Docs/Account/Billing API
Account

Billing API

Managing subscriptions, plans, and invoices.

1 min read

Billing API

Inpera uses Dodo Payments for subscription management. The billing API handles plans, checkout, subscriptions, and invoices.

Get Plans

GET /billing/plans

Returns available subscription plans (public endpoint).

Get Billing Info

GET /billing/organizations/:id
Authorization: Bearer YOUR_TOKEN

Returns current billing status for an organization.

Initiate Checkout

POST /billing/organizations/:id/checkout
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "planId": "plan-uuid",
  "billingPeriod": "monthly" | "annually"
}

Returns a checkout session URL for payment.

Verify Checkout

POST /billing/organizations/:id/verify-checkout
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "sessionId": "checkout-session-id"
}

Verifies the checkout session and creates the subscription.

Cancel Subscription

POST /billing/organizations/:id/cancel
Authorization: Bearer YOUR_TOKEN

Get Subscription Details

GET /billing/organizations/:id/subscription
Authorization: Bearer YOUR_TOKEN

Payment History

GET /billing/organizations/:id/payments
Authorization: Bearer YOUR_TOKEN

Invoices

List Invoices

GET /billing/organizations/:id/invoices
Authorization: Bearer YOUR_TOKEN

Download Invoice PDF

GET /billing/organizations/:organizationId/invoices/:invoiceId/download
Authorization: Bearer YOUR_TOKEN

Returns PDF binary.

Usage Stats

GET /billing/organizations/:id/usage
Authorization: Bearer YOUR_TOKEN

Usage History

GET /billing/organizations/:id/usage/history?period=month
Authorization: Bearer YOUR_TOKEN

Period options: day, week, month

Webhooks

Dodo Payments sends webhooks to:

POST /billing/webhooks/dodo

This is handled automatically by Inpera.