Cancel a subscription

View as Markdown
Cancels a subscription immediately or at the end of the current billing period.

Authentication

AuthorizationBearer
API key obtained from the Afternoon dashboard

Path parameters

idstringRequiredformat: "cuid"

Request

This endpoint expects an object.
cancel_modeenumRequired

When to cancel: “now” cancels immediately, “end_of_period” cancels at the end of the current billing cycle

Allowed values:
cancel_now_prepaid_refund_policyenumOptional

Applies only when cancel_mode is “now”: refund prorated prepaid fixed fees or skip refunds.

Allowed values:

Response

Subscription canceled
successboolean
subscriptionobject
request_idstring

Errors

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error