Skip to content

Take back a change waiting at the renewal

DELETE
/orgs/{org}/billing/plan/pending
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.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

Which change was taken back.

Media typeapplication/json
object
undone
required
string
Allowed values: move cancel
Example
{
"undone": "move"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: NOTHING_PENDING CHANGE_IN_PROGRESS PLAN_SETTLING CHANGE_UNCONFIRMED
key
additional properties
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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: PAYMENT_PROVIDER_REFUSED PAYMENT_PROVIDER_UNAVAILABLE
key
additional properties
Example
{
"code": "PAYMENT_PROVIDER_REFUSED"
}

Stripe is not configured.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}

Report a problem with this page