Using ApplePay

To use Apple Pay as a payment method, you need to include the Apple Pay token returned by Apple in the **ApplePayToken **field within the **ApplePay **object. This should be included in a Payment Sale API call.

{
    "IncludeRawProcessorResponse": true,
    "PaymentMethod": {
        "merchantPaymentMethodRefId": "1235-12345-ljd123",
        "ApplePay": {
            "ApplePayToken": "{\"paymentData\":{\"data\":\"1111111111111111111111111111111111111111111111111111111111111111111111\",\"signature\":\"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\",\"header\":{\"publicKeyHash\":\"11111111111111111111111111111111\",\"ephemeralPublicKey\":\"11111111111111111111111111111111111111111111111111111111111111111==\",\"transactionId\":\"11111111111111111111111111111111111111111111111111111111111111\"},\"version\":\"EC_v1\"},\"paymentMethod\":{\"displayName\":\"Visa 0121\",\"network\":\"Visa\",\"type\":\"credit\"},\"transactionIdentifier\":\"111111111111111111111111111111111111111111111111111111111111111111\"}"
        },
        "BillingAddress": {
            "AddressLine1": "381 Forest Ave. Suite C",
            "City": "Laguna Beach",
            "State": "CA",
            "PostalCode": "92651",
            "Country": "USA"
        }
    },
    "Invoice": {
        "MerchantInvoiceRefId": "123456789",
        "Amount": {
            "Currency": "USD",
            "Value": "12.20"
        }
    }
}

In this integration, include the Apple Pay token, which contains the payment data and transaction details, under the ApplePayToken field. Replace the example data with the token response you receive from Apple Pay.

If the processor doesn't support it, you will get a 400 Bad request back

{
    "message": "Merchant does not have configured processor for payment method type GooglePay"
}