---
title: "Refund a transaction"
method: POST
path: "/transactions/refund/ach"
tags: ["Transactions"]
---

# Refund a transaction

`POST /transactions/refund/ach`

## Request

- Base URL: `https://tb.paymentfusion.com`
- URL: `https://tb.paymentfusion.com/transactions/refund/ach`
- Auth: none declared. Required headers: `Authorization`, `Accept`, `Content-Type`

Called by the Independent Software Vendor. Makes a request to TB in order to get a refund amount for an ACH transaction.

## Headers

- `Authorization` string, api_id:api_token, required
- `Accept` string, required
- `Content-Type` string, required

## Request body `application/x-www-form-urlencoded`

- object
  - `ref_number` string, required: The gateway reference number (PNRef) of the transaction that will be refunded.
  - `refund_amount` string, required: The amount to refund, in USD up to 6 decimals that will be charged, its last 4 digits must be 0. (e.g. "1", "1.00", "1.01", "1.2", "1.230000").
  - `merchant_id` string, required: The merchant identifier that will be used to connect to the gateway. Size range - `1..16`
  - `remote_id` string: Used for keeping track of a 3rd party identifier alongside the transaction object. This is typically used by the ISV to assign its own identifier to the transaction for easy matching in case any network issues appear. This is not validated for uniqueness. Size range - `0..256`.
  - `client_id` string: The client_id of client associated to the terminal.
  - `sec_code` string, required: Value indicating processor SEC Code. Allowed values - `"PPD"`, `"CCD"`
  - `callback_url_1` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.
  - `callback_url_2` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.
  - `callback_url_3` string: One of the three URLs where Transaction Broker will POST to when a HPP request is completed. This eliminates the need for polling for the request's status. Only HTTPS URLs are allowed. The callback will retry if the host is unresponsive. The response received from the callback url must have the response code 2xx. Basic auth credentials may be added in to url ie. 'https://username:password@address.com' or as an url param 'https://address.com?token=secret'. Size range - `0..2000`.

## Response `200`

Success

- object
  - `amount` string: Passthrough of original transaction request amount
  - `auth_amount` string: The authorized amount in case of a partial authorized transaction
  - `gateway_auth_code` string: The authorization code received from the gateway
  - `card_type` string: The type of the card that was submitted. Allowed values - `"Discover"`, `"DISCOVER"`, `"UnionPay"`, `"AmEx"`, `"AMERICAN EXPRESS"`, `"AMEX"`, `"American express"`, `"Master"`, `"MASTERCARD"`, `"Mastercard"`, `"MASTERCARD/Mastercard"`, `"JCB"`, `"Jcb"`, `"Visa"`, `"VISA"`,`"Visa Traditional"`, `"Visa Classic"`, `"Visa Health"`, `"Visa Prefered"`, `"Mastercard/Eurocard"`, `"DINERS"`, `"CareCredit"`, `"Unknown Code"`, `"OTHER"`, `"null"`, `"N/A"` The values are subject to change.
  - `created_at` string: The time the transaction was created.
  - `gateway_identifier` 'usaepay' | 'payment_fusion': Identifier of the gateway.
  - `gateway_reference_number` string: Transaction reference number from gateway.
  - `gateway_response_message` string: The message returned from the gateway
  - `gateway_result_code` string: Result code (or error code) as returned by the gateway
  - `gateway_result_text` string: The result text as returned by the gateway.
  - `merchant_id` string: The merchant identifier that will be used to connect to the gateway. Size range - `1..16`
  - `mid` string: The merchant ID
  - `remote_id` string: Used for keeping track of a 3rd party identifier alongside the transaction object. This is typically used by the ISV to assign its own identifier to the transaction for easy matching in case any network issues appear. This is not validated for uniqueness. Size range - `0..256`.
  - `tid` string: The terminal ID
  - `tip_amount` string: The tip amount in USD that was added to this transaction. Default value - `0`
  - `transaction_status` string: Confirmation from the payment gateway regarding the CC credentials and payment finalization. Allowed values - `"approved"`, `"awaiting_amount"`, `"awaiting_confirmation"`, `"canceled"`, `"declined"`, `"emv_needing_reversal"`, `"error"`, `"in progress"`, `"internal error"`, `"timeout"`, `"verification"`, `"Success"`, `"Failure"`
  - `v` string: The API version that was used to handle the request.

## Other responses

- `4XX`: Possible errors - 1, 5, 6, 9, 10, 11, 57, 81, 83, 189, 208, 231, 232, 240, 250, 251
- `5XX`: Possible errors - 8, 12

---

[API](https://skmtc.dev/bankofamerica/apis/transaction-broker-api.md) - [All operations](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bankofamerica/apis/transaction-broker-api/revisions/6097bc689e41?raw)
