Authorization
Every API request must carry an authorization token.
The token format depends on the billing version and the API you use.
Example of a v3 token: b37c4c689295904ed21eee5d9a48d42e
Example of an l3 token: 29078-API:b37c4c689295904ed21eee5d9a48d42e
Important
For checking the integration and running test payments, use the demo credentials:
Token: b37c4c689295904ed21eee5d9a48d42e
Merchant id: ffffffff-ffff-ffff-ffff-ffffffffffff
Warning
Keep the authorization token in a secure place. Do not store it in publicly accessible locations and do not share it with third parties. If you suspect the token has been exposed, change it in the merchant office immediately or contact support.
To check that authorization works and the token is valid, call:
HTTP
GET /v3/security/api/auth/auth
Accept: application/json
User-Agent: MyApp 1.0
Authorization: Bearer b37c4c689295904ed21eee5d9a48d42e
CURL
curl -L -X GET '{baseUrl}/v3/security/api/auth/auth' \
-H 'Accept: application/json' \
-H 'User-Agent: MyApp 1.0' \
-H 'Authorization: Bearer b37c4c689295904ed21eee5d9a48d42e'
{baseUrl} — the base URL
With a valid token the response is 200 OK and contains the user id.
Example response
{
"data": {
"userId": "01771533-8e75-3234-8e3d-9213ae2d7c52",
"profile": null,
"accessToken": null
},
"extendedData": []
}
With an invalid token the response is 401 Unauthorized and contains an error.
Example response
{
"error": {
"message": "Unauthorized",
"code": "unauthorized"
}
}
With no token at all the response is 200 OK and describes an anonymous user — worth remembering:
a missing token does not look like an error.
Example response
{
"data": {
"userId": null,
"profile": null,
"accessToken": null
},
"extendedData": []
}