billing

Get Billing State

Snapshot of plan + current-period usage for the dashboard.

get/api/billing/state

Response

Successful Response

plan_tierstring required
subscription_statusstring required
pro_enabledboolean required
can_manage_billingboolean required
monthly_price_centsinteger required
monthly_mb_includedinteger required
overage_per_gb_centsinteger required
used_bytesinteger required
period_startstring date-time nullable required
period_endstring date-time nullable required
trial_ends_atstring date-time nullable required
cancel_at_period_endboolean required
has_subscriptionboolean
has_customerboolean
refund_window_ends_atstring date-time nullable
refund_eligibleboolean
is_paygboolean
credit_balance_bytesinteger
credit_balance_creditsnumber
free_grant_creditsinteger
credit_price_centsinteger
bytes_per_creditinteger
payg_out_of_credits_modestring
credit_pack_presetsinteger[]

Changes

Changed in 5 of the 8 revisions of this API.414

    • added the optional property bytes_per_credit to the response with the 200 status

      response-optional-property-added

    • added the optional property credit_balance_bytes to the response with the 200 status

      response-optional-property-added

    • added the optional property credit_balance_credits to the response with the 200 status

      response-optional-property-added

    • added the optional property credit_pack_presets to the response with the 200 status

      response-optional-property-added

    • added the optional property credit_price_cents to the response with the 200 status

      response-optional-property-added

    • added the optional property free_grant_credits to the response with the 200 status

      response-optional-property-added

    • added the optional property is_payg to the response with the 200 status

      response-optional-property-added

    • added the optional property payg_out_of_credits_mode to the response with the 200 status

      response-optional-property-added

    • added the optional property has_customer to the response with the 200 status

      response-optional-property-added

    • added the optional property has_subscription to the response with the 200 status

      response-optional-property-added

    • added the optional property refund_eligible to the response with the 200 status

      response-optional-property-added

    • added the optional property refund_window_ends_at to the response with the 200 status

      response-optional-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property has_customer from the response with the 200 status

      response-optional-property-removed

    • removed the optional property has_subscription from the response with the 200 status

      response-optional-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property has_customer to the response with the 200 status

      response-optional-property-added

    • added the optional property has_subscription to the response with the 200 status

      response-optional-property-added

    • removed the optional property has_customer from the response with the 200 status

      response-optional-property-removed

    • removed the optional property has_subscription from the response with the 200 status

      response-optional-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog