# Testing Electronic Payment Instruments
# Introduction
A separate sanbox service is used to test the creation of an electronic payment instrument. Depending on the submitted full name, it creates an electronic payment instrument for successful and unsuccessful transactions.
# Authorization
Domain for testing and sale
https://accounts.mandarinbank.com/
To obtain an access token, you need to issue an OAuth application through the Support Service (you will receive the client_id from them, and the client_secret will be sent to the email address of the user for whom the application was issued).
Token Request
Includes mandatory form-data parameters that are passed in the request body (the application.client_id and application.client_secret parameters are constant for the application and are stored on the client side).
| Parameter | Description | Example |
|---|---|---|
| grant_type | Authorization grant (always equal to client_credentials). | client_credentials |
| client_id | Client ID (equal to the application.client_id value provided by Mandarin). | VvPtlhcyldKtkuoUWY42 pErdrj4er2AwFoBWrn8n |
| client_secret | Client secret key (equal to the application.client_secret value provided by Mandarin). | uQfOIMsltZYL8x3XMqUGP5 iFM59PyFnKlN0UmD3Ihre2 Ry3AGazUAv5jPdUI4dBJqV 0Of6b9GFvWvzGahYnq2aVV xkxn9n4qWF57FP0C01Kp6l EtajhfYv3UZ2f4pAZ7 |
| scope | Requested scopes (access areas): for example, transactions.read - "Read transactions." The delimiter is a space. You can request any list of scopes, and the response will return the list of requested scopes that can be provided for the given application. | transactions.read |
curl --location --request POST 'https://accounts.mandarinbank.com/oauth/token/' \
--form 'grant_type=client_credentials' \
--form 'client_id=VvPtlhcyldKtkuoUWY42pErdrj4er2AwFoBWrn8n' \
--form 'client_secret=uQfOIMsltZYL8x3XMqUGP5iFM59PyFnKlN0UmD3Ihre2Ry3AGazUAv5jP dUI4dBJqV0Of6b9GFvWvzGahYnq2aVVxkxn9n4qWF57FP0C01Kp6lEtajhfYv3UZ2f4pAZ7' \
--form 'scope=transactions.read'
Response
| Parameter | Description | Example |
|---|---|---|
| access_token | Token (access key). | VnuxZiW14mXBedDeZO7d W7GBmzPxMn |
| expires_in | Token expiration date (in seconds). Always 36,000 seconds (10 hours). | 36000 |
| token_type | Token type (always Bearer). | Bearer |
| scope | Allowed scopes: for example, transactions.read - "Read transactions". Separator - space. You can request any list of scopes, and the response will return the list of requested scopes that can be provided for this application. | transactions.read |
{
"access_token": "VnuxZiW14mXBedDeZO7dW7GBmzPxMn",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "transactions.read"
}
Token Usage
Specified in the headers of each request, in the Authorization field, after the reserved word Bearer.
Authorization:Bearer VnuxZiW14mXBedDeZO7dW7GBmzPxMn
# Creating a virtual account (ESP)
Production
https://payment-tokens.mandarin.io/api/v1/tokens/generate
Sandbox
https://sandbox-payment-tokens.mandarin.io/api/v1/tokens/generate
Request
curl --location 'https://payment-tokens.mandarin.io/api/v1/tokens/generate' \
--header 'Mid: 395' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer Token' \
--data-raw '{
"first_name": "Ivan",
"last_name": "Ivanov",
"middle_name": "Ivanovich",
"birth_date": "1990-12-22",
"citizenship": "RU",
"registration_address": "Moscow, Petrovka St., Bldg. 2, Apt. 1",
"living_address": "Moscow, Petrovka St., Bldg. 2, Apt. 1",
"document": {
"document_type": "Passport",
"serial": "1234",
"number": "123456",
"issue_date": "2002-04-24T15:23:14.969Z",
"birth_place": "Moscow",
"issuer": "Fili-Davydkovo District Department of Internal Affairs",
"issue_code": "404-004",
"expiration_date": null
},
"inn": "1234567890",
"snils": "140-120-150 35",
"phones": [
{
"phone": "79004001234",
"type": "Personal"
}
],
"email": "ivanoff@mail.ru",
"phone_check": true,
"terms_agreement": true,
"is_public_official_person": false,
"presence_of_beneficiary": false,
"beneficiary_information": false,
"exist_fatf_government_bills": false,
"affiliation_with_foreign_taxpayers": false
}'
Response in case of a successful request to create a virtual account (ESP) (200 OK)
{
"id": "06dca2f1-4e1c-44e7-8848-3e9e3adba875",
"status": "Processing",
"created_at": "2025-11-21T10:33:27.021823Z",
"processed_at": null,
"finished_at": null
}
PLEASE NOTE!
To successfully create a wallet, you must use the full name Successful Successful Uspekhovich; to unsuccessfully create a wallet, use the full name Unsuccessful Unsuccessful Unsuccessful.