How you can perform payments
- with later or immediate capture;
- through the payment form (if you do not have PCI DSS);
- with open parameters (if you have PCI DSS).
The payment session
All API operations are carried out within a payment session:
PaymentSession. One payment
session can include several operations: for example, you can accept and
then refund a payment.
You can perform payments in two ways: initiate the payment when you
start the session (as a single request,
create a session and only then perform the payment (by making two
e.g. to call the payment form widget or just to obtain the session
identifier and use it to monitor what is happening with the payment.
Main payment scenario
- You create a payment session:
- separately from the payment itself
session/create), which is mandatory if you are going to perform the payment using the payment form widget;
- or simultaneously with the payment
These steps are necessary only when paying with the widget
- You show the widget to the user and obtain their card details.
- If you are not using the widget and have created the session
separately from the start of the payment, you need to send the
- Bank 131 sends you the
ready_to_confirmwebhook, which means that the Bank is ready to make the payment and is waiting for your confirmation.
- You confirm
confirm_request) or cancel (
These steps are necessary only when paying without the widget
- If you are making a payment without a payment form, Bank 131 sends
action_requiredwebhook. This means that you will need to take additional action to perform the payment. For instance, the user might need to go through 3-D Secure.
- Redirect the user to the address for payment confirmation (3-D Secure).
These steps are only needed for the capture later payment flow.
When you go with the capture later flow, the user payment amount is blocked on their bank card and is captured only on your command. If you do not want to capture later, you may ignore these steps. To enable the capture later flow, please talk to your Bank 131 manager.
- Bank 131 sends you the
payment_finishedwebhook containing the result of the payment. If the status is
succeeded, this tells you that the payment was successful.
The status of the payment is returned in the
status field of the
AcquiringPayment object. To query it, wait for a webhook from Bank 131
or send a
with the identifier of the session containing this payment.
Possible payment statuses
in_progress— the payment is being processed;
pending— the payment is waiting to be confirmed;
succeeded— the payment has completed successfully;
failed— an error occured while processing the payment.