A-pay Documentation
  • Documentation
    • ❇️About A-pay Platform
    • 💵Supported currencies
  • API Documentation
    • 🚀Start Integration
    • 🈁Getting data about PS
    • 📃Payment Page Integration
      • Payment Gateway
    • 🖥️API Integration
      • 💰Deposit
        • Request to create a deposit
        • Deposit Activation
        • Deposit resend OTP
        • Deposit information
      • 📤Withdrawal
      • 🔍Lost transaction
        • Create lost transaction
        • Lost transaction information
    • 🔙Postback
    • 📈Settlement
    • ❗Errors
  • 👨‍💻OpenAPI Docs
Powered by GitBook
On this page
  1. API Documentation
  2. API Integration

Withdrawal

PreviousDeposit informationNextLost transaction

Last updated 1 month ago

Request to create a withdrawal

The section is similar to the section. Only the data required to create a withdrawal request will change.

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

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"
}

All the necessary information can be found in our .

🖥️
📤
API documentation
Request to create a deposit
Sequence diagram of the Withdrawal via API integration

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
400
Error
application/json
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
}
  • Request to create a withdrawal
  • POSTRequest to create a withdrawal
  • Withdrawal information
  • GETWithdrawal information

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
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
ETB etb_fast
ARS cvu_p2p
JMD scotiabank_p2p
EGP egp_tel, egp_card
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
Responses
200
OK
application/json
Responseone of
or
400
Error
application/json
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": {}
}