Skip to main content
PUT
/
organizations
/
{organizationId}
/
billing
/
upgrade
Upgrade organization to advanced plan
curl --request PUT \
  --url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/billing/upgrade \
  --header 'Authorization: Bearer <token>'
{
  "hasPaymentMethod": true,
  "planType": "free",
  "inTrial": true,
  "scope": [
    "<string>"
  ],
  "version": "<string>",
  "billingPortalUrl": "<string>",
  "billingPortalAddPaymentMethodUrl": "<string>",
  "cancelAtPeriodEnd": true,
  "trialStart": "2023-11-07T05:31:56Z",
  "trialEnd": "2023-11-07T05:31:56Z",
  "trialDaysLeft": 123,
  "currentBillingPeriod": {
    "startDate": "2023-11-07T05:31:56Z",
    "endDate": "2023-11-07T05:31:56Z",
    "usagesCount": 123
  },
  "shouldLockEnvironmentSwitch": true,
  "coupons": [
    {
      "coupon": "An example name"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

ID of organization

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Response

Details of the organization's current subscription

hasPaymentMethod
boolean
required

Whether the organization has a valid payment method on file

planType
enum<string>
required
Available options:
free,
advanced,
enterprise,
standard
inTrial
boolean
required

Whether the subscription is currently in a free trial period

scope
string[]
required

List of feature scope strings included in the current subscription plan

version
string
required

Billing plan version identifier

billingPortalUrl
string

URL to the Stripe billing portal for managing the subscription

billingPortalAddPaymentMethodUrl
string

URL to the Stripe billing portal pre-configured to add a payment method

cancelAtPeriodEnd
boolean

When true, the subscription will be cancelled at the end of the current billing period

trialStart
string<date-time>

ISO 8601 timestamp of when the trial period started

trialEnd
string<date-time>

ISO 8601 timestamp of when the trial period ends

trialDaysLeft
number

Number of days remaining in the trial period

currentBillingPeriod
object
shouldLockEnvironmentSwitch
boolean

When true, the user cannot switch between live and sandbox until payment is added

coupons
object[]

List of discount coupons applied to the subscription