Create new withdrawal (pay out).
POST /api/v1/orders/withdrawal/create
Body params:
merchant_id(String) (required)order_id(String) (required)amount_cents(Integer) (required)amount_currency(String) (required)type(String) (required)number(String) — Card/account number (required)name(String) — Cardholder name (optional)client_id(String) (required)callback_url(String) (optional)customer_phone_number(String) (optional)payment_data_bank_name(String) (optional)
Success: 201
Errors: 401, 422
Example curl:
curl -X POST https://api.averonplus.com/api/v1/orders/withdrawal/create \
-H "X-Token: <token>" \
-H "Content-Type: application/json" \
-d '{
"merchant_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id":"ext-123",
"amount_cents":1000,
"amount_currency":"USD",
"type":"card",
"number": "4242424242424242",
"name": "Dave"
"client_id":"cust-1"
}'
Example success response (201):
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_id": "ext-123",
"merchant_id": "m-uuid",
"state": "created",
"kind": "deposit",
"amount_cents": 1000,
"amount_currency": "USD",
"percent": 1.5,
"exchange_rate": 1.0,
"payment_data": {
"name": "Dave",
"number": "4242424242424242",
},
"url": "https://pay.example.com/payment/3fa85f64"
}