Apple Pay
Add
Important: MasterCard, Amex and Discover branded Apple Pay payments receive liability shift treatment.
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.
EnableApple Pay in-app
- Enable Apple Pay in Xcode.
- Set
merchantCapabilities
toPKMerchantCapability3DS
, as Worldpay only supports 3DS.
EnableApple 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
POST
your authorization request to thepayments:authorize
Authorization example request
POST https://try.access.worldpay.com/payments/authorizations
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "MindPalaceLtd"
},
"instruction": {
"narrative": {
"line1": "Mind Palace Ltd"
},
"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=\"
}
}"
}
}
}
The paymentInstrument.walletToken
is taken from payment.paymentToken.paymentData
in the Apple Pay
Apple Pay payment response
Successful payment
You receive:
- an HTTP code
201
- an
"outcome": "authorized"
- a
paymentInstrument
- links to
cancel ,settle ,partially settle ortrack payment events
Refused payment
You receive:
- an
"outcome": "refused"
- a
refusal code - a
description
that gives additional context on the refusal - a
paymentInstrument
Example responses
{
"outcome": "authorized",
"riskFactors": [{
"risk": "not_checked",
"detail": "postcode",
"type": "avs"
},
{
"risk": "not_matched",
"detail": "address",
"type": "avs"
}],
"paymentInstrument": {
"type": "card/network+masked",
"card": {
"number": {
"bin": "444433",
"last4Digits": "1111"
},
"countryCode": "GB",
"expiryDate": {
"month": 1,
"year": 2020
},
"brand": "visa",
"fundingType": "debit",
"issuer": {
"name": "VALID_ISSUER"
},
"paymentAccountReference": "somePAR"
}
},
"_links": {
"payments:cancel": {
"href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiJ9"
},
"payments:settle": {
"href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiJ9"
},
"payments:partialSettle": {
"href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiJ9"
},
"payments:events": {
"href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9"
},
"curies": [{
"name": "payments",
"href": "https://try.access.worldpay.com/rels/payments/{rel}",
"templated": true
}]
}
}
{
"outcome": "refused",
"description": "Do not honour",
"code": "5",
"riskFactors": [{
"risk": "not_checked",
"detail": "postcode",
"type": "avs"
},
{
"risk": "not_matched",
"detail": "address",
"type": "avs"
}],
"paymentInstrument": {
"type": "card/network+masked",
"card": {
"number": {
"bin": "444433",
"last4Digits": "1111"
},
"countryCode": "GB",
"brand": "visa",
"fundingType": "debit",
"issuer": {
"name": "VALID_ISSUER"
},
"paymentAccountReference": "somePAR"
}
}
}
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