billing

Subscribe to a billing plan

[cloud-only] Creates a new subscription to the specified billing plan.

post/api/billing/subscribe

Request body

plan_idstring required

ID of the plan to subscribe to

payment_method_idstring

Stripe payment method ID

Response

Subscription created

billing_op_idstring required

Billing operation ID to poll for status via GET /api/billing/ops/{id}

status'subscribed' | 'needs_payment_method' | 'pending_payment' required

Status of the subscription operation:

  • subscribed: Subscription is active immediately
  • needs_payment_method: User must add payment method via payment_method_url
  • pending_payment: Upgrade initiated, waiting for payment to complete
effective_atstring date-time

When the subscription became/becomes active (present when status=subscribed or pending_payment)

payment_method_urlstring

URL to redirect user to add payment method (present when status=needs_payment_method)

Changes