Billing

Create Checkout Session

Start a checkout to upgrade the active organization to a paid plan.

The request body selects a monthly or yearly product for the chosen plan. Returns a hosted checkout URL to redirect the user to. The plan activates once payment completes and the subscription webhook is received.

post/v1/checkout-session

Request

  • Base URL: https://api.fettle.sh (the document declares no server; this is the origin it was published from)
  • URL: https://api.fettle.sh/v1/checkout-session
  • Auth: API key in header Authorization

Headers

X-Organization-Idstring uuid nullable

Request body

plan'FREE' | 'PLUS' | 'PRO' | 'MAX' | 'ENTERPRISE' required

Subscription tier of an organization; gates feature/usage limits.

billing_period'MONTH' | 'YEAR'

How often a subscription renews.

Polar models monthly and yearly billing as separate products, so the period is part of what a checkout selects. Member name == value to match the project's enum convention and the persisted DB labels.

success_urlstring uri required
cancel_urlstring uri required

Response

Successful Response

checkout_idstring required
redirect_urlstring uri required

Changes

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