Skip to main content
POST
Refund an eligible unused paid-credit lot

Authorizations

Authorization
string
header
required

A Cognito access token, issued through the dashboard's own sign-up and sign-in pages (a backend-for-frontend; there is no Cognito Hosted UI) and sent as Authorization: Bearer <jwt>. Dashboard operations require this scheme and cannot be called with an API key, with no exception. GET /v1/usage and GET /v1/limits offered both schemes from 0.8.0; 0.8.1 withdrew that, because the control-plane API serves them alone and its authorizer has no API-key branch. An account_id supplied by the client is ignored; all reads/writes are scoped server-side to the authenticated account.

Body

application/json
credit_lot_id
string
required
Maximum string length: 80
Pattern: ^lot_[A-Za-z0-9_-]{6,64}$

Response

The refund outcome.

Refunds only unused, unexpired, refundable paid-credit lots, to their originating Stripe charge and currency. Free, promotional, and consumed credits are never cash-refunded.

refund_id
string
required
Required string length: 1 - 100
credit_lot_id
string
required
Maximum string length: 80
Pattern: ^lot_[A-Za-z0-9_-]{6,64}$
refunded_credits
integer
required

A non-negative JavaScript-safe integer credit amount. The upper bound matches Number.MAX_SAFE_INTEGER, which is enforced by the domain ledger so arithmetic and JSON round-trips cannot silently lose cents worth of credit precision.

Required range: 0 <= x <= 9007199254740991
refunded_amount
integer
required

Minor currency units (e.g. cents).

Required range: x >= 0
currency
string
required
Pattern: ^[a-z]{3}$
status
enum<string>
required
Available options:
succeeded,
pending,
failed