On This Page
Authorize an Apple Pay Payment with Merchant Decryption
The topics in this section shows you how to authorize an Apple Pay payment transaction with the
merchant decryption
implementation of Apple Pay.IMPORTANT
In the example, the payment being authorized
was made using a .
Visa card
,
and the processor is
Visa Platform Connect
If you want
to replicate this example
for a different card or a different processor,
you will need to change some of the API fields
in the request message.
For more information, see
Cards Supported for Apple Pay on Visa Platform Connect.
For general information about basic authorizations,
see the "Standard Payments Processing" section of the
.
Basic Steps: Authorizing a Payment with Merchant Decryption
- Follow these steps to request an Apple Pay payment authorization with merchant decryption:
- Create the request message with the requiredRESTAPI fields.
- Use the API fields listed in Fields Required to Authorize a Payment with Merchant Decryption.
- Refer to the example in REST Example: Authorize a Payment with Merchant Decryption.
- Send the message to one of these endpoints:
- Production:POSThttps://api.cybersource.com/pts/v2/payments
- Test:POSThttps://apitest.cybersource.com/pts/v2/payments
- Verify the response messages to make sure that the request was successful.
ADDITIONAL INFORMATION
A 200-level HTTP response code indicates success. See the .
Fields Required to Authorize a Payment with Merchant Decryption
As a best practice,
include these
decryption implementation of Apple Pay.
REST API
fields
in your request for an authorization transaction with the
Cybersource
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 .- Token authentication verification value cryptogram.
- The value for this field must be a 28-character, Base64-encoded string (the encoding method for Apple Pay transactions).
- Set the value to month in which the token expires. Format:MMPossible values:01through12.
- Set the value to the year in which the token expires. Format:yyyy.
- Set the value to customer's payment network token value that contains the customer's credit card number.
- ForVisa Platform Connect, set this field to the value that indicates the type of transaction that provided the payment network token data. Possible values:
- 1: In-app transaction.
- 2: Near-field communication (NFC) transaction. The customer’s mobile device provided the token data for a contactless EMV transaction.
- 3: A transaction using stored customer credentials onVisa Platform Connect, whether for merchant-initiated transactions (MITs) or customer-initiated transactions (CITs).
- IMPORTANTThis value does not specify the token service provider. It specifies the entity that provided you with information about the token.
- Three-digit value that indicates the card type. Possible values:
- 001: Visa (including mada co-badged cards issued in the Kingdom of Saudi Arabia.)
- 002: Mastercard (including mada co-badged cards issued in the Kingdom of Saudi Arabia)
- 007: JCB
- 060: mada (debit cards and prepaid cards issued in the Kingdom of Saudi Arabia)
- Type of transaction. Some payment card companies use this information when determining discount rates. Possible values:
- aesk: American Express SafeKey authentication.
- dipb: Discover card type.
- internet: Default value for authorizations. E-commerce order placed from a website.
- js: JCB J/Secure authentication.
- spa: Mastercard Identity Check authentication.
- vbv: Visa Secure authentication
- Set the value to001to identify Apple Pay as the digital payment solution.
REST Example: Authorize a Payment with Merchant Decryption
Request
{ "clientReferenceInformation": { "code": "TC_1231223" }, "processingInformation": { "commerceIndicator": "internet", "paymentSolution": "001" }, "paymentInformation": { "tokenizedCard": { "number": "4111111111111111", "expirationMonth": "12", "expirationYear": "2031", "cryptogram": "AceY+igABPs3jdwNaDg3MAACAAA=", "transactionType": "1", "type": "001" } }, "orderInformation": { "amountDetails": { "totalAmount": "10", "currency": "USD" }, "billTo": { "firstName": "John", "lastName": "Doe", "address1": "901 Metro Center Blvd", "locality": "Foster City", "administrativeArea": "CA", "postalCode": "94404", "country": "US", "email": "test@cybs.com" } } }
Response to a Successful Request
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/7359621903916966603954/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/7359621903916966603954" }, "capture": { "method": "POST", "href": "/pts/v2/payments/7359621903916966603954/captures" } }, "clientReferenceInformation": { "code": "TC_1231223" }, "id": "7359621903916966603954", "orderInformation": { "amountDetails": { "authorizedAmount": "10.00", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "expirationYear": "2031", "prefix": "411111", "expirationMonth": "12", "suffix": "1111", "type": "001" }, "card": { "type": "001" } }, "processingInformation": { "paymentSolution": "001" }, "processorInformation": { "systemTraceAuditNumber": "918032", "approvalCode": "831000", "merchantAdvice": { "code": "01", "codeRaw": "M001" }, "responseDetails": "ABC", "networkTransactionId": "016153570198200", "retrievalReferenceNumber": "500303918032", "consumerAuthenticationResponse": { "code": "2", "codeRaw": "2" }, "transactionId": "016153570198200", "responseCode": "00", "avs": { "code": "Y", "codeRaw": "Y" } }, "reconciliationId": "7359621903916966603954", "status": "AUTHORIZED", "submitTimeUtc": "2025-01-04T03:43:10Z" }