{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition"]},"type":"markdown"},"seo":{"title":"How it works","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-it-works","__idx":0},"children":["How it works"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn about PXP's Apple Pay component for iOS applications."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple Pay is one of the most secure and convenient payment methods available, widely adopted across e-commerce, retail, and mobile applications. Apple Pay leverages biometric authentication and device-specific security features to provide customers with a seamless and secure checkout experience that reduces friction and increases conversion rates."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With the Apple Pay component for iOS, you can benefit from:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Secure checkout:"]}," Use Apple's industry-leading security with tokenised payments, biometric authentication (Touch ID/Face ID), and device-specific encryption that never exposes actual card details."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Seamless experience:"]}," Provide customers with pre-populated shipping and billing information from their Apple ID, eliminating manual form filling and reducing checkout abandonment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Native integration:"]}," Leverage Apple's official PassKit framework and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PKPaymentAuthorizationController"]}," that customers recognise and trust, maintaining consistency with their device experience."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Real-time updates:"]}," Dynamically update totals, shipping costs, and available options based on customer selections without requiring view reloads."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Flexible customisation:"]}," Choose between Apple's official ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PKPaymentButton"]}," rendering or custom SwiftUI/UIKit implementation to match your brand while maintaining Apple Pay compliance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Multi-network support:"]}," Accept payments from major card networks including Visa, Mastercard, American Express, and Discover through a single integration."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Apple Pay component will automatically determine availability based on the customer's device capabilities and configured payment methods. Apple Pay is available on iOS devices with Touch ID, Face ID, or passcode authentication, and requires the customer to have a supported payment method configured in their Wallet app."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rendering-methods","__idx":2},"children":["Rendering methods"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Apple Pay component for iOS offers multiple rendering approaches to accommodate different integration needs:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"native-pkpaymentbutton-recommended","__idx":3},"children":["Native PKPaymentButton (recommended)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use Apple's official ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PKPaymentButton"]}," class for authentic appearance and behaviour. With automatic updates from Apple and built-in accessibility features, this is the simplest way to provide a consistent user experience."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"let config = ApplePayButtonComponentConfig()\nconfig.buttonType = .buy\nconfig.buttonStyle = .black\nconfig.buttonRadius = 8.0\n\nlet applePayComponent = try checkout.create(.applePayButton, componentConfig: config)\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"custom-swiftui-content","__idx":4},"children":["Custom SwiftUI content"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get complete control over button appearance while maintaining Apple Pay functionality. With advanced styling options, custom animations, and effects, you can match the button to your brand's look and feel."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"config.customContent = {\n    return AnyView(\n        HStack {\n            Image(systemName: \"applelogo\")\n                .foregroundColor(.white)\n            Text(\"Buy with Apple Pay\")\n                .foregroundColor(.white)\n                .fontWeight(.semibold)\n        }\n        .frame(maxWidth: .infinity, minHeight: 50)\n        .background(Color.black)\n        .cornerRadius(8)\n    )\n}\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"custom-uikit-implementation","__idx":5},"children":["Custom UIKit implementation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For applications using UIKit, you can create custom button implementations while maintaining Apple Pay integration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"class CustomApplePayButton: UIButton {\n    override init(frame: CGRect) {\n        super.init(frame: frame)\n        setupAppearance()\n    }\n    \n    private func setupAppearance() {\n        setTitle(\"Pay with Apple Pay\", for: .normal)\n        backgroundColor = .black\n        layer.cornerRadius = 8\n        titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold)\n    }\n}\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-flows","__idx":6},"children":["Payment flows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can configure the component to drive your desired flow:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"immediate-payment-flow","__idx":7},"children":["Immediate payment flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A synchronous, single-step payment process where the customer completes the payment immediately during checkout and you receive the payment confirmation right away."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"config.onPostAuthorisation = { result in\n    if let authorizedResult = result as? AuthorisedSubmitResult {\n        // Payment completed immediately\n        print(\"Payment successful: \\(authorizedResult.provider.code)\")\n        DispatchQueue.main.async {\n            self.navigateToSuccess()\n        }\n    }\n}\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authorisation-flow","__idx":8},"children":["Authorisation flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An asynchronous, two-step payment process where the customer authorises the payment and you choose whether to capture the funds later. This provides flexibility for order validation and inventory management."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"config.onPreAuthorisation = {\n    return ApplePayTransactionInitData(\n        intent: .confirm, // Authorise only\n        riskScreeningData: RiskScreeningData(\n            performRiskScreening: true,\n            deviceSessionId: generateDeviceSessionId(),\n            userIp: \"192.168.1.100\",\n            account: RiskScreeningAccount(\n                id: \"user_12345678\",\n                creationDateTime: \"2024-01-15T10:30:00.000Z\"\n            ),\n            fulfillments: [\n                RiskScreeningFulfillment(\n                    type: .shipped,\n                    recipientPerson: RiskScreeningRecipientPerson(\n                        phoneNumber: \"+1234567890\"\n                    )\n                )\n            ]\n        )\n    )\n}\n\nconfig.onPostAuthorisation = { result in\n    if let authorizedResult = result as? AuthorisedSubmitResult {\n        // Authorisation successful, capture later\n        print(\"Authorisation successful: \\(authorizedResult.provider.code)\")\n        self.scheduleCapture(authorizationId: authorizedResult.provider.code)\n    }\n}\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"key-differences","__idx":9},"children":["Key differences"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Aspect"},"children":["Aspect"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Immediate payment"},"children":["Immediate payment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Authorisation flow"},"children":["Authorisation flow"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Capture"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Confirm"]}," followed by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Capture"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Process"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Captures payment immediately in one step."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Stores authorisation, later captures funds after order validation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirmation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No additional confirmation needed."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requires confirmation step with capture logic."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Flexibility"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Immediate payment completion."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can adjust order, validate inventory, and calculate final costs."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use cases"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Digital products and simple orders."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Complex orders, inventory validation, and shipping calculation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Time limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Immediate settlement."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorisation valid for up to 7 days before expiration."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-transaction-intents","__idx":10},"children":["Supported transaction intents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you initiate a transaction, you provide key information about the transaction method, amount, and currency."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The transaction method consists of:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["entry type"]},", which describes the origin of the transaction. For Apple Pay for iOS, this is always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MobileApp"]}," (mobile application)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["funding type"]},", which describes the payment method used (Apple Pay wallet)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["intent"]},", which describes the purpose and flow of the transaction."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple Pay supports the following intents:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Intent"},"children":["Intent"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"iOS Implementation"},"children":["iOS Implementation"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Create"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Initialise a payment session and prepare for authorisation."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Set up ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PKPaymentRequest"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Confirm"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Authorise a payment and hold funds for later capture."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," with confirm intent,"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Capture"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Transfer authorised funds to your account and complete the transaction."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Immediate capture in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Cancel a transaction that has been authorised but not captured."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Server-side void operation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Refund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Return funds to a customer for a completed transaction."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Server-side refund operation."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-regions","__idx":11},"children":["Supported regions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple Pay availability varies by region and is automatically detected by the component:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple Pay availability varies by region and is automatically detected by the component:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Americas:"]}," United States, Canada, Mexico, Brazil."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Europe:"]}," United Kingdom, France, Germany, Italy, Spain, Netherlands, and 40+ other countries."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Asia-Pacific:"]}," Australia, China, Hong Kong, Japan, Singapore, South Korea, and others."," ","For a full list of supported countries and regions, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://support.apple.com/en-us/102775"},"children":["Apple's official website"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The component automatically detects regional availability and only displays the Apple Pay button when the service is available in the customer's location and on their device."]}]}]},"headings":[{"value":"How it works","id":"how-it-works","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Rendering methods","id":"rendering-methods","depth":2},{"value":"Native PKPaymentButton (recommended)","id":"native-pkpaymentbutton-recommended","depth":3},{"value":"Custom SwiftUI content","id":"custom-swiftui-content","depth":3},{"value":"Custom UIKit implementation","id":"custom-uikit-implementation","depth":3},{"value":"Payment flows","id":"payment-flows","depth":2},{"value":"Immediate payment flow","id":"immediate-payment-flow","depth":3},{"value":"Authorisation flow","id":"authorisation-flow","depth":3},{"value":"Key differences","id":"key-differences","depth":3},{"value":"Supported transaction intents","id":"supported-transaction-intents","depth":2},{"value":"Supported regions","id":"supported-regions","depth":2}],"frontmatter":{"seo":{"title":"How it works"}},"lastModified":"2026-04-22T11:04:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/ios/apple-pay/how-it-works","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}