Skip to main content

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​

FieldTypeRequiredWhat to send
order_idstring, up to 255 charactersYesYour unique withdrawal reference. Reuse it for retries.
amountJSON numberYesPositive MYR amount with at most two decimal places.
currencystringYesMYR.
methodstringIf using a non-default shopThe exact code of your assigned withdrawal-enabled shop.
account_numberstring, up to 255 charactersYesRecipient identifier in the format agreed for the shop.
fields.bank_codestringOptionalCode for the recipient's bank. Use a code supported by your payout shop.
fields.holderstringOptionalName of the recipient account holder.
callback_urlHTTPS URLYesPublic endpoint for withdrawal callbacks.
customer_account_idJSON integerOptionalYour customer reference.
fields.merchant_user_ipstringOptionalCustomer 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.