Aller au contenu principal

Apple Pay

Apple Pay allows customers to use Apple Pay directly within the Rokt Shoppable Ads placement, on both web and native iOS. The Rokt SDK handles the Apple Pay payment sheet presentation and payment processing. The Rokt Catalog brand is the MoR.

Web setupLien direct vers Web setup

Partner requirementsLien direct vers Partner requirements

  • Domain verification: Host the Apple domain verification file at /.well-known/apple-developer-merchantid-domain-association on your parent domain (e.g., www.yoursite.com). Both the parent domain and any subdomains must be registered and verified with Apple.
  • Apple Pay Merchant ID: Provide your Apple Pay Merchant ID to Rokt at SDK initialization time. Rokt uses this to verify Apple Pay availability.
  • iframe permissions (Safari 17+): If the Rokt placement renders inside an iframe, add allow="payment" and allowpaymentrequest attributes. Required for Safari 17+ (iOS 17+, macOS 12+).

iframe configurationLien direct vers iframe configuration

<iframe
src="..."
allowpaymentrequest
allow="payment"
sandbox="allow-scripts allow-same-origin allow-popups
allow-forms allow-top-navigation
allow-popups-to-escape-sandbox"
></iframe>

NOTE: If your confirmation page renders the Rokt placement as an embedded component (not an iframe), the Payment Request API works natively without the allow attribute. Domain verification with Apple is still required regardless.

Browser compatibilityLien direct vers Browser compatibility

BrowserSupportNotes
Safari 17+SupportediOS 17+, macOS 12+. Cross-origin iframe with allow="payment".
Safari (older)LimitedSame-origin only. Not supported in cross-origin iframes.
Chrome / FirefoxNot supportedApple Pay is Safari-only on desktop. Fallback to card or other payment methods.

iOS setupLien direct vers iOS setup

To enable Apple Pay in your native iOS app, you need to install the PaymentKit module and configure Apple Pay entitlements.

Step 1: Install PaymentKitLien direct vers Step 1: Install PaymentKit

When adding the Rokt iOS SDK via Swift Package Manager, select both Rokt_Widget and Rokt_Stripe_Payment_Kit as package products for your target.

https://github.com/ROKT/rokt-sdk-ios.git

Step 2: Configure Apple Pay entitlementsLien direct vers Step 2: Configure Apple Pay entitlements

  1. Register Merchant ID: In your Apple Developer portal, register the merchant ID merchant.com.rokt.payments.
  2. Add Entitlement: In your Xcode project, enable the Apple Pay capability and add the merchant.com.rokt.payments merchant ID.
  3. Payment Processing Certificate: Generate a Certificate Signing Request (CSR) from Stripe (Rokt will provide this). Upload the CSR to Apple to create a Payment Processing Certificate, and share the resulting .cer file with Rokt.

IMPORTANT: The merchant ID merchant.com.rokt.payments is Rokt's shared merchant identifier. Do not use your own merchant ID - the brand (MoR) processes the payment through Rokt's payment infrastructure.

Step 3: Register PaymentKitLien direct vers Step 3: Register PaymentKit

After initializing the Rokt SDK (see iOS SDK Integration), register the PaymentKit:

import Rokt_Widget
import Rokt_Stripe_Payment_Kit

Rokt.initWith(roktTagId: "<ROKT_TAG_ID>") { status in
// Register PaymentKit for Apple Pay
if let paymentKit = RoktStripePaymentKit(
applePayMerchantId: "merchant.com.rokt.payments"
) {
Rokt.registerPaymentKit(paymentKit)
}
}

How it worksLien direct vers How it works

  1. The Rokt placement detects Apple Pay availability on the customer's device/browser.
  2. If available, an Apple Pay button is displayed alongside the saved card option.
  3. Customer taps Apple Pay. The Rokt SDK presents the Apple Pay payment sheet with item details and final price.
  4. Customer authenticates via Face ID or Touch ID.
  5. The payment is processed with the brand as MoR.
Cet article vous a-t-il été utile ?