Skip to main content

Apple Pay

Introduction to Apple Pay

Apple Pay™ is a digital wallet that streamlines card payments, enabling swift and effortless transactions without the need to repeatedly input card information. Apple securely stores the card data. This option is compatible with specific browsers and Apple devices, including phones and computers. For a comprehensive list of supported countries and devices, refer to the official Apple website.

Note that...

The description below concerns making the service available in a mobile app or by running the Apple Pay application directly from the website of the payment recipient (e-store).

iOS

To enable Apple Pay payments within your mobile app or on a website, you'll need to start by obtaining an Apple Development Account and applying for the Apple Developer Program. The approval process can take a few days, as indicated in the Initiating Apple Pay documentation. Once approved, you can proceed with the following steps:

For mobile app integration with Apple Pay, refer to the guidelines provided on Apple Developer.

To simplify the integration process, you can leverage the technical documentation available for the PayU | Mobile SDK.

Web

To integrate a website with Apple Pay, follow the instructions provided on the Apple Developer platform.

When creating an Apple Pay Session, note that PayU supports only Visa and MasterCard payment cards under the 3DS protocol, and thus requires correct parameterization of the created Apple Pay request (regardless of whether you are using the Apple Pay JS API or the Payment Request API):

var request = {
...,
supportedNetworks: ['visa', 'masterCard'],
merchantCapabilities: ['supports3DS'],
...
}

Additionally, please be aware that for each session you create, it is necessary to manage the following events:

  • onvalidatemerchant - While handling this event, note that the request to create an Apple Pay Payment Session is different depending on the chosen integration method;
  • onpaymentauthorized - In this event, Apple will provide a paymentData object (in JSON format) as a response. This object contains a securely encrypted Apple Pay token, which can be accessed in the event.payment.token.paymentData field.

An example Apple Pay Token looks like this:

{
"version": "EC_v1",
"data": "DjI8Ez7nPhVo742aGEzABz/TfxCPt9LSdf2/h+0xIgVJbi3fQqd4lv3ogoTI3SQ7vZrDAWI8g2lbd5sflXBHc0z+wSeybsCcqZB3n1edRFXU7+6DYmdhFFWWCejwUc6XZWmsSaVNEQf+Kc0SeYrj8Eskdapj8bYX/QXxXSPqS4IKSjB+f3O0gUXSq7LK/jA9dl+BbWW0l3gXERU6n5rcYndO5rnjiwNUpnm7EMIMfNU+IPbsubpL82kbL2MdMJB1grel03J4JKld6G0pFSmjR2mF/xBY/yKkADRhoQk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edi3Wy4yubqfxtg==",
"publicKeyHash": "xrJqUFO2jN5edGS8iETkfNXtwqnwSqRUUrQJBysFpZ8=",
"transactionId": "aa0b77fbb4f64cd3e5deef65177938b2d836e0d7d93d58000d8d54cfca19ae13"
}
}
Note that...

When utilizing multi-currency payments along with Apple Pay on your checkout page, it's important to note that when creating an Apple Pay Session, you should employ the amount following currency conversion. This calculated amount is detailed in the described process for multi-currency payments, ensuring accurate integration and payment processing.

Integration with domains managed in the management panel

In order to enable Apple Pay payments on your website, you need to configure your internet domains in the management panel. None of the steps described in the Configuration Instructions section are required in this case.

Open the Account Configuration → Apple Pay tab and add the domains on which you want to process Apple Pay payments. Follow the instructions displayed in the management panel.

Make sure to download the Apple verification file (for the sandbox or production environment) before adding the domain for validation purposes and place it in the appropriate location on your server so that it is accessible at https://[YOUR_DOMAIN]/.well-known/apple-developer-merchantid-domain-association.

After the domain is successfully validated, you will be able to process Apple Pay payments on your website.

In onvalidatemerchant to create an Apple Pay Payment Session use POST /api/v2_1/applepay/session.

Integration with self-managed domains (not recommended)

Why do we discourage self-managing domains?

Self-managing domains requires additional steps that can be difficult to perform, and in case of errors in domain configuration, it may result in the inability to process Apple Pay payments on your website. Therefore, we recommend using integration with domains managed in the management panel, which is simpler and less prone to errors.

In the first step, you need to perform the following actions:

Be aware that in onvalidatemerchant the request to create an Apple Pay Payment Session must be made from the server side of your web application.

Configuration Instructions

Be aware that you do not need to configure everything!

