billing
15 operations
GET/v1/billing
Plan, subscription, usage, credits, spend cap, add-ons, invoices and agency billing.
/v1/billingAuthentication: Dashboard session
Response 200
| Name | Type | Description |
|---|---|---|
summaryrequired | object | |
summary.planrequired | enum | Values none | open_source | indie | startup | growth | managed | agency | enterprise |
summary.subscription_statusrequired | enum | Values none | trialing | active | past_due | canceled | incomplete | lifetime |
summary.trial_ends_atrequired | string (date-time) | |
summary.current_period_startrequired | string (date-time) | |
summary.current_period_endrequired | string (date-time) | |
summary.cancel_at_period_endrequired | boolean | |
summary.has_payment_methodrequired | boolean | |
summary.workspacesrequired | object | |
summary.workspaces.usedrequired | integer | |
summary.workspaces.includedrequired | integer | |
summary.workspaces.extrarequired | integer | |
summary.workspaces.extra_price_usdrequired | number | |
summary.ticketsrequired | object | |
summary.tickets.used_this_periodrequired | integer | |
summary.tickets.limit_per_workspacerequired | integer | |
summary.fixesrequired | object | |
summary.fixes.included_per_monthrequired | integer | |
summary.fixes.used_this_periodrequired | integer | |
summary.fixes.credits_remainingrequired | integer | |
summary.fixes.overage_enabledrequired | boolean | |
summary.fixes.overage_price_usdrequired | number | |
summary.credits_by_sourcerequired | array of object | |
summary.credits_by_source[].sourcerequired | enum | Values plan | referral | review | case_study | sponsored | topup |
summary.credits_by_source[].fixes_remainingrequired | integer | |
summary.credits_by_source[].next_expiry_atrequired | string (date-time) | |
summary.spendrequired | object | |
summary.spend.cap_usdrequired | number | |
summary.spend.spent_this_period_usdrequired | number | |
summary.spend.alert_ratiorequired | number | |
summary.spend.alert_sentrequired | boolean | |
summary.spend.blockedrequired | boolean | |
summary.addonsrequired | object | |
summary.addons.badge_removalrequired | boolean | |
summary.addons.managed_workspacesrequired | integer | |
payments_enabledrequired | boolean | |
has_subscriptionrequired | boolean | |
subscription_statusrequired | enum | Values none | trialing | active | past_due | canceled | incomplete | lifetime |
trialrequired | object | |
trial.ends_atrequired | string (date-time) | |
trial.days_leftrequired | integer | |
trial.fixesrequired | integer | |
past_duerequired | boolean | |
trial_availablerequired | boolean | |
plansrequired | array of object | |
plans[].idrequired | enum | Values none | open_source | indie | startup | growth | managed | agency | enterprise |
plans[].namerequired | string | |
plans[].price_monthly_usdrequired | number | |
plans[].trial_daysrequired | integer | |
plans[].trial_fixesrequired | integer | |
plans[].included_fixes_per_monthrequired | integer | |
plans[].tickets_per_monthrequired | integer | |
plans[].repositories_per_workspacerequired | integer | |
plans[].workspaces_includedrequired | integer | |
plans[].extra_workspace_price_usdrequired | number | |
plans[].overage_fix_price_usdrequired | number | |
plans[].featuresrequired | array of string | |
plans[].currentrequired | boolean | |
plans[].availablerequired | boolean | |
topups_availablerequired | boolean | |
topup_packsrequired | array of object | |
topup_packs[].idrequired | enum | Values topup_10 | topup_50 | topup_100 |
topup_packs[].fixesrequired | integer | |
topup_packs[].price_usdrequired | number | |
addonsrequired | object | |
addons.badge_removalrequired | object | |
addons.badge_removal.availablerequired | boolean | |
addons.badge_removal.activerequired | boolean | |
addons.badge_removal.price_usdrequired | number | |
usagerequired | object | |
usage.period_startrequired | string (date-time) | |
usage.period_endrequired | string (date-time) | |
usage.ticketsrequired | integer | |
usage.answersrequired | integer | |
usage.fixesrequired | integer | |
usage.overage_fixesrequired | integer | |
usage.overage_usdrequired | number | |
usage.cost_usdrequired | number | |
usage.cost_per_answer_usdrequired | number | |
usage.cost_per_fix_usdrequired | number |
PUT/v1/billing/addons/badge-removal
Adds or removes the badge removal add-on (Managed).
/v1/billing/addons/badge-removalAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
enabledrequired | boolean |
Response 200
The same fields as GET /v1/billing.
POST/v1/billing/cancel
Cancels the subscription at the end of the paid period.
/v1/billing/cancelAuthentication: Dashboard session
Response 200
The same fields as GET /v1/billing.
POST/v1/billing/checkout
Stripe Checkout for a plan: 14-day trial with a card on file (first subscription only).
/v1/billing/checkoutAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
planrequired | enum | Values indie | startup | growth | managed | agency |
Response 200
| Name | Type | Description |
|---|---|---|
urlrequired | string (uri) |
POST/v1/billing/connect/onboarding
Agency: creates the Stripe Connect account if needed and returns its onboarding link.
/v1/billing/connect/onboardingAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
countryrequired | string |
Response 200
| Name | Type | Description |
|---|---|---|
urlrequired | string (uri) |
GET/v1/billing/credits
Fix credit grants with their expiry, and the latest credit movements.
/v1/billing/creditsAuthentication: Dashboard session
Response 200
| Name | Type | Description |
|---|---|---|
balancesrequired | array of object | |
balances[].idrequired | string | |
balances[].org_idrequired | string | |
balances[].workspace_idrequired | string | |
balances[].sourcerequired | enum | Values plan | referral | review | case_study | sponsored | topup |
balances[].granted_fixesrequired | integer | |
balances[].fixes_remainingrequired | integer | |
balances[].granted_atrequired | string (date-time) | |
balances[].expires_atrequired | string (date-time) | |
balances[].referencerequired | string | |
balances[].created_atrequired | string (date-time) | |
ledgerrequired | array of object | |
ledger[].idrequired | string | |
ledger[].org_idrequired | string | |
ledger[].balance_idrequired | string | |
ledger[].sourcerequired | enum | Values plan | referral | review | case_study | sponsored | topup |
ledger[].kindrequired | enum | Values grant | consume | refund | expire | adjust |
ledger[].fixesrequired | integer | |
ledger[].job_idrequired | string | |
ledger[].noterequired | string | |
ledger[].created_atrequired | string (date-time) |
GET/v1/billing/invoices
Invoices of the organization, newest first.
/v1/billing/invoicesAuthentication: Dashboard session
Response 200
| Name | Type | Description |
|---|---|---|
itemsrequired | array of object | |
items[].idrequired | string | |
items[].numberrequired | string | |
items[].statusrequired | string | |
items[].purposerequired | enum | Values subscription | topup | resale | other |
items[].amount_paid_usdrequired | number | |
items[].amount_due_usdrequired | number | |
items[].currencyrequired | string | |
items[].period_startrequired | string (date-time) | |
items[].period_endrequired | string (date-time) | |
items[].paid_atrequired | string (date-time) | |
items[].hosted_invoice_urlrequired | string | |
items[].created_atrequired | string (date-time) |
POST/v1/billing/open-source
Puts an organization without a plan on the free Open Source plan (public repositories only); audited.
/v1/billing/open-sourceAuthentication: Dashboard session
Response 200
The same fields as GET /v1/billing.
PUT/v1/billing/overage
Turns paid fixes beyond every credit on or off.
/v1/billing/overageAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
enabledrequired | boolean |
Response 200
The same fields as GET /v1/billing.
POST/v1/billing/plan
Switches the plan of the current subscription in the app (prorated).
/v1/billing/planAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
planrequired | enum | Values indie | startup | growth | managed | agency |
Response 200
The same fields as GET /v1/billing.
POST/v1/billing/portal
Stripe Customer Portal: payment methods, invoices, billing details, cancellation.
/v1/billing/portalAuthentication: Dashboard session
Response 200
| Name | Type | Description |
|---|---|---|
urlrequired | string (uri) |
PUT/v1/billing/spend-cap
Sets or removes the monthly spend cap (alert at 80 %, jobs blocked at 100 %).
/v1/billing/spend-capAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
cap_usdrequired | number |
Response 200
The same fields as GET /v1/billing.
POST/v1/billing/topups
Stripe Checkout for a pack of fix credits (one-time payment).
/v1/billing/topupsAuthentication: Dashboard session
Request body
| Name | Type | Description |
|---|---|---|
packrequired | enum | Values topup_10 | topup_50 | topup_100 |
Response 200
| Name | Type | Description |
|---|---|---|
urlrequired | string (uri) |
PUT/v1/billing/workspaces/{id}/managed
Agency: turns the Managed add-on of a client workspace on or off.
/v1/billing/workspaces/{id}/managedAuthentication: Dashboard session
Parameters
| Name | Type | Description |
|---|---|---|
idpathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
enabledrequired | boolean |
Response 200
The same fields as GET /v1/billing.
PUT/v1/billing/workspaces/{id}/resale
Agency: the resale price of a client workspace and collection through Stripe Connect.
/v1/billing/workspaces/{id}/resaleAuthentication: Dashboard session
Parameters
| Name | Type | Description |
|---|---|---|
idpathrequired | string |
Request body
| Name | Type | Description |
|---|---|---|
resale_price_usdrequired | number | |
collect_via_connectrequired | boolean | |
client_email | string (email) |
Response 200
The same fields as GET /v1/billing.