Introduction
The Sail API lets you pull expense data from your users’ cards and merchant accounts, classify which expenses qualify as tax-deductible healthcare spending under IRS Section 213(d), and connect to Health Savings Account (HSA) and Flexible Spending Account (FSA) accounts.
Sail offers three independent integration paths. Most integrations use one path. You can adopt additional paths over time as your product needs grow.
By the end of this guide, you’ll understand how each integration path works and when to use it.
Three integration paths
Each integration path has its own endpoints, key scopes, connection types, and webhook events.
Expenses
Connect merchant and card accounts to get item-level expense data from your users’ purchase history.
Classification
Push your own transactions and find out which ones qualify as tax-deductible healthcare expenses.
Account connection
Connect HSA/FSA administrator accounts to read balances, contribution summaries, account activity, and deposit credentials.
Expenses
Connect your users to merchant accounts (Amazon, Walgreens, Target, and others) or bank cards through the Connect Account Widget, a secure Sail-hosted UI that you embed in your app where users enter their login credentials. Sail pulls order history and returns item-level expenses with product names, merchant, and category data.
For example, a “$49.00 at Walgreens” transaction becomes three separate expenses: bandages ($8.99), shampoo ($12.99), and thermometer ($27.02).
Choose this path if:
- You want to turn flat card transactions into item-level purchase data.
- You need product-level detail for budgeting, categorization, or receipt matching.
To get started with this path, see Enrich transactions with item-level data.
Classification
Push transaction data you already have (from Plaid, your own aggregator, or manual entry) to Sail. Sail classifies each transaction for healthcare tax-deductibility under IRS Section 213(d) and returns one of four results: eligible, ineligible, itemization_required, or lmn_required. Results come back via webhooks.
This is a server-to-server integration. Your users don’t interact with Sail directly.
Choose this path if:
- You already have transaction data and want to automate healthcare expense classification.
- Your integration is entirely server-to-server with no user-facing Sail UI.
To get started with this path, see Classify your own transactions.
Combine with expenses later
You can add store connections later to get item-level detail for merchants in your transaction feed.
Account connection
Connect your users to their HSA/FSA administrator through the Connect Account Widget. Sail returns account balances, contribution progress, account activity, and deposit credentials.
Choose this path if:
- You want to show your users their HSA/FSA balances, contributions, and account activity.
- You need to read HSA/FSA deposit account and routing numbers.
- You build a healthcare benefits, personal finance, or tax planning product.
To get started with this path, see Connect HSA/FSA accounts.
Get started
These three steps apply to all integration paths, follow them below to get started:
Get an API key
Get your API keys from the Sail team and learn how scopes control access to endpoints.
Create a user
Map your internal users to Sail users. All data is scoped to a user.
Set up webhooks
Register your endpoint and start receiving events as Sail processes data.