curl --request POST \
--url https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation_id": "<string>",
"feature": "self_invoice_portal"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({operation_id: '<string>', feature: 'self_invoice_portal'})
};
fetch('https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate"
payload = {
"operation_id": "<string>",
"feature": "self_invoice_portal"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "c03839fa-20e3-4b56-86ba-d41d92e67f19",
"team_id": "team_example",
"billing_account_id": "account_example",
"effect_scope": "billing_account_shared",
"provider_environment": "sandbox",
"action": "checkout",
"status": "outcome_unknown",
"created_at": 1791500000000,
"updated_at": 1791500000000,
"recovery_available_at": 1791500600000,
"result": null,
"error": {
"code": "billing_result_unconfirmed",
"message": "Read the original operation before retrying",
"retryable": false
},
"resolution": null
},
"timestamp": 1791500000000
}Turn a feature off for a team (pricing v3)
Pricing v3 accounts only (409 features_v3_only), for a feature turned on from the app (409 feature_not_subscribed otherwise). Takes the teamās seat off the usage subscription now, without proration: nothing is refunded and nothing more is charged. The feature stays on until the next cut, which the period already billed covers (result.kind: feature_off, result.ends_at), and gigstack turns it off then. Turning it on again before that only puts the seat back. Repeating it returns the same end. A feature turned on free is off at once (result.ends_at: null). Requires a billing-account administrator.
feature: connect: the item leaves the subscription now and Connect stays on for the whole account until the cut (result.connect.state: ending, result.ends_at); then operating on other teams, creating teams and keys scoped to several teams answer 403. Each team keeps being billed until it is deleted (DELETE /teams/{id} does not need Connect for a billing admin). A Connect turned on by gigstack staff cannot be turned off here (409 feature_not_subscribed).
curl --request POST \
--url https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation_id": "<string>",
"feature": "self_invoice_portal"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({operation_id: '<string>', feature: 'self_invoice_portal'})
};
fetch('https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/teams/{id}/billing/features/deactivate"
payload = {
"operation_id": "<string>",
"feature": "self_invoice_portal"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "c03839fa-20e3-4b56-86ba-d41d92e67f19",
"team_id": "team_example",
"billing_account_id": "account_example",
"effect_scope": "billing_account_shared",
"provider_environment": "sandbox",
"action": "checkout",
"status": "outcome_unknown",
"created_at": 1791500000000,
"updated_at": 1791500000000,
"recovery_available_at": 1791500600000,
"result": null,
"error": {
"code": "billing_result_unconfirmed",
"message": "Read the original operation before retrying",
"retryable": false
},
"resolution": null
},
"timestamp": 1791500000000
}Authorizations
Authentication Method: HTTP Bearer token.
The runtime requires the literal Bearer prefix ā a bare token in the
Authorization header is rejected with 401 unauthorized.
Header Format: Authorization: Bearer YOUR_API_KEY
Your API key is a JWT. Live keys operate on live data (livemode: true);
test keys operate on isolated test data (livemode: false).
Get your key at: app.gigstack.pro/settings?tab=api
Errors: credential failures are answered by the authentication layer with a raw
{ "message": ⦠} body, not the standardized envelope ā 401 for a missing, malformed or
expired token, 403 for a revoked key or a plan without API access. See the Unauthorized
and AuthForbidden responses.
Path Parameters
Body
^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$Catalog key of a paid team feature, e.g. self_invoice_portal, or connect for gigstack Connect on the whole billing account.
^[A-Za-z0-9_-]{1,160}$"self_invoice_portal"