Making payouts to bank cards using independent data collection
To make payouts by card number, you need to obtain a PCI DSS compliance certificate and inform a YooMoney manager that you'd like to collect card details independently.
If you don't have a PCI DSS certificate, then use a payout widget.
To make a payout to a bank card by card number:
- Obtain bank card details.
- Make a payout using details received.
If you need to display the payout recipient information in payout report extracts (e.g., for submission to government agencies), save the recipient's data in YooMoney before making a payout. Then set the saved data ID in the request for creating a payout. More about sending the recipient's data for the purpose of making extracts from reports
Obtaining bank card details
You need the bank card number to process a payout. Obtain it using any method that’s convenient for you.
Processing payouts to bank card
Create a payout : send YooMoney a request with data for authentication, idempotence key, and information for a payout to a bank card:
- set the amount to be paid to the user in the
amount
object; the amount must not exceed the limits; - enter the description of the payout in the
description
parameter; - set the code of the
bank_card
payout type and the bank card number of the transfer recipient in thepayout_destination_data
object; - if you make payouts with recipient's data specified for the extract from a report, specify the personal data ID in the
personal_data
array.
Example of a request for creating a payout
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payouts \ -X POST \ -u <Gateway ID>: <Secret Key> \ -H 'Idempotence-Key: <Idempotence Key>' \ -H 'Content-Type: application/json' \ -d '{ "amount": { "value": "5.00", "currency": "RUB" }, "payout_destination_data": { "type": "bank_card", "card": { "number": "5555555555554477" } }, "description": "Payout for order No. 37", "metadata": { "order_id": "37" } }'
YooMoney will return a created payout object in response to the request.
Example of a created payout object
JSON
{ "id": "po-285ec15d-0003-5000-a000-08d1bec7dade", "amount": { "value": "5.00", "currency": "RUB" }, "status": "pending", "payout_destination": { "type": "bank_card", "card": { "first6": "555555", "last4": "4477", "card_type": "Mir", "issuer_country": "RU", "issuer_name": "Sberbank Of Russia" } }, "description": "Payout for order No. 37", "created_at": "2021-06-21T14:28:45.132Z", "metadata": { "order_id": "37" }, "test": false }
If you received a payout with the
pending
status, wait until the status changes to succeeded
or canceled
. Wait for the YooMoney notification or request payout information with an increasing reasonable interval.Example of a request for payout information
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payouts/{payout_id} \ -X GET \ -u <Gateway ID>:<Secret Key> \
Example of the payout object with the succeeded status
JSON
{ "id": "po-285ec15d-0003-5000-a000-08d1bec7dade", "amount": { "value": "5.00", "currency": "RUB" }, "status": "succeeded", "payout_destination": { "type": "bank_card", "card": { "first6": "555555", "last4": "4477", "card_type": "Mir", "issuer_country": "RU", "issuer_name": "Sberbank Of Russia" } }, "description": "Payout for order No. 37", "created_at": "2021-06-21T14:28:45.132Z", "metadata": { "order_id": "37" }, "test": false }
See also