Skip to main content

Create Withdrawal

Initiate a disbursement to a beneficiary's mobile wallet.

Endpoint

POST /api/withdraws/initiate

Request parameters

ParameterTypeRequiredDescription
amountDoubleAmount to transfer (min: 0.01)
currencyStringISO 4217 currency code (3 characters, e.g. XOF, EUR)
beneficiaryNameStringFull name of beneficiary
beneficiaryPhoneStringPhone number in international format (e.g. +221770000000)
beneficiaryEmailStringBeneficiary email
countryStringISO 3166-1 alpha-2 country code (e.g. SN, CI)
gatewayNameStringSpecific gateway (otherwise automatic selection)
callbackUrlStringWebhook URL for notifications (max 500 characters)
returnUrlStringRedirect URL after processing
metadataMap<String, String>Custom data (e.g. orderReference, userId)

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": "Amadou Diallo",
"beneficiaryPhone": "+221770123456",
"beneficiaryEmail": "amadou@example.com",
"country": "SN",
"gatewayName": "wave-senegal",
"callbackUrl": "https://merchant.example/webhooks/withdrawals",
"metadata": {
"orderReference": "PAYOUT-8831",
"userId": "usr_12345"
}
}'

Success response

{
"reference": "WTD1704067200000ABC123",
"status": "pending",
"fees": 50.0,
"paymentType": "direct",
"createdAt": "2025-01-15T10:30:00Z",
"expiresAt": "2025-01-15T11:30:00Z",
"message": "Withdrawal initiated successfully"
}

Response fields

FieldTypeDescription
referenceStringUnique withdrawal reference (format: WTD{timestamp}{random})
statusStringInitial status (pending, processing)
feesDoubleAmount of fees charged
paymentTypeStringProcessing type (direct, redirect, redirect_post, ussd)
createdAtDateTimeCreation date/time
expiresAtDateTimeExpiration date/time
messageStringDescriptive message
urlStringConfirmation URL (if paymentType = redirect)

Error codes

HTTP CodeError codeDescription
400invalid_requestMissing or invalid parameters
401unauthorizedInvalid or expired token
404merchant_not_foundMerchant account not found
422insufficient_balanceInsufficient merchant balance
422limit_exceededTransaction limit exceeded
500server_errorInternal error

Next step

➡️ Check status — Track your withdrawal status