This page outlines the complete sequence of steps required to successfully integrate with Gale’s API platform.

1. Product Sync

Before initiating any checkout session, you must sync your product catalog with Gale. Each product includes metadata such as name, UPC, GTIN, category, and a unique external_id. Endpoint:
POST /v1/products
This step ensures Gale has full context of the items you intend to sell through the hosted checkout.

2. Eligibility Classification

Once products are synced, Gale evaluates their eligibility based on SIGIS, LMN, and vision-related categories. You can:
  • Query individual or batch product eligibility using the API
  • Subscribe to webhook events (productStatusChange) for real-time updates
Eligibility types include:
  • sigis_eligible
  • lmn_eligible
  • vision_eligible
  • not_eligible

3. Hosted Checkout Session

With eligible products in place, initiate a hosted checkout session using the Gale API. Endpoint:
POST /v1/checkout
You must include customer details, line items, tax, shipping, and total amounts. A successful response returns a checkout_url which you should redirect your customer to.

4. Payment Processing

The customer completes payment on Gale’s hosted checkout page. The checkout session transitions through various statuses such as:
  • UNPAID
  • PAID
  • REFUNDED
  • CANCELLED
  • EXPIRED
You can retrieve the status at any time:
GET /v1/checkout/{checkout_id}

5. Webhook Event Delivery

Gale will notify your server in real-time of any important events, including:
  • Checkout status changes (checkoutStatusChange)
  • Product eligibility updates (productStatusChange)
Make sure to:
  • Register your webhook URL in the Gale Dashboard
  • Validate signatures using X-Gale-Signature
  • Respond with HTTP 200 within 5 seconds
If delivery fails, Gale retries with exponential backoff.

6. Refunds and Cancellations

You can issue full or partial refunds via:
POST /v1/checkout/{checkout_id}/refund
Or cancel unpaid sessions via:
POST /v1/checkout/{checkout_id}/cancel
Ensure that your backend reflects these changes and listens to webhook confirmations when possible.

Summary

StepDescription
Product SyncSend your products to Gale
EligibilityCheck which items are HSA/FSA eligible
Create CheckoutLaunch a hosted checkout session
Process PaymentCustomer completes payment on Gale’s page
Listen to WebhooksReceive real-time updates
Handle RefundsProcess returns or cancellations
Refer to the API Reference section for implementation details of each step.