Skip to main content

Payouts to 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.


To create a payout, complete the following steps:

  1. 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 and skip the next step.

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

    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": "3230"
    "payment_method": {
    "type": "card",
    "card": {
    "last4": "4242",
    "brand": "visa"
    }
    },
    "amount_details": {
    "amount": 10000,
    "currency": "usd"
    },
    "customer": {
    "reference": "user123",
    "contacts": [
    {
    "email": "user@gmail.com"
    }
    ]
    },
    "metadata": "good"
    }'
  3. Wait for a ready_to_confirm webhook. When you receive it, it means that Smart Glocal is ready to make the payout and is waiting for your confirmation.

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

  5. Wait for a payment_finished webhook containing the result of the payout. If the status is succeeded, the payout was successful. To learn more about the payout statuses, see here.

Sequence diagram of payouts without use of the payment form

SequencePCIDSS