Pokepay Flutter SDK
API Document reference
Please refer to this document
Install
- In the pubspec.yaml of the project, add the following:
dependencies:
pokepay_sdk: ^YOUR_VERSION
- Then run this
flutter pub get
- Then you can use Pokepay SDK in your project.
Usage
- 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']));
- How to use the client
PokepayAPI(env: APIEnv.YOUR_ENV,accessToken: YOUR_ACCESS_TOKEN,);
- 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
- bank_api/account
- bank_api/bill
- bank_api/cashtray
- bank_api/check
- bank_api/cpm_token
- bank_api/credit_card
- bank_api/private_money
- bank_api/terminal
- bank_api/transaction
- bank_api/user
- custom_datetime_converter
- messaging_api/message
- o_auth_api/o_auth
- parameters/gender
- parameters/product
- parameters/transaction_strategy
- pokepay_sdk
- responses
- responses/access_token
- responses/account
- responses/account_balance
- responses/account_campaign_point_amounts
- responses/account_cpm_token
- responses/bank_error
- responses/bankpay
- responses/bankpay_redirect_url
- responses/bill
- responses/cashtray
- responses/cashtray_attempt
- responses/cashtray_attempts
- responses/check
- responses/coupon
- responses/coupon_detail
- responses/credit_card
- responses/error
- responses/identification_match
- responses/identification_result
- responses/images
- responses/jwt_result
- responses/message
- responses/message_attachment
- responses/message_unread_count
- responses/no_content
- responses/o_auth_error
- responses/organization
- responses/paginated_account_balances
- responses/paginated_accounts
- responses/paginated_coupons
- responses/paginated_credit_cards
- responses/paginated_messages
- responses/paginated_private_moneys
- responses/paginated_transactions
- responses/paginated_transfers
- responses/private_money
- responses/server_key
- responses/terminal
- responses/token_info
- responses/user
- responses/user_transaction
- responses/user_transfer
- responses/user_with_auth_factors
- responses/veritrans_token
- veritrans_api/veritrans