Faster Payments System (SBP)
Payture lets the Customer pay for purchases by QR code via Russia's Faster Payments System (SBP). The list of participating banks is available on the SBP website: sbp.nspk.ru/participants. SBP questions and answers are available here: sbp.nspk.ru/faq.
On the Merchant side
This section describes the scenario in which payment (displaying the QR code) takes place on the Merchant's side.
Making payments
SBP payments are made only using the one-step flow. Funds are debited from one account and credited to another, even if no cards are linked to them.
The payment flow is as follows:
- The Customer proceeds to checkout and selects QR code payment.
- The Merchant sends a GetQRCode request to obtain a QR code.
- The response contains a URL that must be encoded into a QR code (the QR code is valid for 72 hours). On a mobile device, this link can open the banking app directly (if the Customer has a banking app installed that supports QR payments).
- The Merchant displays the QR code and/or the link and waits for the payment result (the payment result can be obtained in two ways: using the standard
GetStatestatus request and/or from payment gateway notifications). - In the bank's mobile app, the Customer selects QR code payment, scans the QR code, and confirms the payment.
- Payture sends the Merchant a notification with the payment result:
- EnginePaySuccess: if the payment succeeds;
- EnginePayFail: if the payment fails or the payment time (72 hours) expires.
Status request recommendations
If the Merchant uses the GetState status request to obtain the payment result, we recommend the following scheme:
- The Merchant starts requesting the status 15 seconds after the QR code is displayed:
- every 3 seconds during the first 30 seconds;
- every 5 seconds during the next 120 seconds;
- at longer intervals after that.
- Status requests continue until the
ChargedorRejectedstatus is received. In this case, the order can have the following statuses:- Pending: awaiting payment by the Customer;
- Charged: the payment succeeded;
- Rejected: the payment failed or the payment time (72 hours) expired.
The GetState method is described in the Payture API, Payture InPay, and Payture eWallet sections.
Refund
Refunds are made with the standard Refund command (see the Payture API, Payture InPay, and Payture eWallet sections).
GetQRCode
https://{Environment}.payture.com/ncapi/GetQRCodeMethod for obtaining a QR code for payment via SBP.
Request
curl https://sandbox3.payture.com/ncapi/GetQRCode \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d PaymentKey=Merchant \
-d OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea \
-d Amount=12480 \
-d AdditionalField1=Value1 \
-d AdditionalField2=Value2Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| PaymentKey | Payment terminal name Provided with the test/production access credentials | String Mandatory |
| OrderId | Unique payment ID in the Merchant's system Recommended format: GUID/UUID or alphanumeric. Other formats may cause failures in banking services. | String [1..50] Mandatory |
| Amount | Payment amount in kopecks (or another minor unit of the terminal currency) Digits only, without decimal or other separators | Integer Mandatory |
| Cheque | Fiscal receipt data in JSON format, Base64-encoded | String Optional |
| Additional parameters | Any additional Merchant parameters There can be multiple additional parameters. Each parameter is passed separately | — Optional |
Response
Returned in JSON.
Response examples
{
"Success": true,
"ErrCode": "NONE",
"OrderId": "ca6db0c6-546e-4a75-a4c1-7ac7e6b428c1",
"QRCodeId": "AD10004QCI3EQ5S19N689BOA45F54714",
"QRCodePayload": "https://qr.nspk.ru/AD10004QCI3EQ5S19N689BOA45F54714?type=02&bank=100000000015&sum=2725&cur=RUB&crc=2D98"
}| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag. Possible values:true — the operation succeeded, the QR code was obtainedfalse — the operation could not be completed | Boolean Mandatory |
| ErrCode | Error code. See error codes | String Mandatory |
| OrderId | Payment ID in the Merchant's system Matches the value passed in the request | String [1..50] Mandatory |
| QRCodeId | QR code ID in SBP Returned if Success=true | String [1..32] Mandatory |
| QRCodePayload | Payment link that must be encoded into a QR code. On mobile devices, the Customer can be redirected directly to this link. In this case, the Customer's mobile device will offer to open the banking app (if the Customer has a banking app installed that supports QR payments). Returned if Success=true | String [1..999] Mandatory |
SBP test scenarios
To test SBP payments, set a specific amount in the Amount parameter of the GetQRCode request, according to the expected scenario.
Payment scenarios
Last 2 digits of Amount in GetQRCode | Result |
|---|---|
00 | Link obtained successfully, successful auto-payment after 5 seconds |
01 | Failed to obtain the link, PROCESSING_TIMEOUT error on GetQRCode |
02 | Failed to obtain the link, PROCESSING_ERROR error on GetQRCode |
03 | Link obtained successfully, successful auto-payment after 60 seconds |
04 | Link obtained successfully, successful auto-payment after 120 seconds |
05 | Link obtained successfully, failed auto-payment with a PROCESSING_ERROR error after 60 seconds |
06 | Link obtained successfully, failed auto-payment with a PROCESSING_ERROR error after 120 seconds |
Refund
Last 2 digits of Amount in Refund | Result |
|---|---|
00 | Successful refund |
01 | PROCESSING_ERROR error on refund |
02 | PROCESSING_MERCHANT_LIMIT error on refund |
03 | PROCESSING_TIMEOUT error; the refund will not be processed |
04 | PROCESSING_TIMEOUT error, successful refund after 30 seconds |
05 | WRONG_CARD_INFO error on refund |
To enable SBP payments in the test environment, contact Payture technical support.
