Skip to main content

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

ParameterTypeRequiredDescription
merchantAccountIdstringYesYour merchant account ID
referencestringYesThe 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

FieldTypeDescription
successbooleanRequest success status
messagestringResponse message
data.processor_referencestringProcessor's transaction reference
data.payment_methodstringUsed payment method
data.statusstringCancellation 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.