Skip to main content

Reverse Transaction

Reverse a transaction — used to void a payment before settlement. If a transaction times out, perform a reverse before creating a new transaction to prevent a double charge.

danger

Reverse cancels a transaction — used mainly to prevent double charges when a timeout occurs. Use within ~15 minutes of a transaction.


How to Use

Endpoint
POST/v3/payment/reverse

Step 1: Get the Order ID

Locate the orderId from the original transaction response.

Step 2: Make the Request

Send the reverse request with the orderId. Check the code field in the response — if "SUCCESS", the operation completed.


Request Parameters

orderIdSTRINGrequired

Order ID of the transaction to reverse

Example: "180730103903010431152179"

Response Parameters

itemOBJECT

Transaction response object

transactionIdSTRING

Revenue Monster's unique transaction ID

referenceIdSTRING

Reference ID from the payment provider

orderOBJECT

Order details

idSTRING

Order ID

titleSTRING

Order title

currencyTypeSTRING

Currency type

amountINTEGER

Order amount in cents

detailSTRING

Order detail

additionalDataSTRING

Additional data

storeOBJECT

Store details

currencyTypeSTRING

Currency type (MYR)

balanceAmountINTEGER

Remaining balance amount for initiating refund

finalAmountINTEGER

Amount after all deductions

platformSTRING

Transaction platform

typeSTRING

Transaction type

methodSTRING

Payment method

regionSTRING

Payment region

statusSTRING

Transaction status (SUCCESS, FAILED, IN_PROCESS, etc.)

transactionAtSTRING

Transaction date time (only when SUCCESS)

createdAtSTRING

Created date time

updatedAtSTRING

Last updated date time

codeSTRING

"SUCCESS" if the reverse succeeded, otherwise an error code.

errorOBJECT

Error details

codeSTRING

Error code if the request failed.

messageSTRING

Error message if the request failed.

debugSTRING

Debug message (sandbox only).