OneBasket

Cancel a subscription

POST
/subscriptions/subscription/{subscriptionId}/cancel

Requests cancellation of a subscription of the contact in the bearer token. The request has no body.

Only call this when billingSchedule.isUserCancellable is true and canManage is true for the subscription.

After the request succeeds, List subscriptions returns the subscription with the status Cancelled. state.activeUntil is the date until which the contact keeps the benefits of the subscription. Withdraw a cancellation reverses the request.

Authorization

BearerAuth ApiKeyAuth
AuthorizationBearer <token>

In: header

x-api-key<token>

In: header

Path Parameters

subscriptionId*string

The id of a subscription of the contact, from List subscriptions.

Formatuuid

Response Body

application/problem+json

application/problem+json

curl -X POST "https://example.com/subscriptions/subscription/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
Empty