# PaymentSheet

Renders a secure tokenization form as a modal sheet. When the buyer submits the form, the SDK tokenizes the payment details and returns a [TokenizedResponse](/android/online/token-response) via the `onPositiveClick` callback.

Each [form type](/android/online/form-types) comes in two style variants, **Outlined** and **Classic**, and shares the same parameters.


```text
CompletePaymentSheetOutlined(
    modifier, applicationId, isSandbox,
    paymentSheetResources, paymentSheetColors,
    logoTextStyle, textStyle, buttonTextFont,
    onDismiss, onNegativeClick, onPositiveClick
)
```

| Parameter | Type | Required | Description |
|  --- | --- | --- | --- |
| `applicationId` | `String` | No | Your Finix Application ID. Defaults to sandbox environment. |
| `isSandbox` | `Boolean` | No | `true` for sandbox, `false` for production. Defaults to `true`. |
| `onDismiss` | `() -> Unit` | Yes | Called when the buyer dismisses the sheet without submitting. |
| `onNegativeClick` | `() -> Unit` | Yes | Called when the buyer taps the cancel button. |
| `onPositiveClick` | `(TokenizedResponse) -> Unit` | Yes | Called with the [TokenizedResponse](/android/online/token-response) on successful submission. |
| `paymentSheetResources` | `PaymentSheetResources` | No | Customize logo, button labels, and strings. See [PaymentSheetResources](/android/online/resources). |
| `paymentSheetColors` | `PaymentSheetColors` | No | Customize field, button, and error colors. See [PaymentSheetColors](/android/online/colors). |
| `modifier` | `Modifier` | No | Jetpack Compose modifier applied to the sheet container. |
| `logoTextStyle` | `TextStyle` | No | Text style for the logo label. Default: `headlineSmall`. |
| `textStyle` | `TextStyle` | No | Text style for input fields. Default: `LocalTextStyle.current`. |
| `buttonTextFont` | `TextUnit` | No | Font size for button labels. Default: `BUTTON_TEXT_FONT`. |


Your Finix Application ID, found in the Finix Dashboard. Application IDs are environment-specific, so use the one that matches your chosen `isSandbox` value.

Controls which Finix environment the SDK connects to.

| Value | Environment |
|  --- | --- |
| `true` | Sandbox |
| `false` | Production |


Your `applicationId` must belong to the same environment.

The three required callbacks control what happens when the buyer interacts with the sheet.

| Callback | Trigger | Receives |
|  --- | --- | --- |
| `onDismiss` | Buyer swipes the sheet away | nothing |
| `onNegativeClick` | Buyer taps the cancel button | nothing |
| `onPositiveClick` | Successful tokenization | [TokenizedResponse](/android/online/token-response) |


Dismiss the sheet in all three callbacks to avoid leaving it open after interaction.

Pass `PaymentSheetResources` to customize text and images, and `PaymentSheetColors` to customize colors.

See [PaymentSheetResources](/android/online/resources) and [PaymentSheetColors](/android/online/colors) for all available properties.

A complete implementation with customized colors and resources, controlled by a ViewModel.