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

# Browser Redirect Checkout

> **Info**
>
> Looking to embed the card form natively inside your app instead of redirecting out? See the [Mobile SDK overview](/guides/checkout/implementation-overview/mobile-app-payments) for Swift, Android, Flutter, and React Native integrations.

## Overview

This guide shows how to accept payments in a mobile app by redirecting users from your app to a Coinflow-hosted checkout page in the browser. It's the lightest-weight integration option — no frontend SDK to install and no card form to render yourself.

Use this approach when:

* You want the simplest possible integration path.
* Leaving the app briefly during checkout is acceptable.
* You already use universal links or deep links for return flows.

## How It Works

1. **User initiates a purchase** in your app (e.g., taps "Buy Coins").
2. Your app makes a request to your server
3. Your server **requests a checkout link from Coinflow** and passes it back to the user
4. **The app opens the returned link** in the user's browser or a webview.
5. **User completes payment** on the secure checkout page.
6. **User is redirected back to your app** via a callback URL you can set.

---

## iOS Redirect Example

Below is a simplified example from our demo app, showing how to request a checkout link and redirect the user:

> **Info**
>
> **Using a WKWebView instead of redirecting to Safari?** If you're embedding the checkout in a WKWebView, your message handler **must be named exactly `"ReactNativeWebView"`** for the checkout UI to render properly. See the "Listen to Client-Side Messages on Swift iOS" recipe in the Recipes tab for a complete implementation guide.

```swift
    private func goToCheckoutPage() {
        let checkoutUrlStr = getCheckoutURLFromServer()
        let checkoutUrl = URL(string: checkoutUrlStr)!
        DispatchQueue.main.async {
            openURL(checkoutUrl)
        }
    }
```

---

## API Request Example (cURL)

You can also test the API directly using cURL:

```curl
curl -X POST "https://api-sandbox.coinflow.cash/api/checkout/link" \
  -H "Authorization: YOUR_API_KEY" \
  -H "x-coinflow-auth-user-id: USER_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "subtotal": {
      "currency": "USD",
      "cents": 5000
    },
    "standaloneLinkConfig": {
      "callbackUrl": "yourapp://checkout-complete",
      "endUserDeviceIpAddress": "127.0.0.1"
    }
  }'
```

#### Standalone Link Config

This standalone link config is what determines whether or not the checkout page is allowed to render outside of an Iframe embedded on a website that you have whitelisted. If you pass in this config, we allow the Coinflow checkout page to be viewed as a standalone link, which works great in use cases like redirecting to it from your mobile app.

###### Callback URL

The callback URL is what we redirect to upon successful completion of a checkout. For a mobile app, this will be typically a [universal link](https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content/) that takes the user back to the app for you to update their app state given their successful payment.

###### End User Device IP Address

This will be the IP Address of the user that is planning to checkout.

##### Response

The response will include a `link` field with the checkout URL.

```json
{
	"link": "https://sandbox-merchant.coinflow.cash/purchase-v2/your-merchant-name?query_params=here"
}
```

> **Info**
>
> The URL path reflects your merchant's settlement configuration; the default is Coinflow Wallet.

---

## Resources

* **Sample App Source Code:** [View on GitHub](https://github.com/coinflow-labs-us/tap-the-star-ios)
* **API Reference:** [Checkout link API endpoint](/api-reference/api-reference/checkout/get-checkout-link)