Skip to content

Inttegro SDK for Android

Present Inttegro checkout as a native payment sheet in Kotlin and Jetpack Compose applications.

Add Inttegro checkout to a Kotlin or Jetpack Compose app with a native Material payment sheet. The Android SDK owns the customer-facing payment flow; your backend continues to own credentials and every decision about the order.

Requirements

  • Android API 26 or later
  • A Kotlin application using Jetpack Compose
  • A backend endpoint that creates and finalizes an Inttegro order

The SDK has two Maven artifacts with distinct responsibilities:

  • com.inttegro:inttegro-payments contains the native Checkout client, Jetpack Compose payment sheet, result models, and telemetry.
  • com.inttegro:inttegro-android adds the activity and dictionary bridge used by the official React Native and Flutter packages. It depends on inttegro-payments and preserves the existing framework-integration coordinate.

Native Kotlin and Compose applications should depend directly on inttegro-payments; they do not need the framework bridge. Until public Maven distribution opens, use the versioned source to evaluate the preview.

Present the payment sheet

Give the SDK only the finalized Order ID returned by your backend:

val configuration = PaymentSheetConfiguration(
    orderId = orderId,
    returnUrl = "merchant-app://inttegro-return",
    features = PaymentSheetConfiguration.Features(
        showLineItems = true,
        showInvoiceDownload = true,
        showReceiptDownload = true,
        allowPaymentMethodChange = false,
    ),
)

InttegroPaymentSheet(
    configuration = configuration,
    onResult = ::handlePaymentResult,
    onDismissRequest = ::closePaymentSheet,
    eventListener = CheckoutEventListener(::handleCheckoutEvent),
)

InttegroPaymentSheet retrieves the checkout, presents available payment methods, collects any required mobile money details, handles confirmation or provider authorization, and returns a completed, canceled, or failed result.

For a Buy link, configure the same sheet with its public Purchase Intent instead:

val configuration = PaymentSheetConfiguration(
    purchaseIntentId = buyLink.purchaseIntentId,
    returnUrl = "merchant-app://inttegro-return",
)

The sheet gathers the Buy-link choices and payment details without creating an Order. When the payer presses Pay, Inttegro creates the finalized Order and starts the payment attempt together. Customer-selected pricing uses the authoritative currency, range, and suggestions returned by Checkout.

Observe the payment lifecycle

eventListener receives the same ordered lifecycle as the web and other mobile SDKs: presented, ready, change, orderPrepared, paymentAttemptStarted, paymentActionRequired, paymentProcessing, paymentAttemptFailed, completed, canceled, and failed.

Every CheckoutEvent includes type, occurredAt, flowId, and sequence. Events about a payment attempt carry the full client-safe order rather than a separate payment ID. PAYMENT_ATTEMPT_FAILED is recoverable; leave the sheet in control so the payer can retry. onResult receives the exact terminal COMPLETED, CANCELED, or FAILED event:

fun handlePaymentResult(result: PaymentSheetResult) {
    when (result) {
        is PaymentSheetResult.Completed ->
            showPaymentComplete(result.event.order!!.id)
        is PaymentSheetResult.Canceled -> restoreCheckoutControls()
        is PaymentSheetResult.Failed ->
            showPaymentUnavailable(result.event.failure!!.message)
    }
}

Use lifecycle events for immediate interface state and privacy-safe telemetry. Before fulfillment, retrieve the Order from your backend or process its webhook.

Android

React Native and Flutter use these same native payment sheets instead of reimplementing checkout.

Optional feature states

Configure optional presentation through PaymentSheetConfiguration.Features. These values control only what the native sheet shows. They cannot change the Order, its shipping address, its amount, or the customer that owns an attached payment method. Start with the defaults, then expose only the context or follow-up actions that help the payer complete this checkout.

Property Default What changes
allowPaymentMethodChange true Set to false to keep an attached method selected and remove the replacement action. If the Order has no attached method, the payer can still enter one.
showInvoiceDownload false Offers the invoice after a successful payment when Checkout returns a secure invoice URL.
showLineItems false Offers a collapsed Order summary when Checkout returns line items. Opening it moves the sheet to its full-height state before revealing the items.
showReceiptDownload false Offers the receipt after a successful payment when Checkout returns a secure receipt URL.

The opening capture combines showLineItems = true with allowPaymentMethodChange = false. The attached method and pay action remain in view while the Order summary stays out of the way until the payer opens it. The completion capture enables both download properties. After payment succeeds, the sheet returns to its compact state and shows only the document actions for URLs Checkout actually supplied; the Done button remains immediately available.

Android

Continue

Type to search…

↑↓ navigate↵ selectEsc close