Skip to content
Hardcount
Run it locally
Pre-1.0 · one maintainer · Stripe and cards only · no SDKs (client libraries) yet · no production users yet. Docs describe v0.9.1 (29 Oct 2026) · What’s new →

Cancel a scheduled plan change

DELETE
/v1/subscriptions/{id}/items/{itemID}/pending-change
curl --request DELETE \
--url http://localhost:8080/v1/subscriptions/example/items/example/pending-change \
--header 'Authorization: Bearer <token>'

Cancels the plan change scheduled on an item. Calling it on an item with no scheduled change returns the item unchanged. Sends the subscription.pending_change.canceled webhook event.

If the period has already ended, the change has taken effect and the request answers 409.

id
required
string
itemID
required
string

The item with no pending plan change.

Media typeapplication/json

One priced line of a subscription. It pairs a plan with a quantity.

object
id
required
string
tenant_id
string
subscription_id
required
string
plan_id
required
string
quantity
required
integer format: int64
metadata

The item’s stored metadata. Absent when empty.

object
key
additional properties
any
pending_plan_id

Plan the item moves to at pending_plan_effective_at. Absent when no change is scheduled.

string
pending_plan_effective_at
string format: date-time
plan_changed_at

When the plan was last changed immediately. Absent until the first such change.

string format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example generated

{
"id": "example",
"tenant_id": "example",
"subscription_id": "example",
"plan_id": "example",
"quantity": 1,
"metadata": {},
"pending_plan_id": "example",
"pending_plan_effective_at": "2026-04-15T12:00:00Z",
"plan_changed_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
}

The item is not found or is not on this subscription.

Media typeapplication/json
object
error
object
type

One of invalid_request_error, authentication_error, rate_limit_error or api_error. Every error the API answers has this shape, including an unknown path (404, code route_not_found) and a method the path does not take (405, code method_not_allowed, with an Allow header). The few exceptions are listed in docs/api-surface.md.

string
code
string
message
string
request_id
string
param

The request field the error is about. Sent only when the error names one. A request body may hold only the fields its operation lists, spelled and cased as listed: any other field, or one the server sets (such as id), is refused with 422 and param naming it. An operation with no request body lists no fields: send no body, {} or null. The Stripe and Postmark webhooks and the LiteLLM callback take their sender’s body as it comes.

string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Code invalid_state: the change already took effect when the billing period ended. Code unbilled_period: a billing period ended and could not be invoiced; retry billing first.

Media typeapplication/json
object
error
object
type

One of invalid_request_error, authentication_error, rate_limit_error or api_error. Every error the API answers has this shape, including an unknown path (404, code route_not_found) and a method the path does not take (405, code method_not_allowed, with an Allow header). The few exceptions are listed in docs/api-surface.md.

string
code
string
message
string
request_id
string
param

The request field the error is about. Sent only when the error names one. A request body may hold only the fields its operation lists, spelled and cased as listed: any other field, or one the server sets (such as id), is refused with 422 and param naming it. An operation with no request body lists no fields: send no body, {} or null. The Stripe and Postmark webhooks and the LiteLLM callback take their sender’s body as it comes.

string

Example

{
"error": {
"type": "invalid_request_error"
}
}