2.1 Create withdrawal
POST /api/v2/withdrawals
Use this endpoint when your MYR shop is enabled for withdrawals. Send one JSON object and the v2 authentication headers.
Request
| Field | Type | Required | What to send |
|---|---|---|---|
order_id | string, up to 255 characters | Yes | Your unique withdrawal reference. Reuse it for retries. |
amount | JSON number | Yes | Positive MYR amount with at most two decimal places. |
currency | string | Yes | MYR. |
method | string | If using a non-default shop | The exact code of your assigned withdrawal-enabled shop. |
account_number | string, up to 255 characters | Yes | Recipient identifier in the format agreed for the shop. |
fields.bank_code | string | Optional | Code for the recipient's bank. Use a code supported by your payout shop. |
fields.holder | string | Optional | Name of the recipient account holder. |
callback_url | HTTPS URL | Yes | Public endpoint for withdrawal callbacks. |
customer_account_id | JSON integer | Optional | Your customer reference. |
fields.merchant_user_ip | string | Optional | Customer IPv4 or IPv6 address, when available. |
Supply the recipient in the top-level account_number. You can send either optional payout field on its own or omit fields when you have no additional data. Replace the example recipient details and shop code with your own values.
{
"order_id": "WD-MYR-1001",
"amount": 125.50,
"currency": "MYR",
"method": "your_myr_shop",
"account_number": "EXAMPLE-ACCOUNT-01",
"fields": {
"bank_code": "BANK_CODE",
"holder": "Example Recipient"
},
"callback_url": "https://merchant.example.com/webhooks/payout"
}
Response
A successful create request returns 200.
{
"transaction_id": "12345"
}
Store transaction_id and retrieve the withdrawal status. An accepted withdrawal can still be pending or fail. Retry an uncertain create with the same order_id and identical order data. Reusing the ID with changed details can return 409.