Apple Pay
Last updated: May 17, 2023
Start seamlessly accepting credit card payments from your customers via Touch ID and Face ID, eliminating the need for them to manually type in their card and shipping details.
Information
For Apple Pay liability shift eligibility, refer to our 3D Secure page.
Before you can accept Apple Pay payments, you need to set up and configure Apple Pay.
Information
Apple Pay might require additional configurations to be enabled in a live environment. To verify your Checkout.com account configurations for Apple Pay, please contact your Account Manager.
Once you've set up and configured Apple Pay, you're ready to accept Apple Pay payments through our payment gateway.
Note
If you plan to process Apple Pay transactions through an entity outside of the European Economic Area (EEA), please contact your Account Manager.
After your customer validates their transaction with biometrics, Apple will generate a payment token.
The first step in processing an Apple Pay transaction is to convert this Apple Pay token into a Checkout.com card token.
Information
Alternatively, if you want to decrypt the Apple Pay token yourself and process a payment, follow our pay with a pre-decrypted token guide.
Mada cards can be processed in much the same way as other cards with Apple Pay, but you need to make sure that the device's payments permission is enabled for your merchant ID, and include Mada in the supportedNetworks
array.
For both Mastercard and Mada cards, do not include the supportsEMV
value in the merchantCapabilities
array, otherwise it may cause a failure with a 20030
format error.
For the full API specification, see the API reference).
post
https://api.checkout.com/tokens
1{2"type": "applepay",3"token_data": {4"version": "EC_v1",5"data": "t7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=",6"signature": "MIAGCSqGSIb3DQEHAqCA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4"11}12}13}
1{2"type": "applepay",3"token": "tok_ymu4qlccztkedmd6b7c3hcf6ae",4"expires_on": "2019-10-21T10:48:35Z",5"expiry_month": 8,6"expiry_year": 2023,7"scheme": "Visa",8"last4": "6222",9"bin": "481891",10"card_type": "Debit",11"card_category": "Consumer",12"issuer": "HSBC BANK PLC",13"issuer_country": "GB",14"product_id": "F",15"product_type": "Visa Classic"16}
Using the token (tok_...
) you got in the response above, make a standard payment request.
For the full API specification, see the API reference.
post
https://api.checkout.com/payments
1{2"source": {3"type": "token",4"token": "tok_ymu4qlccztkedmd6b7c3hcf6ae"5},6"amount": 6500,7"currency": "USD"8}
If you get a 201 Success
response and the approved
field is true
, your payment was successful. If the transaction failed, it's likely that the payment request was made with an invalid/expired card, or a valid card with an insufficient available balance.
To test Apple Pay payments, you'll need the following:
For more information about testing, see our testing resources.
Note
When testing in a sandbox environment, you cannot use a real Apple Pay wallet with real cards.
Once you've got a compatible device and a sandbox Apple Pay wallet, you can add one of the following test cards to it. See our testing guide for more information.
Card | Number | Expiry | CVV |
---|---|---|---|
Visa |
| 12/2025 | 090 |
| 12/2025 | 536 | |
Mastercard |
| 12/2024 | 111 |
| 12/2024 | 111 | |
American Express |
| 12/2024 | 1111 |
| 12/2024 | 1111 |
If something goes wrong, make sure you're using the correct keys, merchant ID and certificates. This is the most common issue we encounter. We recommend using descriptive names for your merchant IDs to clearly separate between your test and production environments.
If you don't have a card in your Apple Pay wallet, or you have a card that is not accepted based on the settings configured for Apple Pay (supported networks), your Apple Pay button might not be displayed if you display it conditionally (session.canMakePaymentsWithActiveCard(...)
).
When validating the Apple Pay Session, keep note of the following:
- Make sure you're using the correct merchant ID, and the correct
.key
and.pem
certificates associated with it. - If you process payments for more than one business with us, make sure you are using the correct merchant ID and keys for each business.
- The same goes for the environment; if you configured your merchant ID in sandbox, make sure you are using the sandbox environment.
If you are processing payments in UAE or Saudi Arabia, make sure you contact your Account Manager so they can enable Apple Pay on your account.
Also, if you configured Apple Pay for one of your businesses, but then tried to send a payment request using the keys for another of your businesses, you may get an error.