| Integration Needed | Details |
|---|
| Mini App Frontend | Available since: TDB |
miniAppSdk.getBankAccountToken()
.then((result) => {
if(result.success) {
console.log('Token code:', result.data?.token);
}
else {
console.log('Error fetching code:', result.error, result.error?.message);
}
});
type BankAccountTokenResponse = {
success: boolean,
error?: string,
data?: {
token: string
}
}
This API can be called by the Mini App backend to obtain the bank account token.
- After you receive a bank account token from Mini App frontend, you use this Token API to request the access token for the user
- This token is required to call API such as reminder API
| Integration Needed | Details |
|---|
| Mini App Backend | Mini App backend will call GoPay backend to fetch bank account tokens. |
| Property | Data type | Required | Description |
|---|
| Request-Id | string | No | This is an identifier that is used for maintaining idempotency |
| Authorization | string | Yes | This is a Basic Auth header. Please use the shared credentials that you received from the team as stated
Format: Basic <credential-received> |
| Property | Data type | Required | Description |
|---|
| account_token | string | Yes | The code obtained using getBankAccountToken() interface |
| Property | Data type | Description |
|---|
| success | boolean | It will be true if API call is successful and false in case of failure |
| error | object | This object will be non null only in case of failures |
| error.code | string | The code of the error |
| error.description | string | The description of the error |
| data | object | The object containing the token and account details |
| data.bank_code | string | Bank code of user's bank account |
| data.bank_account_name | string | Bank account name of user's bank account |
| data.bank_account_number | string | Bank account number of user's bank account |
Success Response:
{
"success": true,
"data": {
"bank_code": "jago",
"bank_account_name": "Rafa refa",
"bank_account_number": "11223344456"
}
}
Error Response: With appropriate HTTP status codes. Only 5xx would be retriable
{
"success": false,
"error": {
"code": 900,
"description": "Token Not Found"
}
}