---
title: "Reverse payment"
method: POST
path: "/bank-transfer-payments/{paymentId}/reverse"
tags: ["refunds"]
---

# Reverse payment

`POST /bank-transfer-payments/{paymentId}/reverse`

Use this method to cancel a bank transfer payment in an open batch. This is also known as voiding a payment.  

To cancel a bank transfer payment, you need its paymentId. Our gateway returned the paymentId in the response of the [Create Payment](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/create) method.  

**Note:** If you don't have the paymentId, use our [List Payments](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/list) method to search for the bank transfer payment.  

If your request is successful, our gateway removes the bank transfer payment from the merchant’s open batch and no funds are taken from the customer's bank account.

## Path parameters

- `paymentId` string, required

## Headers

- `Authorization` string, required
- `Idempotency-Key` string, uuid, required

## Response `200`

Successful request. We voided the payment.

- BankTransferPayment — Object that contains information about the sale and the customer's bank details.
  - `paymentId` string, required — Unique identifier that we assigned to the payment.
  - `processingTerminalId` string, required — Unique identifier that we assigned to the terminal.
  - `order` BankTransferPaymentOrder, required — Object that contains information about the transaction.
    - `orderId` string, required — Unique identifier that the merchant assigns to the transaction.
    - `dateTime` string, date-time — The processing date and time of the transaction represented as per [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
    - `description` string — A brief description of the transaction.
    - `amount` integer, required — The total amount in the currency's lowest denomination. For example, cents.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
    - `breakdown` BankTransferBreakdown — Object that contains information about the transaction.
      - `taxes` RetrievedTax[] — Array of tax objects.
        - `name` string, required — Name of the tax.
        - `rate` number, double, required — Tax percentage for the transaction.
        - `amount` integer — Amount of tax that was applied to the transaction. The value is in the currency's lowest denomination, for example, cents.
      - `subtotal` integer, required — Total amount of the transaction before tax and tip. The value is in the currency's lowest denomination, for example, cents.
      - `tip` Tip — Object that contains information about the tip.
        - `type` 'percentage' | 'fixedAmount', required — Indicates if the tip is a fixed amount or a percentage. **Note:** Our gateway applies the percentage tip to the total amount of the transaction after tax.
        - `mode` 'prompted' | 'adjusted' — Indicates how the tip was added to the transaction. - `prompted` – The customer was prompted to add a tip during payment. - `adjusted` – The customer added a tip on the receipt for the merchant to adjust post-transaction.
        - `amount` integer — If the value for type is `fixedAmount`, this value is the tip amount in the currency's lowest denomination, for example, cents.
        - `percentage` number, double — If the value for type is `percentage`, this value is the tip as a percentage.
  - `customer` BankTransferCustomer — Object that contains information about the customer.
    - `notificationLanguage` 'en' | 'fr' — Customer's preferred notification language. This code follows the [ISO 639-1](https://www.iso.org/iso-639-language-code) standard.
    - `contactMethods` ContactMethod[] — Array of polymorphic objects, which contain contact information. The value of the type parameter determines which variant you should use: - `email` - Email address - `phone` - Phone number - `mobile` - Mobile number - `fax` - Fax number
      - union
        - object — email variant
          - `type` 'email', required — Discriminator value: email
          - `value` string, required — Email address.
        - object — phone variant
          - `type` 'phone', required — Discriminator value: phone
          - `value` string, required — Phone number.
        - object — mobile variant
          - `type` 'mobile', required — Discriminator value: mobile
          - `value` string, required — Mobile number.
        - object — fax variant
          - `type` 'fax', required — Discriminator value: fax
          - `value` string, required — Fax number.
  - `bankAccount` union, required — Polymorphic object that contains bank account information. The value of the type field determines which variant you should use: - `ach` - Automated Clearing House (ACH) details - `pad` - Pre-authorized debit (PAD) details
    - object — Object that contains the customer's account details.
      - `type` 'ach', required — Discriminator value: ach
      - `secCode` 'web' | 'tel' | 'ccd' | 'ppd' — Indicates the type of authorization for the transaction. **Note:** The field is mandatory for ACH secure token. - `web` – Online transaction. - `tel` – Telephone transaction. - `ccd` – Corporate credit or debit entry for a business bank account. - `ppd` – Pre-arranged transaction.
      - `nameOnAccount` string, required — Customer's name.
      - `accountNumber` string, required — Customer's bank account number. We mask all digits except the last four digits.
      - `routingNumber` string, required — Routing number of the customer’s account. **Note:** In responses, our gateway shows only the last four digits of the account's routing number, for example, *****4162.
      - `secureToken` SecureTokenSummary — Object that contains information about the secure token.
        - `secureTokenId` string, required — Unique identifier that the merchant assigned to the secure token.
        - `customerName` string, required — Customer's name.
        - `token` string, required — Token that the merchant can use in future transactions to represent the customer's payment details. The token: - Begins with the six-digit identification number **296753**. - Contains up to 12 digits. - Contains a single check digit that we calculate using the Luhn algorithm.
        - `status` 'notValidated' | 'cvvValidated' | 'validationFailed' | 'issueNumberValidated' | 'cardNumberValidated' | 'bankAccountValidated', required — Status of the customer's bank account. The processor performs a security check on the customer's bank account and returns the status of the account. **Note:** Depending on the merchant's account settings, this feature may be unavailable.
        - `link` Link — Object that contains HATEOAS links for the resource.
          - `rel` string, required — Indicates the relationship between the current resource and the target resource.
          - `method` string, required — HTTP method that you need to use with the target resource.
          - `href` string, required — URL of the target resource.
    - object — Object that contains the customer's account details.
      - `type` 'pad', required — Discriminator value: pad
      - `nameOnAccount` string, required — Customer's name.
      - `accountNumber` string, required — Customer's bank account number. We mask all digits except the last four digits.
      - `transitNumber` string, required — Five-digit code that represents the customer's banking branch.
      - `institutionNumber` string, required — Three-digit code that represents the customer's bank.
      - `secureToken` SecureTokenSummary — Object that contains information about the secure token.
        - `secureTokenId` string, required — Unique identifier that the merchant assigned to the secure token.
        - `customerName` string, required — Customer's name.
        - `token` string, required — Token that the merchant can use in future transactions to represent the customer's payment details. The token: - Begins with the six-digit identification number **296753**. - Contains up to 12 digits. - Contains a single check digit that we calculate using the Luhn algorithm.
        - `status` 'notValidated' | 'cvvValidated' | 'validationFailed' | 'issueNumberValidated' | 'cardNumberValidated' | 'bankAccountValidated', required — Status of the customer's bank account. The processor performs a security check on the customer's bank account and returns the status of the account. **Note:** Depending on the merchant's account settings, this feature may be unavailable.
        - `link` Link — Object that contains HATEOAS links for the resource.
          - `rel` string, required — Indicates the relationship between the current resource and the target resource.
          - `method` string, required — HTTP method that you need to use with the target resource.
          - `href` string, required — URL of the target resource.
  - `refunds` RefundSummary[] — List of refunds issued against the payment.
    - `refundId` string, required — Unique identifier of the refund.
    - `dateTime` string, date-time, required — Date and time that the refund was processed.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
    - `amount` integer, required — Amount of the refund. This value is in the currency’s lowest denomination, for example, cents.
    - `status` 'ready' | 'pending' | 'declined' | 'complete' | 'referral' | 'pickup' | 'reversal' | 'returned' | 'admin' | 'expired' | 'accepted', required — Current status of the refund.
    - `responseCode` 'A' | 'D' | 'E' | 'P' | 'R' | 'C', required — Response from the processor. - `A` - The processor approved the transaction. - `D` - The processor declined the transaction. - `E` - The processor received the transaction but will process the transaction later. - `P` - The processor authorized a portion of the original amount of the transaction. - `R` - The issuer declined the transaction and indicated that the customer should contact their bank. - `C` - The issuer declined the transaction and indicated that the merchant should keep the card as it was reported lost or stolen.
    - `responseMessage` string, required — Description of the response from the processor.
    - `link` Link — Object that contains HATEOAS links for the resource.
      - `rel` string, required — Indicates the relationship between the current resource and the target resource.
      - `method` string, required — HTTP method that you need to use with the target resource.
      - `href` string, required — URL of the target resource.
  - `returns` BankTransferReturnSummary[] — List of returns issued against the payment.
    - `paymentId` string, required — Unique identifier that our gateway assigned to the payment.
    - `date` string, date, required — The date that the check was returned.
    - `returnCode` string, required — The NACHA return code.
    - `returnReason` string, required — The reason why the check was returned.
    - `represented` boolean, required — Indicates whether the return has been re-presented.
    - `closed` boolean, required — Indicates whether the merchant accepted an alternative payment method to complete the payment.
    - `link` Link — Object that contains HATEOAS links for the resource.
      - `rel` string, required — Indicates the relationship between the current resource and the target resource.
      - `method` string, required — HTTP method that you need to use with the target resource.
      - `href` string, required — URL of the target resource.
  - `representment` PaymentSummary — Object that contains information about a payment.
    - `paymentId` string, required — Unique identifier of the payment.
    - `dateTime` string, date-time, required — Date and time that the payment was processed.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
    - `amount` integer, required — Amount of the payment. This value is in the currency’s lowest denomination, for example, cents.
    - `status` 'ready' | 'pending' | 'declined' | 'complete' | 'referral' | 'pickup' | 'reversal' | 'returned' | 'admin' | 'expired' | 'accepted', required — Current status of the payment.
    - `responseCode` 'A' | 'D' | 'E' | 'P' | 'R' | 'C', required — Response from the processor. - `A` - The processor approved the transaction. - `D` - The processor declined the transaction. - `E` - The processor received the transaction but will process the transaction later. - `P` - The processor authorized a portion of the original amount of the transaction. - `R` - The issuer declined the transaction and indicated that the customer should contact their bank. - `C` - The issuer declined the transaction and indicated that the merchant should keep the card as it was reported lost or stolen.
    - `responseMessage` string — Response description from the processor.
    - `link` Link — Object that contains HATEOAS links for the resource.
      - `rel` string, required — Indicates the relationship between the current resource and the target resource.
      - `method` string, required — HTTP method that you need to use with the target resource.
      - `href` string, required — URL of the target resource.
  - `transactionResult` BankTransferResult, required — Object that contains information about the transaction.
    - `type` 'payment' | 'refund' | 'unreferencedRefund' | 'accountVerification', required — Type of transaction.
    - `status` 'ready' | 'pending' | 'declined' | 'complete' | 'admin' | 'reversal' | 'returned', required — Status of the transaction. The value is one of the following: - `ready` - Successful transaction. We added the payment to the open batch. - `pending` - Successful transaction. We added the payment to the open batch, but we don’t collect the funds when the batch is closed. - `declined` - Unsuccessful transaction. The customer's bank declined the transfer. - `complete` - Successful transaction. The funds have moved to the merchant’s bank account. - `admin` - Transaction under review. We have flagged an issue with the transaction. - `reversal` - Transaction cancelled. The transaction was cancelled, and we removed the transaction from the open batch. - `returned` - Unsuccessful transaction. Automated clearing house (ACH) returned the transaction due to an error. For more information about the error, view the **returns** object.
    - `authorizedAmount` integer — Amount of the transaction. **Note:** The amount is negative for a refund.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
    - `responseCode` string, required — Response from the processor. - `A` - The processor approved the transaction. - `D` - The processor declined the transaction.
    - `responseMessage` string — Description of the response from the processor.
    - `processorResponseCode` string — Original response code that the processor sent.
  - `customFields` CustomField[] — Array of customField objects.
    - `name` string, required — Name of the custom field.
    - `value` string, required — Value for the custom field.

## Other responses

- `400` — Validation error
- `401` — Identity could not be verified
- `403` — Do not have permissions to perform this action
- `404` — Resource not found
- `406` — Not acceptable
- `409` — Conflict
- `415` — Unsupported media type
- `500` — An error has occured

---

[API](https://skmtc.dev/payroc/apis/schema.md) · [All operations](https://skmtc.dev/payroc/apis/schema/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/payroc/schema/revisions/1d9d3e305945/schema)
