# Dojo iOS SDK Documentation > Guides for integrating Dojo payments into iOS apps using the Dojo iOS SDK. API quick reference: - **API base URL**: https://api.dojo.tech - **Environment selection**: Sandbox and production both use `https://api.dojo.tech`; the API key determines which environment receives the request - **Authentication**: `Authorization: Basic ` (literal `Basic ` prefix; do not base64-encode `api_key:`) - **Version header**: `version: 2026-02-27` The iOS SDK handles client-side payment collection. Your backend typically creates payment intents, receives webhooks, and performs refunds with the Dojo API. Machine-readable specs: - [Dojo API v3](https://docs.dojo.tech/api/v3/bundled.json) For complete integration, also load: - `llms-payment-intents.txt` — backend payment intent lifecycle, webhooks, refunds, and saved-card flows This file contains all documentation content in a single document following the llmstxt.org standard. ## Optional configurations >Learn how to activate additional features for your checkout screen. You can activate additional features like address collection. The following table shows which fields are configurable in mobile SDK integration and web integration. |**Configurations**| **Mobile** | **Web**| |-----|---------|---------| |`customerEmail`| ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`billingAddress`| ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircleOneStar.svg#gh-light-mode-only) ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircleOneStarDarkMode.svg#gh-dark-mode-only)| ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg)| |`shippingAddress`| ![no](https://docs.dojo.tech/images/dojo-icons-small/XCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg)| |`Wallet`| ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) |`itemLines`| ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) |`taxLines`| ![no](https://docs.dojo.tech/images/dojo-icons-small/XCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) |`companyName`| ![no](https://docs.dojo.tech/images/dojo-icons-small/XCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg)| *   Currently limited to Postcode and Country only. ## Configurations ​ The mobile SDK UI can do the following: - [**Add payment methods**](https://docs.dojo.tech/mobile-integration/android/accept-payments/optional-configurations#add-payment-methods) Integrate Apple Pay wallets in addition to card payments. - [**Collect billing address and user email**](https://docs.dojo.tech/mobile-integration/android/accept-payments/optional-configurations#collect-billing-address-and-user-email) Use your checkout screen to capture useful information about your mobile app user. - [**Show detailed information about the order**](https://docs.dojo.tech/mobile-integration/android/accept-payments/optional-configurations#show-detailed-information-about-the-order) Set up the information that you want to show to your mobile app users. ## Add payment methods ![Add payment methods](https://docs.dojo.tech/images/add-payment-methods-ios.png) By default, the checkout screen supports only card payments. To also enable the Apple Pay wallet, you must first [configure Apple Pay](https://docs.dojo.tech/mobile-integration/android/accept-payments/ios-setup-apple-pay). Then pass `"Card", "Wallet"` in `paymentMethods` when you create a payment intent, for example: ​ ```bash # The sandbox API key passed in 'authorization' is public. # Don't submit any personally identifiable information in any requests made with this key. # Sign in to developer.dojo.tech to create your own private sandbox key and use that instead # for secure testing. curl -v --request POST \ --url https://api.dojo.tech/payment-intents \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ' \ --header 'Version: 2024-02-05' \ --data '{ "amount": { "value": 1000, "currencyCode": "GBP" }, "reference": "Order-0001", "paymentMethods": [ "Card", "Wallet" ] }' ``` ## Collect billing address and user email ​ ![](https://docs.dojo.tech/images/billing-and-shipping-details-mobile.png) ​ You can add a form to collect the billing address and user email to the checkout screen. Pass `collectionRequired: true` in `config.billingAddress`, and `config.customerEmail`, for example: ​ ```bash # The sandbox API key passed in 'authorization' is public. # Don't submit any personally identifiable information in any requests made with this key. # Sign in to developer.dojo.tech to create your own private sandbox key and use that instead # for secure testing. curl -v --request POST \ --url https://api.dojo.tech/payment-intents \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic sk_sandbox_kqCwRaWEsl9OM0xNSxh00eayT9k8hAqURGeNQseeV62rMxO5ZiZHub0-XRqkzPLfES2fVUl0seMOyujCIiYaMTaDyiBPf25b7W3Gr3oE0qbpTeM4MRuUMgtDt_scAEfJdqYBlBB_gt_31Bw7FihTISp2WIXXGeTD5WbwhdIhraIJVWR7jo2Hy-xKlBpK-lE8' \ --header 'Version: 2024-02-05' \ --data '{ "amount": { "value": 1000, "currencyCode": "GBP" }, "reference": "Order-0001", "config": { "customerEmail": { "collectionRequired": true }, "billingAddress": { "collectionRequired": true } } }' ``` ## Show detailed information about the order ​ ![](https://docs.dojo.tech/images/show-detailed-information-ios.png) ​ You can add information about each position in the order to the checkout page. Pass this data to `itemLines`. The `itemLines` amounts are independent of the payment intent amount. ​ ```bash # The sandbox API key passed in 'authorization' is public. # Don't submit any personally identifiable information in any requests made with this key. # Sign in to developer.dojo.tech to create your own private sandbox key and use that instead # for secure testing. curl -v --request POST \ --url https://api.dojo.tech/payment-intents \ --header 'content-type: application/json' \ --header 'authorization: Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ' \ --header 'version: 2024-02-05' \ --data '{ "amount": { "value": 4000, "currencyCode": "GBP" }, "reference": "Order-0001", "itemLines": [ { "id": "item 1", "caption": "Baseball hat", "amountTotal": { "value": 1200, "currencyCode": "GBP" } }, { "id": "item 2", "caption": "Baseball ball", "amountTotal": { "value": 350, "currencyCode": "GBP" } }, { "id": "item 3", "caption": "Baseball bat", "amountTotal": { "value": 2500, "currencyCode": "GBP" } } ] }' ``` --- ## Save card > Learn how to enable **Save Card** functionality for later use. You can provide your mobile app users with the ability to save their card information securely for future use. This allows users to set their preferred payment method, reducing the need to enter card information repeatedly. This is a nice-to-have feature in your app, however, this is optional. The following gif is a demonstration of this feature within a mobile app. ## Enabling Save Card To enable the **Save Card** functionality within your app, do the following: > **Info:** - Dojo understands that each app is built differently. The steps listed serve as a good reference to build this feature into your app. > - `user` and `customer` might be used interchangeably in this guide except for [`customer` API endpoints](https://docs.dojo.tech/api#tag/Customers). ![](https://docs.dojo.tech/images/save-card-new-part-1.png) ![](https://docs.dojo.tech/images/save-card-new-part-2.png) ## Step 1: Ensure you have a customer id - If you don’t have a Dojo user to link to your backend user, [create a new one](https://docs.dojo.tech/api#tag/Customers/operation/Customers_Create) using POST[/customers](https://docs.dojo.tech/api#tag/Customers/operation/Customers_Create). - If you already have a `customerId`, retrieve it. > **Info:** - Don't create a new customer for each transaction. This avoids customers from accessing their saved cards. > > > ## Step 2: Authorize your app to retrieve customer’s saved cards > > For mobile SDK to retrieve information about saved cards for a specific user, you must create and pass a [customer secret](https://docs.dojo.tech/api#tag/Customers/operation/Customers_CreateCustomerSecret) using POST [/customers/{customerId}/create-secret](https://docs.dojo.tech/api#tag/Customers/operation/Customers_CreateCustomerSecret). > > **Info:** > - To create a customer `secret`, ensure you have the `customerId` from [step 1](https://docs.dojo.tech/mobile-integration/android/accept-payments/save-card#step-1-ensure-you-have-a-customer-id) and your API Key. > - You must always create a customer `secret` in your backend and then pass it to your app. > - Never store sensitive data such as API Keys inside your app. > - Customer `secret` is short-lived, hence Dojo recommends creating a new one each time your app might need to access stored payment methods. The following code samples demonstrate how to create a customer `secret`. ```bash title="create-customer-secret.sh" # The sandbox API key passed in 'authorization' is public. # Don't submit any personally identifiable information in any requests made with this key. # Sign in to developer.dojo.tech to create your own private sandbox key and use that instead # for secure testing. curl -v --request POST \ --url https://api.dojo.tech/customers/cust_sandbox_6g-HvPv6VkG_Q_PXCpJqmw/create-secret \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ' \ --header 'Version: 2024-02-05' ``` ## Step 3: Create a payment intent linked to the customerId When creating a payment intent, pass the `customerId` to the payment intent request body. ```javascript "customer": { "customerId": "cust_sandbox_9WibJ2zeMU2C9gkRnDgs1g" } ``` ## Step 4: Initiate payment flow in the app Pass the `paymentIntentId` and customer `secret` to your app and then pass them to the mobile SDK to start the checkout process. ```swift title="create-customer-secret.swift" dojoUI.startPaymentFlow( paymentIntentId: "", controller: self, customerSecret: "" // Customer secret key ) { result in print(result) } ``` ## Step 5: Receive payment status Once payment is completed, the SDK gets a notification with a numerical code representing the result. Check out the [status codes](https://docs.dojo.tech/payments/accept-payments/online-payments/components/configuration#status-code) reference for more information about what each code means. Additionally, your backend will receive a notification via [Webhook](https://docs.dojo.tech/development-resources/webhooks). --- ## Setup Apple Pay >Compatible with iOS 11 and later. With Apple Pay in your application, you can allow users to securely pay with nearly all credit and debit cards. > **Info:** Users can see Apple Pay as a payment method in the following scenarios: > - When using a device compatible with Apple Pay. > - If a user is located in a region where Apple Pay is available. > - If a user already has Apple Pay set up on their device. To enable Apple Pay in your app and start accepting payments, you must first set up the integration. To setup the integration, do the following: ![Merchant Identifier](https://docs.dojo.tech/images/setup-apple-pay.png) 1. Create a new [Merchant ID](https://developer.apple.com/account/resources/identifiers/add/bundleId). For more details, see [Apple Developer Account Help](https://developer.apple.com/help/account/configure-app-capabilities/configure-apple-pay). 2. [Contact Dojo](https://support.dojo.tech/hc/en-gb/requests/new) for a `signing key`. 3. Generate a [payment processing certificate](https://developer.apple.com/account/resources/certificates/add) for the [Merchant ID](https://developer.apple.com/account/resources/identifiers/add/bundleId) you created using the `signing key`. To do so, go to the [Apple developer portal](https://developer.apple.com/account/resources/certificates/add) and under **Certificates, Identifiers, and Profiles** > **Create a New Certificate** > **Upload a Certificate Signing Request**, upload `CertificateSigningRequest.certSigningRequest` that you received from Dojo. 4. Download the payment processing certificate (with extension `.cer`) and send that certificate to [Dojo](https://support.dojo.tech/hc/en-gb/requests/new). 5. Using the following code, set the `merchantIdentifier` property with your [Merchant ID](https://developer.apple.com/account/resources/identifiers/add/bundleId) you created in Step 1. ```javascript title="capture-apple-pay.js" const result = await startPaymentFlow({ intentId: "", applePayMerchantId: "" }); console.log(result); ``` > **Info:** Known limitation: > Our SDK does not support Amex cards with Apple Pay. ## Testing Apple Pay To enable test cards for Apple Pay, you must have an [Apple Sandbox Tester Account](https://developer.apple.com/help/app-store-connect/test-in-app-purchases-main/create-sandbox-apple-ids/). This lets you add test cards to your Apple Wallet. See Apple's Sandbox Testing [Documentation](https://developer.apple.com/apple-pay/sandbox-testing/) to set up your Sandbox Tester Account and navigate to Test Cards for Apps and the Web to see the full list of supported test cards by Apple. --- ## Step-by-step guide > Learn how to accept payments in your iOS app using our mobile SDK. This guide explains the process of integrating the checkout experience in your app. ## Checkout experience flow The following explains the flow of a user's journey in the checkout experience. > **Info:** - The term `user` used in this document refers to a customer trying to make a payment through your mobile application. > - This guide assumes you named the button on your checkout screen as **Checkout**. 1. A user visits your app and taps **Checkout**. 2. Your mobile app sends the user's purchase information to your backend, your backend sends this information to Dojo's backend to [create a payment intent](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-1-create-a-payment-intent). 3. Your mobile app starts the checkout process using the mobile SDK. 4. The mobile SDK collects the user payment details, sends them to the Dojo backend, and presents a result screen to the user. The mobile SDK then notifies the hosting application of the [payment result](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#result-code). 5. Your backend receives a [webhook notification](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-3-handle-post-payment-events) when the payment is completed. ![](https://docs.dojo.tech/images/flow-checkout-page-ios.png) **Flow diagram: Flow Checkout Page Ios** ```mermaid sequenceDiagram actor U as User participant SDK as dojo mobile SDK participant App as Merchant mobile app participant MB as Merchant backend participant DB as dojo backend U->>App: Taps Checkout App->>MB: Sends information about user purchases MB->>DB: POST /payment-intents DB-->>MB: Payment intent object MB-->>SDK: Payment intent Id SDK-->>U: Display prebuilt Checkout screen U->>SDK: Enters payment details and taps Pay SDK->>DB: Processes payment DB-->>SDK: Sends response with the payment result SDK-->>U: Displays the payment result SDK->>App: Notifies mobile app with the payment result DB->>MB: Sends webhooks ``` ## How to process a payment This is a step-by-step guide that demonstrates how to process payments with Dojo's backend and your backend into your mobile app using Dojo's mobile SDK. ### Before you start This guide contains the following steps: 1. [Create a payment intent](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-1-create-a-payment-intent). 2. [Start the checkout process](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-2-start-checkout-process). 3. [Handle post-payment events](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-3-handle-post-payment-events). 4. [Test and go live](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#step-4-test-and-go-live). ### Step 1. Create a payment intent With the checkout button in your app, call your backend and then call Dojo's backend endpoint to create a payment intent. To create a payment intent, the following parameters are required: - `amount`: This includes the currency and value, in minor units, for example, "1000" for 10.00 GBP. - `reference`: Your unique reference for the payment intent, like the *order number*. Here's an example of how to create a payment intent for 10 GBP on your backend: ```py title="server.py" from urllib import response from flask import Flask, jsonify, request, render_template app = Flask(__name__) @app.route('/checkout', methods=['GET', 'POST']) def hello(): # POST request if request.method == 'POST': print(request.get_json()) # parse as JSON conn = http.client.HTTPSConnection("api.dojo.tech") # call post payment-intent payload = json.dumps({ "amount": { "value": 1000, "currencyCode": "GBP" }, "reference": "Order 245" }) headers = { 'Content-Type': "application/json", 'Version': "2024-02-05", 'Authorization': "Basic sk_sandbox_c8oLGaI__msxsXbpBDpdtwJEz_eIhfQoKHmedqgZPCdBx59zpKZLSk8OPLT0cZolbeuYJSBvzDVVsYvtpo5RkQ" # <-- Change to your secret key } conn.request("POST", "/payment-intents/", payload, headers) # handling the response from POST res = conn.getresponse() data = res.read() resp_data = {} resp_data['id'] = json.loads(data)["id"] json_data = json.dumps(resp_data) ``` See the [API reference](https://docs.dojo.tech/api#operation/PaymentIntents_CreatePaymentIntent) for a complete list of parameters that can be used for payment intent creation. For configurations that apply to our mobile SDK, go to [Configurations](https://docs.dojo.tech/mobile-integration/ios/accept-payments/ios-optional-configurations). ### Step 2. Start checkout process Once you've created the payment intent, pass the payment intent ID to your payment flow code. > **Info:** To start the checkout process, ensure you have installed the [latest SDK](https://docs.dojo.tech/mobile-integration/ios/ios-setup). ```kotlin title="capture-card.swift" let dojoUI = DojoSDKDropInUI() dojoUI.startPaymentFlow(paymentIntentId: "", controller: self) { result in print(result) } ``` After the user fills in their payment information on the checkout screen, Dojo processes the payment and redirects the user to the result screen. Your app receives a [result code](https://docs.dojo.tech/mobile-integration/ios/accept-payments/step-by-step-guide#result-code). > **Info:** For additional configurations that apply to our mobile SDK, go to [configurations](https://docs.dojo.tech/mobile-integration/ios/accept-payments/ios-optional-configurations). ### Step 3. Handle post-payment events ### Step 4. Test and go live Before going live, test your integration using the test card numbers: ### Result code When you make a payment with using an SDK integration, your app will receive a `result` code. Refer to the following result codes for more information. | Result Code | Result |Description | |-----|------------------------------|-----| |`0` | **Successful** |The transaction was successful.| |`3` | **Authorizing** | The card holder hasn't completed 3DS, this status will only be seen on the REST API.| |`4` | **Referred** | The card issuer has parked the transaction awaiting contact with the customer before proceeding to authorize or decline the transaction.| |`5` | **Declined** | The transaction was declined by the card issuer or acquiring bank.| |`20` | **Duplicate Transaction** | The transaction which was processed was a duplicate. Ensure each transaction has a unique `OrderId`.| |`30` | **Failed** | Error executing transaction.| |`400` | **Invalid Request** | The request has failed validation by our servers and the transaction hasn't been submitted to the gateway. Possible causes for this are invalid transaction type or other data in the request.| |`401` | **Issue with Access Token** | The access token being used isn't valid, the transaction hasn't been submitted to the gateway. This can be caused if the token has already been used or the 30 minute expiry time has elapsed.| |`404` | **No Access Token Supplied** | No access token has been supplied. Transaction hasn't been submitted to the gateway.| |`500` | **Internal Server Error** | There's been an error submitting the transaction, please check the REST API for the status of the transaction.| |`7770` | **SDK Internal Error** | There's a problem on the SDK side. Contact [Dojo](https://support.dojo.tech/hc/en-gb/requests/new) for more information.| --- --- ## UI customization > Learn how to customize the mobile SDK UI to blend seamlessly into your app. The mobile SDK comes with two default themes: To switch between these themes, pass a `DojoThemeSettings` object as a parameter when starting a payment flow. ```kotlin title="ui-customization.swift" // Obtain an instance of the desired theme var lightTheme = DojoThemeSettings.getLightTheme() let darkTheme = DojoThemeSettings.getDarkTheme() // Set an individual property to a custom color lightTheme.primaryLabelTextColor = .red // Pass the desired theme to the SDK when starting the payment flow let dojoUI = DojoSDKDropInUI() dojoUI.startPaymentFlow(themeSettings: darkTheme) ``` ## Properties `DojoThemeSettings` contains multiple properties that you can set individually. |Property | Description | |------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |`primaryLabelTextColor`| Primary label color. | |`secondaryLabelTextColor` | Secondary label color. | |`headerTintColor`| Header text color. | |`headerButtonTintColor`| Color of header buttons like the `X` button. | |`primarySurfaceBackgroundColor`| Background color of the screen. | |`primaryCTAButtonActiveBackgroundColor`| Background color of primary button. | |`primaryCTAButtonActiveTextColor`| Font color of primary button. | |`primaryCTAButtonDisabledBackgroundColor`| Background color of disabled state of primary button (filled button). | |`primaryCTAButtonDisableTextColor`| Font color of disabled state of primary button. | |`secondaryCTAButtonActiveBorderColor`| Border color of the secondary button (button that's transparent and only has a border color). The background color is the same as current `primarySurfaceBackgroundColor` and can’t be changed. | |`secondaryCTAButtonActiveTextColor`| Font color of secondary button. | |`separatorColor`| Color of separator between header and the screen content. | |`errorTextColor`| Error message color. | |`loadingIndicatorColor`| Color of the animated loader on the initial loading screen. | |`inputFieldPlaceholderColor`| Input field placeholder color. | |`inputFieldBackgroundColor`| Input field background color. | |`inputFieldDefaultBorderColor`| Input field default border color when field isn't selected and not in the error state. | |`inputFieldSelectedBorderColor`| Input field border color when selected. | |`inputElementActiveTintColor`| Color of tick boxes and saved card selection circle when selected. | |`inputElementDefaultTintColor`| Color of tick boxes and saved card selection circle when not selected. | |`lightStyleForDefaultElements`| Switch between light and dark sets of graphic elements (like keypad, Apple Pay, card schema images). | ## Illustrations The following images are illustrations of the items available for customization. ### Screen 1: Apple Pay ### Screen 2: Saved card ### Screen 3: Input name, address, and email ### Screen 4: Input screen with keypad --- ## Accept payments in iOS >All you need to know about accepting payments on iOS devices. [![](https://docs.dojo.tech/images/dojo-icons/BookBookmark.svg) **Step-by-step Guide** Guide to start accepting payments in your mobile app.](accept-payments/ios-step-by-step-guide) [![](https://docs.dojo.tech/images/dojo-icons/AppleLogo.svg) **Setup Apple Pay** Guide to accept payments with Apple Pay.](accept-payments/ios-setup-apple-pay) [![](https://docs.dojo.tech/images/dojo-icons/PaymentCard.svg) **Save Card for Later** Allow users to save their cards for later use. View complete flow and code samples.](accept-payments/ios-save-card) [![](https://docs.dojo.tech/images/dojo-icons/Layout.svg) **Optional Configurations** Learn how to configure additional elements in your app.](accept-payments/ios-optional-configurations) [![](https://docs.dojo.tech/images/dojo-icons/Code.svg) **UI Customization** Guide to create and customize payment screens and elements.](accept-payments/ios-ui-customization) [![](https://docs.dojo.tech/images/dojo-icons/Headset.svg) **Need a hand?** Our support team is always happy to help with any questions you have.](https://support.dojo.tech/hc/en-gb) --- ## Demo > Want to get your hands on a demo app before you begin your integration? The demo app is a ready-to-run example with the mobile SDK integrated. This allows you to play around with the mobile SDK features. This app is available on both [Swift](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui/tree/main/ExampleSwift) and [Objective-C](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui/tree/main/ExampleObjc) inside the [mobile SDK repository](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui). > **Info:** To run the demo app, you need to have [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) installed. ## How to run the Demo app 1. Clone the [repository](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui). ```bash git clone git@github.com:dojo-engineering/dojo-ios-sdk-drop-in-ui.git ``` 2. Navigate to any of the following folders depending on the language: - [ExampleSwift](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui/tree/main/ExampleSwift) - [ExampleObjc](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui/tree/main/ExampleObjc) ```bash cd dojo-ios-sdk-drop-in-ui/ExampleSwift ``` 3. Install the dependencies. ```bash pod install ``` 4. Open `dojo-ios-sdk-drop-in-ui.xcworkspace`. ```bash open dojo-ios-sdk-drop-in-ui.xcworkspace ``` 5. Navigate to `ViewController` and replace `payment-intent-id` with a [`paymentIntentId`](https://docs.dojo.tech/mobile-integration/ios/accept-payments/ios-step-by-step-guide) that you generated on your side. 6. Run the app and press `startPaymentFlow` button on the screen. --- ## iOS integration >Learn more about Dojo's iOS mobile SDKs. - [**Accept payments from all major credit and debit cards**](https://docs.dojo.tech/mobile-integration/ios/ios/ios-accept-payments) Allow users to pay using a card that works best for them. - [**Accept Apple Pay payments**](https://docs.dojo.tech/mobile-integration/ios/ios/accept-payments/ios-setup-apple-pay) Integrate Apple Pay to your checkout screen in addition to card payments. - [**Allow users to manage and save card information for future use**](https://docs.dojo.tech/mobile-integration/ios/ios/accept-payments/ios-save-card) Allow users to save card information for future payments. - [**Collect additional information from a user (like email, billing address)**](https://docs.dojo.tech/mobile-integration/ios/ios/accept-payments/ios-optional-configurations) Use your checkout screen to capture useful information about your customer. - [**Customize the UI of your checkout screen**](https://docs.dojo.tech/mobile-integration/ios/ios/accept-payments/ios-ui-customization) Choose the colors for the checkout screen UI that align with your brand's visual identity. ## Ready to get started? [![](https://docs.dojo.tech/images/dojo-icons/Wrench.svg) **Install SDK** Install the Dojo iOS SDK to start accepting payments in mobile apps.](ios/ios-setup) --- ## Setup > Learn how to setup the Dojo iOS SDK. [![GitHub release](https://img.shields.io/github/v/release/dojo-engineering/dojo-ios-sdk-drop-in-ui?logo=Github&labelColor)](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui) The Dojo iOS SDK is available on [CocoaPods](https://cocoapods.org/) and [Swift Package Manager](https://www.swift.org/package-manager/). 1. Ensure you have the latest version of CocoaPods. 2. In your existing [Podfile](https://guides.cocoapods.org/syntax/podfile.html), add the following lines: ```ruby title="Podfile" pod 'dojo-ios-sdk-drop-in-ui', :git => 'git@github.com:dojo-engineering/dojo-ios-sdk-drop-in-ui.git', :tag => '1.3.2' pod 'dojo-ios-sdk', :git => 'git@github.com:Dojo-Engineering/dojo-ios-sdk.git', :tag => '1.4.0' ``` 3. Run the following command to install these pods: ```ruby pod install ``` 1. Go to **File** > **Add Packages...** and in **Repository URL**, add `https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui`. 2. Enter the latest version number of our SDK. 3. In target of your app, add `dojo-ios-sdk-drop-in-ui`. 4. Click **Add package**. > **Info:** - To get the latest version of the mobile SDK, run `pod update`. > - Ensure that you exclude payment-related fields from tracking if you are using screen recording or session recording services like **LogRocket** or **UXCam**. You can do that by setting `themeSettings.analyticsExcludedFieldsIdentifier` with your identifier value. [![](https://docs.dojo.tech/images/dojo-icons/BookBookmark.svg) **Releases** Details on the latest SDK changes and previous versions.](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui/releases) --- ## Mobile integration {/* -- enable as option 2 import MobileCards from "@site/src/components/MobileCards" */} > Our mobile SDKs are available in iOS, Android, and React Native. Choose your integration. [![iOS](https://img.shields.io/badge/-iOS-blue?logo=Github&labelColor=grey)](https://github.com/dojo-engineering/dojo-ios-sdk-drop-in-ui) [![Android](https://img.shields.io/badge/Android-blue?logo=Github&labelColor=grey)](https://github.com/dojo-engineering/android-dojo-pay-sdk) [![React Native](https://img.shields.io/badge/React_Native-blue?logo=Github&labelColor=grey)](https://github.com/dojo-engineering/react-native-pay-sdk) Our mobile SDKs have been designed with developers in mind, making the integration simple and intuitive to use. Whether you're an experienced developer or just getting started, our SDK provides a smooth checkout experience by allowing you to easily integrate Dojo checkout screens and UI elements in your app. {/* enable as option 2 */} ![](https://docs.dojo.tech/images/mobile-integration.png) {/* ## Supported features // UNCOMMENT WHEN APPROVED */} The Dojo mobile SDKs support the following payment intent features: |Scenario| Currency | Wallet| Card |-------|:--------:|----|-----| |`Created`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`Authorized`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`Canceled`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`Captured`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`Reversed`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | |`Refunded`| **GBP** | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | ![yes](https://docs.dojo.tech/images/dojo-icons-small/CheckCircle.svg) | [![](https://docs.dojo.tech/images/dojo-icons/AppleLogo.svg) **iOS** Compatible with: iOS 11.0 and later.](/mobile-integration/ios) [![](https://docs.dojo.tech/images/dojo-icons/AndroidLogo.svg) **Android** Compatible with: Android 5.0 and later.](/mobile-integration/android) [![](https://docs.dojo.tech/images/dojo-icons/ReactNative.svg) **React Native** Compatible with: iOS 11.0 and later, Android 5.0 and later.](/mobile-integration/react-native) --- ## Strong Customer Authentication [Strong Customer Authentication (SCA)](https://www.fca.org.uk/firms/strong-customer-authentication) is a security protocol that requires customers to provide at least two forms of authentication before completing an online transaction. It is designed to reduce fraud and increase security for online transactions, especially for electronic payment systems that use credit cards, bank transfers, and e-wallets. Under SCA, customers are required to provide two or more of the following forms of authentication: - Something the customer knows (such as a password or PIN) - Something the customer has (such as a mobile phone or a smart card) - Something the customer is (such as a fingerprint or facial recognition) SCA is mandated by the [European Union's Payment Services Directive 2 (PSD2)](https://www.ecb.europa.eu/paym/intro/mip-online/2018/html/1803_revisedpsd.en.html) for all electronic payment transactions initiated by customers in the [European Economic Area (EEA)](https://www.efta.int/eea). It aims at protecting customers' financial data and prevent unauthorized access to their accounts.