RU

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:

  1. The Customer proceeds to checkout and selects QR code payment.
  2. The Merchant sends a GetQRCode request to obtain a QR code.
  3. 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).
  4. 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 GetState status request and/or from payment gateway notifications).
  5. In the bank's mobile app, the Customer selects QR code payment, scans the QR code, and confirms the payment.
  6. 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:

  1. 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.
  2. Status requests continue until the Charged or Rejected status 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/GetQRCode

Method 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=Value2
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
PaymentKeyPayment terminal name
Provided with the test/production access credentials
String
Mandatory
OrderIdUnique 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
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Digits only, without decimal or other separators
Integer
Mandatory
ChequeFiscal receipt data in JSON format, Base64-encodedString
Optional
Additional parametersAny 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"
}
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
true — the operation succeeded, the QR code was obtained
false — the operation could not be completed
Boolean
Mandatory
ErrCodeError code. See error codesString
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
QRCodeIdQR code ID in SBP
Returned if Success=true
String [1..32]
Mandatory
QRCodePayloadPayment 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 GetQRCodeResult
00Link obtained successfully, successful auto-payment after 5 seconds
01Failed to obtain the link, PROCESSING_TIMEOUT error on GetQRCode
02Failed to obtain the link, PROCESSING_ERROR error on GetQRCode
03Link obtained successfully, successful auto-payment after 60 seconds
04Link obtained successfully, successful auto-payment after 120 seconds
05Link obtained successfully, failed auto-payment with a PROCESSING_ERROR error after 60 seconds
06Link obtained successfully, failed auto-payment with a PROCESSING_ERROR error after 120 seconds

Refund

Last 2 digits of Amount in RefundResult
00Successful refund
01PROCESSING_ERROR error on refund
02PROCESSING_MERCHANT_LIMIT error on refund
03PROCESSING_TIMEOUT error; the refund will not be processed
04PROCESSING_TIMEOUT error, successful refund after 30 seconds
05WRONG_CARD_INFO error on refund

To enable SBP payments in the test environment, contact Payture technical support.