Skip to navigation

Cancel or Resume the Subscription

View as Markdown

Set cancelAtPeriodEnd to true to end an active AI Plus or AI Pro subscription at the current period end; a scheduled plan change is dropped. Set it to false to resume the subscription and restore the plan change scheduled before the cancellation. Set paused to false to resume a PAUSED subscription, which Stripe pauses when a trial ends without a payment method: add one first with POST /v1/billing/portal-sessions, since a resume without one is refused; the resumption invoices the plan and starts a new period now. Read the result with GET /v1/billing/subscription.

Authentication

AuthorizationBearer

Your aVenture API key (https://aventure.vc/settings/api-keys) or OAuth access token

Request

This endpoint expects an object.
cancelAtPeriodEndboolean or nullOptional

true ends the subscription at the current period end and drops a scheduled plan change; false resumes it and restores the plan change scheduled before the cancellation. Omit to change nothing.

pausedboolean or nullOptional

false resumes a subscription Stripe paused because its trial ended without a payment method; add one with POST /v1/billing/portal-sessions first. The resumption starts a new billing period now and charges the plan to that card; a declined or authentication-held charge answers 409. true, or cancelAtPeriodEnd in the same request, is refused. Omit to change nothing.

Response

No Content

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error