WiPay
WAPIsv2.0.2Withdrawals

Create Withdrawal

Create a withdrawal request. Normal withdrawals use the authenticated user's stored Bank details. Sub-banked and sub-unbanked withdrawals require explicit recipient details.

POST
/withdrawals
AuthorizationBearer <token>

OAuth2 access token obtained from POST /auth/tokens.

In: header

Uses the authenticated user's stored Bank details for the requested currency.

withdrawal_typestring

Type of withdrawal. See Get Metadata for acceptable values.

Value in"normal"
currencystring

Currency code (must be in platform currencies).

amountnumber

Withdrawal amount.

Requires recipient details to send the withdrawal to a sub-merchant's Bank account.

withdrawal_typestring

Type of withdrawal. See Get Metadata for acceptable values.

Value in"sub_banked"
currencystring

Currency code (must be in platform currencies).

amountnumber

Withdrawal amount.

emailstring

Recipient email. Required for sub_banked.

Formatemail
Lengthlength <= 255
phonestring

Recipient phone number in E.164 format (for example +18687778899). Required for sub_banked.

Match^\+[1-9]\d{1,14}$
bank_namestring

Recipient Bank name. Must match a supported Bank from Get Metadata. Required for sub_banked.

bank_accountstring

Recipient Bank account number, digits only. Required for sub_banked.

Match^[0-9]+$
name_in_bankstring

Recipient name on the Bank account. Required for sub_banked.

Lengthlength <= 255
id_typestring

Recipient ID type. See Get Metadata for acceptable values and validation patterns. Required for sub_banked.

Value in"driver_permit" | "national_id" | "passport"
id_numberstring

Recipient ID number. Validated against the regex pattern for the selected id_type. See Get Metadata for patterns. Required for sub_banked.

bank_account_type?string

Required for sub_banked in Jamaica only. See Get Metadata for acceptable values.

Value in"chequing" | "savings"
bank_branch?string

Required for sub_banked in Jamaica only. Must belong to the selected Bank. See Get Metadata for acceptable values.

Lengthlength <= 255

Requires recipient details for an unbanked sub-merchant withdrawal. Does not require bank account fields.

withdrawal_typestring

Type of withdrawal. See Get Metadata for acceptable values.

Value in"sub_unbanked"
currencystring

Currency code (must be in platform currencies).

amountnumber

Withdrawal amount.

emailstring

Recipient email.

Formatemail
Lengthlength <= 255
phonestring

Recipient phone number in E.164 format (for example +18687778899).

Match^\+[1-9]\d{1,14}$
recipient_namestring

Recipient name. Required for sub_unbanked.

Lengthlength <= 255
id_typestring

Recipient ID type. See Get Metadata for acceptable values and validation patterns.

Value in"driver_permit" | "national_id" | "passport"
id_numberstring

Recipient ID number. Validated against the regex pattern for the selected id_type. See Get Metadata for patterns.

Response Body

curl -X POST "https://tt.wipayfinancial.com/wapi/withdrawals" \  -H "Content-Type: application/json" \  -d '{    "withdrawal_type": "normal",    "currency": "string",    "amount": 0  }'
{
  "message": "Created",
  "data": {
    "reference": "string",
    "transaction_id": "string"
  }
}
{
  "message": "string"
}
{
  "message": "string"
}