Skip to main content

Payouts to bank cards

You can make a payout to a card following one of two scenarios described below.

All API operations are carried out within a payment session. One payment session can include several operations: for example, you can accept and then refund a payment.

Payout parameters

To get a token, use our tokenization widget.

NameMandatoryTypeDescription
payment_method/payout_details+objectPayout data
 type+stringValue: card
 card+objectBank card payment details
  type+stringValue: encrypted_card
  encrypted_card+objectEncrypted card details
   number_hash+stringCard number hash
amount_details+objectAmount
 amount+intAmount in rubles in decimal format. The value must be greater than zero. To send 100 USD, specify 10000
 currency+stringCurrency code according to ISO 4217. Case insensitive
participant_details+objectInformation on the payout participants
 recipient+objectRecipient details
  full_name+stringRecipient's full name
 sender-objectSender details


To create a payout using our widget, complete the following steps:

  1. Complete Steps 1-5.

  2. Create a payment session sending a session/create request.

    Alternatively, you can use the session-init-payout method. In this case, specify all the payout parameters right away as it is specified in the next step.

  3. Send a session/start/payout request to start the payout.

    In the EncryptedCard object, pass the tokenized bank card details obtained from the widget.

    Example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/start/payout \
    -H 'Content-Type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d'{
    "session_id": "ps_31222806",
    "amount_details": {
    "amount": 3290,
    "currency": "eur"
    },
    "payment_method": {
    "type": "card",
    "card": {
    "type": "encrypted_card",
    "encrypted_card": {
    "number_hash": "3c6cdac9a24f4653512e35d62c76b329f145af5475028c3205dd219517cee33d"
    }
    }
    },
    "participant_details": {
    "recipient": {
    "full_name": "John Johnson"
    },
    "sender": {}
    },
    "customer": {
    "reference": "984753"
    },
    "metadata": {
    "metadata": "withdrawal_116",
    "proxy_to_host": ""
    }
    }'

    To find information on the token or card, use the token/info method. This method also returns the last 4 numbers of the card, so that you can show the user where the amount is going.

  4. Wait for a ready_to_confirm webhook. When you received it, it means that Smart Glocal is ready to make the payout and is waiting for your confirmation.

  5. Send a session/confirm request or a session/cancel request to confirm or cancel the operation.

  6. Wait for a payment_finished webhook containing the result of the payout. If the status is succeeded, the payout was successful. Learn more about the payout statuses

Sequence diagram of payouts with the widget

SequenceWidget