Organizations

Subscribe to a plan

Changed on

Subscribe the organization to a plan's monthly or yearly price, and return the URL to send the member to. Without a subscription, it's Stripe Checkout, which comes back to returnUrl (a page of the web app) once paid. With one, the subscription moves to the plan: through the billing portal, where the member confirms the prorated amount, or at once (prorated) when either plan charges per member, returning returnUrl. Requires the billing: ["manage"] permission (owners and admins)

post/api/v1/organizations/{organizationId}/billing/subscribe

Request

  • Base URL
    https://app.easyscraper.com
  • URL
    https://app.easyscraper.com/api/v1/organizations/{organizationId}/billing/subscribe
  • Auth
    API key in cookie better-auth.session_token

Path parameters

organizationIdstring uuid required

Request body

planIdstring required
interval'month' | 'year' required
returnUrlstring uri required

Response

OK

urlstring uri required

Changes