Perform only the processes that are necessary in your case (mobile application or website) according to what is described in the previous points.

Creating a Merchant ID

To create a Merchant ID, follow these steps:

  1. Log on to your Apple Developer account.
  2. Select Certificates, IDs & Profiles.
  3. Select Identifiers.
  4. Add a new Merchant ID by selecting the + sign in the top right of the screen.
  5. Enter an ID and description, and select Continue.
  6. Select Register to confirm the data entered.

Creating an Apple Pay Payment Processing Certificate

Note that...

Before creating certificate please (select: I am a merchant > Integration > Other question?) and ask for CSR file which is required in below process.

To create a Payment Processing Certificate identifier, follow these steps:

  1. Log on to your Apple Developer account.
  2. Select Certificates, IDs & Profiles.
  3. Select Identifiers.
  4. Select the Merchant ID that you have created, and select Edit. You can make your search easier by using the 5.Merchant IDs filter at the top right of the screen.
  5. In the Apple Pay Payment Processing Certificate section, select Create Certificate.
  6. On the next screen select Continue.
  7. Take received CSR file from the PayU IT support department and upload it to the site, selecting Choose File and then Continue.
  8. Download the generated certificate.
  9. Send the downloaded certificate (the file apple_pay.cer) to the (select: I am a merchant > Integration > Other question?) department.

Validating a Domain

To validate a domain, follow these steps:

  1. Log on to your Apple Developer account.
  2. Select Certificates, IDs & Profiles.
  3. Select Identifiers.
  4. Select the Merchant ID that you have created, and select Edit. You can make your search easier by using the Merchant IDs filter at the top right of the screen.
  5. In the Merchant Domains section, select Add Domain.
  6. Enter the name of your domain and select Continue.
Note that...

The domain must support HTTPS. Check if the server settings are in accordance with Apple guidelines.

  1. Download the file apple-developer-merchantid-domain-association.txt.
Note that...

Download the file only once, before performing domain validation! Repeated download will generate new file content which may result in error in the domain validation process.

  1. Save the downloaded file on the server, in the location given by Apple.
  2. Select Verify.

Creating an Apple Pay Merchant Identity Certificate

To create an Apple Pay Merchant Identity Certificate, follow these steps:

  1. Log on to your Apple Developer account.
  2. Select Certificates, IDs & Profiles.
  3. Select Identifiers.
  4. Select the Merchant ID that you have created, and select Edit. You can make your search easier by using the Merchant IDs filter at the top right of the screen.
  5. In the Apple Pay Merchant Identity Certificate section, select Create Certificate.
  6. In order to prepare the CSR file, follow the steps described on the Apple website, and then select Continue.
  7. Copy the generated CSR file, by selecting Choose File and then Continue.
  8. Download the generated certificate (merchant_id.cer) and open it in the Keychain Access application on a Mac computer.
  9. In Keychain Access, select the imported certificate and export it to .p12 format (Personal Information Exchange).
  10. (optional) Run the command:
openssl pkcs12 -in merchant_id.p12 -out merchant_id.pem -nodes -clcerts

If you prefer .p12 format for the certificates and you find it easier to manage them in this format, you can skip this step. 11. Copy the created certificate in the prefered format onto the server. It will be needed to create an Apple Pay Payment Session in the store validation process, during payment creation.

Creating an Apple Pay Order

To charge a payment card stored in Apple Pay, you must place an extended payMethods object in an OrderCreateRequest.

The payMethods.payMethod object must contain the authorizationCode field, the value of which is the Apple Pay token parameter encoded using the Base64 function. The field payMethod.value should have the value jp, and payMethod.type should have the value PBL.

Encoding Apple Pay Token

If you're using the PayU SDK, you don't need to encode the Apple Pay token. The SDK automatically handles the encoding for you.

