Set up Adyen Apple Pay
Adyen Integration v2.0 supports Apple Pay. This article introduces how to set up and use Adyen Apple Pay payment methods, and export payment method data.
Prerequisites
- Ensure that you have enabled the Apple Pay functionality for your Adyen merchant account, and built your payment form to retrieve Apple Pay tokens as described in Adyen documentation.
You can use either an Adyen Apple Pay certificate or a custom Apple Pay certificate to generate an Apple Pay token. However, Zuora recommends that you take the Adyen certificate approach.
If you use the Adyen Apple Pay certificate to generate an Apple Pay token, all certificate management work is done on the Adyen side, so you do not need to upload it in Zuora. However, you need to retrieve a Base64 encoded string as a response. This string should be decoded prior to being sent to Zuora. See the Apple Pay session response from Adyen documentation for details.
If you use a custom Apple Pay certificate, you are responsible for the generation of the certificate and maintenance of its lifecycle. See Use your own Apple Pay certificate to complete the Apple Pay session validation from Adyen documentation for more information.
- Ensure that an Adyen Integration v2.0 gateway instance is in active use in your Zuora tenant.
Procedure
Take the following steps to set up Apple Pay for Adyen Integration v2.0:
Enable Apple Pay for Adyen
Take the following steps to enable Adyen Apple Pay:
- In your Zuora tenant, navigate to Settings > Payments > Payment Method.
- Click Edit and then select Adyen Apple Pay.
- Click Save. The Adyen Apple Pay payment method is then activated in your Zuora tenant.
Note that no update is required for your existing Adyen Integration v2.0 instance in Zuora to support Apple Pay.
Add a new Adyen Apple Pay payment method
After you have enabled Apple Pay in your Zuora tenant, you can create an Adyen Apple Pay payment method and associate it with a customer account.
Adyen Apple Pay payment methods can only be created through API operations. You can use either of the following API operations to create an Adyen Apple Pay payment method:
- REST API - Create a payment method
- Quickstart API - Create a payment method. Note that you must have Orders or Order Harmonization, and Invoice Settlement features enabled to use the Quickstart API. For more information about the Quickstart API, see Quickstart API Reference.
Create an Adyen Apple Pay payment method through the REST API
You can use the Create a payment method REST API operation to create an Adyen Apple Pay payment method. The following fields must be specified in the request:
accountKey
: Specify the customer account ID. This field is required unless the Orphan Payment Method feature is enabled.type
: SpecifyAdyenApplePay
.applePaymentData
: Include payload with Apple Pay token or Apple payment data. This information should be stringified.
You can also pass the shopperEmail
information to the gateway through any of the following methods:
- Use the
email
field in any of the following API operations: - Use the
gatewayOptions
field in the Create a payment method API operation.
If shopperEmail
is not provided through either the email
or gatewayOptions
field, the shopperEmail
field in the payment request is set to the BillTo personal email if it is available. If BillTo personal email is not specified, the shopperEmail
field is set to the BillTo work email.
The following code is a sample request:
Method and endpoint | POST https://apisandbox.zuora.com/apps/v1/payment-methods |
Request body |
{ "accountKey": "2c92c0f97911f46a0179147510484b90", "type": "AdyenApplePay", "email": "testemail@test.com", "applePaymentData": "{\"data\":\"hM8GTBX0UVhoKmJ/DkneZfwLlH/utWfEueshybbTpuzlf5i1IwO1kvW32SlFW7TmyvU98gf2Pp1FeyFCh7F2atmstxQdonkeJgpIUV7eWW1wUNaOeND28J8YQsEkDhC3sMgOJoju7FHcXNwveq5fk94StFZozRSi08oAjTnTJko5F32aY/JNWr19GiwWBHZe2jkokryt0TEWKO5hm5oTxeLs1LBOoC2ezaR+p2jQb4ISN2aCgCNiX8605w5eYWk7UCTK3Axf/EuJT4vHe75OKghEmcQLxvFzTtEw33ly6Nj2RJX3+I5TbYLXOfiAO0XnsWdhguDrKogtI44HMFqlNCdt79G71tXwCwbXz0VJywEh1d57tbU5Y5f6pw8TrjjeAMt9sa2pHuHmMGDf\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5DCCA4ugAwIBAgIIWdihvKr0480wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTIxMDQyMDE5MzcwMFoXDTI2MDQxOTE5MzY1OVowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPW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AsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUwIIWdihvKr0480wDQYJYIZIAWUDBAIBBQCggZUwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjEwNjAzMTgzNzExWjAqBgkqhkiG9w0BCTQxHTAbMA0GCWCGSAFlAwQCAQUAoQoGCCqGSM49BAMCMC8GCSqGSIb3DQEJBDEiBCCiDFBojwOJgYgEzWaGdLTMez4XiDpYJd34PswTPVdt+DAKBggqhkjOPQQDAgRGMEQCIHAWYyr/s28rtd/khGapLi1jCg3iXwgUfL2l4XadiKq3AiBHuronD982WBP3x0Tzc51rXwMEVpL+GDPme9Ydn2MF2gAAAAAAAA==\", \"header\": { \"publicKeyHash\":\"vJeh5XAkv8SGX2JHswEbnCUPn01YHcQ6imAp+gP300w=\", \"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEVx9kP/eFM6MrP5sXKuzHT7f9Uhsc0Rox0FKvRpHIiqQ05EXYPsgBJZCEjOYlkviC2jDSvV6tEC8Kfq/z/GhrFA==\", \"transactionId\":\"7fd9ede5ea8c1d7a8985346c241a8933190a1acb408448c52ac27f7862f674ff\" }, \"version\":\"EC_v1\" }" } |
You must ensure that the currency and authorization amount included in applePaymentData
are the same as the ones configured in your Apple Pay payment form when Verification is enabled. Verification is required to return a recurringDetailReference
that will be used in subsequent requests. In the example above, the currency is EUR and the authorization is 1.
In addition to the Create a payment method REST API operation, you can also use the following REST API operations to create an Apple Pay payment method together with other objects:
Note that once an Adyen Apple Pay payment method is created, it cannot be edited.
Create an Adyen Apple Pay payment method through the Quickstart API
You can use the Create a payment method operation to create an Adyen Apple Pay payment method through the Quickstart API. The following fields must be specified in the request:
account_id
: Specify the customer account ID. This field is required unless the Orphan Payment Method feature is enabled.type
: Specifyadyen_google_pay
.apple_payment.customer_token
: Include payload with Apple Pay token or Apple payment data. This information should be stringified.
You can also pass the shopperEmail
information to the gateway by using the gateway_options
field in the Create a payment method operation. For more information about the logic of populating the shopperEmail
field in the request, see Gateway Options fields supported by Adyen Integration v2.0.
The following code is a sample request:
Method and endpoint | POST https://apisandbox.zuora.com/v2/payment_methods |
Request body |
{ "account_id": "2c92c0f97911f46a0179147510484b90", "type": "adyen_apple_pay", "gateway_options": { "shopperEmail":"testemail@test.com" }, "apple_pay.customer_token": "{\"data\":\"hM8GTBX0UVhoKmJ/DkneZfwLlH/utWfEueshybbTpuzlf5i1IwO1kvW32SlFW7TmyvU98gf2Pp1FeyFCh7F2atmstxQdonkeJgpIUV7eWW1wUNaOeND28J8YQsEkDhC3sMgOJoju7FHcXNwveq5fk94StFZozRSi08oAjTnTJko5F32aY/JNWr19GiwWBHZe2jkokryt0TEWKO5hm5oTxeLs1LBOoC2ezaR+p2jQb4ISN2aCgCNiX8605w5eYWk7UCTK3Axf/EuJT4vHe75OKghEmcQLxvFzTtEw33ly6Nj2RJX3+I5TbYLXOfiAO0XnsWdhguDrKogtI44HMFqlNCdt79G71tXwCwbXz0VJywEh1d57tbU5Y5f6pw8TrjjeAMt9sa2pHuHmMGDf\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5DCCA4ugAwIBAgIIWdihvKr0480wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTIxMDQyMDE5MzcwMFoXDTI2MDQxOTE5MzY1OVowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3Rlb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gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUwIIWdihvKr0480wDQYJYIZIAWUDBAIBBQCggZUwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjEwNjAzMTgzNzExWjAqBgkqhkiG9w0BCTQxHTAbMA0GCWCGSAFlAwQCAQUAoQoGCCqGSM49BAMCMC8GCSqGSIb3DQEJBDEiBCCiDFBojwOJgYgEzWaGdLTMez4XiDpYJd34PswTPVdt+DAKBggqhkjOPQQDAgRGMEQCIHAWYyr/s28rtd/khGapLi1jCg3iXwgUfL2l4XadiKq3AiBHuronD982WBP3x0Tzc51rXwMEVpL+GDPme9Ydn2MF2gAAAAAAAA==\", \"header\": { \"publicKeyHash\":\"vJeh5XAkv8SGX2JHswEbnCUPn01YHcQ6imAp+gP300w=\", \"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEVx9kP/eFM6MrP5sXKuzHT7f9Uhsc0Rox0FKvRpHIiqQ05EXYPsgBJZCEjOYlkviC2jDSvV6tEC8Kfq/z/GhrFA==\", \"transactionId\":\"7fd9ede5ea8c1d7a8985346c241a8933190a1acb408448c52ac27f7862f674ff\" }, \"version\":\"EC_v1\" }" } |
You must ensure that the currency and authorization amount included in apple_pay.customer_token
are the same as the ones configured in your Apple Pay payment form when Verification is enabled. Verification is required to return a recurringDetailReference
that will be used in subsequent requests. In the example above, the currency is EUR and the authorization is 1.
In addition to the Create a payment method operation, you can also use the following Quickstart API operations to create an Apple Pay payment method together with other objects:
Note that once an Adyen Apple Pay payment method is created, it cannot be edited.
Related information
View and export payment method data
After an Adyen Apple Pay payment method is successfully created, you can view this payment method from the customer account details page in the Zuora UI or the response of the API operations for retrieving payment methods.
All related information about Adyen Apple Pay payment methods can be exported using the Method Specific Data field for the Payment Method data source. If you are not familiar with Data Source Exports, see Create a Data Source Export for instructions.
To filter only specific information about Adyen Apple Pay payment methods, you can use several other Payment Method data source fields. The following table provides the mapping relationship between Zuora data source fields and Adyen Apple Pay fields.
Data source field | Adyen Apple Pay field | Description |
---|---|---|
Method Reference Id | AppleGatewayToken | The recurringDetailReference returned from Adyen after a successful response. |
Sub-Type | AppleCardType | The brand or type of the card. For example, Visa and Mastercard. |
User Reference Id | AppleCardNumber | The last 4 digits of the DPAN returned from Adyen as the card summary. |
Note that in the Credit Card Type field in the UI and the appleCardType
field in the API response, Zuora stores the first 20 characters of paymentMethodVariant returned from Adyen.
Make payments with Adyen Apple Pay
After an Apple Pay payment method for Adyen has been added to a customer account, it can be used to make payments similar to using credit cards. You can use Adyen Apple Pay payment methods in all REST and Quickstart API operations for processing payments, except for CRUD operations. See the following API References for a list of Payments operations:
You can pass the shopperEmail
information to the gateway by using either of the following methods:
- Through the
gatewayOptions
field in the Create a payment REST API operation - Through the
gateway_options
field in the Create a payment Quickstart API operation
For more information about the logic of populating the shopperEmail
field in the request, see Gateway Options fields supported by Adyen Integration v2.0.