Apple Pay Subscriptions and Deferred Charges in Safari

The Safari web browser supports recurring payments, subscriptions, and deferred charges through advanced capabilities within the Apple Pay JS API. By passing specific payment request objects to the browser, merchants can customize the native Apple Pay payment sheet to clearly display future billing terms, trial periods, and cancellation policies to the user. Behind the scenes, Safari communicates with the device's Secure Element to generate specialized merchant tokens, enabling businesses to securely process ongoing or delayed transactions without requiring the customer to re-authenticate for every charge.

Configuring the Apple Pay Payment Sheet

Safari relies on the ApplePaySession and ApplePayPaymentRequest JavaScript APIs to trigger and render the Apple Pay payment sheet on both iOS and macOS. For standard one-time purchases, the payment sheet simply shows the final total. However, to handle non-immediate or repeating charges, developers attach specific request properties to the main payment payload. Safari reads these properties and dynamically alters the user interface of the payment sheet, ensuring the customer explicitly understands and authorizes the future payment terms before authenticating with Face ID, Touch ID, or a passcode.

Recurring Payments and Subscriptions

For ongoing subscriptions and regular billing cycles, Safari utilizes the recurringPaymentRequest property. When a merchant includes this object in their web checkout code, the Apple Pay payment sheet expands to display critical subscription details:

  • Billing Intervals: It clearly states the frequency of the charge, such as weekly, monthly, or annually.
  • Trial and Discount Periods: If the subscription includes a free trial or an introductory promotional rate, the sheet displays both the initial cost and the regular billing amount that will take effect once the promotional period ends.
  • Billing Agreements: Merchants can include a short text description outlining the terms of the recurring payment.
  • Management URL: Safari requires the merchant to provide a managementURL within this request. This link is stored in the user's Apple Wallet, giving the customer a direct way to view, modify, or cancel their subscription on the merchant's website after the initial transaction is complete.

Deferred Charges

Deferred charges apply to scenarios where a customer authorizes a payment during checkout, but the actual capture of funds happens at a later date. Common use cases include pre-ordering a product, booking a hotel room, or reserving a rental car.

Safari supports this workflow via the deferredPaymentRequest property. When implemented, the Apple Pay payment sheet updates to show the exact date the future charge will occur. Furthermore, this configuration allows the merchant to specify a free cancellation date and time zone. The payment sheet clearly presents this deadline to the user, establishing transparency regarding when they can cancel the reservation without incurring a penalty.

Merchant Tokens for Future Billing

A standard Apple Pay transaction generates a one-time payment cryptogram tied to the user's device, which cannot be reused by a merchant for future billing. To overcome this for subscriptions and deferred payments, Safari requests a Merchant Token (often referred to as a Merchant-Specific Payment Token) during the checkout process.

When the payment request in Safari includes the recurringPaymentRequest or deferredPaymentRequest properties, the device's Secure Element generates a payment token bound specifically to that individual merchant. Once the user authorizes the payment sheet in Safari, this encrypted token is passed to the merchant's payment processor. The processor can then store this token and use it to securely initiate the agreed-upon recurring or deferred charges on their backend servers without needing the customer to be present in the Safari browser.