﻿---
name: bank131-payments-via-fps
description: Use when the user asks about accepting payments via the Faster Payments System (FPS, SBP) using a QR code or a deeplink: methods `session/create` and `session/start/payment`, `payment_details` with `type: faster_payment_system` (purpose in `faster_payment_system.description`), `payment_options.return_url`, getting the QR code and deeplink for the customer from `customer_interaction.inform.qr.img` and `customer_interaction.inform.qr.content`, and the payer's masked phone in `contacts.phone`.
---

### How it works

You can accept payments via the Faster Payments System (FPS, SBP). To do this:

1. Open a settlement account in Bank 131.
2. Register in FPS.
3. Place an FPS payment link on your payment page.

Payments via FPS can be accepted:

- with a QR code, if the payment is made in a desktop browser — the QR comes in `customer_interaction.inform.qr.img` from the `action_required` webhook;
- with a deeplink to the issuer's app, if the payment is made from a mobile device — the deeplink comes in `customer_interaction.inform.qr.content` from the `action_required` webhook.

For accepting payment with a QR code, you display the QR code yourself, following the NSPK style guide.

### Payment flow

1. Create a payment session with `session/create`, specifying `faster_payment_system` in `payment_details.type`. Optionally specify the payment purpose in the `description` parameter of the `faster_payment_system` object.
2. Send the payment with `session/start/payment`. In `payment_options.return_url` pass the URL to return to from the issuer's app.
3. Wait for the `ready_to_confirm` webhook to confirm the payment. If everything is fine, send `session/confirm` to confirm the transaction or `session/cancel` to cancel it.
4. Wait for the `action_required` webhook. The `customer_interaction.inform.qr.content` parameter contains the payment deeplink, which you can either show the payer as a QR code or send the payer to the issuer's app by it.
5. Wait for the `payment_finished` webhook with the payment result. The `succeeded` status means the payment was completed successfully. The webhook also contains the payer's masked or full phone number, depending on your payment settings.

### QR code and deeplink

The `action_required` webhook contains the `customer_interaction` object with `type: inform` and the `inform.qr` object:

- `inform.qr.img` — the QR code image, for payments in a desktop browser;
- `inform.qr.content` — the payment deeplink, for payments from a mobile device.

### Payer's phone

After a successful payment, `contacts.phone` contains the payer's masked phone number. If you need to receive the full number, contact your manager in Bank 131.

### Refund

The refund scenario for FPS payments does not differ from the standard one.