Cancel Pre-Auth Transaction
Cancel or void a previously authorized pre-auth transaction that hasn't been captured yet.
Endpoint Information
Name: Cancel Transaction (Pre Auth)
Method: POST
URL: {{BASE_URL}}/api/v1/payment/cancel-pre-auth-transaction
Description
If you need to release the held funds on a customer's card before capturing them, use this endpoint to void the pre-authorization.
Authentication
Type: Basic Auth
- Username: App Key
- Password: Secret Key
Request Body
Content-Type: application/json
{
"reference": "paymid-pre-auth-036",
"merchantAccountId": "100012"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantAccountId | string | Yes | Your merchant account ID |
reference | string | Yes | The reference ID of the pre-authorized transaction |
Response
Success Response
{
"success": true,
"message": "Void request success.",
"data": {
"processor_reference": "payment_85ebe3ba7bf9a380f63d7bca15514f1d",
"payment_method": "MASTERCARD",
"status": "success"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Request success status |
message | string | Response message |
data.processor_reference | string | Processor's transaction reference |
data.payment_method | string | Used payment method |
data.status | string | Cancellation status |
Usage
Use this endpoint only for transactions with requestType: "pre-auth" that have not been captured. Once a transaction is captured, it cannot be cancelled via this endpoint; you must use the Refund API instead.
Related Endpoints
- Pre-Auth Payment Request - Initiate the pre-authorization
- Capture Pre-Auth Transaction - Capture the reserved funds