billing
polar

Create Polar Checkout

Mint a Polar-hosted checkout session for the requested SKU.

Returns the Polar url for redirect + the session_id so the frontend can poll the session-state endpoint while waiting for the webhook.

Auth: see module docstring. The credit-target identity is resolved SERVER-SIDE from auth headers or a signed checkout_token; the request body cannot stamp api_key_hash or email into Polar's metadata.

Errors: 400 — unknown SKU, body carries deprecated identity fields, no Polar product configured, or the checkout_token is bound to a different SKU 401 — no auth context 404 — tenant in X-Tenant-Id (or token) not found 503 — Polar credentials missing / API unreachable

post/v2/billing/polar/checkout

Request

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

Headers

X-Tenant-Idstring nullable
X-User-Idstring nullable
Authorizationstring nullable
X-API-Keystring nullable

Request body

skustring

Etymolt SKU; only topup_10 is wired today.

emailstring nullable

DEPRECATED — rejected since 2026-05-17. Mint a checkout_token via POST /v2/billing/checkout_token.

api_key_hashstring nullable

DEPRECATED — rejected since 2026-05-17. Mint a checkout_token via POST /v2/billing/checkout_token.

checkout_tokenstring nullable

One-time signed token binding (subject, sku, exp).

client_reference_idstring nullable

Opaque buyer-side correlation id; threaded into metadata.

success_urlstring nullable

Response

Successful Response

urlstring required
session_idstring required
skustring required
providerstring
statusstring required

Changes

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