Skip to main content

Inttegro SDK for Android

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.

Developer preview

The Android SDK is implemented and used by the React Native and Flutter bridges, but public Maven distribution is not open yet. The current preview supports mobile money checkout; card payments and Google Pay are not available.

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
5 steps

React Native and Flutter use these same native payment sheets instead of reimplementing checkout. The Android robot is reproduced from work created and shared by Google and used according to the Creative Commons 3.0 Attribution License.

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.

PropertyDefaultWhat changes
allowPaymentMethodChangetrueSet 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.
showInvoiceDownloadfalseOffers the invoice after a successful payment when Checkout returns a secure invoice URL.
showLineItemsfalseOffers a collapsed Order summary when Checkout returns line items. Opening it moves the sheet to its full-height state before revealing the items.
showReceiptDownloadfalseOffers 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.

2 steps

React Native and Flutter use these same native payment sheets instead of reimplementing checkout. The Android robot is reproduced from work created and shared by Google and used according to the Creative Commons 3.0 Attribution License.

Verify before fulfillment

A completed result is useful for immediate app feedback. Your backend must still read the order's current state or process its webhook before releasing goods or services.

Continue