Withdraw a pending plan change
import requests
url = "https://platform.ankra.app/api/v1/org/billing/pending-change"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/pending-change', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/org/billing/pending-change \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"display_name": "<string>",
"free_vcpu_allowance": 123,
"vcpu_rate_hourly": 123,
"annual_discount_pct": 123,
"flat_monthly_cents": 123
},
"stripe_customer_id": "<string>",
"stripe_subscription_id": "<string>",
"billing_cycle": "<string>",
"status": "<string>",
"current_period_start": "2023-11-07T05:31:56Z",
"current_period_end": "2023-11-07T05:31:56Z",
"commitment_start": "2023-11-07T05:31:56Z",
"commitment_end": "2023-11-07T05:31:56Z",
"custom_flat_monthly_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Billing
Withdraw a pending plan change
Drops the pending plan change a cancelled checkout left behind. The caller names the pending plan and cycle it expects, as the plan_name and billing_cycle query parameters or the same fields of a JSON body; when the pending change is no longer that one (a checkout completed elsewhere applied it, or a newer change replaced it) the answer is 409 with reason pending_changed and nothing is dropped. Requires billing.manage, checked against the token’s scopes and then against the member’s role whatever the authorisation rollout state; a token pinned to a project is refused, since billing has no per-project form.
DELETE
/
api
/
v1
/
org
/
billing
/
pending-change
Withdraw a pending plan change
import requests
url = "https://platform.ankra.app/api/v1/org/billing/pending-change"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/pending-change', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/org/billing/pending-change \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"display_name": "<string>",
"free_vcpu_allowance": 123,
"vcpu_rate_hourly": 123,
"annual_discount_pct": 123,
"flat_monthly_cents": 123
},
"stripe_customer_id": "<string>",
"stripe_subscription_id": "<string>",
"billing_cycle": "<string>",
"status": "<string>",
"current_period_start": "2023-11-07T05:31:56Z",
"current_period_end": "2023-11-07T05:31:56Z",
"commitment_start": "2023-11-07T05:31:56Z",
"commitment_end": "2023-11-07T05:31:56Z",
"custom_flat_monthly_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Headers
Response
The subscription