Billing

A link into Stripe checkout, to start a plan

The quantity is the portfolio’s unit count, because every plan is priced per unit per month. Stripe collects the card, the billing address and the VAT number, so none of them are typed here. A team has one plan: while it holds one in trial, active or past due this answers 409, and the plan is changed with /billing/plan or kept with /billing/resume instead. Only a first plan starts with a free trial, where no team the caller owns has had one before, and it runs for the offer’s trialDays instead where the caller holds an offer on the plan being started. Where the plan price carries several currencies, Checkout bills in the one Stripe already bills this customer in, or else the one the team’s country is priced in, which is the one the plan was shown in. Only an owner of the team, signed in on screen.

post/api/v1/billing/checkout

Request

  • Base URL: http://localhost:5180
  • URL: http://localhost:5180/api/v1/billing/checkout
  • Auth: API key in cookie better-auth.session_token

Request body

plan'owner' | 'pro' | 'agency' required

Response

The URL to send the browser to.

okunknown required

Changes

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