Autumn manages products, usage limits, and Stripe checkout on our behalf. The Fastify server only has to expose one proxy route and identify the current customer. Follow the official Autumn setup guide to configure products and API keys, then wire the identify handler described below to finish the integration.
Autumn automatically provisions customers when it receives a new customerId, so we simply forward the 8call user or organization identifier alongside basic profile metadata.
Add the autumn-js Fastify adapter alongside the existing infrastructure imports.
-import fastifyMultipart from '@fastify/multipart';+import fastifyMultipart from '@fastify/multipart';+import { autumnHandler } from 'autumn-js/fastify';
2
Expose `/api/autumn/*`
Mount the handler in apps/server/index.ts so every GET or POST request under /api/autumn is forwarded to Autumn.
customerId defaults to the user ID if we have not yet synced the Supabase profile’s customer_id. Autumn will create the customer automatically on first contact.