Menu

Apple Pay

AddApple Payto iOS apps, watchOS apps and to websites forthese supported countries.

Important: MasterCard, Amex and Discover branded Apple Pay payments receive liability shift treatment.

Get started

  1. Create an Apple Merchant ID.
  2. Ask your WorldpayImplementation Managerto enable Apple Pay.
  3. Get your Certificate Signing Request (CSR) from Worldpay.
  4. Get your payment processing certificate from Apple using the CSR provided by Worldpay.

EnableApple Pay in-app

  1. Enable Apple Pay in Xcode.
  2. Set merchantCapabilities to PKMerchantCapability3DS, as Worldpay only supports 3DS.

EnableApple Pay on the web

  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.

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 ourPayments API documentation.

POST your authorization request to thepayments:authorizeaction link received in yourquery the payments root resourcerequest to authorize a payment.

Authorization example request

POST https://try.access.worldpay.com/payments/authorizations

Copied!
{
    "transactionReference": "unique-transactionReference",
    "merchant": {
        "entity": "default"
    },
    "instruction": {
        "narrative": {
            "line1": "trading name"
        },
        "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 Paypayment request.

Apple Pay payment response

Successful payment

You receive:

Refused payment

You receive:

  • an "outcome": "refused"
  • arefusal code
  • a description that gives additional context on the refusal
  • a paymentInstrument

Example responses

Copied!
{
    "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 tosettle the paymentstraight away. Alternatively you can cache the response and use the link to settle the payment later.