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 uniqueexternal_id.
Endpoint:
2. Eligibility Classification
Once products are synced, Gale automatically checks HSA/FSA eligibility against the SIGIS database. You can:- Query individual or batch product eligibility using the API
- Subscribe to webhook events (
product.updated) for real-time updates
- Auto-substantiation (
auto_substantiation) - Automatically eligible via SIGIS verification, no additional documentation needed - Dual-purpose (
dual_purpose) - Requires Letter of Medical Necessity (LMN) from doctor - Vision (
vision) - Vision care products - Prescription (
rx) - Prescription items - Not eligible - Products that don’t qualify for HSA/FSA
3. Hosted Checkout Session
With eligible products in place, initiate a hosted checkout session using the Gale API. Endpoint:checkout_url which you should redirect your customer to.
4. Payment Processing
The customer completes payment on Gale’s hosted checkout page. Once paid, an order is created.Order Lifecycle
Orders track both fulfillment and payment separately: Order Status (your fulfillment state):pending- Order created, awaiting paymentprocessing- Payment in progresscompleted- Payment successful, ready to fulfillfailed- Payment declinedcancelled- Order cancelled
pending- Payment not attemptedauthorized- Funds reserved (not yet captured)captured- Funds captured successfullyrefunded- Funds returned to customer
completed while payment is still authorized (not yet captured).
Most merchants only need to check: Order status === 'completed' means the order is paid and ready to ship.
Check order status anytime:
5. Webhook Notifications
Gale sends webhooks when important events occur. All payment flows (checkout sessions, payment links) create orders, so you’ll receive order webhooks.Common Webhooks
For Checkout Sessions:order.created- Order created after successful paymentorder.failed- Payment failedorder.refunded- Order was refunded
payment_link.paid- Customer paid the linkorder.created- Order created from the payment (fires afterpayment_link.paid)payment_link.expired- Link expired without payment
product.updated- Eligibility status changed (e.g., SIGIS update)
Setup
- Register your webhook URL in Settings → Webhooks in the Gale Dashboard
- Validate signatures using
X-Gale-Signatureheader - Respond with HTTP 200 within 5 seconds
- Gale retries failed deliveries with exponential backoff
6. Refunds and Cancellations
You can issue full or partial refunds via:Summary
| Step | Description |
|---|---|
| Product Sync | Send your products to Gale |
| Eligibility | Check which items are HSA/FSA eligible |
| Create Checkout | Launch a hosted checkout session |
| Process Payment | Customer completes payment on Gale’s page |
| Listen to Webhooks | Receive real-time updates |
| Handle Refunds | Process returns or cancellations |
