Build billing into your product
A typed JSON REST API for subscriptions, usage, invoicing, and payments. Idempotent by design, with an explainable calculation behind every amount.
Make your first request
Create a key on the dashboard's API keys page, then create your first customer. The API lives at https://app.yrecurring.com/v1.
curl https://app.yrecurring.com/v1/customers \
-H "Authorization: Bearer yr_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 1e4f6f2e-first-customer" \
-d '{
"display_name": "Acme Corp",
"email": "[email protected]",
"currency": "USD"
}'Bearer API keys (yr_…), created and scoped in the dashboard. Scope a key read-only, read-write, or down to specific resources like invoices:read.
Every mutation accepts an Idempotency-Key header; retries replay the original response instead of re-executing.
RFC 7807 problem+json on every error: an HTTP status, a human-readable detail, structured fields where useful.
List endpoints take limit and offset and return data plus a total count.
Requests are limited per key. Read X-RateLimit-* headers; on 429, back off for the Retry-After interval.
Amounts carry an explainable calculation, and mutations are safe to retry — built for reliable automation.
Step-by-step guides cover every part of the app. The API reference is generated from the same code that serves the API, so it is always current. It is also available as OpenAPI 3.1 and llms.txt so your tooling and agents can read it too.