Skip to content

Apple Pay

Last updated: 14th July 2022

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.


Before you start

Before you can accept Apple Pay payments, you need to set up and configure Apple Pay.

If you plan to process Apple Pay payment through an entity outside the European Economic Area (EEA), please contact your Customer Success Manager or Integration Engineer.

Make a payment

Once you've set up and configured Apple Pay, you're ready to accept Apple Pay payments through our payment gateway.

Step 1: Generate a Checkout.com token from the Apple Pay token

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.

Alternatively, if you want to decrypt the Apple Pay token yourself and process a payment, follow our pay with a pre-decrypted token guide.

Endpoints

For the full API specification, see the API reference.

    post

    https://api.checkout.com/tokens

    Request example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    {
    "type": "applepay",
    "token_data": {
    "version": "EC_v1",
    "data": "t7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=",
    "signature": "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwb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ADBkAjA6z3KDURaZsYb7NcNWymK/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA4MDIxNjA5NDZaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIGEfVr+4x9RQXyfF8IYA0kraoK0pcZEaBlINo6EGrOReMAoGCCqGSM49BAMCBEgwRgIhAKunK47QEr/ZjxPlVl+etzVzbKA41xPLWtO01oUOlulmAiEAiaFH9F9LK6uqTFAUW/WIDkHWiFuSm5a3NVox7DlyIf0AAAAAAAA=",
    "header": {
    "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX1ievoT8DRB8T5zGkhHZHeDr0oBmYEgsDSxyT0MD0IZ2Mpfjz2LdWq6LUwSH9EmxdPEzMunsZKWMyOr3K/zlsw==",
    "publicKeyHash": "tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=",
    "transactionId": "3cee89679130a4b2617c76118a1c62fd400cd45b49dc0916d5b951b560cd17b4"
    }
    }
    }

    Response example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    {
    "type": 'applepay',
    "token": 'tok_ymu4qlccztkedmd6b7c3hcf6ae',
    "expires_on": '2019-10-21T10:48:35Z',
    "expiry_month": 8,
    "expiry_year": 2023,
    "scheme": 'Visa',
    "last4": '6222',
    "bin": '481891',
    "card_type": 'Debit',
    "card_category": 'Consumer',
    "issuer": 'HSBC BANK PLC',
    "issuer_country": 'GB',
    "product_id": 'F',
    "product_type": 'Visa Classic'
    }

    Step 2: Request a payment

    Using the token (tok_...) you got in the response above, make a standard payment request.

    Endpoints

    For the full API specification, see the API reference.

      post

      https://api.checkout.com/payments

      Request example

      1
      2
      3
      4
      5
      6
      7
      8
      {
      "source": {
      "type": "token",
      "token": "tok_ymu4qlccztkedmd6b7c3hcf6ae"
      },
      "amount": 6500,
      "currency": "USD"
      }

      Response example

      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.


      Testing Apple Pay

      Before you start

      To test Apple Pay payments, you'll need the following:

      Apple Pay test 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.

      CardNumberExpiryCVV

      Visa

      4761 2099 8001 1439

      11/2022

      569

      4761 3497 5001 0326

      11/2022

      851

      Mastercard

      5204 2477 5000 1497

      11/2022

      111

      5204 2477 5000 1489

      11/2022

      111

      American Express

      3499 563102 56071

      12/2022

      1111

      3499 562866 52212

      12/2022

      111

      Troubleshooting

      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.

      Displaying the Apple Pay button

      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(...)).

      Validating the Apple Pay Session

      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.
      • The same goes for the environment; if you configured your merchant ID in sandbox, make sure you are using the sandbox environment.