Recurring payments via FPS
You can make a transaction to bind a payer's account to the FPS for recurring payments with a recurring token.
Transaction scenario
- Create a payment session
session/create
. - Send a payment request using the
session/start/payment
method. Thepayment_options.recurrent
parameter contains thetrue
value. - Wait for a
ready_to_confirm
webhook to confirm the payment withsession/confirm
or cancel the payment withsession/cancel
. - Wait for an
action_required
webhook. Thecustomer_interaction.inform.qr.content
parameter contains a deeplink which you can either display to the customer as QR code in a web browser, or use it to forward the customer to the issuer's mobile application. - Wait for a
payment_finished
webhook containing the transaction result from Bank 131. In case of a successful transaction, the webhook will containsession.status=accepted
andpayments.status=succeeded
along with a recurring token within therecurrent.token
parameter. If the transaction fails, the webhook will containsession.status=cancelled
,payments.status=failed
, and no recurring token.
The payment_finished webhook
- Success
- Failure
{
"type": "payment_finished",
"session": {
"id": "ps_713610",
"status": "accepted",
"created_at": "2024-08-08T08:06:51.841432Z",
"updated_at": "2024-08-08T08:14:56.168219Z",
"acquiring_payments": [
{
"id": "pm_308906",
"status": "succeeded",
"created_at": "2024-08-08T08:06:51.931193Z",
"finished_at": "2024-08-08T08:14:55.996273Z",
"customer": {
"reference": "user123",
"contacts": [
{
"phone": "7123*****45"
}
]
},
"payment_details": {
"type": "faster_payment_system"
},
"recurrent": {
"token": "6a6a29c4193a8e1049231e1497a3c5f180e120b20db81b39f53ec478029b53cf",
"created_at": "2024-08-08T10:10:27+03:00",
"finished_at": "2034-08-08T10:10:27+03:00",
"is_active": true,
"type": "recurrent_token"
},
"amount_details": {
"amount": 1000,
"currency": "RUB"
},
"amounts": {
"net": {
"amount": 1000,
"currency": "RUB"
},
"gross": {
"amount": 1000,
"currency": "RUB"
}
}
}
],
"actions": {
"confirm": "2024-08-08T08:06:52.184593Z",
"capture": "2024-08-08T08:14:55.699095Z"
}
}
}
{
"type": "payment_finished",
"session": {
"id": "ps_109941",
"status": "cancelled",
"created_at": "2022-03-01T11:57:31.652396Z",
"updated_at": "2022-03-01T11:57:31.861329Z",
"payments": [
{
"id": "po_31668",
"status": "failed",
"created_at": "2022-03-01T11:57:31.895773Z",
"finished_at": "2022-03-01T11:57:31.895773Z",
"payment_method": {
"type": "bank_account",
"bank_account": {
"system_type": "faster_payment_system"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"customer": {
"reference": "user123"
}
}
]
}
}