API Overview
Learn how the Lithic REST API works, including environments, authentication, and the conventions that apply to every request.
The Lithic API is a REST API. Requests and responses use JSON bodies, and every resource is identified by its token. This page covers the basics you need to make your first request. The pages that follow cover individual topics in more detail.
Environments
Lithic provides a Sandbox environment for integration testing. Sandbox is completely separate from Production: API keys, data, and configuration do not carry over between them.
| Environment | Base URL | Description |
|---|---|---|
| Sandbox | https://sandbox.lithic.com/v1 | Use this environment for testing and development. No real money or card transactions occur here. |
| Production | https://api.lithic.com/v1 | Use this environment for live card programs with real transactions and financial activity. |
For usage limits that apply to Sandbox, see Sandbox fair use.
Authentication
An API key is required to get started. Generate one on the Program settings page of the Lithic Dashboard.
Send the API key as the raw value of the Authorization header. Do not add a prefix such as Bearer or Basic.
curl --request GET \
--url 'https://api.lithic.com/v1/cards' \
--header 'Accept: application/json' \
--header 'Authorization: YOUR_API_KEY'Keep your API key secret. If a request fails authentication, see Errors.
Request conventions
- Each resource is identified by its
token, a UUID. - HTTP bodies must be valid JSON and the request header
Content-Typemust beapplication/json. - Amounts are all integers. They are represented in the smallest unit of the associated currency (e.g.,
amountof 100 in USD is $1) unless specified otherwise. - All dates are RFC 3339 unless specified otherwise.
- Additional parameters may be added to API response payloads. API users should ensure that any integrations and use of these responses can handle new parameters at any time.
In this section
- Errors: HTTP status codes and error messages, and how to handle them.
- Pagination: Page through lists of resources with cursors.
- API versioning: Choose which dated version of the API serves your requests.
- Idempotent requests: Safely retry requests without duplicating actions.
- Rate limits: Request limits per resource and how to handle
429responses. - Tags: Attach your own metadata to resources.
- SDKs and OpenAPI spec: Official client libraries and the OpenAPI definition.
Updated 13 days ago
