Implementing the Autumn + Convex component
autumn-js
installed, it will need to be version 0.1.24 or higher.convex/convex.config.ts
convex/autumn.ts
identify()
function determines which customer is making the request. You may customise it based on your use case. For example, if organizations are your customers, you should return an organization ID as customerId
. This can help you with
entity billing.identify()
function, you may need to change user.subject
to user.id
depending on your auth provider.AutumnWrapper.tsx
:
<PricingTable/>
The quickest way to get started is to use our <PricingTable/> component:
useCustomer
We also provide a useCustomer
hook which lets you easily access your customer data and interact with the Autumn API directly from your frontend. For example, to upgrade a user:
useCustomer()
and useEntity()
features as you would normally. If you aren’t familiar with these,
you can read more about them here.
checkout
attach
And more!