Reverse an Apple Pay Payment Authorization {#applepay-txn-reversal-ex}
======================================================================

The topics in this section show to how to reverse an Apple Pay payment authorization:

* Basic Steps: Reversing a Payment Authorization
* Fields Required to Reverse a Payment Authorization
* REST Example: Reverse a Payment Authorization

Basic Steps: Reversing a Payment Authorization {#applepay-txn-reversal-ex-rest-steps}
=====================================================================================

1. Follow these steps to reverse an Apple Pay payment authorization:

2. Create the request message with the required `REST` API fields.

   * Use the API fields listed in [Fields Required to Reverse a Payment Authorization](/docs/bofa/en-us/apple-pay/developer/gpx/rest/applepay/applepay-txns-intro/applepay-txn-reversal-ex/applepay-txn-reversal-ex-rest-fields.md "").
   * Refer to the example in [REST Example: Reverse a Payment Authorization](/docs/bofa/en-us/apple-pay/developer/gpx/rest/applepay/applepay-txns-intro/applepay-txn-reversal-ex/applepay-txn-reversal-ex-rest-code.md "").
3. Send the request to one of these endpoints:

   * Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/reversals`
   * Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/reversals`

   #### ADDITIONAL INFORMATION

   Replace the `{id}` portion of the URL with the transaction ID of the payment that you want to reverse. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the response to the authorization request. Example value: 7359642011156554503954

4. Verify the response messages to make sure that the request was successful.

   #### ADDITIONAL INFORMATION

A 200-level HTTP response code indicates success. See the [Transaction Response Codes](https://developer.merchant.services.bankofamerica.com/api/reference/response-codes.md "").

Fields Required to Reverse a Payment Authorization {#applepay-txn-reversal-ex-rest-fields}
==========================================================================================

As a best practice, include these REST API fields in your request to reverse the authorization of an Apple Pay transaction.  
Depending on your processor, your geographic location, and whether the relaxed address verification system (RAVS) is enabled for your account, some of these fields might not be required. It is your responsibility to determine whether an API field can be omitted from the transaction you are requesting. For information about the relaxed requirements for address data and expiration dates in payment transactions, see the [Payments Developer Guide](https://developer.merchant.services.bankofamerica.com/docs/bofa/en-us/payments/developer/ctv/rest/payments/payments-intro.md "").

clientReferenceInformation.code
:
Set this field to the value returned in the response to the original authorization.

orderInformation.amountDetails.currency
:

processingInformation.paymentSolution
:
Set the value to `001` to identify Apple Pay as the digital payment solution.

reversalInformation.amountDetails.totalAmount
:

REST Example: Reverse a Payment Authorization {#applepay-txn-reversal-ex-rest-code}
===================================================================================

Request

```
{ 
  "clientReferenceInformation": {
    "code": "TC_1231223"
  },
  "processingInformation": {
    "paymentSolution": "001"
  },
  "orderInformation": {
    "amountDetails": {
      "currency": "USD"
    }
  },
  "reversalInformation": {
    "amountDetails": {
      "totalAmount": "10"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "void": {
      "method": "POST",
      "href": "/pts/v2/captures/6662994431376681303954/voids"
    },
    "self": {
      "method": "GET",
    }
  },
  "clientReferenceInformation": {
    "code": "TC_1231223"
  },
  "id": "6662994431376681303954",
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "10.00",
      "currency": "USD"
    }
  },
  "reconciliationId": "66535942B9CGT52U",
  "status": "PENDING",
  "submitTimeUtc": "2025-01-04T23:56:13Z"
}
```

