App-to-Web Checkout

Audience: mobile app developers collecting payments outside the Apple / Google billing systems.
Prerequisites: a backend able to receive webhooks and to authenticate your users.

Principle

Inflow collects the money. You decide who gets access to what.

We deliberately expose no queryable "entitlement" API that your application could call. Your backend remains the source of truth for your users' access rights, fed by our webhooks. This keeps you from depending on our availability in your app's critical path, and saves you from shipping a public key inside your binary.

Your app  ──①──▶  Your backend  ──②──▶  Inflow API (creates the session)
    ▲                   ▲
    │                   │ ④ webhook payment.authorized
    │ ⑤ deep link       │
    │             ┌─────┴─────────┐
    └─────────────┤ Web checkout  │◀──③── the user pays
                  └───────────────┘

The golden rule: the deep link brings the user back, it proves nothing. Access is granted by your backend when it receives the webhook, never on the strength of a URL parameter.

Two flows, two integrations

App → Web → AppWeb → App
Starting pointA paywall inside your appAn ad, a landing page
Is the user identified?Yes, they are signed inNo, they don't know you yet
Join keymetadatas.appUserIdThe email entered at checkout
ReturnDeep link back to the appDownload + sign-in by email
returnModeAPP_RETURNAPP_INSTALL

This section covers the first one, step by step. The second is covered in Web-to-App Acquisition.

The five steps

StepWhat you doGuide
1Create the checkout session from your backendCreating the Checkout Session
2Open checkoutUrl in the system browserOpening the Checkout
3Receive the webhook and grant accessGranting Access with Webhooks
4Bring the user back into the appReturning to the App
5Refresh the access right, reconcile if neededRefreshing Entitlements

Then validate the whole chain in the sandbox — see Testing Your Mobile Integration — and check the Store Compliance rules before you submit your app.

What this builds on

  • Checkout V2 — the session-oriented checkout these steps use. Read it first if you have never created a session.
  • Webhooks — the delivery, retry, and signature model your backend must implement.
  • Metadata — how the metadatas object travels from the session to the payment, the subscription, and the webhook payloads.

Did this page help you?