Skip to content

Billing API

Get Subscription

GET /api/billing/subscription
json
{
  "tier": "pro",
  "status": "active",
  "renewalDate": "2024-03-01T00:00:00Z",
  "cancelAtPeriodEnd": false
}

Create Checkout Session

POST /api/billing/checkout

Body:

json
{
  "tier": "pro"
}

Returns a Stripe checkout URL:

json
{
  "url": "https://checkout.stripe.com/..."
}

Customer Portal

POST /api/billing/portal

Returns a Stripe customer portal URL for managing subscription and payment methods.

Get Usage

GET /api/billing/usage
json
{
  "compute": { "used": 1200, "limit": 5000 },
  "backtests": { "used": 15, "limit": 100 },
  "deployments": { "used": 2, "limit": 10 }
}

Get Invoices

GET /api/billing/invoices

Returns a list of Stripe invoices with download URLs.

tradectl — Automate Crypto Trading