Skip to main content

Getting Started

This guide walks you through creating your first checkout session using Gale’s API. By the end, you’ll understand the full payment flow.

Base URL

Use test API keys (prefix glm_test_) during development. All test transactions are processed in sandbox mode with no real charges.

Authentication

Include your API key in the Authorization header:
Generate an API key in the Gale Dashboard under Developer Tools > API Keys. The full key is shown only once, when you generate it β€” copy it straight away. See Authentication for details.

Quick Start

1. Sync a Product

Before creating a checkout, sync your product catalog so Gale can determine HSA/FSA eligibility.
The response includes eligibility status:

2. Create a Checkout Session

Create a checkout session and get a URL to redirect your customer to:
Response:

3. Redirect Customer

Send your customer to the checkout_url. Gale’s hosted checkout page handles:
  • HSA/FSA card collection
  • Eligibility verification
  • Letter of Medical Necessity (LMN) flow for dual-purpose items
  • Payment processing
After payment, the customer is redirected to your success_url or failure_url.

4. Confirm Payment

Option A: Webhooks (recommended) Register a webhook endpoint in your Dashboard under Settings > Webhooks. Gale sends an order.created event when payment succeeds:
Option B: Poll for status Check the checkout status by querying the order:

Three Key IDs

Testing

Use test API keys (glm_test_*) during development. Test card numbers: See Test Cards for the full list.

Next Steps

Integration Flow

Full end-to-end integration walkthrough

Checkout Guide

Detailed checkout integration guide

API Reference

Complete API endpoint documentation

Webhooks

Set up real-time event notifications