Processing an Apple Pay Payment Capture

This section uses a code example to show how to process an Apple Pay payment capture request.
IMPORTANT
In the example, a
Visa card
transaction is processed with
Visa Platform Connect
. If you want to replicate this example for a
different card or processor
, you will need to change some of the API fields in the request message.
For information about supported cards, see Card Types Supported on Visa Platform Connect with Apple Pay.
For general information about capture transactions, see the "Standard Payments Processing" section of the
Payments Developer Guide
.

Basic Steps

Follow these steps to request the capture= service for an Apple Pay payment authorization:
  1. Create the message with the required API fields.
  2. Send the message to one of these endpoints:
    • Production:
      POST
      https://api.cybersource.com
      /pts/v2/{id}/captures
    • Test:
      POST
      https://apitest.cybersource.com
      /pts/v2/{id}/captures
    Replace the
    {id}
    portion of the URL with the transaction ID included in the authorization request for the payment that you want to capture. For example, 6869458685866438003955.
  3. Verify the response messages to make sure that the request was successful. A 200-level HTTP response code indicates success.

Required Fields Capturing an Authorization

As a best practice, include these
REST API
fields in your request for a combined authorization and capture (sale) transaction with the
Cybersource
decryption implementation of Apple Pay.
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.
Set this field to the value returned in the response to the original authorization.
For
Visa Platform Connect
, set this field to the value that identifies the application vendor and application version for a third-party gateway.
You are provided with this value during testing and validation.
Set the value to
001
to identify Apple Pay as the digital payment solution.

REST Example: Capturing an Authorization

Example Request
{ "clientReferenceInformation": { "code": "TC_1231223", “partner”: { “thirdPartyCertificationNumber”: “123456789012” } }, "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" }