Capture an Apple Pay Authorization {#applepay-txn-capture-ex}
=============================================================

The topics in this section show to how to capture an authorized Apple Pay payment transaction:

* Basic Steps: Capturing an Authorization
* Fields Required to Capture an Authorization
* REST Example: Capturing an Authorization

Basic Steps: Capturing an Authorization {#applepay-txn-capture-ex-rest-steps}
=============================================================================

1. Follow these steps to capture an authorized Apple Pay payment transaction:

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

   * Use the API fields listed in [Fields Required to Capture an Authorization](/docs/bofa/en-us/apple-pay/developer/gpx/rest/applepay/applepay-txns-intro/applepay-txn-capture-ex/applepay-txn-capture-ex-rest-fields.md "").
   * Refer to the example in [REST Example: Capturing an Authorization](/docs/bofa/en-us/apple-pay/developer/gpx/rest/applepay/applepay-txns-intro/applepay-txn-capture-ex/applepay-txn-capture-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}/captures`
   * Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/captures`

   #### ADDITIONAL INFORMATION

   Replace the `{id}` portion of the URL with the transaction ID of the payment that you want to capture. 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 Capture an Authorization {#applepay-txn-capture-ex-rest-fields}
==================================================================================

As a best practice, include these REST API fields in your request to capture an authorized Apple Pay payment 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
:

orderInformation.amountDetails.totalAmount
:

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

REST Example: Capturing an Authorization {#applepay-txn-capture-ex-rest-code}
=============================================================================

Request

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

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": "2024-11-21T04:17:20Z"
}
```

