{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition","tabs","tab"]},"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 PayPal components for iOS."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PayPal is one of the most widely used payment options in Europe, the US and many other parts of the world. PayPal is also widely adopted across industries, from retail to hospitality to gaming to many others. With the PayPal component for iOS, you can provide your customers with a secure and convenient checkout experience."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With the PayPal components, you can benefit from:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fast checkout:"]}," Retrieve stored shipping information from PayPal, so you can offer customers a \"checkout with PayPal\" experience."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["High customisability:"]}," Set the style and button text of the payment buttons, with the maximum level of customised branding allowed by PayPal."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Flexible rendering:"]}," Each PayPal button is made available as a separate component, so you can place the buttons anywhere in your checkout flow — including separately from each other."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Vaulting consent:"]}," Collect user consent to save PayPal account information for future transactions (requires backend token exchange implementation)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Native iOS integration:"]}," Seamlessly integrated with SwiftUI for modern iOS app development, using the native PayPal iOS SDK."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Secure web authentication:"]}," Secure payment processing using PayPal's web-based authentication flow with proper SSL/TLS handling."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The PayPal components will determine availability for Pay Later automatically and only render the button if available in the shopper's region."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-options","__idx":2},"children":["Payment options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The PayPal components support the following payment options:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PayPal:"]}," A digital payment platform that allows users to make payments and transfer money online. It enables customers to pay using their PayPal balance, linked bank accounts, or cards."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PayPal Pay later:"]}," A buy-now-pay-later service that allows customers to split their purchases into multiple payments over time. It offers both short-term (Pay in 4) and long-term financing options, with no interest on Pay in 4 if payments are made on time."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Venmo isn't currently supported on native Android or iOS. It's only available with our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/web"},"children":["Web SDK"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-flows","__idx":3},"children":["Payment flows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can configure the components to drive your desired flow:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pay now flow:"]}," 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":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue flow:"]}," A two-step checkout experience where the customer reviews order details after PayPal approval but before final payment submission. This allows customers to review contact information, shipping address, and order summary before confirming payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Confirm payment flow:"]}," An asynchronous, two-step payment process where the customer authorises the payment and you choose whether to capture the funds later on. If these aren't captured within the time limit (29 days for PayPal), then the authorisation expires."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"transaction-data","__idx":4},"children":["Transaction data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you initiate a transaction, you have to provide key information in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData"]}," object:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["amount"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["currency"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["entry type"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EntryType"]},"), which describes the origin of the transaction and determines the supported payment methods and available features. For PayPal, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".ecom"]}," for e-commerce transactions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["intent"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalIntentType"]},"), which describes the purpose of a transaction, indicating the intended money flow direction. Each intent dictates a specific transaction flow and affects how the transaction is handled by the system."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["merchant transaction identifier"]}," of your choosing, which identifies this specific transaction."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["merchant transaction date"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"supported-transaction-intents","__idx":5},"children":["Supported transaction intents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PayPal 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":"PayPal usage"},"children":["PayPal usage"]}]}]},{"$$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":["PayPalIntentType.purchase"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Immediate payment capture."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Used for the pay now flow. It captures a payment in one step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalIntentType.authorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Payment authorisation only."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Used for \"Confirm payment\" flow. It authorises a payment for later capture."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"available-components","__idx":6},"children":["Available components"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PayPal for iOS uses a compositional approach with two main components that can be used independently or combined:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Button component:"]}," The main PayPal payment button and flow, built using the native PayPal iOS SDK."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Consent component:"]}," A consent checkbox for vaulting PayPal account information for future transactions."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The button component is required for PayPal payments. The consent component is optional and only needed if you want to collect user consent for vaulting PayPal accounts (backend implementation required for token exchange and future payments)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"button-component","__idx":7},"children":["Button component"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The core PayPal button component for initiating PayPal payments, built using the native PayPal iOS SDK."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this when:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You need PayPal payment functionality in your iOS app."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You want full control over button styling and behaviour."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You're implementing custom payment flows."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"key-features","__idx":8},"children":["Key features"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Multiple button styles (gold, blue, silver, white, black, dark blue)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Support for PayPal and Pay Later funding sources."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Customisable button size, edges, and content insets."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optional custom SwiftUI content to replace default PayPal button."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Native PayPal iOS SDK integration with web-based authentication."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"consent-component","__idx":9},"children":["Consent component"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A checkbox component for obtaining user consent to save PayPal account information for future transactions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this when:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You want to collect consent for vaulting PayPal accounts for future transactions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You need to obtain explicit user consent before saving PayPal account information."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You're implementing custom consent flows."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"key-features-1","__idx":10},"children":["Key features"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Customisable checkbox with text label."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Can be linked to the PayPal button component for automatic consent validation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Alternatively, use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetConsent"]}," callback for custom consent mechanisms."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Native SwiftUI implementation."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementation-options","__idx":11},"children":["Implementation options"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Simple (button only)","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use when you need basic PayPal payments without vaulting consent. Ideal for simple checkout flows, guest checkout, and digital products."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"// Create PayPal button configuration\nlet config = PayPalButtonComponentConfig()\nconfig.fundingSource = .paypal\nconfig.paymentDescription = \"PayPal Payment\"\n\n// Configure button appearance\nconfig.style = PayPalButtonStyleConfig(\n    color: .gold,\n    label: .payWith,\n    size: .expanded,\n    edges: .rounded\n)\n\n// Create PayPal button component\nlet paypalComponent = try pxpCheckout.create(\n    .paypalButton, \n    componentConfig: config\n)\n\n// Render in SwiftUI\nVStack {\n    paypalComponent.buildContent()\n        .frame(height: 50)\n}\n","lang":"swift"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"With consent component","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use when you want to collect user consent for vaulting PayPal account information. The consent component obtains explicit user permission for saving their PayPal account (backend implementation required for token exchange)."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"// Create consent component first\nlet consentConfig = PayPalConsentComponentConfig(\n    label: \"Save my PayPal account for future transactions\",\n    checked: false\n)\nlet consentComponent = try pxpCheckout.create(\n    .paypalConsent, \n    componentConfig: consentConfig\n)\n\n// Create PayPal button with linked consent\nlet paypalConfig = PayPalButtonComponentConfig()\npaypalConfig.fundingSource = .paypal\npaypalConfig.paypalConsentComponent = consentComponent as? PayPalConsentComponent\n\nlet paypalComponent = try pxpCheckout.create(\n    .paypalButton, \n    componentConfig: paypalConfig\n)\n\n// Compose in SwiftUI\nVStack(spacing: 16) {\n    consentComponent.buildContent()\n    paypalComponent.buildContent()\n        .frame(height: 50)\n}\n","lang":"swift"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"With consent callback","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetConsent"]}," callback for custom consent mechanisms instead of the consent component. Best for apps with existing consent UI or complex consent requirements."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"// Create PayPal button with custom consent handler\nlet config = PayPalButtonComponentConfig()\nconfig.fundingSource = .paypal\n\n// Custom consent callback\nconfig.onGetConsent = {\n    // Check your custom consent mechanism\n    let hasConsent = UserDefaults.standard.bool(forKey: \"paypal_consent\")\n    return hasConsent\n}\n\n// Configure payment callbacks\nconfig.onApprove = { approvalData in\n    print(\"Payment approved: \\(approvalData.orderID)\")\n}\n\nconfig.onError = { error in\n    print(\"Payment error: \\(error.errorMessage)\")\n}\n\nlet paypalComponent = try pxpCheckout.create(\n    .paypalButton, \n    componentConfig: config\n)\n","lang":"swift"},"children":[]}]}]}]},"headings":[{"value":"How it works","id":"how-it-works","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Payment options","id":"payment-options","depth":2},{"value":"Payment flows","id":"payment-flows","depth":2},{"value":"Transaction data","id":"transaction-data","depth":2},{"value":"Supported transaction intents","id":"supported-transaction-intents","depth":3},{"value":"Available components","id":"available-components","depth":2},{"value":"Button component","id":"button-component","depth":3},{"value":"Key features","id":"key-features","depth":4},{"value":"Consent component","id":"consent-component","depth":3},{"value":"Key features","id":"key-features-1","depth":4},{"value":"Implementation options","id":"implementation-options","depth":2}],"frontmatter":{"seo":{"title":"How it works"}},"lastModified":"2026-02-26T12:14:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/ios/paypal/how-it-works","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}