> This page is for Afterpay.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.cash.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.cash.app/_mcp/server.

# Present checkout on iOS

The iOS SDK can present Afterpay checkout in four ways. Choose one based on how much of the checkout you want your server to own and which checkout features you need.

| Option                                                                                    | How it works                                                                                                                                              | Use it when                                                                                                           |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [Web Redirect](/cash-app-afterpay/guides/sdk/ios-sdk/present-checkout/web-redirect)       | Your server creates a checkout and returns its redirect URL. The SDK loads the URL and detects the result from your redirect URLs.                        | You want the simplest integration and don't need express checkout features. Supports Swift, SwiftUI, and Objective-C. |
| [Built-in UI](/cash-app-afterpay/guides/sdk/ios-sdk/present-checkout/built-in-ui)         | The SDK opens Afterpay's checkout UI right away and asks your app for a checkout token while it shows a loading state.                                    | You want express checkout features, such as shipping address and shipping option callbacks.                           |
| [Afterpay Button](/cash-app-afterpay/guides/sdk/ios-sdk/present-checkout/afterpay-button) | Your app passes the order details to the SDK, which returns a one-time virtual card. Your server doesn't call the Afterpay API.                           | You want a front-end-only integration that uses your existing card payments flow. Available in the US and Canada.     |
| [Cash App Pay](/cash-app-afterpay/guides/sdk/ios-sdk/present-checkout/cash-app-pay)       | Your server creates a checkout with `isCashAppPay: true`, or the SDK creates one with the Afterpay Button. The customer approves the payment in Cash App. | You want to accept Cash App Pay with your Afterpay merchant account. Available in the US.                             |

The SDK refers to the first three options by version: Web Redirect is Checkout V1, Built-in UI is Checkout V2, and the Afterpay Button is Checkout V3. The versions appear in SDK method names, such as `presentCheckoutV2Modally`.

## Before you present checkout

* [Install the SDK](/cash-app-afterpay/guides/sdk/ios-sdk#install-the-sdk).
* For Web Redirect, Built-in UI, and Cash App Pay, [configure the SDK](/cash-app-afterpay/guides/sdk/ios-sdk#configure-the-sdk) with your merchant configuration. The SDK doesn't present checkout without it. The Afterpay Button uses its own configuration, described on its page.
* Show a [payment button](/cash-app-afterpay/guides/sdk/ios-sdk/ui-components/payment-button) that starts checkout when the customer taps it.

## Server-side flow

Web Redirect and Built-in UI use the same flow. Your server creates the checkout with your merchant credentials, the SDK presents the checkout to the customer, and your server completes the payment. Your merchant credentials never leave your server.

Cash App Pay can use this flow too: your server creates the checkout, but Pay Kit sends the customer to Cash App instead of the SDK presenting checkout. For the steps, see Cash App Pay.

```mermaid
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#FFF',
      'primaryTextColor': '#000',
      'primaryBorderColor': '#000',
      'lineColor': '#000',
      'secondaryColor': '#fff',
      'tertiaryColor': '#fff',
      'noteBkgColor': '#fff',
      'noteBorderColor': '#000',
      'background': '#fff'
    }
  }
}%%
sequenceDiagram
    participant App
    participant SDK as Afterpay SDK
    participant Server as Merchant server
    participant API as Afterpay API
    App->>Server: Request checkout
    Server->>API: POST /v2/checkouts
    API-->>Server: Checkout token and URL
    Server-->>App: Checkout token or URL
    App->>SDK: Present checkout
    SDK-->>App: Checkout result (order token)
    App->>Server: Complete order
    Server->>API: Capture or authorize payment
```

The Afterpay Button doesn't use this flow. The SDK creates the checkout itself and returns a virtual card, which you process like any other card payment.