Implement your app’s payments and pricing model using Autumn’s API
autumn.config.ts
file. Paste in the code below, or view our config schema to build your own.npx atmn pull
to
pull them into your local config.checkout
function to get Stripe checkout page when the customer wants to purchase the Pro plan, and pass it to your frontend. Once they’ve paid, Autumn will grant them access to the features we defined.
If their payment details are already on file, checkout data (eg, prices) will be returned instead to be displayed to the customer. This lets them confirm their upgrade, downgrade or new purchase.
sk_test_...
in the Autumn
dashboard.attach
function to enable the product (and charge the customer if applicable).
check
for feature access to see if the customer is allowed to send a message.track
a usage event in Autumncustomer
to fetch subscription and usage data.check
function makes an API call to Autumn’s DB to fetch the latest information.