Skip to main content
If your mobile app is backed by a Shopify store, you can open FlexyPe’s 1-click checkout inside a webview. The flow has two steps: create a checkout session for the cart with the API, then load the hosted checkout page in a webview using the returned session ID.
Complete the Shopify onboarding first. It’s mandatory — your store must be onboarded and your domain registered with FlexyPe before you can integrate FlexyPe Checkout on your mobile app.
You’ll need an API key (dashboard → Settings → API Keys) and your store domain registered with FlexyPe during onboarding. See the API Reference for authentication details.

Checkout flow

1

Create a checkout session

Call the Create Checkout Session endpoint with the cart items. The response returns a session_id you’ll use in the next step. See the API reference for the full request schema, parameters, and a live example.

Create Checkout Session

POST /session — create a session and get back a session_id.
Create the session from your backend so your API key is never exposed in the mobile app.
2

Open the checkout in a webview

Open a webview in your app and load the hosted checkout URL with the session_id from the previous step:
https://checkout.flexype.io/?session={session_id}
The customer completes the entire checkout — login, address, payment — inside the webview.
import { WebView } from "react-native-webview";

export function CheckoutScreen({ sessionId }) {
  return (
    <WebView
      source={{ uri: `https://checkout.flexype.io/?session=${sessionId}` }}
    />
  );
}
Enable JavaScript in your webview — the checkout page requires it. Most webviews enable it by default, except Android, where you must set javaScriptEnabled = true.

Detecting completion

After a successful payment, the checkout redirects to the redirect_url you set when creating the session. Watch your webview’s navigation events for that URL to know when checkout is complete, then close the webview and continue your app’s post-purchase flow.

Need help?

Reach out to the FlexyPe team at [email protected] for integration support.