Authentication
Obtain token
API credentials are sent to your e-mail after registration. You can regenerate them anytime in Control panel > API Access.
Request
POST
[base]/token
Name | Type | Required | Description |
---|---|---|---|
| string | Yes | Your API key. |
| string | Yes | Your API secret. |
Request example
Response
Name | Type | Description |
---|---|---|
| string | Your access token. It has an expiry time of about a minute and after expiration should be refreshed. |
| string | |
| string | The date and time of access token expiration. |
| string | The date and time of refresh token expiration. |
| boolean | If 2FA is unavailable for API users. |
| string | The date and time of request receiving. |
| string | The HMAC signature for a response payload authentication. To verify that the refresh token was sent by B2BINPAY, generate an HMAC signature using the |
Response example
Response codes
HTTP code | Application code | Description | Suggested action |
---|---|---|---|
| — | OK | — |
| 2006: No active account found with the given credentials | Incorrect credentials | Send correct credentials. |
| throttled: Request was throttled | Too many requests | Try again later. |
| — | Internal server error | Try again later. |
| — | Bad gateway | Try again later. |
| — | Service unavailable | Try again later. |
| — | Gateway timeout | Try again later. |
| — | Other server errors | Try again later. |
Refresh token
Once you receive a new key pair using your refresh token, the previous refresh token can no longer be used. A refresh token that is found to be invalid while not being expired must be rendered suspicious.
Request
POST
[base]/token/refresh/
Name | Type | Required | Description |
---|---|---|---|
| string | Yes |
Request example
Response
The response body is the same as for Obtain token request, but without meta
fields.
Response body example
Response codes
HTTP code | Application code | Description | Suggested action |
---|---|---|---|
| — | OK | — |
| 2007: No active account found with the given credentials | Incorrect credentials | Send correct credentials. |
| — | Internal server error | Try again later. |
| — | Bad gateway | Try again later. |
| — | Service unavailable | Try again later. |
| — | Gateway timeout | Try again later. |
| — | Other server errors | Try again later. |
Auth verification
Refer to the example below for a sign verification instance.
Last updated