/api/v1/* require a Bearer token issued from your dashboard. The API follows conventional HTTP semantics — use the right method, check the status code, and parse the JSON body.
Base URL
Every endpoint is relative to your self-hosted instance:The base URL is the domain you deployed Crypto Checkout to. There is no shared cloud instance — you own and operate the server.
Authentication
Attach your API key as a Bearer token on every request:| Prefix | Environment | Behaviour |
|---|---|---|
ck_live_... | Live | Processes real on-chain payments |
ck_test_... | Test | Sandboxed — no real funds move |
/dashboard/api-keys on your instance. Each key carries one or more scopes (links:read, links:write, sessions:read, sessions:write, webhooks:read, webhooks:write, events:read). Requests that exceed the key’s granted scopes return a 403 permission error.
Request Format
Set
Content-Type: application/json on all POST and PATCH requests.All timestamps in request bodies and query parameters must be ISO 8601 strings in UTC, e.g.
2024-11-01T12:00:00Z.Fiat amounts (e.g.
fiatAmount) are always decimal strings such as "10.00", never floats. This avoids floating-point precision errors — treat them as such in your own code too.Response Format
Successful responses return 200 for reads (GET) and 201 for resource creation (POST). Every resource object includes anobject field that identifies its type so you can pattern-match without relying on the endpoint path:
object values in use are: payment_link, checkout_session, webhook_endpoint, event, and customer.
List responses
Most list endpoints return a cursor-based envelope:Array of resource objects for the current page.
true when there are additional pages beyond this one.Opaque cursor to pass as
starting_after to fetch the next page. null when you have reached the last page.total, page, and limit fields instead of hasMore and nextCursor. See the Customers API for details.
Pagination
Most list endpoints use cursor-based pagination. Passstarting_after with the nextCursor value from the previous response to advance through pages. The limit parameter controls page size (default 25, maximum 100).
Cursors are opaque strings. Do not parse or construct them yourself — always use the
nextCursor value returned by the API exactly as-is.The Customers endpoint is the exception: it uses page-based pagination with
page and limit query parameters, and its response envelope includes a total count rather than a nextCursor.Idempotency
All mutating endpoints (POST, PATCH, DELETE) accept an optional Idempotency-Key header. Supplying the same key within the 24-hour replay window returns the original response without executing the operation again, making it safe to retry on network failures.
Rate Limiting
Requests are rate-limited per API key. When you exceed the limit the API responds with429 and an error body whose type is rate_limited. Back off and retry using exponential backoff — see Error handling for recommended retry logic.
Live Mode vs Test Mode
Your API key prefix determines which environment you are operating in:ck_live_...— live mode. Checkout sessions create real on-chain deposit addresses and process real ETH payments.ck_test_...— test mode. All operations are sandboxed; no funds move and no blockchain activity occurs.
Available Resources
| Resource | Description |
|---|---|
| Payment Links | Reusable, shareable links that generate a checkout session on each visit |
| Checkout Sessions | Individual payment sessions tracking the full lifecycle of a transaction |
| Webhook Endpoints | Registered URLs that receive real-time event deliveries |
| Events | Immutable audit log of everything that happened in your account |
| Customers | Customer records attached to sessions |
OpenAPI Spec
A machine-readable OpenAPI 3.1 spec is available on your running instance:/docs on your instance. You can import the spec into any OpenAPI-compatible tool such as Postman, Insomnia, or code generators.