> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/coda-links/link-users-out-to-coda-powered-webstore/link-to-webstore-checkout-on-ios-us.md).

# Link to Webstore checkout on iOS - US  🇺🇸

iOS in the US permits the use of standard "naked" hyperlinks without requiring integration with Apple's StoreKit APIs for external linkouts. Thus, launching Coda Links in iOS is a highly streamlined process.

Below is the step-by-step guide for linking US users to from an iOS App to your Coda-powered Webstore:

## Prerequisites

Ensure that you have followed the [Steps to Launch your Web Store](/coda-webstore/steps-to-launch-your-web-store.md), and published your Coda Webstore.

This is the standard integration that allows users to purchase items on the web store and have the items fulfilled in-app. If you already have this set up with Coda, no further modifications are required.

## Step 1: Client-Side Implementation (iOS App)

<figure><img src="/files/Nr7pDHsBnfbLtCGuNJbp" alt="" width="357"><figcaption></figcaption></figure>

When you want to present a linkout offer to a user, your app simply needs to programmatically construct the correct Coda Links destination URL. When the user clicks the link or button with this URL, you can open it in the user's external browser (e.g., Safari).

**1. Construct the checkout URL:** Build the destination URL dynamically. It must append your new transaction token alongside the standard Coda parameters. Your final URL should include:

* `sessionToken` (for extracting the user's UID)
* `skuId` (the specific item selected, exactly as configured on the Coda web store)
* `mode` (e.g., `mode=lite` to indicate the simple checkout page)
* `utm` parameters (source, medium, campaign)

For example:

<pre><code>https://store.mygame.com/en-us
<strong>    ?mode=lite
</strong>    &#x26;sessionToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE3NzA2MDI5MjksImV4cCI6MTgwMjEzODkyOSwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoiU0hfVVNBIiwiR2l2ZW5OYW1lIjoiSm9obm55IiwiU3VybmFtZSI6IlJvY2tldCIsIkVtYWlsIjoianJvY2tldEBleGFtcGxlLmNvbSIsIlJvbGUiOlsiTWFuYWdlciIsIlByb2plY3QgQWRtaW5pc3RyYXRvciJdfQ.-ui2BeK9zOdeIfeKUvJ0GS4oQioX964VTMztI31wmTQ
    &#x26;skuId=SKU001
    &#x26;utm_campaign=usLinkout
    &#x26;utm_medium=codaLinks
    &#x26;utm_source=myapp
</code></pre>

**2. Launch the URL:**\
Simply invoke standard iOS networking methods to launch the URL in an **external browser**.

> For optimal functionality, open the URL in an external browser rather than an in-app webview, as certain e-wallet payment features may be limited in webviews.

<details>

<summary>SwiftUI Sample</summary>

```swift
import SwiftUI

struct ContentView: View {
    @Environment(\.openURL) var openURL

    var body: some View {
        Button("Visit Apple") {
            if let url = URL(string: "https://www.apple.com") {
                openURL(url) // Opens in the default external browser (usually Safari)
            }
        }
    }
}
```

</details>

<details>

<summary>UIKit Sample</summary>

```swift
import UIKit

if let url = URL(string: "https://www.apple.com") {
    UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
```

</details>

<figure><img src="/files/cb2O2DplahFEf9Lda3sW" alt="" width="188"><figcaption></figcaption></figure>

<figure><img src="/files/cb2O2DplahFEf9Lda3sW" alt="" width="188"><figcaption></figcaption></figure>

## Step 2: Post-Purchase UX & Deep Linking

1. **Item Fulfillment:** When the payment succeeds, Coda Webstore completes the payment and automatically sends a server-to-server item fulfillment request to your backend. This should already be covered in the Webstore basic setup. No changes required here

<figure><img src="/files/brgHVRBbnhk7uxKoCFtI" alt="" width="188"><figcaption></figcaption></figure>

2. **User can click to go back to App via deep link:** \
   To ensure this redirection happens smoothly, you must provide Coda with a deep link that can redirect users back to your iOS app upon a successful purchase.
   * Once the user is deep-linked back to your app, they should seamlessly receive their items. In addition, your app can display a purchase success screen with confetti animations!
   * Refer to [Redirecting users from Coda Links back to your app](/coda-links/redirecting-users-from-coda-links-back-to-your-app.md)to learn how to setup back-to-app redirection correctly for your iOS App.
3. **User can explore Webstore's offers & LiveOps campaigns**\
   **T**he post-purchase screen will automatically display your Webstore offers to the user, encouraging them to explore & become a loyal Webstore user

{% hint style="success" icon="seedling" %}
**Why having LiveOps features on Coda Links is crucial for your long-term revenue**

* **Linkouts are not (actually) free:** Including in the US, Google and Apple are fighting tooth and nail to impose fees on external purchases to protect their revenue streams. For instance, Google charges up to a 20% commission on purchases made within 24 hours of a user following an external payment link. Similarly, Apple imposes a 15% commission on website sales initiated within 7 days of an end user tapping an out-of-app link. If users stick exclusively to linkout payments directly from the app, publisher margins will continuously be undercut by these fees with no way out.
* **Webstore loyalty builds long-term profitability:** Converting purchasers from in-app to webstore should be the ultimate goal. Publishers can use elements on the linkout success page to convert users into direct webstore customers, which makes the long-term cost per transaction significantly lower. When users build a habit of going directly to out-of-app channels like a webstore, they bypass the in-app link altogether. These direct visits make their future purchases completely out-of-reach for the app platforms, meaning all fee savings go straight to the publisher's bottom line.
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coda.co/coda-links/link-users-out-to-coda-powered-webstore/link-to-webstore-checkout-on-ios-us.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
