# Checkout Flow

> Understand marketplace checkout sessions and Stripe redirects.

Use this page to understand and verify checkout from the provider dashboard.

For production storefront implementation details, see [Build a Storefront](/docs/marketplace/providers/build-a-storefront).

## In the Dashboard

Use **Store** or **Store Preview** to verify listed apps and algorithms, devices, checkout mode, redirects, and purchase confirmation.

1. Open **Infuse-Marketplace**.
2. Select the marketplace instance.
3. Open **Provider**.
4. Open **Store** or **Store Preview**.
5. Select one or more listed apps or algorithms.
6. Select devices from the provider organisation or enter device IDs manually.
7. Choose live or test checkout mode.
8. Create the checkout session.
9. Open the returned checkout URL.
10. Complete or cancel the Stripe checkout.
11. Return to **Purchases** to confirm purchase state.

## Checkout States

<table>
<thead>
  <tr>
    <th>
      State
    </th>
    
    <th>
      What it means
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Session created
    </td>
    
    <td>
      Infuse created a hosted Stripe Checkout session and returned a checkout URL.
    </td>
  </tr>
  
  <tr>
    <td>
      Redirecting
    </td>
    
    <td>
      The browser is leaving your site or dashboard for Stripe Checkout.
    </td>
  </tr>
  
  <tr>
    <td>
      Cancelled
    </td>
    
    <td>
      The customer returned to the cancel URL. The basket can remain editable.
    </td>
  </tr>
  
  <tr>
    <td>
      Pending confirmation
    </td>
    
    <td>
      The customer returned to the success URL, but purchase state has not become active yet.
    </td>
  </tr>
  
  <tr>
    <td>
      Active purchase
    </td>
    
    <td>
      Infuse has validated payment, recorded the purchase, and created the entitlement.
    </td>
  </tr>
  
  <tr>
    <td>
      Ready to install
    </td>
    
    <td>
      A compatible release is available for the purchased item and device.
    </td>
  </tr>
</tbody>
</table>

## Live and Test Mode

Use test mode for previews, QA, and demos. Use live mode only when you intend to create production purchase records.

The dashboard labels the selected checkout mode. Confirm the mode before opening the checkout URL.

## After Checkout

1. Open **Purchases**.
2. Filter by device ID or marketplace item.
3. Confirm the purchase status.
4. Open the device page when you need to review compatible releases or queue an install.

## What Happens Behind the Scenes

The checkout session contains:

- selected device IDs,
- selected marketplace item IDs,
- success and cancel URLs,
- checkout mode.

Infuse creates the hosted Stripe Checkout session and returns a checkout URL. The customer completes payment on Stripe. Infuse validates successful payment, records purchase state, and creates the relevant entitlements.

Treat the success redirect as a return to your site, not proof that fulfillment has completed. Always read purchase state from Infuse after the redirect.

## For Custom Storefronts

Custom storefronts create checkout sessions from the provider backend. Keep provider credentials server-side, validate selected devices before checkout, and read purchase state after redirect. See [Build a Storefront](/docs/marketplace/providers/build-a-storefront) for the full integration flow.
