billing

Reveal Key

Issue the API key for a paid Checkout Session, once.

The welcome page Stripe returns the buyer to calls this with the session id. The session is checked with Stripe (paid, recent, its subscription live), the key is created on the plan the subscription was bought for (its metadata; the API plan if it names none), linked to that subscription, and returned; a second call for the same session is a 409, so a leaked welcome link can't mint more keys.

Args: body: The session id. caller: Injected caller, for the per-visitor limit. gateway: Injected Stripe gateway. repo: Injected ApiKeyRepository.

Returns: The new key.

Raises: HTTPException: 404, 402 or 409 as described in the responses.

post/billing/keys

Request

  • Base URL: https://api.licenscheck.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.licenscheck.com/billing/keys
  • Auth: none declared

Request body

session_idstring required

The session parameter Stripe put on the welcome page's URL.

Response

Successful Response

keystring required

The full API key (lc_live_...). It's never shown again.

prefixstring required

The key's readable prefix, for telling keys apart.

emailstring nullable required

The email the subscription was bought with.

planstring required

The plan bought: "starter" or "api".

included_verificationsinteger required

Verifications a month the plan includes.

overage_centsinteger required

What each verification after those costs, in cents.

Changes

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