Billing API

Integrate CargoLint billing and checkout into your own application via the API.

For dashboard-based billing management, see Billing & Plans.

Custom Checkout via API

Integrate Stripe Checkout into your own application (Business and Enterprise plans only):

curl -X POST https://api.cargolint.com/api/v1/billing/checkout \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "plan": "business",
    "success_url": "https://yourapp.com/success",
    "cancel_url": "https://yourapp.com/cancel"
  }'

The endpoint returns a Stripe checkout session URL for your application.

Checking Subscription Status

curl -X GET https://api.cargolint.com/api/v1/billing/subscription \
  -H "Authorization: Bearer YOUR_API_KEY"

Retrieving Usage

curl -X GET https://api.cargolint.com/api/v1/billing/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Returns current billing period document count, quota, and overage details.