alguna command-line tool. All five are generated from the same versioned OpenAPI spec as the API reference, so every endpoint has a method or a command, and they read and write the same objects the dashboard does: customers, products and prices, quotes, subscriptions and their versions, usage, invoices, payments and revenue schedules. Those objects all read from one versioned agreement per customer, which How Alguna works explains. Use this page to choose a client, connect it, and make a first call. The reference pages hold the full method lists and the details of each library.
Which one
The API key is a secret, so use the libraries and the CLI on a server, in CI, or on your own machine, never in a browser. For a purchase flow in your product’s frontend, use Embedded Checkout, where your server mints the session and the browser only mounts it.
Install
Create an API key in the dashboard under Settings → Connections → Developers → API keys. Every library and the CLI read it fromALGUNA_API_KEY when you do not pass it in code.
Connect
Pin the API version you integrate against. The date inAlguna-Version is what fixes the request and response shapes, and a later package release keeps sending the date you set. See Versioning.
A first call
Create a customer. Each reference page continues from here to a product, a subscription, an invoice and a customer portal session.What every library does for you
- Sends the
AuthorizationandAlguna-Versionheaders on every request. - Sends an
Idempotency-Keyon every write, yours or a generated one, and reuses it on each retry, so a retried create never duplicates a record. See Idempotency. - Retries
408,429,502,503and504, a409withRetry-After, and network failures, twice by default. Never retries a500, because the request may have changed data. See Errors. - Raises a typed error for a failed response, carrying the HTTP status and the
X-Request-Id. Include that id when you report a problem.
Sandbox first
Every library and the CLI take a base URL. Point it athttps://api.sandbox.alguna.io with a sandbox API key, run the whole flow there, then switch the URL and the key for production. Sandbox and production are separate environments with separate keys and data. See Testing and Sandbox. For the CLI, set ALGUNA_BASE_URL=https://api.sandbox.alguna.io.