Skip to main content
POST
/
cancel
import { Autumn as autumn } from 'autumn-js'

const response = await autumn.cancel({
customer_id: 'user_123',
product_id: 'lite'
})

Authorizations

Authorization
string
header
required

Use your Autumn Secret Key as the Bearer token.

Body

application/json
customer_id
string
required

Your unique identifier for the customer

product_id
string
required

Product ID to cancel for the customer

entity_id
string

If using entities, the entity to cancel the product for.

cancel_immediately
boolean

Whether to cancel the product immediately. If false, the product will be cancelled at the end of the billing cycle.

Response

200

Product cancelled successfully

I