Pokepay Flutter SDK

API Document reference

Please refer to this document

Install

  1. In the pubspec.yaml of the project, add the following:
 dependencies:
    pokepay_flutter_sdk: ^YOUR_VERSION
  1. Then run this
flutter pub get
  1. Then you can use Pokepay SDK in your project.

Usage

  1. How to use OAthClient with FLutterWebAuth
PokepayOAuthClient oauthClient = PokepayOAuthClient(clientId: YOUR_CLIENT_ID,clientSecret: YOUR_CLIENT_SCRET, env: APIEnv.DEVELOPMENT);
String authUrl = oauthClient.getAuthorizationUrl();
String result = await FlutterWebAuth.authenticate(url: authUrl, callbackUrlScheme: 'pocketchange'));
AccessToken accessToken = await oauthClient.getAccessToken(Uri.parse(result).queryParameters['code']));
  1. How to use the client
PokepayAPI(env: APIEnv.YOUR_ENV,accessToken: YOUR_ACCESS_TOKEN,);
  1. Call API, for example, create account
PokepayAPI api = PokepayAPI(env: APIEnv.YOUR_ENV,accessToken: YOUR_ACCESS_TOKEN,);
Account createdAccount = await api.createAccount(name:your_wallet_name, privateMoneyId: your_private_money_id);

Libraries

access_token
account
account
account_balance
account_cpm_token
bank_error
bill
bill
cashtray
cashtray
cashtray_attempt
cashtray_attempts
check
check
coupon
coupon_detail
cpm_token
custom_datetime_converter
error
images
jwt_result
message
message
message_attachment
message_unread_count
no_content
o_auth
o_auth_error
organization
paginated_account_balances
paginated_accounts
paginated_coupons
paginated_messages
paginated_private_moneys
paginated_transactions
pokepay_sdk
private_money
private_money
product
responses
server_key
terminal
terminal
token_info
transaction
user
user
user_transaction