AWDPay Transfers API
The AWDPay Transfers API allows you to transfer funds between AWDPay accounts without going through external operators (Mobile Money). It's an instant internal transfer on the AWDPay ledger.
Special configuration
For AWDPay transfers, always use:
gatewayName:"awdpay"country:"AF"(Africa - AWDPay internal code)
Use casesβ
- π Marketplaces β Credit sellers instantly after a sale
- π° Wallet apps β Fund user sub-accounts
- π Loyalty programs β Transfer rewards between members
- π P2P transfers β Enable transfers between AWDPay users
- π’ Inter-subsidiary β Fund movements between entities of the same group
Transfer directionsβ
| Direction | API | Description |
|---|---|---|
| User β Merchant | Collections (Deposit) | AWDPay user pays the merchant |
| Merchant β User | Disbursements (Withdrawal) | Merchant sends funds to an AWDPay user |
AWDPay Collection (User β Merchant)β
Receive payments from an AWDPay account to your merchant balance.
Endpointβ
POST /api/deposits/initiate
Request exampleβ
curl -X POST "https://app.awdpay.com/api/deposits/initiate" \
-H "Authorization: Bearer $AWDPAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "XOF",
"customerName": "Jean Dupont",
"customerPhone": "+221770123456",
"customerEmail": "jean@example.com",
"country": "AF",
"gatewayName": "awdpay",
"callbackUrl": "https://merchant.example/webhooks/collections",
"metadata": {
"orderReference": "ORDER-1192",
"userId": "usr_12345"
}
}'
Specific parametersβ
| Parameter | Value | Description |
|---|---|---|
country | "AF" | Special country code for internal AWDPay |
gatewayName | "awdpay" | Internal AWDPay gateway |
customerPhone | String | Number associated with payer's AWDPay account |
Responseβ
{
"reference": "DEP1704067200000ABC123",
"status": "pending",
"fees": 0,
"paymentType": "otp",
"createdAt": "2025-01-15T10:30:00Z",
"expiresAt": "2025-01-15T11:30:00Z",
"message": "Waiting for OTP confirmation"
}
AWDPay Disbursement (Merchant β User)β
Send funds from your merchant balance to an AWDPay account.
Endpointβ
POST /api/withdraws/initiate
Request exampleβ
curl -X POST "https://app.awdpay.com/api/withdraws/initiate" \
-H "Authorization: Bearer $AWDPAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "XOF",
"beneficiaryName": "Marie Ndiaye",
"beneficiaryPhone": "+221771234567",
"beneficiaryEmail": "marie@example.com",
"country": "AF",
"gatewayName": "awdpay",
"callbackUrl": "https://merchant.example/webhooks/disbursements",
"metadata": {
"orderReference": "PAYOUT-8831",
"reason": "Order refund"
}
}'
Specific parametersβ
| Parameter | Value | Description |
|---|---|---|
country | "AF" | Special country code for internal AWDPay |
gatewayName | "awdpay" | Internal AWDPay gateway |
beneficiaryPhone | String | Number associated with beneficiary's AWDPay account |
Responseβ
{
"reference": "WTD1704067200000DEF456",
"status": "pending",
"fees": 0,
"paymentType": "direct",
"createdAt": "2025-01-15T10:30:00Z",
"expiresAt": "2025-01-15T11:30:00Z",
"message": "Withdrawal initiated successfully"
}
Check statusβ
Collectionβ
curl -X GET "https://app.awdpay.com/api/deposits/DEP1704067200000ABC123" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
Disbursementβ
curl -X GET "https://app.awdpay.com/api/withdraws/WTD1704067200000DEF456" \
-H "Authorization: Bearer $AWDPAY_TOKEN"
AWDPay transfer advantagesβ
| Feature | AWDPay Transfer | Mobile Money |
|---|---|---|
| Fees | 0% or reduced | Variable by operator |
| Speed | β‘ Instant | 5 sec - 2 min |
| Availability | 24/7 | Depends on operator |
| Confirmation | OTP (Collection) / Direct (Disbursement) | Variable |
| Limit | According to your plan | Operator limits |
Specific rulesβ
Balance verificationβ
AWDPay checks the balance of both parties:
- Collection: Payer's AWDPay account must have sufficient funds
- Disbursement: Your merchant balance must be sufficient
{
"error": "insufficient_balance",
"message": "Payer's account does not have sufficient funds"
}
OTP confirmation (Collections)β
For collections, the payer receives an OTP to confirm:
- You initiate the collection
- Payer receives an SMS with OTP code
- Payer confirms payment in AWDPay app
- Status changes from
pendingβsuccess
Direct transfers (Disbursements)β
Disbursements to an AWDPay account are instant and don't require beneficiary confirmation.
Webhooksβ
Events use the same topics as other methods:
Successful collectionβ
{
"event": "deposit.success",
"timestamp": "2025-01-15T10:30:45Z",
"data": {
"reference": "DEP1704067200000ABC123",
"status": "success",
"amount": 5000.00,
"currency": "XOF",
"gatewayName": "awdpay",
"country": "AF",
"customerPhone": "+221770123456",
"metadata": {
"orderReference": "ORDER-1192"
}
}
}
Successful disbursementβ
{
"event": "withdrawal.success",
"timestamp": "2025-01-15T10:31:00Z",
"data": {
"reference": "WTD1704067200000DEF456",
"status": "success",
"amount": 5000.00,
"currency": "XOF",
"gatewayName": "awdpay",
"country": "AF",
"beneficiaryPhone": "+221771234567",
"metadata": {
"orderReference": "PAYOUT-8831"
}
}
}
Reconciliationβ
In the AWDPay dashboard and exports:
- AWDPay transfers are identified by
gatewayName: "awdpay" - The
country: "AF"field allows easy filtering - Distinguish them from Mobile Money movements for your reports
Next stepsβ
- Collections API β Complete deposits documentation
- Disbursements API β Complete withdrawals documentation
- Authentication β Get your API token
- Error handling β Handle failure cases