Cancel the plan
Cancels the plan at the end of the paid period (the default; POST /billing/plan/resume undoes it until then), or now with atPeriodEnd=false. Answers the plan as it now stands.
DELETE
/
billing
/
plan
Cancel the plan
curl --request DELETE \
--url https://api.streamloop.app/v1/billing/plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.streamloop.app/v1/billing/plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.streamloop.app/v1/billing/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"userErrors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"account": {
"balance": 123,
"catalog": {
"isDefault": true,
"version": "<string>"
},
"creditLimit": 123,
"headroom": 123,
"id": "<string>",
"standing": "OK",
"subscriptionEngine": "INTERNAL",
"uncoveredPerHour": 123,
"autoTopUp": {
"amount": 123,
"cardId": "<string>",
"threshold": 123
},
"catalogVersionUntil": "2023-11-07T05:31:56Z",
"defaultCard": {
"brand": "<string>",
"expMonth": 123,
"expYear": 123,
"id": "<string>",
"isDefault": true,
"last4": "<string>",
"rail": "STRIPE",
"status": "ACTIVE"
},
"plan": {
"cancelAtPeriodEnd": true,
"lines": [
{
"product": {
"key": "<string>",
"price": 123,
"term": "MONTHLY"
},
"quantity": 123,
"quantityAtRenewal": 123,
"total": 123,
"unitPrice": 123
}
],
"monthlyTotal": 123,
"renewalTotal": 123,
"status": "TRIALING",
"term": "MONTHLY",
"renewsAt": "2023-11-07T05:31:56Z",
"trialEndsAt": "2023-11-07T05:31:56Z"
},
"spendCap": 123
},
"plan": {
"cancelAtPeriodEnd": true,
"lines": [
{
"product": {
"key": "<string>",
"price": 123,
"term": "MONTHLY"
},
"quantity": 123,
"quantityAtRenewal": 123,
"total": 123,
"unitPrice": 123
}
],
"monthlyTotal": 123,
"renewalTotal": 123,
"status": "TRIALING",
"term": "MONTHLY",
"renewsAt": "2023-11-07T05:31:56Z",
"trialEndsAt": "2023-11-07T05:31:56Z"
}
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
oauth2bearerAuthapiKey
Headers
Workspace this request operates in — the workspace id (wksp_…) or the organization id, from GET /workspaces. Required with an API key, which carries no workspace (400 WORKSPACE_REQUIRED without it). With an OAuth token it defaults to the workspace the token was issued for. Responds 403 WORKSPACE_FORBIDDEN when the caller is not a current member, rather than falling back to another workspace.
Query Parameters
⌘I
Cancel the plan
curl --request DELETE \
--url https://api.streamloop.app/v1/billing/plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.streamloop.app/v1/billing/plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.streamloop.app/v1/billing/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"userErrors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"account": {
"balance": 123,
"catalog": {
"isDefault": true,
"version": "<string>"
},
"creditLimit": 123,
"headroom": 123,
"id": "<string>",
"standing": "OK",
"subscriptionEngine": "INTERNAL",
"uncoveredPerHour": 123,
"autoTopUp": {
"amount": 123,
"cardId": "<string>",
"threshold": 123
},
"catalogVersionUntil": "2023-11-07T05:31:56Z",
"defaultCard": {
"brand": "<string>",
"expMonth": 123,
"expYear": 123,
"id": "<string>",
"isDefault": true,
"last4": "<string>",
"rail": "STRIPE",
"status": "ACTIVE"
},
"plan": {
"cancelAtPeriodEnd": true,
"lines": [
{
"product": {
"key": "<string>",
"price": 123,
"term": "MONTHLY"
},
"quantity": 123,
"quantityAtRenewal": 123,
"total": 123,
"unitPrice": 123
}
],
"monthlyTotal": 123,
"renewalTotal": 123,
"status": "TRIALING",
"term": "MONTHLY",
"renewsAt": "2023-11-07T05:31:56Z",
"trialEndsAt": "2023-11-07T05:31:56Z"
},
"spendCap": 123
},
"plan": {
"cancelAtPeriodEnd": true,
"lines": [
{
"product": {
"key": "<string>",
"price": 123,
"term": "MONTHLY"
},
"quantity": 123,
"quantityAtRenewal": 123,
"total": 123,
"unitPrice": 123
}
],
"monthlyTotal": 123,
"renewalTotal": 123,
"status": "TRIALING",
"term": "MONTHLY",
"renewsAt": "2023-11-07T05:31:56Z",
"trialEndsAt": "2023-11-07T05:31:56Z"
}
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}