billing

Claim Topup

Credit a paid Stripe Checkout session to a buyer's API key.

Auth: gated by ETYMOLT_ADMIN_TOKEN. Without it, the endpoint 404s — minting credits is not a public capability. Operator/founder uses this via curl with the admin token to rescue a stuck purchase.

Returns 200 with ok=True + the new balance on success. Returns 200 + ok=False + a reason on graceful failure (e.g. email not found) so the caller can decide whether to escalate. Returns 4xx only on hard errors (bad input, unknown sku).

post/v2/billing/claim

Request

  • Base URL: https://api.etymolt.com
  • URL: https://api.etymolt.com/v2/billing/claim
  • Auth: none declared

Headers

X-Admin-Tokenstring nullable

Request body

stripe_session_idstring required

Stripe Checkout session id (cs_...)

stripe_event_idstring nullable

Optional Stripe event id for idempotency anchoring. If provided, repeated claims with the same event id are no-ops.

skustring
api_key_hashstring nullable

sha256 hex of the buyer's API key. Preferred — direct credit path.

emailstring nullable

Buyer's email. Used to look up the API key when api_key_hash is missing.

amount_usdnumber nullable

Purchase amount for the receipts ledger. Optional.

Response

Successful Response

okboolean required
verdicts_creditedinteger required
api_key_hash_prefixstring nullable
new_balanceobject nullable
skustring required
stripe_session_idstring required
notestring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.