📤Withdrawal

Request to create a withdrawal
The section is similar to the Request to create a deposit section. Only the data required to create a withdrawal request will change.
Withdrawal creation.
When the withdrawal is confirmed, a callback request will be sent to the client's application handler with the Withdrawal webhook body
Project ID in the A-Pay system
123Withdrawal amount
10| Currency | Payment systems |
|---|---|
| INR | upi_fast, upi_fast_v, upi_fast_qr, upi_p2p, upi_a, paytm, phonepe, imps, imps_top, upi_link, upi_push, phonepe_fast, upi_fast_vip, imps, inr_p2p, inr_p2c |
| BDT | nagad_api_v, bkash_api_v, bkash_a, apaybdt, upay, bkash_b, nagad_a, nagad_b, upay_w, bkash_p2p |
| PKR | bankalfalah, easypaisa, jazzcash_l, nayapay_l, pkr_w, jazzcash, pkr_w2 |
| KES | mpesa |
| MMK | wavepay_l, kbzpay_p2p |
| TND | d17_l, flouci, flouci_l |
| BRL | pix_p2p |
| MXN | spei_p2p |
| KHR | wing_l, ababank |
| NPR | esewa, khalti, khalti_l, imepay_l |
| LKR | ipay_l, ipay_fast |
| ETB | etb_fast, etb_p2p |
| ARS | cvu_p2p |
| JMD | scotiabank_p2p, lynk_p2p |
| EGP | egp_tel, egp_card, egp_tel_fast |
| PEN | yape_pen_p2p |
KESPossible values: Name of the payment system in A-Pay
mpesaPossible values: Transaction ID in the client's system. Must be unique. Optional
custom123User ID in the client's system. Must be unique for each user
user123Id of a webhook that will be used to send a postback. If not filled then default webhook url will be used. Optional
42798Data depending on the specific payment system
OK
Error
POST /Remotes/create-withdrawal?project_id=1 HTTP/1.1
Host: <domain>
apikey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"amount": 10,
"currency": "KES",
"payment_system": "mpesa",
"custom_transaction_id": "custom123",
"custom_user_id": "user123",
"webhook_id": 42798,
"data": {
"phone_number": "254712345678"
}
}{
"success": true,
"status": "Pending",
"order_id": "7fa13dbc3b79e05e",
"data": {}
}All the necessary information can be found in our API documentation.
Example of the responses:
{
"success": true,
"status": "Pending",
"order_id": "7fa13dbc3b79e05e",
"data": {}
}{
"success": false,
"status": "Failed",
"message": "Invalid request",
"code": 400,
"order_id": "7fa13dbc3b79e05e"
}Withdrawal information
order_id or/and custom_transaction_id parameters must be set.
Project ID in the A-Pay system
123Withdrawal ID in the A-Pay system
7fa13dbc3b79e05ePattern: ^[0-9a-f]{16}$Transaction ID in the client's system
OK
Error
GET /Remotes/withdrawal-info?project_id=1 HTTP/1.1
Host: <domain>
apikey: YOUR_API_KEY
Accept: */*
{
"success": true,
"status": "Success",
"order_id": "7fa13dbc3b79e05e",
"amount": 10,
"currency": "KES",
"payment_system": "mpesa",
"custom_transaction_id": "custom123",
"custom_user_id": "user123",
"created_at": 1665135515
}Examples of the responses:
{
"success": true,
"status": "Success",
"order_id": "7fa13dbc3b79e05e",
"amount": 10,
"currency": "INR",
"payment_system": "mpesa",
"custom_transaction_id": "custom123",
"custom_user_id": "user123",
"created_at": 1665135515
}{
"success": false,
"code": 400,
"message": "Invalid request"
}Last updated