FaciPayCheckout.start(...) apresenta o checkout (WebView num bottom-sheet) e devolve o resultado pelo FaciPayCallback.
FaciPayCheckout.start(
    activity = this, // FragmentActivity
    references = listOf(
        PaymentReference(
            referenceNumber = "ORDER-2024-001",
            referenceAmount = 5000.0 // AOA
        )
    ),
    createOrder = {
        // Cria a ordem no teu backend e devolve o transactionId
        val response = api.createOrder(cart)
        CreateOrderResult.success(response.transactionId)
    },
    customerInfo = CustomerInfo(name = "João Silva", phone = "923456789"),
    config = FaciPayConfig.Builder()
        .language(Language.PORTUGUESE)
        .theme(Theme.LIGHT)
        .defaultPaymentMethod(PaymentMethod.MCX_EXPRESS)
        .showUIOfProcessingInfo(true)
        .build(),
    callback = object : FaciPayCallback {
        override fun onApprove(result: PaymentResult) { /* ... */ }
        override fun onPending(result: PaymentResult) { /* ... */ }
        override fun onCancel() { /* ... */ }
        override fun onError(error: FaciPayException) { /* ... */ }
    }
)

Parâmetros

activity
FragmentActivity
obrigatório
A Activity que apresenta o checkout.
references
List<PaymentReference>
obrigatório
Itens a pagar. Cada PaymentReference tem referenceNumber, referenceAmount (Kwanzas), referenceQuantity (default 1) e referenceTotalQuantity (opcional).
createOrder
suspend () -> CreateOrderResult
obrigatório
Cria a ordem no teu backend. Devolve CreateOrderResult.success(transactionId) ou CreateOrderResult.failure(message).
customerInfo
CustomerInfo
name, phone (244XXXXXXXXX ou 9XXXXXXXX), email (opcional).
config
FaciPayConfig
language, theme, defaultPaymentMethod, allowedPaymentMethods, showUIOfProcessingInfo, referencePaymentLifeSpan (minutos).
presentationMode
PresentationMode
WEBVIEW (default). CUSTOM_TABS e NATIVE planeados para versões futuras.

Próximo passo: Callbacks & resultado

Tratar aprovação, pendência, cancelamento e erros.