# Accept recurring payments with Apple Pay

> Learn how to accept recurring payments with Apple Pay through Antom Payment Element.

 Subscription payment is a recurring automatic payment solution that enables merchants to collect payments periodically. With a one-time authorization, buyers can link their payment accounts to enjoy continuous subscription services, while supporting dynamic adjustments to subscription configurations (such as modifying cycle/amount, canceling renewal, or terminating services, etc.). The entire process is both efficient and secure.

 This document provides integration instructions for [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md). Through the [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) service, buyers can make payments using credit or debit cards stored in their Apple accounts. With Antom Payment Element, you do not need to integrate the [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) SDK separately. Payment Element will automatically load [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) for you and can be configured to support [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) as an express payment method.

  

<!-- ToggleTab query="platform" -->

**Tab: Web/WAP**

# User experience {#BEWwv}

 The following figures demonstrate the user experience of paying with [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md):

 ![Apple Pay first-time subscription payment flow using Antom Payment Element on Web/WAP](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/idocs/2026/png/0a393062-0516-456a-93d4-86dfdadd1bed.png)

# Integration preparations {#f3oDm}

 1. Antom provides pre-configured [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) merchant certification for quick integration. Follow the steps below to complete the certification:

   1. Provide the server domain name   `DOMAIN_NAME`   used for receiving payments to Antom Technical Support.
  2. Contact Antom Technical Support to obtain the [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) domain verification file and place it in the following server directory:

 ```plain
https://[DOMAIN_NAME]/.well-known/apple-developer-merchantid-domain-association
```

 2. Before you start integrating, read   [Integration guide](https://docs.antom.com/integration_guide_en.md)   and   [API overview](https://docs.antom.com/ac/ams/api_fund.md)   to understand the integration steps of the server-side API and the precautions for calling the API. Furthermore, ensure the following prerequisites are met:

   - Obtained your client ID
  - Complete the key configuration
  - Complete the configuration of     *paymentNotifyUrl*     to receive the asynchronous notification
  - Integrate the server-side SDK package, install the server-side library, and initialize a request instance. For more details, refer to   [Server-side SDKs](https://docs.antom.com/ac/sdks/server_sdks.md)  .
  - Integrate the client-side SDK package by following the steps detailed in   [Integrate the SDK package for Web/WAP](https://docs.antom.com/ac/sdks/web.md)  , and to use the latest SDK version or no lower than 1.46.0.

# Integration steps {#fpHZX}

 Start your integration by taking the following steps:

 1. Create a payment session
2. Invoke Payment Element
3. Obtain the authorization result
4. Capture
5. Obtain subscription notifications

## Step 1: Create a payment session  **[Server-side]** {#chKYz}

 Call the      [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)      API with order information to create a payment session and obtain the     *paymentSessionData*     required to invoke Payment Element. You can choose to either render [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) by specifying it yourself or use the Payment Element-rendered payment method list.

<!-- TabGroup -->

**Tab: Merchant-rendered Apple Pay**

If you render [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) independently, it is recommended to call the   [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)   API after the buyer selects the payment method and submits payment. Follow   [Step 1: Create a payment session](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=web-wap#KuWal)   to create the session. You must pass in all parameters listed in the parameter table, along with the following additional parameters:

 | **Parameter name** | **Required** | **Description** |
| --- | --- | --- |
| *availablePaymentMethod.paymentMethodMetaData.applePayConfiguration* | No | [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) payment preference configuration. In Payment Element scenario, it is recommended to leave it empty or use the default value. |
| *availablePaymentMethod.paymentMethodTypeList.paymentMethodType* | No | Used to specify payment methods: - For [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md), pass in   `APPLEPAY`  . - To specify multiple payment methods, refer to   [Enumeration values of payment methods](https://docs.antom.com/ac/pm/enumeration_values.md)   for valid values. |

**Tab: Payment Element-rendered payment method list**

If you use Payment Element-rendered payment method list, it is recommended to call the      [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)      API when loading the checkout page. Follow   [Step 1: Create a payment session](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=web-wap#KuWal)   to create the session. You only need to pass in the basic parameters listed in the parameter table.

<!-- /TabGroup -->

## Step 2: Invoke Payment Element   **[Client-side]** {#k8HAI}

 Follow   [Step 2: Invoke Payment Element](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=web-wap#FWfpW)   to    use     *paymentSessionData*     to invoke Payment Element on your client. After the buyer clicks to submit payment, Payment Element will handle the entire flow based on the selected payment method, including displaying QR codes, redirecting to payment pages, performing 3DS authentication, and returning to the merchant’s result page.

## Step 3: Obtain the authorization result   **[Server-side]** {#cUyeS}

 After the buyer completes the authorized payment or the payment times out, you can obtain the authorization result either by receiving asynchronous notifications from Antom or by proactively querying the result. For detailed steps, refer to   [Obtain the authorization or payment result](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=web-wap#MxqX3)  .

## Step 4: Capture   **[Server-side]** {#qu0V5}

 Antom provides both automatic and manual capture methods. You can choose based on your business needs. After initiating capture, you can obtain the result via asynchronous notification or active inquiry. For specific operations, refer to   [Capture](https://docs.antom.com/ac/cashierpay/capture.md)  .

## Step 5: Obtain subscription notifications   **[Server-side]** {#aJOH3}

 After the subscription relationship takes effect, Antom will send you the initial subscription notification and subscription renewal notifications. Refer to   [Step 5: Obtain subscription notifications](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=web-wap#AQnvC)  to obtain the relevant notifications.

**Tab: iOS**

# User experience {#B22EWwv}

 The following figures demonstrate the user experience of paying with [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md):

 ![Apple Pay first-time subscription payment flow using Antom Payment Element for iOS terminal](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/idocs/2026/png/84438278-1533-4bce-ad80-a0488649b4bc.png)

# Integration preparations {#q7nN1}

 Before you start integrating, read   [Integration guide](https://docs.antom.com/integration_guide_en.md)   and   [API overview](https://docs.antom.com/ac/ams/api_fund.md)   to understand the integration steps of the server-side API and the precautions for calling the API. Furthermore, ensure the following prerequisites are met:

 - Obtained your client ID
- Complete the key configuration
- Complete the configuration of     *paymentNotifyUrl*     to receive the asynchronous notification
- Integrate the server-side SDK package, install the server-side library, and initialize a request instance. For more details, refer to   [Server-side SDKs](https://docs.antom.com/ac/sdks/server_sdks.md)  .
- Integrate the client-side SDK package by following the steps detailed in   [Integrate the SDK package for iOS](https://docs.antom.com/ac/sdks/ios.md)  , and ensure to use the latest SDK version or no lower than 1.46.0.

# Integration steps {#n22t0Y}

 Start your integration by taking the following steps:

 1. (Optional) Preload the SDK
2. Create a payment session
3. Invoke Payment Element
4. Obtain the authorization result
5. Capture
6. Obtain subscription notifications

## (Optional) Step 1: Preload the SDK   **[Client-side]** {#f4eFC}

 Before creating a payment session, it is highly recommended that you preload the SDK to improve the rendering speed of the checkout page, reducing the waiting time for buyers during the payment. Follow the code example below to perform the preloading:

 ```objectivec
[AMSPaymentElement.shared preload];
```

## Step 2: Create a payment session   **[Server-side]** {#22hKYz}

 Call the      [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)      API with order information to create a payment session and obtain the     *paymentSessionData*     required to invoke Payment Element. You can choose to either render [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) by specifying it yourself or use the Payment Element-rendered payment method list.

<!-- TabGroup -->

**Tab: Merchant-rendered Apple Pay**

If you render [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) independently, it is recommended to call the   [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)   API after the buyer selects the payment method and submits payment. Follow   [Step 2: Create a payment session](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=ios#K2uWal)   to create the session. You must pass in all parameters listed in the parameter table, along with the following additional parameters:

 | **Parameter name** | **Required** | **Description** |
| --- | --- | --- |
| *availablePaymentMethod.paymentMethodMetaData.applePayConfiguration* | No | [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) payment preference configuration. In Payment Element scenario, it is recommended to leave it empty or use the default value. |
| *availablePaymentMethod.paymentMethodTypeList.paymentMethodType* | No | Used to specify payment methods: - For [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md), pass in   `APPLEPAY`  . - To specify multiple payment methods, refer to   [Enumeration values of payment methods](https://docs.antom.com/ac/pm/enumeration_values.md)   for valid values. |
| *availablePaymentMethod.paymentMethodTypeList.expressCheckout* | No | Specifies whether to enable the express checkout option for [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md). Valid values are: - `true`  : Enables express checkout for [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md). - `false`  : Disables express checkout for [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md).   > **[INFO]** **Note**    ：This parameter is currently supported only on iOS. |

**Tab: Payment Element-rendered payment method list**

If you use Payment Element-rendered payment method list, it is recommended to call the      [**createPaymentSession (One-time Payments)**](https://docs.antom.com/ac/ams/session_cashier.md)      API when loading the checkout page.    Follow   [Step 2: Create a payment session](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=ios#K2uWal)   to create the session. You only need to pass in the basic parameters listed in the parameter table.

<!-- /TabGroup -->

## Step 3: Invoke Payment Element   **[Client-side]** {#FW22fpW}

 Follow   [Step 3: Invoke Payment Element](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=ios#F2WfpW)   to use     *paymentSessionData*     to invoke Payment Element on your client. After the buyer clicks to submit payment, Payment Element will handle the entire flow based on the selected payment method, including displaying QR codes, redirecting to payment pages, performing 3DS authentication, and returning to the merchant’s result page.

## Step 4: Obtain the authorization result  **[Server-side]** {#zBUox}

 After the buyer completes the authorized payment or the payment times out, you can obtain the authorization result either by receiving asynchronous notifications from Antom or by proactively querying the result. For detailed steps, refer to   [Obtain the authorization or payment result](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=ios#2MxqX3)  .

## Step 5: Capture   **[Server-side]** {#OwRWT}

 Antom provides both automatic and manual capture methods. You can choose based on your business needs. After initiating capture, you can obtain the result via asynchronous notification or active inquiry. For specific operations, refer to   [Capture](https://docs.antom.com/ac/cashierpay/capture.md)  .

## Step 6: Obtain subscription notifications   **[Server-side]** {#aJOH3}

 After the subscription relationship takes effect, Antom will send you the initial subscription notification and subscription renewal notifications. Refer to   [Step 6: Obtain subscription notifications](https://docs.antom.com/ac/subscriptionpay/element_subscription.md?platform=android#A3nvC)  to obtain the relevant notifications.

<!-- /ToggleTab -->

# After subscription {#BJbEu}

 After completing the payment, you can perform the following actions:

## Subscription trial    **[Server-side]** {#Rue5J}

 Antom provides a subscription trial feature that allows buyers to experience a product or service for a limited time at no cost or at a discounted rate before officially purchasing a subscription plan. For more details, refer to   [Subscription trial](https://docs.antom.com/ac/subscriptionpay/subscription_trial.md)  .

## Subscription cancellation    **[Server-side]** {#jcX2m}

 The subscription cancellation feature allows buyers to cancel their current subscription at any time when they no longer need to use the associated service. For more details, refer to   [Subscription cancellation](https://docs.antom.com/ac/subscriptionpay/subscription_cancellation.md)  .

## Cancellation    **[Server-side]** {#Otb6j}

 For successful payments, if the buyer requests cancellation or a refund on the same day, you can use Antom’s cancellation capability to cancel the order or release funds. Orders not yet completed can also be cancelled directly. For details, refer to   [Cancel](https://docs.antom.com/ac/cashierpay/cancel.md)  .

## Refund    **[Server-side]** {#kg4oU}

 For successfully paid orders, if you need to issue a refund to the buyer, Antom provides two methods:

 - Your operations staff can manually process refunds directly through   [Antom Dashboard](https://dashboard.alipay.com/)  .
- Call the   [**refund**](https://docs.antom.com/ac/ams/refund_online.md)   API to initiate a refund.

 Antom’s refund capabilities are as follows:

 - Supports full refunds.
- Supports multiple partial refunds, with the total refunded amount not exceeding the captured amount.

 Refer to   [Refund](https://docs.antom.com/ac/cashierpay/refund.md)   to learn about Antom refund rules and operation process.

## Dispute    **[Server-side]** {#AoEw6}

 Antom provides dispute resolution services for contested transactions. For more information, refer to   [Dispute Guidance](https://docs.antom.com/ac/dispute/overview.md)  .

## Reconciliation      **[Server-side]** {#Ftc87}

 After the transaction is completed, use the financial reports provided by Antom for reconciliation. For more information on how to reconcile and the settlement rules of Antom, please refer to   [Reconciliation](https://docs.antom.com/ac/cashierpay/reconcile.md)  .

# Additional content {#GBkuL}

 Antom also offers the following customization options:

 - [**Specify payment methods**](https://docs.antom.com/ac/subscriptionpay/element_subscription.md#L9xOX)  : You can use API parameters to define which payment methods are displayed in Payment Element, control the order of the payment method list, and configure the display of express payment options.
- [**Payment method features**](https://docs.antom.com/ac/subscriptionpay/element_subscription.md#RvQap)  : Learn about the characteristics of APM and card payments.

 - [**Appearance customization**](https://docs.antom.com/ac/cashierpay/appearance.md)  : Antom provides extensive styling options, including theme, layout, and CSS customization.

# Best practice {#jeYPR}

 Card payment features also apply to [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md). The following table outlines the support status of these features for [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md):

 | **Type** | **Supported** | **Conditions** |
| --- | --- | --- |
| [**Antom Tokenization**](https://docs.antom.com/ac/pm/tokenization.md) | Conditional | - ​   Not supported in CIT (Cardholder-Initiated Transaction) scenarios. It is recommended to store cards via Apple accounts. - Supported in MIT (Merchant-Initiated Transaction) scenarios. |
| [**COF**](https://docs.antom.com/ac/pm/cof.md) | Conditional | Only supported in MIT (Merchant-Initiated Transaction) scenarios. |
| [**3D Secure 2**](https://docs.antom.com/ac/pm/3ds.md) | Yes | After completing 3D Secure 2 authentication, [Apple Pay](https://docs.antom.com/ac/antomop/applepay.md) passes the encrypted transaction cryptogram and ECI (E-Commerce Indicator) to Antom. Antom processes this authentication data following standard third-party card network procedures.    For details, refer to   [Apple Developer: Payment token format reference](https://developer.apple.com/documentation/passkit/payment-token-format-reference)  .    As a result, no additional 3DS authentication flow will be triggered by the payment method within Payment Element, ensuring a seamless user experience. It is recommended to use the default values for the        *is3DSAuthentication*     and     *enableAuthenticationUpgrade*        parameters when initiating payment requests. |
| [**Antom 3DS-Retry**](https://docs.antom.com/ac/pm/3ds_retry.md) | Yes | None |
| [**MIT**](https://docs.antom.com/ac/pm/mit.md) | Yes | None |
| [**Installment payments**](https://docs.antom.com/ac/pm/installment.md) | No | None |