Getnet DocsGetnet Docs

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).

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:

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

Register a slot at build

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:

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.

SlotFrom → ToContext
AmountToProductSelectionAmount → ProductSelectionCard sale
ProductSelectionToInstallmentSelectionProductSelection → InstallmentSelectionCredit installments
ProductSelectionToCardReadingProductSelection → CardReadingDebit / credit single / voucher
ProductSelectionToPixQrCodeLoadingProductSelection → PixQrCodeLoadingPix
InstallmentSelectionToCardReadingInstallmentSelection → CardReadingAfter choosing installments
CardReadingToCardSelectionCardReading → CardSelectionMulti-application EMV
CardReadingToProcessingCardReading → ProcessingAuthorization
CardReadingToPaymentErrorCardReading → PaymentErrorRead failure
CardSelectionToProcessingCardSelection → ProcessingAfter selection
CardSelectionToPaymentErrorCardSelection → PaymentErrorFailure after selection
ProcessingToPaymentSuccessProcessing → PaymentSuccessApproved
ProcessingToPaymentErrorProcessing → PaymentErrorDeclined
PixQrCodeLoadingToPixPaymentErrorPixQrCodeLoading → PixPaymentErrorQR generation failure
PixQrCodeToPixPaymentSuccessPixQrCode → PixPaymentSuccessPix approved
PixQrCodeToPixPaymentErrorPixQrCode → PixPaymentErrorPix declined
PixPaymentRecognitionToPixPaymentSuccessPixPaymentRecognition → PixPaymentSuccessRecognition OK
PixPaymentRecognitionToPixPaymentErrorPixPaymentRecognition → PixPaymentErrorRecognition failure
PixPaymentVerificationToPixPaymentSuccessPixPaymentVerification → PixPaymentSuccessVerification OK
PixPaymentVerificationToPixPaymentErrorPixPaymentVerification → PixPaymentErrorVerification failure
CancelInputToSearchTransactionCancelInput → SearchTransactionRefund start
SearchTransactionToCancelPaymentSearchTransaction → CancelPaymentAfter lookup
CancelPaymentToCancelPaymentProcessingCancelPayment → CancelPaymentProcessingConfirmation
CancelPaymentProcessingToCancelPaymentSuccessCancelPaymentProcessing → CancelPaymentSuccessRefund OK
CancelPaymentProcessingToCancelPaymentErrorCancelPaymentProcessing → CancelPaymentErrorRefund failed

Next steps