Skip to content

Usage Billing

The published PromptJang rate is USD $0.10 per 1,000 newly accepted items. An item is one webhook event, mailbox message, or A2A handoff. There is no monthly subscription fee or included allowance.

Retries, mailbox reads, claims, acknowledgements, replays, rejected requests, idempotent duplicates, and public demo simulations are not billable. Usage is rounded up to the next 1,000-item unit for the monthly billing period.

Founder-assisted beta

Live billing is disabled. Founder-provisioned workspaces use exempt status, local accepted-item usage remains visible, and PromptJang does not create Checkout sessions, portal sessions, or Stripe meter events. Checkout and portal endpoints return 503 until the launch flag is enabled. Invoice history returns an empty disabled response, while reconciliation returns local-only evidence.

Billing states

StateIngestionAPI-key creationRead access
pendingBlockedBlockedAvailable
activeAvailableAvailableAvailable
graceAvailable for three daysAvailableAvailable
suspendedReturns 402Returns 402Available
exemptAvailableAvailableAvailable

Connect payment

Unavailable while live billing is disabled.

http
POST /api/v1/billing/checkout
X-Session-Token: SESSION_TOKEN

The server creates a Stripe Checkout session using configured return URLs. The request body cannot override those URLs or the price.

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

Get billing status

http
GET /api/v1/billing
X-Session-Token: SESSION_TOKEN
json
{
  "status": "exempt",
  "billing_enabled": false,
  "grace_ends_at": null,
  "has_payment_method": false,
  "currency": "usd",
  "price_cents": 10,
  "unit_size": 1000
}

Get current usage

http
GET /api/v1/usage
Authorization: Bearer pj_live_YOUR_API_KEY
json
{
  "usage": {
    "period_start": 1785542400,
    "period_end": 1788220800,
    "accepted_events": 4280,
    "estimated_units": 0,
    "estimated_cents": 0,
    "pending_meter_events": 4280
  }
}

The local usage ledger updates immediately. For an exempt workspace, estimated units and cents are zero. Pending meter events remain local while billing is disabled and are not exported to Stripe. After paid billing launches, Stripe meter summaries update asynchronously and the Stripe invoice becomes the billing source of record.

Invoice history

While live billing is disabled, this returns:

json
{ "invoices": [], "billing_enabled": false }
http
GET /api/v1/billing/invoices
X-Session-Token: SESSION_TOKEN

Returns up to 12 recent Stripe invoices with their number, date, status, amount due, amount paid, currency, and hosted invoice URL. Organizations that have not connected Stripe receive an empty list.

Reconcile usage

While live billing is disabled, this returns local accepted usage and pending-ledger counts with status: "disabled". Stripe totals, differences, and invoice evidence are null.

http
GET /api/v1/billing/reconciliation
X-Session-Token: SESSION_TOKEN

Compares the current month's accepted-item ledger with Stripe's meter summary. It also compares the latest invoice subtotal with PromptJang's local estimate for the same invoice period.

status is reconciled only when no local meter events are waiting to be reported and Stripe's aggregate matches the local ledger. Stripe summaries are asynchronous, so a temporary pending result does not by itself mean usage was lost.

Customer portal

Unavailable while live billing is disabled; the endpoint returns 503.

http
GET /api/v1/billing/portal
X-Session-Token: SESSION_TOKEN

Returns a short-lived Stripe portal URL for payment methods and invoices.

Payment failure

This state machine is inactive while live billing is disabled. After billing launches, a failed invoice places the workspace in grace for three days. PromptJang then changes it to suspended until payment succeeds. Existing delivery, mailbox, and billing history remains readable.

Released under the MIT License.