Billing

Change the plan (upgrades are invoiced right away, downgrades credit the next invoice; Free = cancel at period end). Dashboard session only

post/billing/subscription

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/billing/subscription
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Query parameters

orgIdstring

Organization id (required when you belong to several)

lang'en' | 'sv'

Language of labels and Stripe pages (default en)

Request body

planId'free' | 'pro' | 'business' required
interval'month' | 'year'
prorationDateinteger

Response

Result

status'updated' | 'pending_payment' | 'cancel_scheduled' | 'resumed' | 'unchanged' required
paymentUrlstring nullable required

when a payment needs the customer (pending_payment): the hosted invoice page

Changes

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