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:
Get your API keys from Gale Dashboard under Settings > API Keys.

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