API reference

Billing

8 operations.

GET /v1/billing

The account's current plan and trial status. Does not call Stripe or write data.

Operation id
getBilling
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Answers

200 Billing status. application/json

Field Type Always sent Notes
plan string yes Values: free , trial , team .
host_limit integer yes
ends_at string or null yes Limits: format date-time.
trial_available boolean yes
free_host_id string or null yes
active_hosts array of object yes
active_hosts[] object yes
active_hosts[].id string yes
active_hosts[].name string yes
has_subscription boolean yes
has_customer boolean yes
pending_checkout object or null yes
pending_checkout.session_id string or null yes
pending_checkout.interval string or null yes Values: month , year .
pending_checkout.seats integer yes
cancel_at_period_end boolean yes

Refusals

Status Meaning Codes
400 The request is not valid. invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
429 Too many attempts. rate_limited

POST /v1/billing/trial

Start the account's one card-free 30-day Team trial.

Operation id
startTeamTrial
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

No fields.

Answers

200 Billing status. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
plan string yes Values: free , trial , team .
host_limit integer yes
ends_at string or null yes Limits: format date-time.
trial_available boolean yes
free_host_id string or null yes
active_hosts array of object yes
active_hosts[] object yes
active_hosts[].id string yes
active_hosts[].name string yes
has_subscription boolean yes
has_customer boolean yes
pending_checkout object or null yes
pending_checkout.session_id string or null yes
pending_checkout.interval string or null yes Values: month , year .
pending_checkout.seats integer yes
cancel_at_period_end boolean yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
409 This cannot be done while something else depends on it. The same identifier was already used for a different request. This request is already running. conflict , id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited

POST /v1/billing/free-host

Explicitly select the account's bookable person on Free. Does not cancel a paid subscription.

Operation id
selectFreeHost
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

Field Type Required Notes
host_id string yes Limits: 1 to 64 characters.

Answers

200 Billing status. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
plan string yes Values: free , trial , team .
host_limit integer yes
ends_at string or null yes Limits: format date-time.
trial_available boolean yes
free_host_id string or null yes
active_hosts array of object yes
active_hosts[] object yes
active_hosts[].id string yes
active_hosts[].name string yes
has_subscription boolean yes
has_customer boolean yes
pending_checkout object or null yes
pending_checkout.session_id string or null yes
pending_checkout.interval string or null yes Values: month , year .
pending_checkout.seats integer yes
cancel_at_period_end boolean yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
404 Nothing was found there. not_found
409 The same identifier was already used for a different request. This request is already running. id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited

POST /v1/billing/refresh

Reconcile billing from Stripe's current state.

Operation id
refreshBilling
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

No fields.

Answers

200 Billing status. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
plan string yes Values: free , trial , team .
host_limit integer yes
ends_at string or null yes Limits: format date-time.
trial_available boolean yes
free_host_id string or null yes
active_hosts array of object yes
active_hosts[] object yes
active_hosts[].id string yes
active_hosts[].name string yes
has_subscription boolean yes
has_customer boolean yes
pending_checkout object or null yes
pending_checkout.session_id string or null yes
pending_checkout.interval string or null yes Values: month , year .
pending_checkout.seats integer yes
cancel_at_period_end boolean yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
409 The same identifier was already used for a different request. This request is already running. id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited
503 This environment is not fully set up. A calendar could not be reached. not_configured , provider_unavailable

POST /v1/billing/checkout

Open or resume the account's single Team checkout.

Operation id
createBillingCheckout
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

Field Type Required Notes
interval string yes Values: month , year .
seats integer yes Limits: at least 1.

Answers

200 Stripe-hosted checkout. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
url string yes
session_id string yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
409 This cannot be done while something else depends on it. The same identifier was already used for a different request. This request is already running. conflict , id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited
503 This environment is not fully set up. A calendar could not be reached. not_configured , provider_unavailable

POST /v1/billing/checkout/discard

Discard the exact pending checkout after Stripe confirms expiry, so its choices can be changed safely.

Operation id
discardBillingCheckout
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

Field Type Required Notes
session_id string yes Limits: 1 to 255 characters.

Answers

200 Billing status. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
plan string yes Values: free , trial , team .
host_limit integer yes
ends_at string or null yes Limits: format date-time.
trial_available boolean yes
free_host_id string or null yes
active_hosts array of object yes
active_hosts[] object yes
active_hosts[].id string yes
active_hosts[].name string yes
has_subscription boolean yes
has_customer boolean yes
pending_checkout object or null yes
pending_checkout.session_id string or null yes
pending_checkout.interval string or null yes Values: month , year .
pending_checkout.seats integer yes
cancel_at_period_end boolean yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
409 This cannot be done while something else depends on it. The same identifier was already used for a different request. This request is already running. conflict , id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited
503 This environment is not fully set up. A calendar could not be reached. not_configured , provider_unavailable

POST /v1/billing/portal

Open the account's Stripe billing portal.

Operation id
createBillingPortal
Who can call it
Acts in one account, the one the credential belongs to.
Credentials
session or API key
Permission
billing.manage
Retry key
Required: send an Idempotency-Key header.
Assistant tool
No. Billing changes and hosted payment links require the account owner's explicit action.

Parameters

Name In Type Required Notes
Idempotency-Key header string yes Caller-chosen key for a safe retry. 1 to 255 visible ASCII characters. Limits: pattern ^[\u0020-\u007E]{1,255}$.

Request body application/json, required

No fields.

Answers

200 Stripe-hosted billing portal. application/json

  • Header Idempotency-Replayed: true when this answer was built from the receipt of an earlier attempt.
Field Type Always sent Notes
url string yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
401 Sign in is required. unauthenticated
403 You are not allowed to do that. Choose an account to act in first. forbidden , no_active_account
409 This cannot be done while something else depends on it. The same identifier was already used for a different request. This request is already running. conflict , id_conflict , request_in_progress
415 Send the body as JSON. unsupported_media_type
429 Too many attempts. rate_limited
503 This environment is not fully set up. A calendar could not be reached. not_configured , provider_unavailable

POST /hooks/billing/stripe

Verify and reconcile an Availies Stripe event. Failed processing is retried by Stripe.

Operation id
receiveStripeBillingEvent
Who can call it
Anyone. No sign-in.
Credentials
None needed.

Parameters

Name In Type Required Notes
stripe-signature header string yes Limits: at most 4096 characters.

Request body application/json, required

Field Type Required Notes
id string yes Limits: 1 to 255 characters.
object string no Values: event .
account string or null no
api_version string or null no
created integer no
pending_webhooks integer no
request object or null no
request.id string or null yes
request.idempotency_key string or null yes
type string yes Limits: at most 255 characters.
livemode boolean yes
data object yes
data.object object yes
data.previous_attributes object no

Answers

200 Processed or irrelevant event. application/json

Field Type Always sent Notes
received boolean yes

Refusals

Status Meaning Codes
400 The body is not valid JSON. The request is not valid. invalid_json , invalid_request
403 You are not allowed to do that. forbidden
409 This request is already running. request_in_progress
415 Send the body as JSON. unsupported_media_type
503 This environment is not fully set up. A calendar could not be reached. not_configured , provider_unavailable