Cancel a payment

Stop a payment from processing with the click of a button

Overview

Due to the asynchronous nature of ACH payments there may be instances where a payment is created via an API request and subsequently needs to be completely stopped from processing or cancelled.

As indicated on the link shared above, as long as the current status of the payment is scheduled it can be cancelled via a simple API call.

Fields and values

📘

Deja vu

Remember to pass in the Transact_ReferenceID as it's the key to querying the desired payment record for cancellation

Luckily for us, cancelling a payment has far fewer variables than updating a payment so this will be a super short example (you're welcome.)

Remember, all API requests should always include the fields detailed in the General Implementation Rules.

Field NameUsageField Value Format ConstraintsMax Length
CommandRequiredSet to ECheck.Void50
Transact_ReferenceIDRequiredA unique identifier assigned to the original payment by ACHQ50

And that's it. So, we get the following request format:

Resulting in the following request:

curl --request POST \
     --url 'https://www.speedchex.com/datalinks/transact.aspx/?ProviderID=99&Provider_GateKey=test&Provider_GateID=test&MerchantID=2001&Merchant_GateID=test&Merchant_GateKey=test&CommandVersion=2.0&Command=ECheck.Void&cancel=' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data Transact_ReferenceID=14477175

and response:

{
  "CommandStatus": "Approved",
  "Description": "Command Successful.  Approved.",
  "ErrorInformation": null,
  "ExpressVerify": {
    "Status": null,
    "Code": null,
    "Description": null
  },
  "ResponseData": null,
  "ACHQToken": null,
  "Provider_TransactionID": null,
  "TransAct_ReferenceID": "14477176",
  "ResponseCode": "000"
}

View more at the 🛑 cancel a payment endpoint