Authentication

B2BINPAY API authentication guide with API keys, security protocols, and secure integration methods for crypto payment processing

Obtain token

Request

POST [base]/token

Name
Type
Required
Description

client_id

string

Yes

Your API key.

client_secret

string

Yes

Your API secret.

Request example

curl --location '{base_url}/token/' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
  "data": {
    "type": "auth-token",
    "attributes": {
      "client_id": "<Your API key>",
      "client_secret": "<Your API secret>"
    }
  }
}'

Response

Name
Type
Description

access

string

Your access token. It has an expiry time and after expiration should be refreshed by resending the request.

expires_in

number

The lifetime of the token, in seconds.

token_type

string

Always `"Bearer"`.

Response example

{
  "data": {
    "type": "auth-token",
    "id": "0",
    "attributes": {
      "access": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjMy...",
      "expires_in": 3599,
      "token_type": "Bearer"
    }
  }
}

Response codes

HTTP code
Description
Suggested action

200

OK

400

No active account found with the given credentials

Resend the request with the correct credentials.

429

Too many requests

Try again later.

4xx

Incorrect request

Resend the request with the correct parameters.

5хх

Server error

Try again later.

Last updated

Was this helpful?