Base URLs
Sandbox is a separate environment with its own data and its own API keys; a key issued in one environment is rejected by the other. All requests must be made over HTTPS.
Authentication
Every request carries an API key as a Bearer token:401.
Versioning
The API is date-versioned. Send theAlguna-Version header on every request to pin the version your integration is written against; the current version is 2026-04-01. Upgrading is a deliberate change to that header, never a side effect of time passing.
apiVersion option.
Request and response format
- Request and response bodies are JSON with snake_case field names (
customer_id,plan_id). Webhook payloads are the exception — they are camelCase; see Webhooks. - Monetary amounts are decimal strings (
"99.00"), never floats. - Timestamps are RFC 3339 (
2026-04-01T10:00:00Z); dates areYYYY-MM-DD. - Send
Content-Type: application/jsonon requests with a body. - Every response carries an
X-Request-Idheader — a UUID for that request. Log it and quote it when you contact support.
Filtering and sorting
List endpoints take filters as individual query parameters. Pass one value for an exact match, or comma-separated values for IN-style matching:sort=<field>:<asc|desc>, for example name:asc.
Pagination
List endpoints requirelimit and offset, and most require sort. Send all three on every list request. Responses wrap the page in data and describe it in pagination:
offset by limit until offset / limit + 1 reaches total_pages.
Idempotency
Mutating endpoints (POST, PATCH, PUT, DELETE) accept an Idempotency-Key header so a retried request is applied at most once. POST /events is the exception: each event carries its own unique_id. See Idempotency.
Errors
Failed requests return a JSON body with the HTTPstatus and a human-readable detail:
Branch on the status code, not on the text of
detail. See Errors for typed SDK errors, request IDs and retry guidance.
Other ways in
- TypeScript SDK —
@alguna/sdk, one typed method per endpoint. - Webhooks — push notifications for subscription, invoice, payment, checkout and credit events.
- MCP server — the same operations exposed as tools for AI assistants.
- Developer quick start — first request to first invoice, end to end.