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
glm_test_) during development. All test transactions are processed in sandbox mode with no real charges.
Authentication
Include your API key in theAuthorization header:
Quick Start
1. Sync a Product
Before creating a checkout, sync your product catalog so Gale can determine HSA/FSA eligibility.2. Create a Checkout Session
Create a checkout session and get a URL to redirect your customer to:3. Redirect Customer
Send your customer to thecheckout_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
success_url or failure_url.
4. Confirm Payment
Option A: Webhooks (recommended) Register a webhook endpoint in your Dashboard under Settings > Webhooks. Gale sends anorder.created event when payment succeeds:
Three Key IDs
| ID | What it is | When you get it |
|---|---|---|
checkout_id | The checkout session you created | Returned when you create a checkout |
order_id | The payment record after successful payment | Returned in webhooks and order queries |
reference_id | Your own order/cart ID for correlation | You provide this when creating a checkout |
Testing
Use test API keys (glm_test_*) during development. Test card numbers:
| Card Number | Result |
|---|---|
4111 1111 1111 1111 | Successful payment |
4000 0000 0000 0002 | Card declined |
