First, run the development server:
npm run dev
# or
yarn dev
From any environment you can now make a post request to /api/checkout_sessions with customer_email and price_id to create a checkout session for a subscribtion product with 7 day trial.
An api route to create a custom checkout session with the customer email and price_id creating a subscribtion with 7 days trial
TypeScript
First, run the development server:
npm run dev
# or
yarn dev
From any environment you can now make a post request to /api/checkout_sessions with customer_email and price_id to create a checkout session for a subscribtion product with 7 day trial.