Skip to content

Apple Pay

Add Apple Pay to iOS apps, watchOS apps and to websites for these supported countries.

Important

Mastercard, Visa, Amex and Discover branded Apple Pay payments receive liability shift.

Get started

  1. Read through Apple's overview.
  2. Create an Apple Merchant ID.
  3. Ask your Worldpay Implementation Manager to enable Apple Pay.
  4. Get your Certificate Signing Request (CSR) from Worldpay.
  5. Get your payment processing certificate from Apple using the CSR provided by Worldpay.
  1. Enable Apple Pay in Xcode.
  2. Set merchantCapabilities to PKMerchantCapability3DS, as Worldpay only supports 3DS.
  1. Register and verify any domains that will host Apple Pay.
  2. Create a merchant identity certificate. This is used to establish a secure connection between your servers and Apple's servers.
  3. Set merchantCapabilities to PKMerchantCapability3DS, as Worldpay only supports 3DS.

Supported card brands

Set the supportedNetworks property in your integration with Apple Pay to control available payment networks.

Note

We support Apple Pay payments with Visa, Mastercard, Maestro, American Express (Amex), Discover, eftpos, and Cartes Bancaires.

Apple Pay payment request

Use our Customer Initiated Transactions endpoint to take Apple Pay payments.

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.

For more information on taking an Apple Pay payment, take a look at our Card Payments API documentation.

Use Apple Pay to set up and take repeat payments

Your customer can use Apple Pay to set up repeat payments (such as subscriptions). In those cases, make sure to include the recurringPaymentRequest modifier in your Apple Pay payment request. This allows you to include additional information within the Apple Pay form relating to the payment agreement you are making with your customer, such as terms and conditions and billing frequency.

Now, include the customerAgreement object in your Customer Initiated Transactions Apple Pay request:

{
...
  "instruction": {
    ...
    "customerAgreement": {
      "type": "subscription",
      "storedCardUsage": "first"
    }
  }
}

We convert the Apple Pay encrypted payload into a Worldpay Token, which will be returned to you in the response to the above request. Use that token to request subsequent recurring Merchant Initiated Transactions.

Apple Pay Merchant Tokens (MPAN)

When you use the recurringPaymentRequest property, Apple issues a merchant token (sometimes referred to as a Merchant PAN or MPAN).

Merchant tokens are specific to the merchant, rather than to a particular iOS device, meaning that they remain valid even if your customer upgrades their iOS device and removes the card from their Apple wallet on their old device.

There are no changes to the format of the Apple Pay payment token that you submit to Worldpay.

If the card brand does not support merchant-scoped tokens, Apple issues a regular device-specific token for the payment request.

Apple Pay payment response

Successful payment

You receive:

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
        }]
    }
}

We return the "paymentInstrument" object if we are able to provide information related to the underlying card used in the authorization request.

Note

If we return the paymentInstrument object, there is no guarantee that each field listed below will be returned with every transaction.

ParameterDescription
paymentInstrument.typeThe type of paymentInstrument. E.g.:
  • card/plain+masked
  • card/network+masked
  • card/network
paymentInstrument.cardBrandThe card brand. Sometimes referred to as the network or scheme. E.g.:
  • visa
  • mastercard
  • amex
paymentInstrument.cardBinThe card bin. E.g.:
444433
Note
this may contain the * character.
paymentInstrument.lastFourThe last four digits of the Apple Pay token. E.g.:
1111
Note
This may contain the * character, where the card number is less than 16 digits.
paymentInstrument.expiryDate.monthThe Apple Pay token expiry month. E.g.:
11
paymentInstrument.expiryDate.yearThe Apple Pay token expiry year. E.g.:
2028
paymentInstrument.fundingTypeHow the card is funded. E.g.:
  • credit
  • debit
  • prepaid
  • deferredDebit
  • chargeCard
paymentInstrument.categoryWhether the card is classed as a consumer card or a card for commercial use. E.g.:
  • consumer
  • commercial
paymentInstrument.countryCodeThe alpha-2 ISO-3166 country code that the card was issued in. May return "N/A" where the country is unknown. E.g.:
GB
paymentInstrument.issuerNameThe name of the card issuer. E.g.:
Some Issuer PLC.
paymentInstrument.paymentAccountReferenceThe payment account reference (PAR) is a non-financial reference that uniquely identifies the underlying cardholder account. This allows you to correlate payments made with differing instruments (e.g. "card/plain" and "card/wallet+applepay"), where the same account funds the transaction. A PAR cannot be used to initiate a payment. E.g.:
ABC123DEF456GHI789JKL123MNO45

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.