Refund a payment

Send the full or partial amount of a payment back to the customer

Overview

Customer satisfaction is one of the key metrics for any business. And with that, comes situations where merchants may have to issue a refund for a payment collected via the ACHQ API.

Rather than having to collect and transmit a new transaction API request, the Refund endpoint allows for a quick remittance of money back to the customer.

Obviously, issuing a refund falls on a different end of the payment lifecycle than cancelling or holding a payment. To help ensure refunds or only sent back on valid transactions, the current payment status must be Cleared, indicating the merchant was actually paid for the transaction in question.

Fields and values

📘

Just keep track of this field

Remember to pass in the Transact_ReferenceID as it's the key to querying the payment you wish to refund

Refund API request are a bit more variable than some of the other examples we've explored. This is due to the fact that a Refund request creates a new ACH Credit record. That means we have a few optional fields to play with

Field NameUsageField Value Format ConstraintsMax Length
CommandRequiredSet to ECheck.Refund50
Transact_ReferenceIDRequiredA unique identifier assigned to the original payment by ACHQ50
Provider_TransactionIDOptionalAn external ID which can be used for traceability between your application and ACHQ50
Merchant_ReferenceIDOptionalAn external ID which can be used for traceability between the merchant and ACHQ50
DateScheduledOptionalUse this parameter if you'd like to schedule a payment for a future date in MM/DD/YYYY format, otherwise the payment will be scheduled the day it is created-
AmountOptionalUse this field to specify a refund amount less than the original debit amount-
DescriptionOptionalFriendly internal description for this payment100

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

🚧

Show me the money

Leaving the Amount field blank will refund the full... amount of the original payment

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.Refund&refund=' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data TransAct_ReferenceID=14452405 \
     --data Amount=23 \
     --data Provider_TransactionID=1233 \
     --data Merchant_ReferenceID=123456 \
     --data 'Description=Partial refund'

and response:

{
  "CommandStatus": "Approved",
  "Description": "Command Successful.  Approved.",
  "ErrorInformation": null,
  "ExpressVerify": {
    "Status": null,
    "Code": null,
    "Description": null
  },
  "ResponseData": null,
  "ACHQToken": "achq-sandbox-127a3-ee432-2a07e",
  "Provider_TransactionID": "1233",
  "TransAct_ReferenceID": "14477272",
  "ResponseCode": "000"
}

Full API reference available at the 💸 Refund a payment endpoint