# Dojo Android SDK Documentation > Guides for integrating Dojo payments into Android apps using the Dojo Android 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 Android 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, optional features in your integration. The following table shows which fields are configurable in mobile SDK 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 Google 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-android.png) By default, the checkout page only supports card payments. To enable Google Pay wallet, you must first [configure Google Pay](https://docs.dojo.tech/mobile-integration/android/accept-payments/android-setup-google-pay). Then, pass `"Card","Wallet"` in `paymentMethods`. 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-android.png) ​ You can add a form to collect the billing address and user email to the checkout screen by passing `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-android.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 choose a preferred payment method, reducing their need to enter card information repeatedly. This is a nice-to-have, but optional feature for your app. The following gif is a demonstration of this feature in a mobile app. ## Enabling save card To enable save card functionality in 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-android.png) ![](https://docs.dojo.tech/images/save-card-new-part-2-android.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 a `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](https://docs.dojo.tech/development-resources/api-keys). > - 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](https://docs.dojo.tech/payments/manage-payments/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. Then, pass them to the SDK to start the checkout process. ```java title="create-customer-secret.java" // Get the PaymentHandler private final DojoPaymentFlowHandler dojoPaymentFlowHandler = DojoSDKDropInUI.INSTANCE.createUIPaymentHandler( this, ((dojoPaymentResult) -> { Toast.makeText(this, dojoPaymentResult.name(), Toast.LENGTH_LONG).show(); return Unit.INSTANCE; })); // On "Pay" tapped dojoPaymentFlowHandler.startPaymentFlow( new DojoPaymentFlowParams( "", "" // Customer secret key )); ``` ## Step 5: Receive payment status Once payment is completed, the app receives a notification with a numerical code representing the result. Visit 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 Google Pay >Compatible with Android 5.0 and later. With Google Pay in your application, you can allow users to securely pay with nearly all credit and debit cards. > **Info:** Users can see Google Pay as a payment method in the following scenarios: > - When using a device compatible with Google Pay. > - If a user is located in a region where Google Pay is available. > - If a user already has Google Pay set up on their device. To enable Google Pay in your app and start accepting payments, you must first set up the integration. To set up the integration, do the following: ![Enable Google Pay](https://docs.dojo.tech/images/setup-google-pay.png) 1. You must first enable the [Google Pay API](https://developers.google.com/pay/api/android/guides/setup) to use Google Pay. To do so, add the following snippet to ``: ```xml title="AndroidManifest.xml" ... ``` 2. Request a `gatewayMerchantId` from [Dojo](https://support.dojo.tech/hc/en-gb/requests/new). 3. Login to [Google Pay portal](https://pay.google.com/) and obtain your `Merchant Id`. 4. Upload screenshots of your app containing the checkout scenario to your Google Pay console for review. 5. After Google approves your app, pass the `gatewayMerchantId` and `Merchant Id` to the following code snippet: ```javascript title="capture-google-pay.js" const result = await startPaymentFlow({ intentId: "", gPayMerchantId: "", gPayGatewayMerchantId: "", gPayMerchantName: "" }); console.log(result); ``` ## Testing Google Pay The Google Pay [Test Card Suite](https://developers.google.com/pay/api/android/guides/resources/test-card-suite) allows you to test Google Pay without the need of adding real cards to Google accounts. To instantly view these cards in your Google Account TEST environment, join [Google's User Group](https://groups.google.com/g/googlepay-test-mode-stub-data) and all test cards will be automatically added to your account so you don't need to add them manually. --- ## Step-by-step guide > Learn how to accept payments in your Android 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/android/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/android/accept-payments/step-by-step-guide#result-codes). 5. Your backend receives a [webhook notification](https://docs.dojo.tech/mobile-integration/android/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-android.png) **Flow diagram: Flow Checkout Page Android** ```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/android/accept-payments/step-by-step-guide#step-1-create-a-payment-intent). 2. [Start the checkout process](https://docs.dojo.tech/mobile-integration/android/accept-payments/step-by-step-guide#step-2-start-checkout-process). 3. [Handle post-payment events](https://docs.dojo.tech/mobile-integration/android/accept-payments/step-by-step-guide#step-3-handle-post-payment-events). 4. [Test and go live](https://docs.dojo.tech/mobile-integration/android/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/android/accept-payments/android-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/android/android-setup). ```java title="capture-card.java" // Get the PaymentHandler private final DojoPaymentFlowHandler dojoPaymentFlowHandler = DojoSDKDropInUI.INSTANCE.createUIPaymentHandler( this, ((dojoPaymentResult) -> { Toast.makeText(this, dojoPaymentResult.name(), Toast.LENGTH_LONG).show(); return Unit.INSTANCE; })); // On "Pay" tapped dojoPaymentFlowHandler.startPaymentFlow( new DojoPaymentFlowParams( "" )); ``` After the user fills in their payment information on the checkout screen, Dojo processes the payment and redirects the user to the result screen. The app receives a [result code](https://docs.dojo.tech/mobile-integration/android/accept-payments/step-by-step-guide#result-codes). > **Info:** For additional configurations that apply to our mobile SDK, go to [configurations](https://docs.dojo.tech/mobile-integration/android/accept-payments/android-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 codes When you make a payment 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 the payment flow. ```java title="ui-customization.java" // call this before u display the ui sdk on the screen private void configureDojoThemeSettings() { // you can override any value you for lightColorPalette LightColorPalette lightColorPalette = new LightColorPalette( "#DD000000" // primaryLabelTextColor ); // you can override any value for the darkColorPalette DarkColorPalette darkColorPalette = new DarkColorPalette( "#DD000000" // primaryLabelTextColor ); DojoThemeSettings dojoThemeSettings = new DojoThemeSettings( lightColorPalette, darkColorPalette, // set that one to true if you don't support dark mode false, // set that one to false if you want to hide dojo brand true ); DojoSDKDropInUI.INSTANCE.setDojoThemeSettings(dojoThemeSettings); } ``` ## 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. | ## Illustrations The following images are illustrations of the items available for customization. ### Screen 1: Google Pay ### Screen 2: Saved card ### Screen 3: Input name, address, and email id ### Screen 4: Input screen with keypad --- ## Accept payments in Android >All you need to know about accepting payments on Android 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/android-step-by-step-guide) [![](https://docs.dojo.tech/images/dojo-icons/AndroidLogo.svg) **Setup Google Pay** Guide to accept payments with Google Pay.](accept-payments/android-setup-google-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/android-save-card) [![](https://docs.dojo.tech/images/dojo-icons/Layout.svg) **Optional Configurations** Learn how to configure additional elements in your app.](accept-payments/android-optional-configurations) [![](https://docs.dojo.tech/images/dojo-icons/Code.svg) **UI Customization** Guide to create and customize payment screens and elements.](accept-payments/android-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) --- ## Android integration >Learn more about integrating with Dojo's Android SDKs. - [**Accept payments from all major credit and debit cards**](https://docs.dojo.tech/mobile-integration/android/android/android-accept-payments) Allow users to pay using a card that works best for them. - [**Accept Google Pay payments**](https://docs.dojo.tech/mobile-integration/android/android/accept-payments/android-setup-google-pay) Integrate Google 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/android/android/accept-payments/android-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/android/android/accept-payments/android-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/android/android/accept-payments/android-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 Android SDK to start accepting payments in mobile apps.](android/android-setup) --- ## Compatibility matrix > Learn which Compose file versions are compatible with the Dojo UI SDK. The following table shows which Compose file versions support our UI SDK versions. | Compose | Dojo UI SDK | | --------| ----------- | | 1.5.0 | 1.3.3 | | 1.4.x | 1.3.1 | --- ## 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 [Kotlin](https://github.com/dojo-engineering/android-dojo-pay-sdk/blob/master/sample/src/main/java/tech/dojo/pay/sdksample/ExampleKotlin.kt) and [Java](https://github.com/dojo-engineering/android-dojo-pay-sdk/blob/master/sample/src/main/java/tech/dojo/pay/sdksample/ExampleJava.java) inside the [mobile SDK repository](https://github.com/dojo-engineering/android-dojo-pay-sdk). ## How to run the Demo app 1. Clone the [repository](https://github.com/dojo-engineering/android-dojo-pay-sdk). ```bash git clone git@github.com:dojo-engineering/android-dojo-pay-sdk.git ``` 2. Navigate to any of the following folders depending on the language: - [Kotlin](https://github.com/dojo-engineering/android-dojo-pay-sdk/tree/master/sample/src/main/java/tech/dojo/pay/sdksample) - [Java](https://github.com/dojo-engineering/android-dojo-pay-sdk/tree/master/sample/src/main/java/tech/dojo/pay/sdksample) ```bash cd sample/src/main/java/tech/dojo/pay/sdksample ``` 3. Navigate to `ExampleKotlin` or `ExampleJava` and replace `payment-intent-id` with a [`paymentIntentId`](https://docs.dojo.tech/mobile-integration/android/accept-payments/android-step-by-step-guide) that you generated on your side. 5. Run the app and tap `startPaymentFlow` button on the screen. --- ## Setup > Learn how to setup the Dojo Android SDK. [![Releases](https://img.shields.io/github/v/tag/dojo-engineering/android-dojo-pay-sdk?logo=Github&labelColor)](https://github.com/dojo-engineering/android-dojo-pay-sdk/tags) ## Declare the repository Dojo hosts the Android SDK dependencies in a Maven repository. You can declare the Dojo Android SDK repository by adding the URL in the top-level `build.gradle` file. > **Info:** - The SDK uses an external library [Cardinal](https://www.cardinalcommerce.com/) to support 3DS. To get the credentials, contact [Dojo support](https://support.dojo.tech/hc/en-gb/requests/new). > - 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. ```java title="build.gradle" repositories { ... maven { url = uri("https://cardinalcommerceprod.jfrog.io/artifactory/android") credentials { // Contact Dojo support for credentials username = "" password = "" } } } ``` ## Add dependency To install the Dojo Android SDK, add `tech.dojo.pay` to [`dependencies`](https://developer.android.com/studio/build/dependencies) of your `app\build.gradle` file. ```java title="build.gradle" dependencies { ... implementation ("tech.dojo.pay:sdk:1.6.2") implementation ("tech.dojo.pay:uisdk:1.3.5") } ``` If your app supports [`ProGuard`](https://www.guardsquare.com/proguard), add the following dependency to your `proguard-rules.pro` file: ```java title="proguard-rules.pro" -keep class com.cardinalcommerce.dependencies.internal.bouncycastle.** -keep class com.cardinalcommerce.dependencies.internal.nimbusds.** -keep class tech.dojo.pay.** { *; } ``` --- [![](https://docs.dojo.tech/images/dojo-icons/BookBookmark.svg) **Releases** Details on the latest SDK changes and previous versions.](https://github.com/orgs/dojo-engineering/packages?repo_name=android-dojo-pay-sdk) --- ## 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.