Apple Pay
Add Apple Pay to iOS apps, watchOS apps and to websites for these supported countries.
MasterCard, Visa, Amex and Discover branded Apple Pay payments receive liability shift.
Get started
- Create an Apple Merchant ID.
- Ask your Worldpay Implementation Manager to enable Apple Pay.
- Get your Certificate Signing Request (CSR) from Worldpay.
- Get your payment processing certificate from Apple using the CSR provided by Worldpay.
Enable Apple Pay in-app
- Enable Apple Pay in Xcode.
- Set
merchantCapabilities
toPKMerchantCapability3DS
, as Worldpay only supports 3DS.
Enable Apple Pay on the web
- Register and verify any domains that will host Apple Pay.
- Create a merchant identity certificate. This is used to establish a secure connection between your servers and Apple's servers.
- Set
merchantCapabilities
toPKMerchantCapability3DS
, as Worldpay only supports 3DS.
Apple Pay payment request
Here is an example of an Apple Pay authorization request. For more information on taking an Apple Pay payment take a look at our Card Payments API documentation.
POST
your authorization request to the customerInitiatedTransactions
action link received in your payments root resource response to authorize a payment.
Authorization example request
POST
https://try.access.worldpay.com/cardPayments/customerInitiatedTransactions
{ "transactionReference": "Memory265-13/08/1876", "merchant": { "entity": "default" }, "instruction": { "requestAutoSettlement": { "enabled": false }, "narrative": { "line1": "Mind Palace" }, "value": { "currency": "GBP", "amount": 250 }, "paymentInstrument": { "type": "card/wallet+applepay", "walletToken": "{\"version\": \"EC_v1\",\"data\": \"kdHd..GQ==\",\"signature\": \"MIAGCSqGSIb3DQEH...AAA\",\"header\": {\"transactionId\": \"d3b28af..f8\",\"ephemeralPublicKey\": \"MFkwE..Q==\",\"publicKeyHash\": \"dxCK..6o=\" }}" } }, "channel": "ecom" }
The paymentInstrument.walletToken
is taken from payment.paymentToken.paymentData
in the Apple Pay payment request.
Apple Pay payment response
Successful payment
You receive:
- an HTTP code
201
- an
"outcome": "authorized"
- a
paymentInstrument
- links to cancel, settle, partially settle or query
Refused payment
You receive:
- an
"outcome": "refused"
- a refusal code
- a
description
that gives additional context on the refusal - a
paymentInstrument
{ "outcome": "authorized", "riskFactors": [{ "risk": "notChecked", "detail": "postcode", "type": "avs" }, { "risk": "notChecked", "detail": "address", "type": "avs" } ], "scheme": { "reference": "schemeReference" }, "paymentInstrument": { "type": "card/network+masked", "cardBin": "444433", "lastFour": "1111", "tokenNumber": "444433******1111", "countryCode": "GB", "expiryDate": { "month": 2, "year": 2028 }, "cardBrand": "visa", "fundingType": "debit", "category": "consumer", "issuerName": "VALID_ISSUER", "paymentAccountReference": "somePAR" }, "_links": { "cardPayments:cancel": { "href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA==" }, "cardPayments:settle": { "href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA==" }, "cardPayments:partialSettle": { "href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA==" }, "cardPayments:events": { "href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA==" }, "tokens:token": { "href": "https://access.worldpay.com/tokens/linkData" }, "curies": [{ "name": "cardPayments", "href": "https://try.access.worldpay.com/rels/payments/{rel}", "templated": true }] } }
The paymentInstrument
includes brand
, fundingType
and paymentAccountReference
. They can have the following values:
brand
:
visa
visaElectron
mastercard
maestro
amex
fundingType
:
debit
credit
paymentAccountReference
(PAR):
The payment account reference is a unique identifier associated with a specific cardholder PAN. This 29 character identification number can be used in place of sensitive customer identification fields. It can be transmitted across the payments ecosystem to facilitate customer identification.
You can use the payments:settle
action link to settle the payment straight away. Alternatively you can cache the response and use the link to settle the payment later.