Your product.
Accountly billing.
Add plans, subscriptions and payments to your SaaS. Use our customer widget, or build your own experience with the same APIs and SDKs.
A ready-made billing experience
Accountly renders published tiers, plan changes, payment methods and invoices inside your SaaS. Your customer stays focused on their subscription.
Freedom to build your own
Call the server SDK from your backend. Use the browser SDK for customer billing, or generate another client from our OpenAPI contracts.
01 / Get connected
From your app to a working billing page
You need an Accountly test application, your existing SaaS login, and a backend route. No desktop installer or pre-existing “Connect Accountly” tab is required.
1Your server
Application key · ak_test_
Checks the user and creates a customer session.
2Accountly
Plans, billing & entitlements
Manages subscriptions and provider-backed payments.
3Your customer
Short-lived session · acs_
Sees their own plans, payments and invoices.
1. Configure your application
In your Accountly dashboard, create a test application and publish at least one tier. Add your SaaS’s exact origin to allowed origins, including the port for local development. In API Keys, create a server key with read/write scopes; include usage only if your server records usage.
.env · server onlyACCOUNTLY_API_URL=http://localhost:19393 ACCOUNTLY_APPLICATION_ID=YOUR_APPLICATION_ID ACCOUNTLY_API_KEY=YOUR_TEST_SERVER_KEY # Local stack only. Replace the URL with your HTTPS API in deployment. # Never prefix the secret with NEXT_PUBLIC_, VITE_, or REACT_APP_.2. Install your server SDK
Choose your language below and download its preview package. The commands use a file in your project directory. Your package manager also needs network access to install dependencies.
Download Node.js packagenpm# Download the server package into your project, then: npm install ./accountly-sdk-0.1.0.tgz # For the optional React widget, download BOTH packages: npm install ./accountly-browser-0.2.0.tgz ./accountly-react-0.1.0.tgz # React 18 or 19 and react-dom are peer dependencies.3. Create a customer session
Add a same-origin POST route at
/api/billing/session. Require sign-in, authorize the user’s workspace membership, and apply origin/CSRF protection before this code. Derive the customer from your trusted server session. These are handler excerpts; connect them to your framework’s authentication and response handling.JavaScript / TypeScriptimport { Accountly } from '@accountly/sdk'; const accountly = new Accountly({ apiBaseUrl: process.env.ACCOUNTLY_API_URL, applicationId: process.env.ACCOUNTLY_APPLICATION_ID, apiKey: process.env.ACCOUNTLY_API_KEY, }); // Inside your authenticated POST /api/billing/session handler. // signedInWorkspace comes from YOUR server's auth + membership check. const customer = await accountly.customers.upsert({ externalRef: signedInWorkspace.id, displayName: signedInWorkspace.name, }); const session = await accountly.customerSessions.create(customer.subscriberId); return Response.json(session, { headers: { 'Cache-Control': 'no-store' } });Return only
token,expiresAt,applicationIdandapiBaseUrl, withCache-Control: no-store. The API URL must be reachable by the browser. Never accept a customer ID supplied by the browser as proof of ownership.4. Mount the widget and test
Add the Accountly widget to your billing page using the example below. Start with a free tier, then configure Stripe test payments in the dashboard to verify paid subscriptions and payment recovery.
Add the customer widget
02 / Choose your stack
SDKs that fit your application
All seven server SDKs expose the reviewed server API. Session creation, bounded retries, pagination helpers and webhook verification are included. Python, PHP, Ruby, Go, Java and C# use generated resource classes; their method shapes differ from the JavaScript facade.
JavaScript / TypeScript
Node 20+ · Preview 0.1.0
accountly-sdk-0.1.0.tgz
141 KB · preview package
SHA-256 checksum
95999d4eca52c8a048fe0d122fae3e20fd4681dcaae46dc6ccb2eb3d3f9777a4# Download the server package into your project, then:
npm install ./accountly-sdk-0.1.0.tgz
# For the optional React widget, download BOTH packages:
npm install ./accountly-browser-0.2.0.tgz ./accountly-react-0.1.0.tgz
# React 18 or 19 and react-dom are peer dependencies.Everything in one download
Get all SDKs, both OpenAPI contracts, the setup guide and file checksums in a single developer kit.
accountly-developer-kit-0.1.0.zip
1,923 KB · preview package
SHA-256 checksum
03d8f7f5fd14aa1c824d9428d5b0e16ca0ef7bf20499e4d2595b1d55a47f2335SDK source code
Download the complete TypeScript/React SDK source, multi-language server helpers (Python, PHP, Ruby, Go, Java, C#), and OpenAPI contracts in one archive.
accountly-sdk-source-0.1.0.tar.gz
155 KB · source archive
SHA-256 checksum
ac82fa744ef3209f797f066b4c397ff226be88e34ecebb9f245cb2522597465eCustomer-side packages
For a JavaScript or TypeScript customer interface, install both local tarballs together for React. A custom interface only needs the browser package. For plain HTML, extract the React package and self-host its loader and stylesheet.
Java can also be consumed from Kotlin and Gradle, but those consumers have not been separately tested. Need another language? Download OpenAPI below and generate a client. Public registry names and wider runtime support are still release work.
03 / The customer experience
Your billing page, already built
The widget renders your real published plans and the signed-in customer’s billing. It handles session renewal, plan selection, changes, cancellation, hosted card setup, payment verification and invoice history. A tier’s marketFeatures are display text; enforce access using entitlements from your server.
"use client";
import { ConnectedBillingPortal } from '@accountly/react';
import '@accountly/react/styles.css';
export function Billing({ userId }) {
return <ConnectedBillingPortal
sessionEndpoint="/api/billing/session"
customerKey={userId}
theme="light"
/>;
}customerKey clears the previous billing view when the signed-in customer changes; your server's session endpoint still decides who can access billing. If a user can switch workspaces, combine your own workspace ID and user ID for this key. Unmount on sign-out. With the HTML loader, call window.Accountly.unmount({root: element}) before switching identities, then mount again after sign-in. Use theme="dark" (or data-theme="dark") for a dark interface.
Want complete control over your billing UI?
Use the browser SDK with the same authenticated session route. Render the results in your own components and handle loading, errors, confirmations and payment recovery. Keep authorization and access enforcement on your server.
import { AccountlyBrowser } from '@accountly/browser';
const billing = new AccountlyBrowser({
apiBaseUrl: 'YOUR_PUBLIC_API_URL',
applicationId: 'YOUR_APPLICATION_ID',
getSession: async () => {
const response = await fetch('/api/billing/session', {
method: 'POST', credentials: 'same-origin', cache: 'no-store',
});
if (!response.ok) throw new Error('Billing session unavailable');
return response.json();
},
});
const subscriptions = await billing.subscriptions.list();
// Render using your own components; dispose on sign-out or unmount.
billing.dispose();Keep provider card collection hosted by Stripe. Your SaaS must allow the required API connections and Stripe script/frame origins in its content security policy. A successful return URL is not proof of payment; Accountly verifies the provider result.
04 / Keep access in sync
Trust verified billing events
Register your HTTPS endpoint in the application’s Settings → Webhooks screen. Use the endpoint’s signing secret, which is separate from your application API key. Read X-Accountly-Signature-V2 and verify the exact raw request bytes before parsing or acting on an event.
import { verifyWebhook } from '@accountly/sdk';
const event = verifyWebhook(rawRequestBytes, signatureHeader,
[currentSecret, previousSecret]);
// Persistently deduplicate event.eventId before applying changes.Use your current signing secret; include the previous secret only during rotation. The default signature window is five minutes. Invalid signatures must not change state. Valid signatures do not prevent duplicate delivery: persistently deduplicate eventId, validate applicationId, durably save work, and then acknowledge receipt.
Enforce access on your server
Read entitlements for the mapped subscriber before granting paid access. Reconcile after events; do not trust a plan name, browser state or redirect. Scope every lookup to the correct application and customer.
Make retries safe
Persist one idempotency key per subscription or usage operation. Reuse it on retries. Helpers retry eligible reads and keyed writes, with a 25-second default timeout and up to two retries. Quota failures are not retried.
05 / Generated from OpenAPI
Explore the API
Search the actual reviewed contracts. Server operations use an application key; browser billing uses a short-lived customer session. Public catalog routes need neither. A pricing plan is a price book: its planId identifies the book and each nested tierId identifies a selectable tier. Older responses also include id for the book and planId for the tier. Subscription requests still use planId to mean the tier ID for compatibility.
32 operations shown
Retrieve Daily UsageGET/api/v1/applications/{applicationId}/analytics/daily
retrieveDailyUsage
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| from | query | Yes | string (date) |
| to | query | Yes | string (date) |
| subscriber | query | No | string |
| eventType | query | No | string |
| aggregate | query | No | boolean |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/AnalyticsDailyResponse"
},
"components": {
"schemas": {
"AnalyticsDailyResponse": {
"properties": {
"mode": {
"type": "string"
},
"points": {
"items": {},
"type": "array"
},
"rollup": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List MetricsGET/api/v1/applications/{applicationId}/metrics
listMetrics
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/UsageVariableResponseDto"
},
"type": "array"
},
"components": {
"schemas": {
"UsageVariableResponseDto": {
"properties": {
"aggregation": {
"type": "string"
},
"applicationId": {
"type": "string"
},
"defaultQuantity": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"eventType": {
"type": "string"
},
"id": {
"type": "string"
},
"unit": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Create MetricPOST/api/v1/applications/{applicationId}/metrics
createMetric
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/DeclareUsageVariableRequestBody"
},
"components": {
"schemas": {
"DeclareUsageVariableRequestBody": {
"properties": {
"aggregation": {
"pattern": "SUM|LATEST",
"type": "string"
},
"defaultQuantity": {
"type": [
"number",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"eventType": {
"maxLength": 128,
"minLength": 0,
"type": "string"
},
"unit": {
"maxLength": 64,
"minLength": 0,
"type": "string"
}
},
"required": [
"eventType",
"unit"
],
"type": "object"
}
}
}
}Responses
201Created
{
"additionalProperties": {
"type": "string"
},
"type": "object"
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Lookup PricingGET/api/v1/applications/{applicationId}/pricing
lookupPricing
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| country | query | No | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/PricingLookupResponse"
},
"components": {
"schemas": {
"PricingLookupResponse": {
"properties": {
"country": {
"type": [
"string",
"null"
]
},
"matchedBy": {
"type": "string"
},
"plan": {
"$ref": "#/components/schemas/PricingLookupPlanResponse"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/PricingTierResponse"
},
"type": "array"
}
},
"type": "object"
},
"PricingLookupPlanResponse": {
"properties": {
"availableFrom": {
"type": [
"string",
"null"
]
},
"availableUntil": {
"type": [
"string",
"null"
]
},
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"introOffer": {
"oneOf": [
{
"$ref": "#/components/schemas/IntroOfferResponse"
},
{
"type": "null"
}
]
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
}
},
"type": "object"
},
"IntroOfferResponse": {
"properties": {
"durationMonths": {
"format": "int32",
"type": "integer"
},
"percentOff": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"PricingTierResponse": {
"properties": {
"billingPeriod": {
"type": "string"
},
"introOffer": {
"oneOf": [
{
"$ref": "#/components/schemas/TierIntroOfferResponse"
},
{
"type": "null"
}
]
},
"isDefault": {
"type": "boolean"
},
"level": {
"format": "int32",
"type": "integer"
},
"monthlyFee": {
"type": "string"
},
"name": {
"type": "string"
},
"pricingModel": {
"type": "string"
},
"published": {
"type": "boolean"
},
"quotas": {
"items": {
"$ref": "#/components/schemas/PlanQuotaResponse"
},
"type": "array"
},
"tierId": {
"type": "string"
},
"trialDays": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"TierIntroOfferResponse": {
"properties": {
"durationMonths": {
"format": "int32",
"type": "integer"
},
"monthlyFee": {
"type": "string"
},
"percentOff": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"PlanQuotaResponse": {
"properties": {
"eventType": {
"type": "string"
},
"expression": {
"type": [
"string",
"null"
]
},
"hardLimit": {
"format": "int64",
"type": "integer"
},
"overagePolicy": {
"type": "string"
},
"period": {
"type": "string"
},
"quotaId": {
"type": "string"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/QuotaTierResponse"
},
"type": "array"
},
"unitPrice": {
"type": "string"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"QuotaTierResponse": {
"properties": {
"unitPrice": {
"type": "string"
},
"upTo": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List Pricing PlansGET/api/v1/applications/{applicationId}/pricing-plans
listPricingPlans
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/PricingPlanResponse"
},
"type": "array"
},
"components": {
"schemas": {
"PricingPlanResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"availability": {
"type": "string"
},
"availableFrom": {
"type": [
"string",
"null"
]
},
"availableUntil": {
"type": [
"string",
"null"
]
},
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"createdAt": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"id": {
"type": "string"
},
"introOffer": {
"oneOf": [
{
"$ref": "#/components/schemas/IntroOfferResponse"
},
{
"type": "null"
}
]
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
},
"subscriptionCount": {
"format": "int64",
"type": "integer"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/PlanResponse"
},
"type": "array"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"IntroOfferResponse": {
"properties": {
"durationMonths": {
"format": "int32",
"type": "integer"
},
"percentOff": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"PlanResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"applicationName": {
"type": "string"
},
"badgeLabel": {
"type": [
"string",
"null"
]
},
"billingPeriod": {
"type": "string"
},
"catalogPlanName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"ctaLabel": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"featureBullets": {
"items": {
"type": "string"
},
"type": "array"
},
"highlighted": {
"type": "boolean"
},
"isDefault": {
"type": "boolean"
},
"killbillPlanName": {
"type": [
"string",
"null"
]
},
"killbillPriceList": {
"type": [
"string",
"null"
]
},
"killbillProductName": {
"type": [
"string",
"null"
]
},
"level": {
"format": "int32",
"type": "integer"
},
"marketFeatures": {
"items": {
"type": "string"
},
"type": "array"
},
"monthlyFee": {
"type": "string"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
},
"priceLabel": {
"type": [
"string",
"null"
]
},
"pricingModel": {
"type": "string"
},
"pricingPlanId": {
"type": [
"string",
"null"
]
},
"published": {
"type": "boolean"
},
"quotas": {
"items": {
"$ref": "#/components/schemas/PlanQuotaResponse"
},
"type": "array"
},
"tierId": {
"type": "string"
},
"trialDays": {
"format": "int32",
"type": "integer"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"PlanQuotaResponse": {
"properties": {
"eventType": {
"type": "string"
},
"expression": {
"type": [
"string",
"null"
]
},
"hardLimit": {
"format": "int64",
"type": "integer"
},
"overagePolicy": {
"type": "string"
},
"period": {
"type": "string"
},
"quotaId": {
"type": "string"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/QuotaTierResponse"
},
"type": "array"
},
"unitPrice": {
"type": "string"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"QuotaTierResponse": {
"properties": {
"unitPrice": {
"type": "string"
},
"upTo": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve Pricing PlanGET/api/v1/applications/{applicationId}/pricing-plans/{pricingPlanId}
retrievePricingPlan
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| pricingPlanId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/PricingPlanResponse"
},
"components": {
"schemas": {
"PricingPlanResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"availability": {
"type": "string"
},
"availableFrom": {
"type": [
"string",
"null"
]
},
"availableUntil": {
"type": [
"string",
"null"
]
},
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"createdAt": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"id": {
"type": "string"
},
"introOffer": {
"oneOf": [
{
"$ref": "#/components/schemas/IntroOfferResponse"
},
{
"type": "null"
}
]
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
},
"subscriptionCount": {
"format": "int64",
"type": "integer"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/PlanResponse"
},
"type": "array"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"IntroOfferResponse": {
"properties": {
"durationMonths": {
"format": "int32",
"type": "integer"
},
"percentOff": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"PlanResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"applicationName": {
"type": "string"
},
"badgeLabel": {
"type": [
"string",
"null"
]
},
"billingPeriod": {
"type": "string"
},
"catalogPlanName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"ctaLabel": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"featureBullets": {
"items": {
"type": "string"
},
"type": "array"
},
"highlighted": {
"type": "boolean"
},
"isDefault": {
"type": "boolean"
},
"killbillPlanName": {
"type": [
"string",
"null"
]
},
"killbillPriceList": {
"type": [
"string",
"null"
]
},
"killbillProductName": {
"type": [
"string",
"null"
]
},
"level": {
"format": "int32",
"type": "integer"
},
"marketFeatures": {
"items": {
"type": "string"
},
"type": "array"
},
"monthlyFee": {
"type": "string"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
},
"priceLabel": {
"type": [
"string",
"null"
]
},
"pricingModel": {
"type": "string"
},
"pricingPlanId": {
"type": [
"string",
"null"
]
},
"published": {
"type": "boolean"
},
"quotas": {
"items": {
"$ref": "#/components/schemas/PlanQuotaResponse"
},
"type": "array"
},
"tierId": {
"type": "string"
},
"trialDays": {
"format": "int32",
"type": "integer"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"PlanQuotaResponse": {
"properties": {
"eventType": {
"type": "string"
},
"expression": {
"type": [
"string",
"null"
]
},
"hardLimit": {
"format": "int64",
"type": "integer"
},
"overagePolicy": {
"type": "string"
},
"period": {
"type": "string"
},
"quotaId": {
"type": "string"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/QuotaTierResponse"
},
"type": "array"
},
"unitPrice": {
"type": "string"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"QuotaTierResponse": {
"properties": {
"unitPrice": {
"type": "string"
},
"upTo": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List CustomersGET/api/v1/applications/{applicationId}/subscribers
listCustomers
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| page | query | No | integer (int32) |
| size | query | No | integer (int32) |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/SubscriberPageResponse"
},
"components": {
"schemas": {
"SubscriberPageResponse": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/SubscriberSummaryResponse"
},
"type": "array"
},
"page": {
"format": "int32",
"type": "integer"
},
"size": {
"format": "int32",
"type": "integer"
},
"total": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"SubscriberSummaryResponse": {
"properties": {
"billingAddress": {
"type": [
"string",
"null"
]
},
"billingCity": {
"type": [
"string",
"null"
]
},
"billingCountry": {
"type": [
"string",
"null"
]
},
"billingPostalCode": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"externalRef": {
"type": [
"string",
"null"
]
},
"killbillAccountId": {
"type": [
"string",
"null"
]
},
"legalHold": {
"type": "boolean"
},
"legalHoldReason": {
"type": [
"string",
"null"
]
},
"subscriberId": {
"type": "string"
},
"taxId": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Upsert CustomerPOST/api/v1/applications/{applicationId}/subscribers
upsertCustomer
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/ProvisionSubscriberRequestBody"
},
"components": {
"schemas": {
"ProvisionSubscriberRequestBody": {
"properties": {
"billingAddress": {
"type": [
"string",
"null"
]
},
"billingCity": {
"type": [
"string",
"null"
]
},
"billingCountry": {
"type": [
"string",
"null"
]
},
"billingPostalCode": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"externalRef": {
"minLength": 1,
"type": "string"
},
"taxId": {
"type": [
"string",
"null"
]
}
},
"required": [
"externalRef"
],
"type": "object"
}
}
}
}Responses
201Created
{
"schema": {
"$ref": "#/components/schemas/ProvisionSubscriberResponse"
},
"components": {
"schemas": {
"ProvisionSubscriberResponse": {
"properties": {
"killbillAccountId": {
"type": [
"string",
"null"
]
},
"subscriberId": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve CustomerGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}
retrieveCustomer
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/SubscriberSummaryResponse"
},
"components": {
"schemas": {
"SubscriberSummaryResponse": {
"properties": {
"billingAddress": {
"type": [
"string",
"null"
]
},
"billingCity": {
"type": [
"string",
"null"
]
},
"billingCountry": {
"type": [
"string",
"null"
]
},
"billingPostalCode": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"externalRef": {
"type": [
"string",
"null"
]
},
"killbillAccountId": {
"type": [
"string",
"null"
]
},
"legalHold": {
"type": "boolean"
},
"legalHoldReason": {
"type": [
"string",
"null"
]
},
"subscriberId": {
"type": "string"
},
"taxId": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Update CustomerPATCH/api/v1/applications/{applicationId}/subscribers/{subscriberId}
updateCustomer
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/UpdateSubscriberRequestBody"
},
"components": {
"schemas": {
"UpdateSubscriberRequestBody": {
"properties": {
"billingAddress": {
"maxLength": 500,
"minLength": 0,
"type": [
"string",
"null"
]
},
"billingCity": {
"maxLength": 100,
"minLength": 0,
"type": [
"string",
"null"
]
},
"billingCountry": {
"pattern": "|[A-Za-z]{2}",
"type": [
"string",
"null"
]
},
"billingPostalCode": {
"maxLength": 32,
"minLength": 0,
"type": [
"string",
"null"
]
},
"displayName": {
"maxLength": 200,
"minLength": 0,
"type": [
"string",
"null"
]
},
"email": {
"maxLength": 320,
"minLength": 0,
"type": [
"string",
"null"
]
},
"taxId": {
"maxLength": 64,
"minLength": 0,
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/SubscriberSummaryResponse"
},
"components": {
"schemas": {
"SubscriberSummaryResponse": {
"properties": {
"billingAddress": {
"type": [
"string",
"null"
]
},
"billingCity": {
"type": [
"string",
"null"
]
},
"billingCountry": {
"type": [
"string",
"null"
]
},
"billingPostalCode": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"externalRef": {
"type": [
"string",
"null"
]
},
"killbillAccountId": {
"type": [
"string",
"null"
]
},
"legalHold": {
"type": "boolean"
},
"legalHoldReason": {
"type": [
"string",
"null"
]
},
"subscriberId": {
"type": "string"
},
"taxId": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve BalanceGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/balance
retrieveBalance
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/BalanceResponse"
},
"components": {
"schemas": {
"BalanceResponse": {
"properties": {
"balance": {
"type": [
"string",
"null"
]
},
"currency": {
"type": "string"
},
"killbillAccountId": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve EntitlementGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/entitlement
retrieveEntitlement
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/SubscriberEntitlementDto"
},
"components": {
"schemas": {
"SubscriberEntitlementDto": {
"properties": {
"computedAt": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"planId": {
"type": [
"string",
"null"
]
},
"quotaEnvelopeJson": {
"type": "string"
},
"status": {
"type": "string"
},
"subscriberAccountId": {
"type": "string"
},
"subscriptionId": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List InvoicesGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/invoices
listInvoices
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/InvoiceResponse"
},
"type": "array"
},
"components": {
"schemas": {
"InvoiceResponse": {
"properties": {
"amount": {
"type": [
"string",
"null"
]
},
"balance": {
"type": [
"string",
"null"
]
},
"currency": {
"type": [
"string",
"null"
]
},
"invoiceDate": {
"type": [
"string",
"null"
]
},
"invoiceId": {
"type": "string"
},
"invoiceNumber": {
"type": [
"string",
"null"
]
},
"status": {
"type": [
"string",
"null"
]
},
"targetDate": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve Invoice HtmlGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/invoices/{invoiceId}/html
retrieveInvoiceHtml
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| invoiceId | path | Yes | string |
Responses
200OK
{
"type": "string"
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List Payment ActionsGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-actions
listPaymentActions
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/PaymentActionResponse"
},
"type": "array"
},
"components": {
"schemas": {
"PaymentActionResponse": {
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
},
"paymentId": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List Payment MethodsGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods
listPaymentMethods
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/PaymentMethodResponse"
},
"type": "array"
},
"components": {
"schemas": {
"PaymentMethodResponse": {
"properties": {
"brand": {
"type": [
"string",
"null"
]
},
"expMonth": {
"format": "int32",
"type": [
"integer",
"null"
]
},
"expYear": {
"format": "int32",
"type": [
"integer",
"null"
]
},
"id": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"last4": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Delete Payment MethodDELETE/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods/{paymentMethodId}
deletePaymentMethod
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| paymentMethodId | path | Yes | string |
Responses
204No content
No response body.
defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Set Default Payment MethodPUT/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-methods/{paymentMethodId}/default
setDefaultPaymentMethod
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| paymentMethodId | path | Yes | string |
Responses
204No content
No response body.
defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Create Payment Setup SessionPOST/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payment-setup-session
createPaymentSetupSession
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/CreateSetupSessionRequestBody"
},
"components": {
"schemas": {
"CreateSetupSessionRequestBody": {
"properties": {
"cancelUrl": {
"minLength": 1,
"type": "string"
},
"successUrl": {
"minLength": 1,
"type": "string"
},
"uiMode": {
"type": [
"string",
"null"
]
}
},
"required": [
"cancelUrl",
"successUrl"
],
"type": "object"
}
}
}
}Responses
201Created
{
"schema": {
"$ref": "#/components/schemas/SetupSessionResponse"
},
"components": {
"schemas": {
"SetupSessionResponse": {
"properties": {
"clientSecret": {
"type": [
"string",
"null"
]
},
"provider": {
"type": "string"
},
"redirectUrl": {
"type": [
"string",
"null"
]
},
"sessionId": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List PaymentsGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments
listPayments
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/PaymentResponse"
},
"type": "array"
},
"components": {
"schemas": {
"PaymentResponse": {
"properties": {
"amount": {
"type": [
"string",
"null"
]
},
"currency": {
"type": [
"string",
"null"
]
},
"invoiceIds": {
"items": {
"type": "string"
},
"type": "array"
},
"occurredAt": {
"type": [
"string",
"null"
]
},
"paymentId": {
"type": "string"
},
"status": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Authenticate PaymentPOST/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments/{paymentId}/authentication
authenticatePayment
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| paymentId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/PaymentAuthenticationResponse"
},
"components": {
"schemas": {
"PaymentAuthenticationResponse": {
"properties": {
"clientSecret": {
"type": [
"string",
"null"
]
},
"payment": {
"$ref": "#/components/schemas/PaymentActionResponse"
},
"provider": {
"type": "string"
},
"publishableKey": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"PaymentActionResponse": {
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
},
"paymentId": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Refresh PaymentPOST/api/v1/applications/{applicationId}/subscribers/{subscriberId}/payments/{paymentId}/refresh
refreshPayment
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| paymentId | path | Yes | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/PaymentActionResponse"
},
"components": {
"schemas": {
"PaymentActionResponse": {
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
},
"paymentId": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Create Customer SessionPOST/api/v1/applications/{applicationId}/subscribers/{subscriberId}/sessions
createCustomerSession
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
201Created
{
"schema": {
"$ref": "#/components/schemas/SubscriberSessionResponse"
},
"components": {
"schemas": {
"SubscriberSessionResponse": {
"properties": {
"expiresAt": {
"type": "string"
},
"token": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List SubscriptionsGET/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions
listSubscriptions
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/SubscriptionResponse"
},
"type": "array"
},
"components": {
"schemas": {
"SubscriptionResponse": {
"properties": {
"canceledAt": {
"type": [
"string",
"null"
]
},
"killbillBundleId": {
"type": [
"string",
"null"
]
},
"killbillSubscriptionId": {
"type": [
"string",
"null"
]
},
"planId": {
"type": "string"
},
"planName": {
"type": "string"
},
"status": {
"type": "string"
},
"subscribedAt": {
"type": "string"
},
"subscriptionId": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Create SubscriptionPOST/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions
createSubscription
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| Idempotency-Key | header | No | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/MerchantSubscribeRequestBody"
},
"components": {
"schemas": {
"MerchantSubscribeRequestBody": {
"properties": {
"planId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"planId"
],
"type": "object"
}
}
}
}Responses
201Created
{
"additionalProperties": {
"type": "string"
},
"type": "object"
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Cancel SubscriptionDELETE/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions/{subscriptionId}
cancelSubscription
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| subscriptionId | path | Yes | string |
| Idempotency-Key | header | No | string |
Responses
204No content
No response body.
defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Change SubscriptionPATCH/api/v1/applications/{applicationId}/subscribers/{subscriberId}/subscriptions/{subscriptionId}
changeSubscription
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| subscriberId | path | Yes | string |
| subscriptionId | path | Yes | string |
| Idempotency-Key | header | No | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/MerchantSubscribeRequestBody"
},
"components": {
"schemas": {
"MerchantSubscribeRequestBody": {
"properties": {
"planId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"planId"
],
"type": "object"
}
}
}
}Responses
204No content
No response body.
defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}List TiersGET/api/v1/applications/{applicationId}/tiers
listTiers
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Responses
200OK
{
"schema": {
"items": {
"$ref": "#/components/schemas/PlanResponse"
},
"type": "array"
},
"components": {
"schemas": {
"PlanResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"applicationName": {
"type": "string"
},
"badgeLabel": {
"type": [
"string",
"null"
]
},
"billingPeriod": {
"type": "string"
},
"catalogPlanName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"ctaLabel": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"featureBullets": {
"items": {
"type": "string"
},
"type": "array"
},
"highlighted": {
"type": "boolean"
},
"isDefault": {
"type": "boolean"
},
"killbillPlanName": {
"type": [
"string",
"null"
]
},
"killbillPriceList": {
"type": [
"string",
"null"
]
},
"killbillProductName": {
"type": [
"string",
"null"
]
},
"level": {
"format": "int32",
"type": "integer"
},
"marketFeatures": {
"items": {
"type": "string"
},
"type": "array"
},
"monthlyFee": {
"type": "string"
},
"name": {
"type": "string"
},
"planId": {
"type": "string"
},
"priceLabel": {
"type": [
"string",
"null"
]
},
"pricingModel": {
"type": "string"
},
"pricingPlanId": {
"type": [
"string",
"null"
]
},
"published": {
"type": "boolean"
},
"quotas": {
"items": {
"$ref": "#/components/schemas/PlanQuotaResponse"
},
"type": "array"
},
"tierId": {
"type": "string"
},
"trialDays": {
"format": "int32",
"type": "integer"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"PlanQuotaResponse": {
"properties": {
"eventType": {
"type": "string"
},
"expression": {
"type": [
"string",
"null"
]
},
"hardLimit": {
"format": "int64",
"type": "integer"
},
"overagePolicy": {
"type": "string"
},
"period": {
"type": "string"
},
"quotaId": {
"type": "string"
},
"tiers": {
"items": {
"$ref": "#/components/schemas/QuotaTierResponse"
},
"type": "array"
},
"unitPrice": {
"type": "string"
},
"version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"QuotaTierResponse": {
"properties": {
"unitPrice": {
"type": "string"
},
"upTo": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Create TierPOST/api/v1/applications/{applicationId}/tiers
createTier
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/CreatePlanRequestBody"
},
"components": {
"schemas": {
"CreatePlanRequestBody": {
"properties": {
"badgeLabel": {
"maxLength": 60,
"minLength": 0,
"type": [
"string",
"null"
]
},
"billingPeriod": {
"pattern": "MONTHLY|ANNUAL",
"type": [
"string",
"null"
]
},
"catalogPlanName": {
"maxLength": 100,
"minLength": 1,
"type": [
"string",
"null"
]
},
"ctaLabel": {
"maxLength": 60,
"minLength": 0,
"type": [
"string",
"null"
]
},
"description": {
"maxLength": 500,
"minLength": 0,
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": [
"integer",
"null"
]
},
"highlighted": {
"type": [
"boolean",
"null"
]
},
"isDefault": {
"type": [
"boolean",
"null"
]
},
"level": {
"format": "int32",
"type": [
"integer",
"null"
]
},
"marketFeatures": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"monthlyFee": {
"type": [
"number",
"null"
]
},
"name": {
"minLength": 1,
"type": "string"
},
"priceLabel": {
"type": [
"string",
"null"
]
},
"pricingModel": {
"minLength": 1,
"pattern": "FlatRate|PerUsage",
"type": "string"
},
"pricingPlanId": {
"type": [
"string",
"null"
]
},
"published": {
"type": [
"boolean",
"null"
]
},
"trialDays": {
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"name",
"pricingModel"
],
"type": "object"
}
}
}
}Responses
201Created
{
"additionalProperties": {
"type": "string"
},
"type": "object"
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Record UsagePOST/api/v1/applications/{applicationId}/usage-events
recordUsage
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| Idempotency-Key | header | No | string |
| X-Correlation-Id | header | No | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/UsageIngestRequestBody"
},
"components": {
"schemas": {
"UsageIngestRequestBody": {
"properties": {
"correlationId": {
"type": [
"string",
"null"
]
},
"eventType": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"idempotencyKey": {
"maxLength": 256,
"minLength": 1,
"type": [
"string",
"null"
]
},
"occurredAt": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"planId": {
"type": [
"string",
"null"
]
},
"properties": {
"oneOf": [
{
"$ref": "#/components/schemas/JsonNode"
},
{
"type": "null"
}
]
},
"quantity": {
"type": [
"number",
"null"
]
},
"source": {
"minLength": 1,
"type": "string"
},
"subscriberAccountId": {
"minLength": 1,
"type": "string"
},
"subscriptionId": {
"type": [
"string",
"null"
]
},
"unit": {
"type": [
"string",
"null"
]
}
},
"required": [
"eventType",
"source",
"subscriberAccountId"
],
"type": "object"
},
"JsonNode": {
"properties": {
"array": {
"type": "boolean"
},
"bigDecimal": {
"type": "boolean"
},
"bigInteger": {
"type": "boolean"
},
"binary": {
"type": "boolean"
},
"boolean": {
"type": "boolean"
},
"container": {
"type": "boolean"
},
"double": {
"type": "boolean"
},
"embeddedValue": {
"type": "boolean"
},
"empty": {
"type": "boolean"
},
"float": {
"type": "boolean"
},
"floatingPointNumber": {
"type": "boolean"
},
"int": {
"type": "boolean"
},
"integralNumber": {
"type": "boolean"
},
"long": {
"type": "boolean"
},
"missingNode": {
"type": "boolean"
},
"nodeType": {
"enum": [
"ARRAY",
"BINARY",
"BOOLEAN",
"MISSING",
"NULL",
"NUMBER",
"OBJECT",
"POJO",
"STRING"
],
"type": "string"
},
"null": {
"type": "boolean"
},
"number": {
"type": "boolean"
},
"object": {
"type": "boolean"
},
"pojo": {
"type": "boolean"
},
"short": {
"type": "boolean"
},
"string": {
"type": "boolean"
},
"textual": {
"deprecated": true,
"type": "boolean"
},
"valueNode": {
"type": "boolean"
}
},
"type": "object"
}
}
}
}Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/UsageIngestResponse"
},
"components": {
"schemas": {
"UsageIngestResponse": {
"properties": {
"applicationId": {
"type": "string"
},
"eventId": {
"type": "string"
},
"eventType": {
"type": "string"
},
"occurredAt": {
"format": "date-time",
"type": "string"
},
"quantity": {
"type": "string"
},
"replayed": {
"type": "boolean"
},
"source": {
"type": "string"
},
"subscriberAccountId": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Record Usage BatchPOST/api/v1/applications/{applicationId}/usage-events/batch
recordUsageBatch
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| X-Correlation-Id | header | No | string |
Request body schema
{
"schema": {
"$ref": "#/components/schemas/UsageIngestBatchRequestBody"
},
"components": {
"schemas": {
"UsageIngestBatchRequestBody": {
"properties": {
"events": {
"items": {
"$ref": "#/components/schemas/UsageIngestBatchItem"
},
"maxItems": 500,
"minItems": 1,
"type": "array"
},
"subscriberAccountId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"subscriberAccountId"
],
"type": "object"
},
"UsageIngestBatchItem": {
"properties": {
"correlationId": {
"type": [
"string",
"null"
]
},
"eventType": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"idempotencyKey": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"occurredAt": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"planId": {
"type": [
"string",
"null"
]
},
"properties": {
"oneOf": [
{
"$ref": "#/components/schemas/JsonNode"
},
{
"type": "null"
}
]
},
"quantity": {
"type": [
"number",
"null"
]
},
"source": {
"minLength": 1,
"type": "string"
},
"subscriptionId": {
"type": [
"string",
"null"
]
},
"unit": {
"type": [
"string",
"null"
]
}
},
"required": [
"eventType",
"idempotencyKey",
"source"
],
"type": "object"
},
"JsonNode": {
"properties": {
"array": {
"type": "boolean"
},
"bigDecimal": {
"type": "boolean"
},
"bigInteger": {
"type": "boolean"
},
"binary": {
"type": "boolean"
},
"boolean": {
"type": "boolean"
},
"container": {
"type": "boolean"
},
"double": {
"type": "boolean"
},
"embeddedValue": {
"type": "boolean"
},
"empty": {
"type": "boolean"
},
"float": {
"type": "boolean"
},
"floatingPointNumber": {
"type": "boolean"
},
"int": {
"type": "boolean"
},
"integralNumber": {
"type": "boolean"
},
"long": {
"type": "boolean"
},
"missingNode": {
"type": "boolean"
},
"nodeType": {
"enum": [
"ARRAY",
"BINARY",
"BOOLEAN",
"MISSING",
"NULL",
"NUMBER",
"OBJECT",
"POJO",
"STRING"
],
"type": "string"
},
"null": {
"type": "boolean"
},
"number": {
"type": "boolean"
},
"object": {
"type": "boolean"
},
"pojo": {
"type": "boolean"
},
"short": {
"type": "boolean"
},
"string": {
"type": "boolean"
},
"textual": {
"deprecated": true,
"type": "boolean"
},
"valueNode": {
"type": "boolean"
}
},
"type": "object"
}
}
}
}Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/UsageIngestBatchResponse"
},
"components": {
"schemas": {
"UsageIngestBatchResponse": {
"properties": {
"ingested": {
"format": "int32",
"type": "integer"
},
"rejected": {
"format": "int32",
"type": "integer"
},
"replayed": {
"format": "int32",
"type": "integer"
},
"results": {
"items": {
"$ref": "#/components/schemas/UsageIngestBatchResult"
},
"type": "array"
}
},
"type": "object"
},
"UsageIngestBatchResult": {
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"eventId": {
"type": [
"string",
"null"
]
},
"idempotencyKey": {
"type": "string"
},
"index": {
"format": "int32",
"type": "integer"
},
"status": {
"type": "string"
}
},
"type": "object"
}
}
}
}defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}Retrieve CatalogGET/api/v1/public/applications/{applicationId}/catalog
retrieveCatalog
| Name | Location | Required | Type |
|---|---|---|---|
| applicationId | path | Yes | string |
| country | query | No | string |
| If-None-Match Previously returned ETag. A matching catalog returns 304 without a body. | header | No | string |
Responses
200OK
{
"schema": {
"$ref": "#/components/schemas/PublicCatalogResponse"
},
"components": {
"schemas": {
"PublicCatalogResponse": {
"properties": {
"application": {
"$ref": "#/components/schemas/PublicApplicationDto"
},
"plans": {
"items": {
"$ref": "#/components/schemas/PublicPlanDto"
},
"type": "array"
},
"pricingPlan": {
"oneOf": [
{
"$ref": "#/components/schemas/PublicPricingPlanDto"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"PublicApplicationDto": {
"properties": {
"currency": {
"type": "string"
},
"name": {
"type": "string"
},
"widgetAppearance": {
"$ref": "#/components/schemas/PublicWidgetAppearanceDto"
}
},
"type": "object"
},
"PublicWidgetAppearanceDto": {
"properties": {
"accentColor": {
"type": "string"
},
"buttonStyle": {
"type": "string"
},
"cornerStyle": {
"type": "string"
},
"fontFamily": {
"type": "string"
},
"highlightStyle": {
"type": "string"
}
},
"type": "object"
},
"PublicPlanDto": {
"properties": {
"amount": {
"type": "string"
},
"badge": {
"type": [
"string",
"null"
]
},
"billingPeriod": {
"type": "string"
},
"catalogPlanName": {
"type": "string"
},
"ctaLabel": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"displayOrder": {
"format": "int32",
"type": "integer"
},
"featureBullets": {
"items": {
"type": "string"
},
"type": "array"
},
"highlighted": {
"type": "boolean"
},
"id": {
"type": "string"
},
"includedUsage": {
"items": {
"$ref": "#/components/schemas/PublicIncludedUsageDto"
},
"type": "array"
},
"introAmount": {
"type": [
"string",
"null"
]
},
"marketFeatures": {
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"type": "string"
},
"priceLabel": {
"type": [
"string",
"null"
]
},
"pricingModel": {
"type": "string"
},
"tierId": {
"type": "string"
},
"trialDays": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"PublicIncludedUsageDto": {
"properties": {
"aggregation": {
"type": "string"
},
"eventType": {
"type": "string"
},
"limit": {
"format": "int64",
"type": "integer"
},
"overage": {
"$ref": "#/components/schemas/PublicOverageDto"
},
"period": {
"type": "string"
},
"unit": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"PublicOverageDto": {
"properties": {
"kind": {
"type": "string"
},
"startingAt": {
"type": [
"string",
"null"
]
},
"unitPrice": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"PublicPricingPlanDto": {
"properties": {
"introOffer": {
"oneOf": [
{
"$ref": "#/components/schemas/PublicIntroOfferDto"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
}
},
"type": "object"
},
"PublicIntroOfferDto": {
"properties": {
"durationMonths": {
"format": "int32",
"type": "integer"
},
"percentOff": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
}
}
}
}304Not modified; use the cached catalog.
No response body.
404Application unavailable or no public catalog.
No response body.
defaultRequest failed. Some infrastructure/authentication errors have an empty or non-JSON body.
{
"schema": {
"$ref": "#/components/schemas/AccountlyProblem"
},
"components": {
"schemas": {
"AccountlyProblem": {
"additionalProperties": true,
"properties": {
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}06 / Ship with confidence
Test the whole customer journey
Start in test mode
Create an isolated test application, publish a free tier, and keep test/live keys and payment provider settings separate.
Verify customer isolation
Sign in as two customers. Each must see only their own subscription, invoices and payment methods. Switch workspaces and check expired sessions.
Exercise subscriptions
Subscribe, repeat the request with the same idempotency key, change tiers, and cancel. Confirm server entitlements follow the final state.
Exercise Stripe test payments
Configure the test provider and webhook. Test successful cards, declined cards and bank authentication. Confirm invoices and entitlements, including after a page refresh.
Deliver and replay events
Test a valid event, tampered body, expired signature and duplicate delivery. Check persistent deduplication and recovery after your endpoint is temporarily offline.
Prepare your live environment
Complete Accountly’s Go live checks. Use HTTPS, exact origins, live provider configuration and separate secrets. Monitor failed payments, webhook delivery and API errors.
Troubleshooting & release boundaries
401 or 403: check test/live environment, key scopes, sign-in, application ownership and exact allowed origins. Never fix it by exposing a server key in the browser.
Empty plans: publish tiers in the selected application and check country/price-list eligibility. Keep the API’s tier IDs when creating or changing a subscription.
Payment stays pending: check provider setup, webhook delivery and billing recovery in the Accountly dashboard. Do not create another charge merely because a redirect finished.
API errors: capture status and request ID for support, with secrets and payment data removed. Python’s read timeout is not a hard total limit for a continuously streaming response.
Preview: local package installation and transport/helper checks are covered for the listed runtimes. Successful Stripe sandbox billing is checked with all six additional server languages; decline and bank-authentication journeys are checked through the JavaScript/widget integration. Node 20, 22, 24 and 26 passed the installed-package runtime checks on Linux. Windows/macOS matrix runs, final licensing, registry ownership and public publishing remain release work. Configuration operations such as API-key management, provider secrets and webhook registration stay in the Accountly dashboard.