📤Withdrawal

Sequence diagram of the Withdrawal via API integration

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.

Request to create a withdrawal

post

Withdrawal creation.

When the withdrawal is confirmed, a callback request will be sent to the client's application handler with the Withdrawal webhook body

Authorizations
Query parameters
project_idnumberRequired

Project ID in the A-Pay system

Example: 123
Body
amountintegerRequired

Withdrawal amount

Example: 10
currencystring · enumRequired
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_a, apaybdt, upay, bkash_b, nagad_a, nagad_b, upay_w, bkash_p2p
PKR bankalfalah, easypaisa, jazzcash_l, nayapay_l, jazzcash_fast, pkr_w, jazzcash
KES mpesa
MMK wavepay_l
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
ARS cvu_p2p
JMD scotiabank_p2p
EGP egp_tel, egp_card, egp_tel_fast
Example: INRPossible values:
payment_systemstring · enumRequired

Name of the payment system in A-Pay

Example: mpesaPossible values:
custom_transaction_idstring · max: 200Optional

Transaction ID in the client's system

Example: custom123
custom_user_idstring · max: 200Required

User ID in the client's system. Must be unique for each user

Example: user123
webhook_idstring · min: 7 · max: 7Optional

Id of a webhook that will be used to send a postback. If not filled then default webhook url will be used

Example: 42798
dataone ofRequired

Data depending on the specific payment system

or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
or
Responses
200
OK
application/json
Responseone of
or
post
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": "INR",
  "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
{
  "success": true,
  "status": "Pending",
  "order_id": "7fa13dbc3b79e05e",
  "data": {}
}
Error
{
  "success": false,
  "status": "Failed",
  "message": "Invalid request",
  "code": 400,
  "order_id": "7fa13dbc3b79e05e"
}

Withdrawal information

Withdrawal information

get
Authorizations
Query parameters
project_idnumberRequired

Project ID in the A-Pay system

Example: 123
order_idstringRequired

Deposit ID in the A-Pay system

Example: 7fa13dbc3b79e05e
Responses
200
OK
application/json
Responseone of
or
get
GET /Remotes/withdrawal-info?project_id=1&order_id=text HTTP/1.1
Host: <domain>
apikey: YOUR_API_KEY
Accept: */*
{
  "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
}

Examples of the responses:

Success
{
  "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
}
Error
{
  "success": false,
  "code": 400,
  "message": "Invalid request"
}

Last updated