nspay

Create payout

POST /v1/payout

Create an outbound payout. The merchant sends funds out; nspay routes the operation to a configured provider. Payouts share their request and response shape with payments — the only difference is the path and the resulting type field on the response ("payout" instead of "payment").

Endpoint

POST /v1/payout
Content-Type: application/json
X-API-Key: nspay_live_…

Request

Identical to POST /v1/payment. For payouts the destination fields (number, name, bankname) are required so the provider knows where to send the funds:

  • WT_RUB_C2Cnumber is the card number; name is the cardholder; bankname is ignored.
  • WT_RUB_PHONEnumber is the phone number; name is the recipient; bankname is the bank (sber, tcs).

Example — C2C

curl -X POST https://api.nspay.tech/v1/payout \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nspay_live_…" \
  -d '{
    "merchant_operation_id": "9b372f87-2c8b-4d99-bd3f-7f7f9b1d33ef",
    "client_id":   "57b8a4ca-3a4b-4f01-9a5e-1f29c1cefb9b",
    "method":      "WT_RUB_PHONE",
    "amount":      "5000.00",
    "currency":    "RUB",
    "number":      "+79991234567",
    "name":        "Ivan Ivanov",
    "bankname":    "sber"
  }'

Example — card

curl -X POST https://api.nspay.tech/v1/payout \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nspay_live_…" \
  -d '{
    "merchant_operation_id": "9b372f87-2c8b-4d99-bd3f-7f7f9b1d33ef",
    "client_id":   "57b8a4ca-3a4b-4f01-9a5e-1f29c1cefb9b",
    "method":      "WT_RUB_C2C",
    "amount":      "5000.00",
    "currency":    "RUB",
    "number":      "4111111111111111",
    "name":        "IVAN IVANOV"
  }'

Response

200 OK with an operation object where "type": "payout". Payouts usually return pending and reach their terminal status asynchronously once nspay has settled the transfer; that final transition is delivered via webhook. If the selected route uses auto-conversion, a pending response includes the fx_rate/fx_source quote, but NOT the recorded amount/currency fields — those are the ledger fact and only appear once the operation actually processes money (see Operation object).

For a payout, settlement_amount is the total charged to your balance, i.e. the payout amount plus the nspay commission_amount (both in settlement_currency) — the mirror of the payment case, where settlement_amount is the amount credited to you after commission.

Errors

See Errors. Same set of validation errors as payments.

On this page