> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withgale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Integration

> Learn how to integrate Gale into your custom platform using our APIs.

If you're building your own storefront or platform, you can fully integrate Gale using our REST APIs. This gives you complete control over how products are synced, how checkout sessions are initiated, and how your system responds to real-time updates from Gale.

***

## How It Works

The custom integration flow:

1. **Sync your product catalog** — Send products to Gale via the Products API. Gale determines HSA/FSA eligibility automatically.
2. **Create a checkout session** — When a customer checks out, create a session via the Checkout API. You get back a `checkout_url` to redirect the customer to.
3. **Customer pays** — On Gale's hosted checkout page, the customer enters payment details. Gale handles HSA/FSA card detection, eligibility verification, and LMN flow for dual-purpose items.
4. **Receive confirmation** — Gale sends an `order.created` webhook when payment succeeds. You can also poll the Orders API.
5. **Fulfill the order** — Use the `reference_id` you passed during checkout creation to match the order back to your system.

***

## Get Started

<CardGroup cols="2">
  <Card title="Quickstart" icon="rocket" href="/developer-manual/getting-started">
    Create your first checkout session in minutes with curl examples.
  </Card>

  <Card title="Integration Flow" icon="diagram-project" href="/developer-manual/integration-flow">
    Full end-to-end walkthrough: product sync, eligibility, checkout, payment, webhooks, and refunds.
  </Card>

  <Card title="API Reference" icon="terminal" href="/api-reference/introduction">
    Complete endpoint documentation for products, checkout, orders, and more.
  </Card>

  <Card title="Webhooks" icon="bell" href="/developer-manual/webhooks">
    Receive real-time notifications for payments, orders, and product updates.
  </Card>
</CardGroup>
