Skip to main content

Single-request payout

You can create a payout and send it with a single request, without any intermediate steps.

You should consider this option if you are sending money:

  • to a bank account
  • to a bank card if you have PCI DSS

How to enable

Inform your Bank 131 manager that you want to use this option. Then all your payouts will be performed using this method.

How to send a payout

Use the session/init/payout request.

  • In the type parameter of the payment_method object, pass bank_account.
  • In the ru object, pass the bank's BIC, the account number, the recipient's full name, and the purpose of the payout.

View the parameters for payouts to accounts

Request example: payout to an account
curl -X POST \
https://demo.bank131.ru/api/v1/session/init/payout \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-d '{
"payment_method": {
"type": "bank_account",
"bank_account": {
"system_type": "ru",
"ru": {
"bik": "044525971",
"account": "40817810100000270411",
"full_name": "Ivanov Ivan Ivanovich",
"description": "Wire for agreement № 5015553111 Ivanov Ivan Ivanovich VAT exempt"
}
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"metadata": "good"
}'

How to check the result

Wait for a payment_finished webhook or query the payout's status using the session/status method.

The result of the payout can be found in the payment.status field.

If the status is succeeded, then the payout has been successful. If the status is failed, then the payout has not been completed because of an error.

More about payout statuses

Webhook example: payout result
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2018-05-27T02:03:00.000000Z",
"updated_at": "2018-05-27T02:03:00.000000Z",
"payments": [
{
"id": "po_2018",
"status": "succeeded",
"created_at": "2018-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [
{
"email": "user@gmail.com"
}
]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"metadata": "good"
}
]
}
}'