"payMethods": {
"payMethod": {
"value": "jp",
"type": "PBL",
"authorizationCode": "ewogICJ2ZXJzaW9uIjogIkVDX3YxIiwKICAiZGF0YSI6ICJEakk4RXo3blBoVm83NDJhR0V6QUJ6L1RmeENQdDlMU2RmMi9oKzB4SWdWSmJpM2ZRcWQ0bHYzb2dvVEkzU1E3dlpyREFXSThnMmxiZDVzZmxYQkhjMHord1NleWJzQ2NxWkIzbjFlZFJGWFU3KzZEWW1kaEZGV1dDZWp3VWM2WFpXbXNTYVZORVFmK0tjMFNlWXJqOEVza2RhcGo4YllYL1FYeFhTUHFTNElLU2pCK2YzTzBnVVhTcTdMSy9qQTlkbCtCYldXMGwzZ1hFUlU2bjVyY1luZE81cm5qaXdOVXBubTdFTUlNZk5VK0lQYnN1YnBMODJrYkwyTWRNSkIxZ3JlbDAzSjRKS2xkNkcwcEZTbWpSMm1GL3hCWS95S2tBRFJob1FrVmxEUmljdUtWTXBkUlhYYklRancveVJrTHYvdThpeTF3WEk1WW1FQkIrVzRRcFBZc3V4eXM5NGdNUGFLaGNhRUsvT2FUMDk5YUZyTkJlemJ1TE1UY1R6YmhYT3BQd1duOXBrQUswZVpOT1E9PSIsCiAgInNpZ25hdHVyZSI6ICJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RHpBTkJnbGdoa2dCWlFNRUFnRUZBRENBQmdrcWhraUc5dzBCQndFQUFLQ0FNSUlENWpDQ0E0dWdBd0lCQWdJSWFHRDJtZG5NcHc4d0NnWUlLb1pJemowRUF3SXdlakV1TUN3R0ExVUVBd3dsUVhCd2JHVWdRWEJ3YkdsallYUnBiM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gogIH0KfQ=="
}
}

Subsequent processing of the request follows the standard procedure outlined in the Create a New Order section.

Note that...

Keep in mind that you might need to manage the redirection of the request to the 3D Secure authentication page.

Given that orders paid using the Apple Pay method are settled similarly to standard card payments, it is worth considering the integration of the service transaction data retrieve. This approach enables the distinction between cards entered via the PayU form and those acquired from Apple Pay.

Recurring Payments and Tokenization Using Apple Pay

Cards stored in Apple Pay can be used for recurring payments and creating multi-use tokens.

Testing

The Apple Pay payment method is also accessible within the sandbox environment. During the integration process, we recommend establishing a distinct Merchant ID (e.g., ending with ".test") along with the corresponding set of certificates.

Since Apple Pay isn't the default payment method, please contact the after your sandbox environment registration, but prior to commencing integration involving the Apple Pay payment method. Upon contact, you will also receive the CSR (Certificate Signing Request) file tailored for the Sandbox environment.

Before beginning to perform tests in the sandbox, please also read the Apple sandbox testing instructions.

We recommend using the card numbers:

  • 5204 2477 5000 1471
  • 4761 1200 1000 0492

since these are configured in the PayU sandbox to enable payments to be completed successfully.

Status Codes

Possible Errors
HTTP Status CodeStatus CodeStatus DescDescription
400 Bad request
ERROR_VALUE_INVALID
Bad Request: Amount is different in request and token.
Amount in Apple Pay token is not equal to amount in totalAmount.
400 Bad request
ERROR_VALUE_INVALID
Bad Request: Transactions with same id found.
Apple Pay token was already used.
400 Bad request
ERROR_VALUE_INVALID
Bad Request: Apple Pay token too old.
Apple Pay token validity time expired.
400 Bad request
ERROR_VALUE_INVALID
Bad Request: Currency is different in request and token.
Cuerrncy code in Apple Pay token is inconsistent with request.
400 Bad request
ERROR_VALUE_INVALID
Apple Pay Certificate used for token creation unknown to PayU.
Verification of the publicKeyHash value is required. If the error still occurs contact our support.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: header is empty.
header field is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: data is empty.
data field is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: signature is empty.
signature field is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: ephemeralPublicKey is empty.
ephemeralPublicKey field is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: publicKeyHash is empty.
publicKeyHashfield is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token: transactionId is empty.
transactionId field is missing in the Apple token or it is empty.
400 Bad request
ERROR_VALUE_INVALID
Problem with decrypted card: CARD_CARD_EXPIRED.
Card expired.
400 Bad request
ERROR_VALUE_INVALID
Invalid apple pay token.
The structure of the request body has been changed/corrupted. Try to pass the original value received from Apple.
400 Bad request
ERROR_VALUE_INVALID
Validation of OID's from signature failed.
Check the configuration of keys and certificates in your Apple account. Make sure you are using the correct Merchant ID.
400 Bad request
ERROR_VALUE_INVALID
Apple Pay token signed x minutes ago and it's too old, allowed 15 minutes.
The payload created with Apple Pay token was sent to PayU too late from the moment of generation.