# Demo App Walkthrough

The demo app is a working Android project that tokenizes a card using every [form type](/android/online/form-types) the SDK ships.

Clone it to see the SDK running end-to-end before wiring it into your own app, or keep it open as a side-by-side reference while you follow the [Integration Guide](/android/online/integration).

The only thing you need before running it is a Finix sandbox Application ID. The demo ships with one so you can run it straight out of the box.

## Download the repository

Download the [finix-android-payment-sheet-app](https://github.com/finix-payments/finix-android-payment-sheet-app
https://github.com/finix-payments/finix-android-payment-sheet-app.git) repository from GitHub.

```bash
git clone
cd finix-android-payment-sheet-app
```

## Open the project in Android Studio

1. In Android Studio, choose **File → Open** and select the `finix-android-payment-sheet-app` directory.
2. Android Studio will auto-detect the Gradle project and begin an initial sync. The first sync downloads the Gradle distribution, the Android SDK components the project uses, and every library in `gradle/libs.versions.toml` (including `com.finix:finix-android-payment-sheet`). This can take several minutes.
3. Wait for the status bar to report **Gradle sync finished** before continuing. If sync fails, the error appears in the **Build** tool window - address it before trying to run.


## Create an emulator

If you don't already have a device or emulator target:

1. Open **Tools → Device Manager**.
2. Click the **+** icon and choose **Create Virtual Device**.
3. Pick a phone profile (e.g. Pixel 7) and click **Next**.
4. Pick a system image (API 34 is a safe default) and click **Next**.
5. Accept the defaults and click **Finish**.
6. In the Device Manager, click the ▶ icon next to the device to boot it.


## Run the app

With the emulator (or a connected physical device) selected in the target dropdown, click the green ▶ **Run 'app'** button. Android Studio builds the project, installs the APK, and launches it on the device.

## Configuration

Tap **Configuration** in the top-right of the home screen to set the values the demo passes into `PaymentSheetConfiguration`:

| Field | Maps to |
|  --- | --- |
| Application ID | [`PaymentSheetConfiguration.applicationId`](/android/online/configuration) |
| Environment | [`PaymentSheetConfiguration.environment`](/android/online/configuration) - Sandbox / Production / QA |
| Amount | `amount` passed to the payment sheet composable, in the smallest currency unit |
| Currency | `currency` passed to the payment sheet composable (ISO 4217) |
| Enable 3DS | Toggles 3D Secure. When on, surfaces Merchant ID / API Username / API Password fields that populate the rest of [`PaymentSheetConfiguration`](/android/online/configuration) and the [`ThreeDSConfiguration`](/android/online/configuration#threedsconfiguration). |


Tap **Save** to return to the home screen with the new values applied.

Sandbox only
The demo embeds its sandbox Application ID in-app and accepts API credentials via text fields. That's acceptable for a demo but **not** for a production integration - see the [Do not embed production API credentials](/android/online/configuration#configuration-shape) warning on PaymentSheetConfiguration.

## Pick a form type

Tap the **+** card on the home screen to open the form-type selector. The demo exposes one entry per form type - pick the one you want to try:

| Option | SDK composable | Collects |
|  --- | --- | --- |
| Complete Payment Sheet | `CompletePaymentSheet` | Name, Card Number, Expiry, CVV, Full Address |
| Partial Payment Sheet | `PartialPaymentSheet` | Name, Card Number, Expiry, CVV, Zip Code |
| Basic Payment Sheet | `BasicPaymentSheet` | Name, Card Number, Expiry, CVV |
| Minimal Payment Sheet | `MinimalPaymentSheet` | Card Number, Expiry, CVV |
| International Payment Sheet | `InternationalPaymentSheet` | Name, Card Number, Expiry, Country, Zip Code |


See [Form Types](/android/online/form-types) for the full field list per variant and the `*Outlined` style variants the SDK also ships (the demo only surfaces one style per variant).

## Submit a card

Fill the sheet with a [sandbox test card](/additional-resources/developers/implementation-and-testing/testing-your-integration), then tap the **Charge** button at the bottom of the sheet - its label shows the amount you set on the Configuration screen (e.g. **Charge $10.00**).

Camera capture
Optionally, you can scan card details [using the camera](/android/online/card-scanner). This feature requires a dedicated test card designed for sandbox environments.

Behind the scenes the sheet calls Finix's tokenization endpoint and (if 3DS is enabled) runs the 3D Secure challenge.

## Success

On success, the demo shows the token ID and - when 3DS ran - the 3DS session ID:

| Field | Meaning |
|  --- | --- |
| Token ID | The `id` from the [TokenizedResponse](/android/online/token-response#tokenizedresponse). Pass this to your backend to create a [Payment Instrument](/api/payment-instruments). Tokens expire 30 minutes after creation. |
| 3DS Session ID | The `sessionId` from the [ThreeDSResponse](/android/online/token-response#threedsresponse). `null` when 3DS wasn't enabled. |


The demo stops here on purpose - creating the Payment Instrument and running a transfer happens on your backend using the Finix API, and is covered in the [Integration Guide](/android/online/integration).

## Next steps

- Read the [Integration Guide](/android/online/integration) to add the SDK to your own app.
- Reference the [PaymentSheet](/android/online/payment-sheet), [PaymentSheetConfiguration](/android/online/configuration), and [PaymentSheetResponse](/android/online/token-response) pages for the parameter-level details.