Cancel Transaction
/v3/payment/reverseWhat is this?
Cancel or reverse a transaction. Use this to void a payment before settlement, or to request a refund for a completed transaction.
Reverse cancels a transaction — used mainly to prevent double charges when a timeout occurs.
Refund returns funds to the customer — based on the payment provider's policy and time limits.
How to Use
Step 1: Decide Between Reverse or Refund
- Reverse — use within ~15 minutes of a transaction to cancel it. Prevents double charges caused by timeouts.
- Refund — use to return funds for a completed transaction. Subject to the payment provider's refund period.
Step 2: For Reverse — Get the Order ID
Locate the orderId from the original transaction response.
Step 3: For Refund — Get the Transaction ID
Locate the transactionId and prepare the refund amount and reason.
Step 4: Make the Request
Send the appropriate request. Check the code field in the response — if "SUCCESS", the operation completed.
Reverse
If a transaction times out, perform a reverse before creating a new transaction. This prevents a double charge.
Request Parameters
Order ID of the transaction to reverse
Example: "180730103903010431152179"
1{2 "orderId": "180730103903010431152179"3}
Response Parameters
Transaction response object
"SUCCESS" if the reverse succeeded, otherwise an error code.
Error code if the request failed.
Error message if the request failed.
Debug message (sandbox only).
Refund
Refund eligibility depends on the payment provider. Each payment method has its own refund period. If the refund period has passed, contact support@revenuemonster.my with:
- Transaction ID
- Reference ID (if applicable)
- Total Transaction Amount
- Total Refund Amount
- Reason for refund
Request Parameters
Transaction ID to refund
Example: "180730103903010431152179"
Refund type (e.g., "FULL")
Example: "FULL"
Refund currency type
Example: "MYR"
Refund amount in smallest currency unit
Example: 100
Reason for the refund
1{2 "transactionId": "180730103903010431152179",3 "refund": {4 "type": "FULL",5 "currencyType": "MYR",6 "amount": 1007 },8 "reason": "Customer requested refund"9}
Response Parameters
Transaction response object
"SUCCESS" if the refund succeeded, otherwise an error code.
Error code if the request failed.
Error message if the request failed.
Debug message (sandbox only).