Cancel at the period’s end
const url = 'https://beta-api.plune.ai/v1/billing/subscription/cancel';const options = {method: 'POST', headers: {cookie: 'plune_session=<plune_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/billing/subscription/cancel \ --cookie plune_session=<plune_session>The paid period stays; nothing more is charged, and the tier goes to its grace when the period ends (ADR 0081 §6). An open renewal link is made unpayable at the bank; one paid anyway extends the paid period and keeps the cancel. Monopay ends its renewals; Paddle is told to cancel at the period end (effective_from: next_billing_period). The session alone, the owner’s alone for a company.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Team: a company the caller owns. Absent: the caller’s own account (Personal).
Responses
Section titled “ Responses ”The subscription, now cancelling
object
object
Another period, from the next one
Fewer seats, from the next period
Seats added mid-period: owed on top of the next charge, in US cents (0 when nothing)
When the owner cancelled at the period’s end
The latest failed renewal payment not followed by a payment (Monopay: of an invoice still unpaid; Paddle: transaction.payment_failed)
A refund that ended it: Free limits at once
object
Monopay: the link to pay for the next period, while it lives
Where the receipt is: Paddle’s customer portal page of the subscription (its past payments), for the owner; a short-lived link, never stored; null when the provider gives none
Where the card is changed: Paddle’s customer portal with the payment method form open, for the owner; a short-lived link, never stored; null when the provider gives none
Example
{ "subscription": { "provider": "paddle", "tier": "personal", "period": "month", "status": "active", "nextPeriod": "month" }}No / invalid session
An API token (session_required), or a member of the company who is not its owner (owner_only)
object
Example generated
{ "error": "example"}A company the caller is not in
object
Example generated
{ "error": "example"}No active subscription whose period has not passed (nothing_to_cancel), or it changed meanwhile (conflict)
object
Example generated
{ "error": "example"}The payment provider refused the change (provider_error); nothing of ours changed
object
Example generated
{ "error": "example"}The provider’s variables are not set on this server (provider_not_configured), or it could not be reached (provider_unreachable) - try again
object
Example generated
{ "error": "example"}