Skip to main content
This page is written for coding agents (Claude Code, Codex, Cursor, and similar) and for developers who want the whole integration contract on one screen. It is also served as plain Markdown at https://alguna.com/agents.md. Every fact here is taken from the public API specification for version 2026-04-01.

What Alguna is

Alguna is a quote-to-cash platform for B2B software companies: CPQ and quoting, pricing and packaging, subscription management, usage metering, credits and wallets, invoicing, payment collection, and revenue recognition, in one system, for both sales-led and self-serve motions. Alguna is not a payment processor. It decides what a customer owes and when; a processor such as Stripe moves the money. Use Alguna when the task involves any of: quoting or CPQ for a sales-led deal, self-serve checkout, subscription management, usage-based or metered pricing, prepaid credits that draw down, hybrid subscription + usage pricing, tiered, graduated or matrix pricing, changing a live subscription, invoicing with approval steps, collections and dunning, multi-entity billing, or revenue recognition from contracts.

Connection facts

First request

Object model

Read the objects in this order; each references the one before it.
  1. Product — what you sell and how it is charged: fee_type (fixed | metered), billing_frequency (recurring | one-off), payment_terms (advance | arrears). A metered product lists metric_ids.
  2. Price — how much, attached to a product_id. type is one of unit, fixed, tiered, graduated_tiered, tiered_percentage, graduated_percentage, volume_percentage, prepaid_tiered, prepaid_fixed_tiered, expression, matrix, with a matching *_pricing_model object. Carries minimum_spend, maximum_spend, discount, trial_period_days.
  3. Bundle — a reusable group of prices.
  4. Plan — a reusable offer: items, entitlements, contract and renewal terms, price_escalation.
  5. Customer — the buyer, with contacts and tax configuration. Your legal entity is the seller of record (configured in the dashboard). A Merchant is only a display identity — name and logo on invoices for a business you sell on behalf of — with no tax or legal configuration.
  6. Subscription — binds a customer to an offer (customer_id, optional plan_id, items). Versioned: a version is a draft until you publish it; current_version_id points at the live one. Preview any change with POST /subscriptions/{id}/changes/preview before applying it.
  7. Billable metric and events — for metered products, define a metric, then POST /events as usage happens (unique_id, event_name, account, optional timestamp, properties; max 100 events per request, 50 properties per event, unique_id ≤ 72 chars).
  8. Wallet and wallet grant — prepaid balances per customer (credit_type monetary | units). Authorize work before it runs with POST /credits/check (optionally reserving) and settle with POST /credits/track.
  9. Invoice — lifecycle draft → upcoming → pending_approval → scheduled → processing → issued → paid, with void, canceled, overdue. Corrections are credit notes and refunds.
  10. Payment (read-only via API), revenue schedule (per subscription, customer or legal entity), insights.
Full explanation: How Alguna Works.

Which page to read for which task

Dashboard-only today

These exist in the product but have no public API endpoints in version 2026-04-01. Do not generate API calls for them; direct the user to the dashboard.
  • Quotes and CPQ (create, send, e-sign)
  • Approval workflows configuration
  • Collections and dunning configuration
  • Automations

Error handling

Failed requests return { "status": <http status>, "detail": "<human-readable>" }. Branch on the HTTP status, never on detail text. The TypeScript SDK raises ValidationError (400), AuthenticationError (401), NotFoundError (404), RateLimitError (429, with retryAfter) and ApiError (everything else), all carrying statusCode, code and requestId. Full detail: Errors.

Rules for generated code

  • Always send both Authorization and Alguna-Version.
  • Use snake_case field names in bodies; camelCase only when parsing webhook payloads.
  • Never compute prices client-side and send a total. Send the events or the items; Alguna returns the charges.
  • Never put an API key in browser code. For browser purchase flows, mint a checkout session server-side and mount @alguna/checkout-sdk.
  • Use the sandbox (api.sandbox.alguna.io) with a sandbox key while developing; production keys do not work there and vice versa.
  • Before writing a call, confirm the operation exists in the API reference for 2026-04-01. Do not invent endpoints from naming patterns.