Apple Pay

Enable Apple Pay as a payment method for your merchants

Enabling Apple Pay for your merchants

Please contact your support representative to enable Apple Pay for your account.

Once Apple Pay support is enabled in your account, please follow the below steps

Step 1 - Select merchant from your partner portal and go to settings

Step 2 - Select Add Domain from the Apple Pay Section to start the merchant domain verification process. Please note that Apple Pay requires domain verification for each merchant.

Apple Pay Domain Verification Screen

Step 3 - Download the verification certificate from the Add Domain screen. After properly hosting the certificate file, select the "The file has been uploaded" checkbox and click the Add Domain button. If everything is correct, the domain will be verified and added to the merchant's account.

Apple Pay - Add Domain Screen

Using Apple Pay in your Web Application

For native app integration, please contact your assigned solution engineer for further implementation details

To use Apple Pay in your web application, the system must first verify the domain as described in the previous section.

This platform simplifies presenting Apple Pay during the checkout process in your web application. If you are already using the JS library, you only need to call an additional function to display the Apple Pay button.

To learn more about JS library, please see our guide.

To erquest billing and/or shipping contact information associated with Apple Wallet please include the options in the requiredShippingContactFields and requiredBillingContactFields arrays.

You will receive the customer's name when you request postalAddress. If you don't need the customer's address, you can request the name contact field directly.

You will receive the postal address as well as the user's name after the user authorizes the transaction.

The source of the information may be the user's Me contact card, the back of credit card in Wallet, or may be entered by the user directly into the payment sheet.

Sample Token Response

Presenting the Apple Pay button

As demonstrated in the example above, you can present Apple Pay as an option in your client app by calling the ApplePay.configure function. Please note that you need to provide the amount before calling this method. In a production environment, you also need to provide an HMAC value, similar to any other web component in your application.

Customizing Apple Pay button

You can customize the label and color of your Apple Pay Button by providing buttonType and buttonColor attributes in Apple Pay configuration object.

Dynamic Pricing Setup with Apple Pay

Dynamic pricing allows you to adjust the total amount of a transaction based on user-selected shipping methods and shipping contacts. This section outlines how to implement dynamic pricing using the shippingMethods array, the onShippingContactSelected callback, and the onShippingMethodSelected callback in your Apple Pay integration.

Define shipping methods

Create an array of shipping methods that includes details such as the identifier, label, amount, and description. This array will be used to present shipping options to the user.

Handle shipping contact selection

Implement the onShippingContactSelected callback to dynamically adjust the available shipping options based on the user's selected shipping contact. This function will be triggered when the user selects a shipping address.

Updating shipping contact properties

  • errors: a list of custom errors to display on the payment sheet.

  • newLineItems: an optional list of updated line items.

  • newShippingMethods: a list of shipping methods that are available to the updated shipping contact.

  • newTotal: the new total that results from a change in the shipping contact.

Handle shipping method selection

Implement the onShippingMethodSelected callback to dynamically adjust the total amount based on the selected shipping method. This function will be triggered when the user selects a shipping option

Updating shipping method properties

  • newLineItems: an optional list of updated line items.

  • newTotal: the new total that results from a change in the shipping contact.

Complete payment method selection

Ensure that the total amount reflects any changes made during the shipping method selection. This is handled in the onPaymentMethodSelected callback.

Updating payment method properties

  • errors: a list of customized errors you provide that results from the user's change to the payment method.

  • newLineItems: an optional list of updated line items.

  • newShippingMethods: a list of shipping methods that results from the user's change to the payment method.

  • newTotal: the new total that results from a change in the shipping contact.

Param Definitions

ApplePayShippingMethod:

The Apple Pay sheet displays all the properties of a shipping method except identifier

ApplePayLineItem

A line item in a payment request—for example, total, tax, discount, or grand total.

ApplePayLineItemType

A type that indicates whether a line item is final or pending

The constant values are:

  • final: a line item representing the known,final cost

  • pending: a line item representing an estimated or unknown cost

Last updated