---
title: "iOS SDK"
description: "Present Inttegro checkout as a native payment sheet in SwiftUI and UIKit applications."
canonical: "https://studio.inttegro.com/mobile/ios"
format: inttegro-machine-docs/v1
language: "TypeScript"
sdk_version: "v12.0.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/typescript/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 530
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "curated"
recommended_mcp_tools: ["design_integration","check_integration_readiness"]
estimated_tokens: 2736
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Native iOS Checkout receives only a backend-finalized Order ID; its sheet result is client feedback, and the backend must confirm the paid order before fulfillment.

### Five questions

#### Q1. Which package path does a Swift app use?

The current [iOS guide](https://studio.inttegro.com/machine/typescript/mobile/ios.md#requirements) uses a versioned Swift package from its Git repository; add the Inttegro product to a native Swift target, not the Objective-C bridge intended for framework adapters. The guide labels the mobile-money package a developer preview, so check release readiness before live rollout.

#### Q2. What should cross from the backend to iOS?

Only the finalized Order ID. The backend owns API credentials, amount, line items, and customer decisions; the native sheet owns protected payment entry and confirmation. See [Orders](https://studio.inttegro.com/machine/typescript/api/orders.md#create-an-order).

#### Q3. How is the sheet presented?

SwiftUI attaches the documented PaymentSheetConfiguration to its view; UIKit presents PaymentSheet with the same configuration. Use [present the payment sheet](https://studio.inttegro.com/machine/typescript/mobile/ios.md#present-the-payment-sheet) for the public signatures rather than borrowing React Native or Flutter bridge calls.

#### Q4. What does a completed result establish?

Only immediate UI feedback. Have the trusted backend [look up the order](https://studio.inttegro.com/machine/typescript/api/orders.md#lookup-an-order) or process its webhook before releasing goods or services; handle canceled and failed results distinctly.

#### Q5. Can features or MCP change the order?

Optional sheet features only alter presentation, not amount, customer, or shipping. With an authenticated connection, [design_integration](https://studio.inttegro.com/machine/typescript/inttegro-mcp/tools.md#design_integration) can plan the server/native boundary and [check_integration_readiness](https://studio.inttegro.com/machine/typescript/inttegro-mcp/tools.md#check_integration_readiness) can audit declared controls.

## Document content

# Inttegro SDK for iOS

Add Inttegro checkout to a SwiftUI or UIKit app with a native iOS payment
sheet. The iOS SDK owns the customer-facing payment flow; your backend
continues to own credentials and every decision about the order.

:::caution Developer preview

The public Swift package is available now. The current preview supports mobile
money checkout; card payments and Apple Pay are not available. CocoaPods
distribution is not published yet.

:::

## Requirements

- iOS 16 or later
- SwiftUI or UIKit
- A backend endpoint that creates and finalizes an Inttegro order

In Xcode, choose **File → Add Package Dependencies** and enter:

```text
https://github.com/inttegro/inttegro-sdk-ios.git
```

The [Swift Package Index](https://swiftpackageindex.com/inttegro/inttegro-sdk-ios)
lists Inttegro for discovery and compatibility results. Xcode installs the
package from its versioned Git repository.

Select version `0.4.1` or later. The package exposes two products with separate
responsibilities:

- `Inttegro` contains the native Checkout client, SwiftUI and UIKit payment
  sheet, result models, and telemetry.
- `InttegroBridge` contains the Objective-C-compatible coordinator used by the
  official React Native and Flutter packages.

Native Swift applications should add only the `Inttegro` product to their
application target and import it where they present Checkout:

```swift
import Inttegro
```

## Present the payment sheet

Give the SDK only the finalized Order ID returned by your backend. In SwiftUI,
attach the payment sheet to the view that starts checkout:

```swift
let configuration = try PaymentSheetConfiguration(
    orderID: orderID,
    returnURL: URL(string: "merchant-app://inttegro-return"),
    features: .init(
        showLineItems: true,
        showInvoiceDownload: true,
        showReceiptDownload: true,
        allowPaymentMethodChange: false
    )
)

checkoutView.inttegroPaymentSheet(
    isPresented: $isPaymentSheetPresented,
    configuration: configuration,
    eventHandler: handleCheckoutEvent,
    onCompletion: handlePaymentResult
)
```

UIKit applications can create `PaymentSheet` with the same configuration and
call `present(from:completion:)`. Both entry points retrieve the checkout,
present available payment methods, handle confirmation or provider
authorization, and return a completed, canceled, or failed result.

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

```swift
let configuration = try PaymentSheetConfiguration(
    purchaseIntentID: buyLink.purchaseIntentID,
    returnURL: URL(string: "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

The optional `eventHandler` 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. `paymentAttemptFailed` is recoverable; leave the sheet in
control so the payer can retry. The completion callback receives the exact
terminal `completed`, `canceled`, or `failed` event:

```swift
func handlePaymentResult(_ result: PaymentSheetResult) {
    switch result {
    case let .completed(event):
        showPaymentComplete(orderID: event.order!.id)
    case .canceled:
        restoreCheckoutControls()
    case let .failed(event):
        showPaymentUnavailable(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.

> Mobile Sdk Screenshots is interactive content. Use the canonical page to view it.

## Optional feature states

Configure optional presentation through
[`PaymentSheetConfiguration.Features`](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/paymentsheetconfiguration/features-swift.struct).
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`](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/paymentsheetconfiguration/features-swift.struct/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`](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/paymentsheetconfiguration/features-swift.struct/showinvoicedownload)           | `false` | Offers the invoice after a successful payment when Checkout returns a secure invoice URL.                                                                 |
| [`showLineItems`](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/paymentsheetconfiguration/features-swift.struct/showlineitems)                       | `false` | Offers a collapsed Order summary when Checkout returns line items. Opening it moves the sheet to its large detent before revealing the items.             |
| [`showReceiptDownload`](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/paymentsheetconfiguration/features-swift.struct/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 detent and shows only the document actions for
URLs Checkout actually supplied; the Done button remains immediately available.

> Mobile Sdk Feature Screenshots is interactive content. Use the canonical page to view it.

:::warning 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

- [Browse the package source](https://github.com/inttegro/inttegro-sdk-ios)
- [Browse the generated API reference](https://mobile.inttegro.dev/v0.4.1/ios/documentation/inttegro/)
- [Run the iOS and SwiftUI demo](https://studio.inttegro.com/machine/typescript/demos/ios-swiftui.md)
- [Compare every mobile SDK](https://studio.inttegro.com/machine/typescript/mobile.md)
- [Create and finalize orders](https://studio.inttegro.com/machine/typescript/api/orders.md#create-an-order)
