Skip to content
Navigation

createOrgBillingSync

Sync the org's plan and subscription from Stripe now, without waiting for Stripe's event, and answer them as getOrgBilling does. Call it when a person returns from a checkout or the billing portal. An org that never started a checkout stays on free. Takes manageBilling on the org.

POST
/orgs/{org_id}/billing/sync

Path parameters

  • org_id
    string
    required
    pattern: ^org_[0-7][0-9a-hjkmnp-tv-z]{25}$

Returns

200

OrgBilling

JSON
  • plan
    free
    or
    pro
    or
    team
    required
  • subscription_status
    required

    One of the following:

    • SubscriptionStatus
    • null
  • current_period_end
    required

    One of the following:

    • string
    • null
  • cancel_at
    required

    One of the following:

    • string
    • null

400

InvalidRequest
JSON
  • _tag
    InvalidRequest
    required
  • part
    path
    or
    query
    or
    headers
    or
    body
    required
  • issues
    array of
    object
    required
    • path
      array of
      required

      One of the following:

      • string
      • integer
    • message
      string
      required

401

InvalidCredentials
JSON
  • _tag
    InvalidCredentials
    required

403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON

One of the following:

  • ForbiddenEncoded
    • _tag
      Forbidden
      required
    • message
      string
      required
  • ForbiddenOriginEncoded
    • _tag
      ForbiddenOrigin
      required
  • RequiresPersonalSessionEncoded
    • _tag
      RequiresPersonalSession
      required
  • RunBranchRequiredEncoded
    • _tag
      RunBranchRequired
      required
    • branch
      string
      required
      minLength: 1
    • message
      string
      required

404

OrgNotFound
JSON
  • _tag
    OrgNotFound
    required

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

OrgFailure | ControlPlaneFailure
JSON

One of the following:

  • OrgFailureEncoded
    • _tag
      OrgFailure
      required
    • reason
      string
      required
  • ControlPlaneFailureEncoded
    • _tag
      ControlPlaneFailure
      required
    • reason
      string
      required

502

StripeFailure
JSON
  • _tag
    StripeFailure
    required
  • reason
    string
    required

503

BillingNotConfigured | SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • BillingNotConfiguredEncoded
    • _tag
      BillingNotConfigured
      required
  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close