Faster Payments System (SBP)
Payment flow
The Faster Payments System payment flow contains the following steps:
- You initiate a payment request.
- The system submits a request to the payment method provider. The Faster Payments System generates a QR-code used to complete a payment.
- You get a response and redirect your customer to the received URL.
- Your customer gets the payment QR-code and completes the payment.
- You get a webhook notification about a payment status, if you send
notification_url
in the payment request.
This alternative payment method supports the following operations:
Payment
Request
Send a payment request with the following additional data:
Parameter | Type | Description |
---|---|---|
method | object | A section of the payment method information. |
type required |
string | sbp |
Response
The payment response additionally contains the form
section with the URL of a page with the QR-code. Redirect your customer to the URL received as a value of the form.action
parameter.
Payment status query
Request
To check a status of the payment, send a transaction status query.
Response
The response contains the transaction status, a section of the payment method as well as other details related to the transaction according to the description of a transaction status query.
Refund
Request
To pay money back to the customer, send a refund request with the UID of the payment transaction.
Response
The response contains the status of the refund transaction as well as other relevant transaction details according to the description of a refund transaction.
MT Integration option
Info
This integration option only supports RUB
currency.
Payment
Payment flow
- The customer initiates the payment on the merchant's website.
- The merchant sends the payment request to bePaid.
- bePaid returns a URL to the payment page with SBP QR-code.
- The merchant redirects the customer to the received payment page URL. The default lifespan of the payment link is 15 minutes.
- On desktop: the customer scans the QR-code on the SBP page with the mobile device, selects the bank from the displayed list of the available banks, gets redirected to the corresponding bank application and completes the payment. Alternatively the customer scans the QR-code in their bank application and completes the payment. On mobile: the customer is redirected to the bank selection page to complete the payment.
- bePaid sends a webhook notification to the merchant.
- The merchant displays the payment status to the customer.
Request
Send a payment request with the following additional data:
Parameter | Type | Description |
---|---|---|
request | object | |
return_url * required |
string | A URL to return the customer to when the transaction is completed. |
method | object | A section of the payment method information. |
type * required |
string | sbp |
Request example
{
"request": {
"amount": 100000,
"currency": "RUB",
"description": "description",
"return_url": "https://merchant.ltd/return",
"method": {
"type": "sbp"
}
}
}
Response
Redirect your customer to the URL received as the value of the form.action
parameter.
Response example
{
"transaction": {
"uid": "ff907a25-c194-44bb-b3ec-9a943f89f863",
"type": "payment",
"status": "pending",
"amount": 100000,
"currency": "RUB",
"description": "description",
"created_at": "2024-09-23T13:21:05Z",
"updated_at": "2024-09-23T13:21:06Z",
"method_type": "sbp",
"receipt_url": "https://merchant.bepaid.by/customer/transactions/ff907a25-c194-44bb-b3ec-9a943f89f863/fc6fcec74ae131c4afad01db10a2abd209b91b0b4e54c8af65a38485bbcdd245",
"payment": {
"status": "pending",
"gateway_id": 4497,
"ref_id": "3960848",
"message": "Transaction was initialized."
},
"sbp": {
"type": "sbp"
},
"customer": {
"email": null,
"ip": null
},
"manually_corrected_at": null,
"version": 0,
"message": "Transaction was initialized.",
"test": false,
"additional_data": {
"payment_method": {
"type": "alternative"
}
},
"gateway": {
"iframe": false
},
"form": {
"action": "https://qr.nspk.ru/AD100066PTMO2TOG8S1B64I8GGMR32GR",
"method": "GET",
"fields": []
}
}
}
Refund
Request
For the refund, send a refund request with the UID of the payment transaction. The refund can be executed once for an amount less than or equal to the parent transaction amount.