General information
If you were looking for an old version of the API, it is available at HTTP-protocol.
Interaction is carried out via HTTPS using GET/POST/PUT methods. The API uses the REST architecture:
- POST and PUT requests use JSON arguments;
- GET requests work with query strings;
- The API always returns a response in JSON format, regardless of the type of the request;
Request headers:
curl --request POST 'https://paymaster.ru/api/v2/invoices' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'
-
Content-type: application/json
is transmitted in the headers of all requests and responses; -
Authorization: Bearer {token}
is transmitted in the headers of all requests; -
Idempotency-Key: {key_value}
- request id (idempotency key);
In case of an error, the response contains code and the reason (code, message), and the answer may also contain sections with additional details.
An example of an error response:
{
"code": "validation_error",
"message": "One or many validation errors. See 'errors' list.",
"errors": [
"Specify required MerchantId value."
]
}
In requests, mandatory parameters are highlighted in bold.
Request authentication
Requests must be transmitted via a secure protocol (https). Base service address: https://paymaster.ru
The following methods of request authentication are supported:
- Bearer: The token for the site can be generated in the Merchant's Personal Account. Must add to the
Authorization
header of each request.
Data types
The following data types are used in the requests:
- Strings (
string
) - Numbers with a fractional part (
numeric
) - Dates (
date
).ISO 8601
format is used for the information transmission in the requests.
A three-letter code according to ISO 4217
is used to encode currencies.
Working with lists
Loading lists (payments, refunds, etc.) is made page by page: if there is a pointer to the next page (cursor) in the response, you must request the next part of data. To do this, repeat the request and add a cursor value to the list of parameters.
Payments
Payment link
POST /api/v2/invoices
Request example:
curl --request POST 'https://paymaster.ru/api/v2/invoices' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "cf128151-127b-44ed-bde5-26c531cad20d",
"invoice": {
"description": "test payment",
"params": {
"BT_USR": "34"
}
},
"amount": {
"value": 10.50,
"currency": "RUB"
},
"paymentMethod": "BankCard"
}'
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
dualMode | bool | DMS payments flag (false by default) |
testMode | bool | Test payments flag (false by default) |
tokenization | Tokenization details | |
type | string | Token type (cof / recurring ) |
purpose | string | Subscription purpose |
callbackUrl | string | Url to notify for token changes |
invoice | Invoice details | |
description | string | Payments description |
orderNo | string | Order number in the merchant system |
expires | date | Invoice expiration date |
params | Additional parameters | |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
paymentMethod | string | Payment method |
protocol | Protocol parameters | |
returnUrl | string | User is redirected to this web page after the payment |
callbackUrl | string | Url for payment notification |
customer | Customer data | |
string | ||
phone | string | phone (E.164 formatted w/o + sign) |
ip | string | IP address |
account | string | Customer account |
receipt | Receipt details | |
client | Client details | |
items | Items list |
Response example:
{
"paymentId": "12769",
"url": "https://paymaster.ru/cpay/a62beecb68c84778b2424294f635b370"
}
Response:
Parameter | Type | Description |
paymentId | string | Payment identification |
url | string | Payment page url, where the user should be redirected for making a payment |
Creating a payment
POST /api/v2/payments
Request example:
curl --request POST 'https://paymaster.ru/api/v2/payments' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "cf128151-127b-44ed-bde5-26c531cad20d",
"invoice": {
"description": "test payment",
"params": {
"BT_USR": "34"
}
},
"amount": {
"value": 10.50,
"currency": "RUB"
},
"paymentData": {
"paymentMethod": "BankCard",
"card": {
"pan": "4**********0540",
"expiry": "10/22",
"cvc": "***"
}
}
}'
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
dualMode | bool | DMS payments flag (false by default) |
testMode | bool | Test payments flag (false by default) |
tokenization | Tokenization details | |
type | string | Token type (cof / recurring ) |
purpose | string | Subscription purpose |
callbackUrl | string | Url to notify for token changes |
invoice | Invoice details | |
description | string | Payments description |
orderNo | string | Order number in the merchant system |
expires | date | Invoice expiration date |
params | Additional parameters | |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
paymentData | Payment data | |
paymentMethod | string | Payment method |
card | Card details | |
pan | string | Card number |
expiry | string | Expiry date |
cvc | string | CVV/CVC2 |
dsrp | ||
type | string | Type (ApplePay / GooglePay ) |
cryptogram | string | Cryptogram |
eci | string | ECI |
authorizationCode | string | Payment authorization code |
account | string | Login/account |
phone | string | Phone number |
token | Payment token | |
id | string | Token identification |
stickerId | string | Sticker id (cashlink payment) |
protocol | Protocol parameters | |
returnUrl | string | User is redirected to this web page after the payment |
callbackUrl | string | Url for payment notification |
threeDSCompleteUrl | string | threeDSCompleteUrl using the scenario 3DSecure Challenge Flow |
customer | Customer data | |
string | ||
phone | string | phone |
ip | string | IP address |
account | string | Customer account |
device | User device details | |
language | string | Language |
acceptHeader | string | Accept header definition |
userAgent | string | UserAgent header definition |
colorDepth | string | Color depth on bits |
screenHeight | string | Screen height in pixels |
screenWidth | string | Screen width in pixels |
utcOffsetMinutes | string | UTC offset in minutes |
receipt | Receipt details | |
client | Client details | |
items | Items list |
Parameters for making a payment depend on the payment method chosen.
Response example:
{
"id": "12769",
"created":"2021-09-01T08:20:00Z",
"testMode": false,
"status": "Confirmation",
"resultCode": "Success",
"merchantId": "96e809e9-8bce-40fd-86cb-d34db39b4668",
"amount": {
"value": 10.5000,
"currency": "RUB"
},
"invoice": {
"description": "test payment",
"params": {
"BT_USR": "34"
}
},
"paymentData": {
"paymentMethod": "BankCard"
},
"confirmation": {
"type": "ThreeDSv1",
"acsUrl": "https://paymaster.ru/acs/pareq",
"PAReq": "eJxVUtuO0...v4BOrji7g=="
}
}
Response
Parameter | Type | Description |
id | string | Payment identification |
created | date | Payment date |
testMode | bool | Test payments flag |
status | string | Payment status |
resultCode | string | Result code |
message | string | Authorization result description |
merchantId | string | Merchant identification |
invoice | Invoice details | |
description | string | Payments description |
orderNo | string | Order number in the merchant system |
expires | date | Invoice expiration date |
params | Additional parameters | |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
customer | Customer data | |
ip | string | IP address |
paymentData | Payment data | |
paymentMethod | string | Payment method |
paymentInstrumentTitle | string | Payment instrument title |
agreement | string | Agreement reference code |
cardInfo | Card BIN details | |
brand | string | Card brand name |
issuer | string | Issuer bank name |
country | string | Country ISO-code |
type | string | Card type (credit, debit) |
category | string | Card category (gold, classic) |
confirmation | Payment confirmation method | |
type | string | Confirmation type |
*** | Confirmation parameters | |
paymentToken | Payment token data | |
id | string | Token ID |
expires | date | Token expiration date |
title | string | Description to be displayed |
Additional confirmation (or several confirmations) may be required during the payment process.
Payment confirmation in the external system
Parameter | Type | Description |
type | string | Confirmation type External |
paymentUrl | string | Payment confirmation address to redirect the user |
universalLink | bool | Payment link attribute |
instruction | string | Payment instruction |
Payment confirmation with a one-time code
Parameter | Type | Description |
type | string | Confirmation type SmsOtp |
maskedPhone | string | Telephone number that receives the confirmation code |
3DS Method scenario
Parameter | Type | Description |
type | string | Confirmation type ThreeDSMethod |
methodUrl | string | ACS page address to pass the scenario |
transactionId | string | Transaction authentication ID |
3DS Challenge Flow scenario
Parameter | Type | Description |
type | string | Confirmation type ThreeDSChallenge |
acsUrl | string | ACS page address to pass the scenario |
creq | string | Challenge request |
3DS v1 scenario
Parameter | Type | Description |
type | string | Confirmation type ThreeDSv1 |
acsUrl | string | ACS page address to pass the scenario |
PAReq | string | Payer Authentication request |
Payment completion
PUT /api/v2/payments/{id}/complete
Request example:
curl --request PUT 'https://paymaster.ru/api/v2/payments/12769/complete' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Content-Type: application/json' \
--data-raw '{
"PARes": "eJx7v3u...IxsAwA="
}'
Request:
Parameter | Type | Description |
id | string | Payment identification |
code | string | Confirmation code |
threeDSCompInd | string | 3DS Method complete indicator |
cres | string | Challenge response |
PARes | string | Payer Authentication response |
In response service returns the payment details.
Payment capture
PUT /api/v2/payments/{id}/confirm
Request example:
curl --request PUT 'https://paymaster.ru/api/v2/payments/12769/confirm' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": {
"value": 10.50,
"currency": "RUB"
}
}'
Request:
Parameter | Type | Description |
id | string | Payment identification |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
receipt | Receipt details | |
client | Client details | |
items | Items list |
If the request is successful, the service returns an empty response with HTTP status 200.
Payment cancellation
PUT /api/v2/payments/{id}/cancel
Request example:
curl --request PUT 'https://paymaster.ru/api/v2/payments/12769/cancel' \
--header 'Authorization: Bearer QdvdwiXKFm='
If the request is successful, the service returns an empty response with HTTP status 200.
Getting payment details
GET /api/v2/payments/{id}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/payments/12769' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
id | string | Payment identification |
The service returns payment details in the response.
List of payments
GET /api/v2/payments?merchantId={merchantId}&start={start}&end={end}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/payments?merchantId=cf128151-127b-44ed-bde5-26c531cad20d&start=2021-08-01T06:00:00Z&end=2021-08-01T06:30:00Z' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
start | date | Period starts |
end | date | Period ends |
Response example:
{
"items": [
{
"id": "9755",
"status": "Settled",
"created":"2021-08-01T06:15:00Z",
"merchantId": "96e809e9-8bce-40fd-86cb-d34db39b4668",
"amount": {
"value": 10.0000,
"currency": "RUB"
},
"invoice": {
"description": "test"
},
"paymentData": {
"paymentMethod": "BankCard",
"paymentInstrumentTitle": "410000XXXXXXX0000"
}
}
]
}
Response:
Parameter | Type | Description |
id | string | Payment identification |
created | date | Payment date |
status | string | Payment status |
merchantId | string | Merchant identification |
invoice | Invoice details | |
description | string | Payment description |
orderNo | string | Order number in the merchant system |
expires | date | Invoice expiration date |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
paymentData | Payment data | |
paymentMethod | string | Payment method |
paymentInstrumentTitle | string | Payment instrument title |
Refunds
Creating a refund
POST /api/v2/refunds
Request example:
curl --request POST 'https://paymaster.ru/api/v2/refunds' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"paymentId": "12870",
"amount": {
"value": 5.5,
"currency": "RUB"
}
}'
Request:
Parameter | Type | Description |
paymentId | string | Payment identification |
amount | Refund amount | |
value | decimal | Refund amount value |
currency | string | Currency code |
receipt | Receipt details | |
client | Client details | |
items | Items list |
Response example:
{
"id": "1276",
"created": "2021-10-01T06:23:02.273Z",
"status": "Pending",
"paymentId": "12870",
"amount": {
"value": 5.5,
"currency": "RUB"
}
}
Response
Parameter | Type | Description |
id | string | Refund identification |
created | date | Refund date |
paymentId | string | Payment identification |
amount | Refund amount | |
value | decimal | Refund amount value |
currency | string | Currency code |
status | string | Refund status |
resultCode | string | Result code |
Refund details
GET /api/v2/refunds/{id}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/refunds/1276' \
--header 'Authorization: Bearer QdvdwiXKFm='
Request:
Parameter | Type | Description |
id | string | Refund identification |
The service returns the refund details in the response.
List of refunds
GET /api/v2/refunds?merchantId={merchantId}&start={start}&end={end}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/refunds?merchantId=cf128151-127b-44ed-bde5-26c531cad20d&start=2021-08-01T06:00:00Z&end=2021-08-01T06:30:00Z' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
start | date | Period starts |
end | date | Period ends |
Response example:
{
"items": [
{
"id": "1276",
"created": "2021-10-01T06:23:02.273Z",
"status": "Pending",
"paymentId": "12870",
"amount": {
"value": 5.5,
"currency": "RUB"
}
}
]
}
Response:
Parameter | Type | Description |
id | string | Refund identification |
created | date | Refund date |
paymentId | string | Payment identification |
amount | Refund amount | |
value | decimal | Refund amount value |
currency | string | Currency code |
status | string | Refund status |
Payment tokens
Tokenization link
POST /api/v2/tokenization
Request example:
curl --request POST 'https://paymaster.ru/api/v2/tokenization' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "cf128151-127b-44ed-bde5-26c531cad20d",
"type": "recurring",
"purpose": "Test subscription"
"paymentMethod": "bankcard",
"customer": {
"account": "47733000003"
}
}'
Request:
Parameter | Type | Description |
merchantId | string | Merchant ID |
testMode | bool | Test mode flag (false by default) |
type | string | Token type (recurring ) |
purpose | string | Subscription description |
paymentMethod | string | Payment method |
callbackUrl | string | Token status notification url |
returnUrl | string | Url for customer return page |
customer | Customer data | |
account | string | Customer account in merchant's system |
string | Customer e-mail |
Response example:
{
"tokenId": "8cd9991b47ab42018f0bb56ca0fbdba0",
"url": "https://paymaster.ru/cpay/tokenization/f3da06b158924a6c8da280a8b49c2996"
}
Response:
Parameter | Type | Description |
tokenId | string | Token ID |
url | string | Tokenization url for customer to complete scenario |
Create token request
POST /api/v2/paymenttokens
Request example:
curl --request POST 'https://paymaster.ru/api/v2/paymenttokens' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "cf128151-127b-44ed-bde5-26c531cad20d",
"type": "recurring",
"purpose": "Test subscription"
"paymentData": {
"paymentMethod": "sbp"
},
"customer": {
"account": "47733000003"
}
}'
Request:
Parameter | Type | Description |
merchantId | string | Merchant ID |
testMode | bool | Test mode flag (false by default) |
type | string | Token type (recurring ) |
purpose | string | Subscription description |
paymentData | Payment data | |
paymentMethod | string | Payment method |
protocol | Protocol parameters | |
returnUrl | string | Url for customer return page |
callbackUrl | string | Token status notification url |
threeDSCompleteUrl | string | threeDSCompleteUrl for 3DSecure Challenge Flow |
customer | Customer data | |
account | string | Customer account in merchant's system |
string | Customer e-mail |
Response example:
{
"id": "8cd9991b47ab42018f0bb56ca0fbdba0",
"status": "Created",
"confirmation": {
"type": "External",
"universalLink": true,
"paymentUrl": "https://paymaster.ru/cpay/mock/sbp/subscription/8cd9991b47ab42018f0bb56ca0fbdba0"
}
}
Response
Parameter | Type | Description |
id | string | Token identifier |
status | string | Token status (Active / Revoked ) |
title | string | Display name |
expires | date | Token expire date |
cardInfo | Card BIN details | |
brand | string | Card brand name |
issuer | string | Issuer bank name |
country | string | Country ISO-code |
type | string | Card type (credit, debit) |
category | string | Card category (gold, classic) |
confirmation | Additional confirmation | |
type | string | Confirmation type |
*** | Confirmation parameters |
Additional confirmation (or several confirmations) may be required during the process.
Confirmation in the external system
Parameter | Type | Description |
type | string | Confirmation type External |
paymentUrl | string | Confirmation address to redirect the user |
universalLink | bool | Payment link attribute |
instruction | string | Payment instruction |
Token details
GET /api/v2/paymenttokens/{id}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/paymenttokens/8cd9991b47ab42018f0bb56ca0fbdba0' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
id | string | Token identifier |
In response service returns the token details.
Token revocation
PUT /api/v2/paymenttokens/{id}/revoke
Request example:
curl --request PUT 'https://paymaster.ru/api/v2/paymenttokens/8cd9991b47ab42018f0bb56ca0fbdba0/revoke' \
--header 'Authorization: Bearer QdvdwiXKFm='
Request:
Parameter | Type | Description |
id | string | Token identifier |
HTTP 200 status shows the successful completion of the request.
Receipts
Creating a receipt
POST /api/v2/receipts
Request example:
curl --request POST 'https://paymaster.ru/api/v2/receipts' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"paymentId": "13167",
"amount": {
"value": 10,
"currency": "RUB"
},
"type": "Payment",
"client": {
"email": "customer@gmail.com"
},
"items": [{
"name": "Apples",
"quantity": 1,
"price": 10,
"vatType": "Vat120",
"paymentSubject": "Commodity",
"paymentMethod": "FullPrepayment"
}
]
}'
Request
Parameter | Type | Description |
paymentId | string | Payment identification |
amount | Receipt amount | |
value | decimal | Amount value |
currency | string | Currency code |
type | string | Receipt type |
client | Client details | |
string | Client e-mail | |
phone | string | Client telephone |
name | string | Company name |
inn | string | Company TIN |
items | Items list | |
name | string | Name |
quantity | decimal | Quantity |
price | decimal | Price |
measure | string | Product measure |
excise | decimal | Excise |
product | ||
country | string | Country origin code |
declaration | string | Tax declaration number |
vatType | string | VAT type |
paymentSubject | string | Payment subject |
paymentMethod | string | Payment method |
marking | Marking details | |
code | string | Product code |
quantity | Fractional quantity data | |
numerator | int | Numerator |
denominator | int | Denominator |
agentType | string | Agent type |
supplier | Supplier details | |
name | string | Supplier name |
inn | string | Supplier TIN |
phone | string | Supplier telephone |
Response example:
{
"id": "1860",
"created": "2021-11-02T09:54:35.45Z",
"paymentId": "13167",
"amount": {
"value": 10.0,
"currency": "RUB"
},
"type": "Payment",
"status": "Pending"
}
Response
Parameter | Type | Description |
id | string | Receipt identification |
created | date | Creation date |
paymentId | string | Payment identification |
amount | Receipt amount | |
value | decimal | Amount value |
currency | string | Currency code |
type | string | Receipt type |
status | string | Receipt registration status |
providerOperationId | string | Provider's operation id |
fiscalData | Fiscal data | |
fiscalDeviceId | string | Fiscal device serial number |
shiftNumber | string | Shift number |
receiptNumber | string | Receipt number |
documentId | string | Fiscal document id |
fiscalAttribute | string | Fiscal attribute |
timestamp | date | Receipt registration data |
Getting receipt details
GET /api/v2/receipts/{id}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/receipts/1860' \
--header 'Authorization: Bearer QdvdwiXKFm='
Request:
Parameter | Type | Description |
id | string | Receipt identification |
The service returns receipt details in the response.
Список чеков
GET /api/v2/receipts?paymentId={paymentId}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/receipts?paymentId=22504' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
paymentId | string | Payment id |
The response will contain the list of receipt details
Stickers
Sticker registration
POST /api/v2/stickers
Request example:
curl --request POST 'https://paymaster.ru/api/v2/stickers' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Idempotency-Key: 86cf125c' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "cf128151-127b-44ed-bde5-26c531cad20d",
"stickerType": "Sbp",
"productCode": "product-1234",
"paymentPurpose": "Payment for the product",
"description": "Product #1234",
"amount": {
"value": 39.90,
"currency": "RUB"
}
}'
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
stickerType | string | Sticker type (example, Sbp) |
cashlink | bool | Cashlink mode |
description | string | Sticker description |
productCode | string | Product code |
paymentPurpose | string | Payment purpose |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
callbackUrl | string | Url for payment notification |
Response example:
{
"id": "24cc565dea08",
"stickerType": "Sbp",
"productCode": "product-1234",
"paymentPurpose": "Payment for the product",
"description": "Product #1234",
"amount": {
"value": 39.90,
"currency": "RUB"
},
"status": "Active",
"payload": "https://qr.nspk.ru/AS****G0?type=01&sum=3990&cur=RUB&crc=ZZZZ"
}
Response
Parameter | Type | Description |
id | string | Sticker identification |
stickerType | string | Sticker type |
cashlink | bool | Cashlink mode |
productCode | string | Product code |
paymentPurpose | string | Payment purpose |
description | string | Sticker description |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
status | string | Sticker status |
payload | string | Content (payment link) |
Sticker activation / deactivation
PUT /api/v2/stickers/{id}
Request example:
curl --request PUT 'https://paymaster.ru/api/v2/stickers/24cc565dea08' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
--header 'Content-Type: application/json' \
--data-raw '{
"active": true
}'
Request:
Parameter | Type | Description |
id | string | Sticker identification |
active | bool | Sticker status |
HTTP 200 status shows the successful completion of the request.
Getting sticker details
GET /api/v2/stickers/{id}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/stickers/24cc565dea08' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
id | string | Sticker identification |
The service returns sticker details in the response.
List of stickers
GET /api/v2/stickers?merchantId={merchantId}
Request example:
curl --request GET 'https://paymaster.ru/api/v2/stickers?merchantId=cf128151-127b-44ed-bde5-26c531cad20d' \
--header 'Authorization: Bearer QdvdwiXKFm=' \
Request:
Parameter | Type | Description |
merchantId | string | Merchant identification |
Response example:
{
"items": [
{
"id": "24cc565dea08",
"stickerType": "Sbp",
"productCode": "product-1234",
"paymentPurpose": "Payment for the product",
"description": "Product #1234",
"amount": {
"value": 39.90,
"currency": "RUB"
},
"status": "Active",
"payload": "https://qr.nspk.ru/AS****G0?type=01&sum=3990&cur=RUB&crc=ZZZZ"
}
]
}
Ответ:
Parameter | Type | Description |
items | array | List of stickers |
Notifications
Payment status
POST {callbackUrl}
Request example:
curl --request POST 'https://merchant-site.com/payments/result' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "12769",
"created":"2021-09-01T08:20:00Z",
"testMode": false,
"status": "Settled",
"merchantId": "96e809e9-8bce-40fd-86cb-d34db39b4668",
"amount": {
"value": 10.5000,
"currency": "RUB"
},
"invoice": {
"description": "test payment",
"params": {
"BT_USR": "34"
}
},
"paymentData": {
"paymentMethod": "BankCard",
"paymentInstrumentTitle": "410000XXXXXXX0000"
}
}'
Request:
Parameter | Type | Description |
id | string | Payment identification |
created | date | Payment date |
testMode | bool | Test payments flag |
status | string | Payment status |
merchantId | string | Merchant identification |
invoice | Invoice details | |
description | string | Payments description |
orderNo | string | Order number in the merchant system |
expires | date | Invoice expiration date |
params | Additional parameters | |
amount | Amount | |
value | decimal | Amount to pay |
currency | string | Currency code |
paymentData | Payment data | |
paymentMethod | string | Payment method |
paymentInstrumentTitle | string | Payment instrument title |
Payment token status
POST {callbackUrl}
Request example:
curl --request POST 'https://merchant-site.com/tokens/result' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "8cd9991b47ab42018f0bb56ca0fbdba0",
"status": "Active",
"title": "410000XXXXXX0001",
"expires": "2022-10-31T23:59:59Z"
}'
Request:
Parameter | Type | Description |
id | string | Token identifier |
status | string | Token status (Active / Revoked ) |
title | string | Display name |
expires | date | Token expire date |
Payment methods
Alias | Name |
bankcard | Bank card |
sbp | Quick payment system |
qiwi | QIWI |
Codes and dictionaries
Error codes
Code | Description |
validation_error | Incorrect request format |
not_authorized | Not enough user rights for the operation |
idempotency_key_violation | Idempotency key violation |
invalid_operation | Request is rejected |
payment_token_revoked | Payment token is revoked |
payment_token_blocked | Payment token is locked out |
Payment status
Code | Description |
Authorized | Payment is authorized |
Settled | Payment is settled |
Cancelled | Payment is cancelled |
Rejected | Payment is rejected |
Confirmation | Additional confirmation is required |
Pending | Payment is pending |
Refund status
Code | Description |
Success | Refund is successful |
Rejected | Refund is rejected |
Pending | Refund is pending |
Authorization code
Code | Description |
TransactionDeclined | Transaction authorization is declined |
IssuerUnavailable | Issuer is not available |
RejectedByFraud | Rejected by fraud monitoring |
InvalidAmount | Invalid amount |
InvalidAccount | Incorrect card number / card does not exist |
BlockedAccount | Card is blocked (lost) |
OperationNotAllowed | Operation is not allowed |
InsufficientFunds | Insufficient funds |
ExpiredAccount | Expired card date / incorrect card date |
PaymentLimitExceeded | Payment limit exceeded |
PaymentCountExceeded | Payment count exceeded |
CardNotEnrolled | Card is not enrolled for 3DS |
ThreeDSecureFailed | 3DS authentication is not passed |
CancelledByUser | User cancelled the payment |
PaymentExpired | Payment expired |
Receipt registration status
Code | Description |
Success | Receipt is registered successfully |
Rejected | Receipt is rejected for registration |
Cancelled | Receipt registration is cancelled |
Pending | Receipt registration is pending |
Receipt type
Code | Description |
Payment | Payment |
Refund | Payment refund |
VAT type
Code | Description |
None | No VAT |
Vat0 | VAT 0% |
Vat5 | VAT 5% |
Vat7 | VAT 7% |
Vat10 | VAT 10% |
Vat20 | VAT 20% |
Vat105 | VAT formula 5/105 |
Vat107 | VAT formula 7/107 |
Vat110 | VAT formula 10/110 |
Vat120 | VAT formula 20/120 |
Agent type
Code | Description |
BankPaymentAgent | Bank payment agent |
BankPaymentSubagent | Bank payment subagent |
PaymentAgent | Payment agent |
PaymentSubagent | Payment subagent |
Attorney | Attorney |
Commissioner | Commissioner |
Agent | Agent |
Types of goods/services
Code | Description |
Commodity | Commodity |
Excise | Excise |
Job | Job |
Service | Service |
Gambling | Gambling |
Lottery | Lottery |
IntellectualActivity | Intellectual activity |
Payment | Payment |
AgentFee | Agent fee |
PropertyRights | Property rights |
NonOperatingIncome | Non operating income |
InsurancePayment | Insurance payment |
SalesTax | Sales tax |
ResortFee | Resort fee |
Other | Other |
Payment type
Code | Description |
FullPrepayment | Full prepayment |
PartialPrepayment | Partial prepayment |
Advance | Advance |
FullPayment | Full payment |
PartialPayment | Partial payment |
Credit | Credit |
Measure
Code | Description |
Piece | Piece |
Gram | Gram |
Kilogram | Kilogram |
Tonne | Tonne |
Centimeter | Centimeter |
Decimeter | Decimeter |
Meter | Meter |
SquareCentimeter | Square Centimeter |
SquareDecimeter | Square Decimeter |
SquareMeter | Square Meter |
Millilitre | Millilitre |
Litre | Litre |
QubicMeter | Qubic Meter |
KilowattHour | Kilowatt * Hour |
Gigacal | Gigacalorie |
Day | Day |
Hour | Hour |
Minute | Minute |
Second | Second |
Kilobyte | Kilobyte |
Megabyte | Megabyte |
Gigabyte | Gigabyte |
Terabyte | Terabyte |
Other | Other |