Take back a change waiting at the renewal
const url = 'https://api.sloose.com/orgs/org_9f3c/billing/plan/pending';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.sloose.com/orgs/org_9f3c/billing/plan/pending \ --header 'Authorization: Bearer <token>'Takes back a move to a lower plan (the schedule is released, and the subscription stays on its plan) or a cancellation (the subscription renews), until the period’s end. Administrators, through their own session; never a staff member’s view.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
Responses
Section titled “Responses”Which change was taken back.
object
Example
{ "undone": "move"}No bearer, or one that is expired, revoked or no longer resolves to a member.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low, it was issued for a different org, it is an API token (SESSION_REQUIRED), or it is a staff member’s view (IMPERSONATION_REFUSED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}NOTHING_PENDING: nothing waits at the renewal. CHANGE_IN_PROGRESS: another change to the org’s plan, or a webhook about it, is being made at this moment. PLAN_SETTLING: the last change, a renewal, or a change made at Stripe is still reaching the org — what Stripe bills and what Sloose has recorded differ — so nothing is decided until they agree; try again in a minute. CHANGE_UNCONFIRMED: Stripe did not answer the release, so the move may have been taken back; the plan as it stands arrives within a minute.
object
Example
{ "code": "NOTHING_PENDING"}Stripe refused the request (PAYMENT_PROVIDER_REFUSED) — nothing was charged, though a step taken before the refusal stands: the org’s first Stripe customer, or an existing customer’s billing email brought up to date — or was unavailable (PAYMENT_PROVIDER_UNAVAILABLE: unreachable, failing or rate-limiting), which may or may not have gone through — check before retrying. Stripe’s own words are logged, not returned.
object
Example
{ "code": "PAYMENT_PROVIDER_REFUSED"}Stripe is not configured.
object
Examplegenerated
{ "error": "example"}