# Insert Screens with Slots

This guide shows how to insert one of your screens between two consecutive SDK screens, without changing the original flow logic (Level 2 — see [Customization model](/en/getnet-toolbox/sdk-white-label/core-concept-sdk/customization-model)).

## How it works

The SDK leads the user up to the slot screen, waits for your application to signal completion with `resumeFlow()`, and resumes the original flow from there. Slot screens receive `resumeFlow()` with no arguments — their only job is to tell the SDK it can continue.

Slots are registered in `SdkUiNavigationConfig.slotScreens`, keyed by a `BrFlowSlot` value:

```kotlin
interface SdkFlowSlot
typealias SlotScreen = @Composable (resumeFlow: () -> Unit) -> Unit
```

## Register a slot at build

```kotlin
import com.pagonxt.sdk.brazil.uxal.navigation.BrFlowSlot
import com.pagonxt.sdk.core.uxal.navigation.SdkUiNavigationConfig

val config = SdkUiNavigationConfig(
    slotScreens = mapOf(
        BrFlowSlot.AmountToProductSelection to { resumeFlow ->
            CustomConfirmationScreen(onConfirm = { resumeFlow() })
        }
    )
)

ApoloSdk.Builder(applicationContext)
    // ...
    .customizeNavigationConfig(config)
    .build()
```

## Register a slot at runtime

Apply a configuration after the SDK is initialized:

```kotlin
val apolo = ApoloSdk.getClient()

val config = SdkUiNavigationConfig(
    slotScreens = mapOf(
        BrFlowSlot.ProcessingToPaymentSuccess to { resumeFlow ->
            OfferScreen(onContinue = { resumeFlow() })
        }
    )
)

apolo.customizeNavigation(config)
```

## Available slots

Each slot sits between two SDK screens. Rectangles are SDK screens; the slot is inserted between them.

| Slot | From → To | Context |
| :--- | :--- | :--- |
| `AmountToProductSelection` | Amount → ProductSelection | Card sale |
| `ProductSelectionToInstallmentSelection` | ProductSelection → InstallmentSelection | Credit installments |
| `ProductSelectionToCardReading` | ProductSelection → CardReading | Debit / credit single / voucher |
| `ProductSelectionToPixQrCodeLoading` | ProductSelection → PixQrCodeLoading | Pix |
| `InstallmentSelectionToCardReading` | InstallmentSelection → CardReading | After choosing installments |
| `CardReadingToCardSelection` | CardReading → CardSelection | Multi-application EMV |
| `CardReadingToProcessing` | CardReading → Processing | Authorization |
| `CardReadingToPaymentError` | CardReading → PaymentError | Read failure |
| `CardSelectionToProcessing` | CardSelection → Processing | After selection |
| `CardSelectionToPaymentError` | CardSelection → PaymentError | Failure after selection |
| `ProcessingToPaymentSuccess` | Processing → PaymentSuccess | Approved |
| `ProcessingToPaymentError` | Processing → PaymentError | Declined |
| `PixQrCodeLoadingToPixPaymentError` | PixQrCodeLoading → PixPaymentError | QR generation failure |
| `PixQrCodeToPixPaymentSuccess` | PixQrCode → PixPaymentSuccess | Pix approved |
| `PixQrCodeToPixPaymentError` | PixQrCode → PixPaymentError | Pix declined |
| `PixPaymentRecognitionToPixPaymentSuccess` | PixPaymentRecognition → PixPaymentSuccess | Recognition OK |
| `PixPaymentRecognitionToPixPaymentError` | PixPaymentRecognition → PixPaymentError | Recognition failure |
| `PixPaymentVerificationToPixPaymentSuccess` | PixPaymentVerification → PixPaymentSuccess | Verification OK |
| `PixPaymentVerificationToPixPaymentError` | PixPaymentVerification → PixPaymentError | Verification failure |
| `CancelInputToSearchTransaction` | CancelInput → SearchTransaction | Refund start |
| `SearchTransactionToCancelPayment` | SearchTransaction → CancelPayment | After lookup |
| `CancelPaymentToCancelPaymentProcessing` | CancelPayment → CancelPaymentProcessing | Confirmation |
| `CancelPaymentProcessingToCancelPaymentSuccess` | CancelPaymentProcessing → CancelPaymentSuccess | Refund OK |
| `CancelPaymentProcessingToCancelPaymentError` | CancelPaymentProcessing → CancelPaymentError | Refund failed |

## Next steps

* [Override SDK screens](/en/getnet-toolbox/sdk-white-label/how-to-guides-sdk/override-sdk-screens) — replace a screen's appearance instead of inserting one.