Switch Payment Mode

Toggle between one-time payment and subscription modes for your application.

Payment Mode Configuration
Choose between one-time payment and subscription modes for your application.

Code Implementation

TypeScript
const useOneTimePayment = false; 

Implementation Steps

Follow these steps to implement the payment mode in your application.

1

Configure Pricing Page

Go to the src/app/pricing/page.tsx file and implement the pricing page with conditional rendering based on the payment mode.

2

Toggle Payment Mode

Set the useOneTimePayment boolean to true for one-time payment or false for subscription mode. The UI will update automatically based on this value.

3

Use Appropriate Price IDs

For subscription mode, use priceIdMonthly and priceIdAnnually. For one-time payment mode, use priceIdMonthly.

SuperFast - Go From Idea to Revenue in Just Days | Product Hunt