Apple Pay
Learn how to integrate Apple Pay into your checkout journey.
Overview
Apple Pay provides a secure payment method that can simplify your customer's checkout experience both in-app and on the web. It is available on an iPhone, iPad and Apple Watch. Apple Pay stores payment information on the user's device and authenticates the user via biometrics.
It is PSD2 SCA-compliant, meaning you don't need to utilise 3-D Secure before authorising the payment. The user will be presented with a payment sheet, where they can choose which of their stored cards to use and provide contact, billing and shipping data without needing to fill out any forms.
Apple Pay supports liability shift for American Express, Discover, JCB, Mastercard and Visa cards. For Visa, however, liability shift only occurs for transactions with cards issued in Europe.
It works with many of the major credit and debit cards from leading banks on specific devices and browsers (within hosted countries and regions).
Refer to Apple's documentation for:
Issuing banks that support Apple Pay
Countries and regions where Apple Pay is available
Note
The country limitation applies to the customer's country and not the merchant's.
Setting up Apple Pay
In order to setup Apple Pay you will need:
- A direct integration to the Acquired.com API.
- Apple Pay (on web) - You can use our certificates or you can use your own.
- Apple Pay (in-app) - You are required to create a payment processing certificate.
Note
When using Apple Pay on your website, we advise you to use our certificates as this is a much simpler process.
Process an Apple Pay payment
Once you’ve successfully integrated your web or application with Apple Pay and are able to send the returned payload to your server. You are then capable of submitting Apple Pay transactions to Acquired.com via our API.
At the end of the Apple Pay process an encrypted payload will be returned to your application, like the example below. Base64 the entire payload and then pass through to us in the token
field.
{"version":"EC_v1","data":"Xnt8nkb239ci1iTWXbR1v7JvIN6YiaMNVpdwTAZad6WG1Wttpk..."}}
Using the Apple Pay endpoint, submit the base64 encoded string value through to us in the token
field of your request.
{
"transaction": {
"order_id": "1f1f2a61-5b68-4725-a0ce-9560514ec00b",
"amount": 15.02,
"currency": "gbp",
"capture": true
},
"payment": {
"token": "{{token}}",
"scheme": "visa",
"type": "debit",
"display_name": "**** 4242",
"create_card": false,
"reference": "Custom Ref 001"
},
"customer": {
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
See below a list of the parameters passed in the Apple Pay request:
Field | Type | Description |
---|---|---|
token | string | Encrypted payload returned by Apple at the end of the payment process in base64 format. |
scheme | string | The scheme the card belongs to. |
type | string | The type of card. |
display_name | string | The last four digits of the card number, that will be displayed to the customer as the card used for the payment. |
create_card | boolean | Set to true to create a card for future use. |
reference | string | Where supported by the acquiring bank set the reference, to appear on the card holders bank statement. |
You will then receive either a successful or error response.
Successful response:
{
"transaction_id": "a7e3fde5-5b83-44f4-9915-782bc7121717",
"status": "success",
"reason": "",
"issuer_response_code": "00",
"check": {
"avs_line1": "matched",
"avs_postcode": "matched",
"cvv": "matched"
},
"links": [
{
"rel": "self",
"href": "/v1/transactions/a7e3fde5-5b83-44f4-9915-782bc7121717"
}
]
}
400 error response:
{
"status": "error",
"error_type": "validation",
"title": "Your request parameters did not pass our validation.",
"instance": "string",
"invalid_parameters": [
{
"parameter": "transaction.currency",
"reason": "format is invalid, must be [aed,aud,acd,chf,cny,dkk,eur,gbp,hkd,jpy,mxn,sek,usd,zar]"
}
]
}
Apple Pay Recurring
Apple Pay Recurring is a feature of Apple Pay that allows users to set up recurring payments for services such as subscriptions, memberships, and other regular payments. With Apple Pay Recurring, users can link their credit or debit card to their Apple Pay account and authorise regular payments to be made automatically.
Apple Pay recurring payments work in the exact same way as recurring card payments, please refer to our guide for more information.
Updated 9 months ago