Subscriptions and payments
Configure Stripe
To configure payments please specify these keys from your Stripe in .env file:
NEXT_PUBLIC_FD_STRIPE_PUBLIC_KEY
FD_STRIPE_SECRET_KEY
Seed additional payment plans
If you are not satisfied with the existing ones, you can seed additional payment plans. Add payment plans in npm-commands/seed-db/index.ts file via the function seedPaymentPlan which accepts SeedPaymentPlanConfig:
const config: SeedPaymentPlanConfig = {
name: paymentPlanNames.launch,
pricingConfigs: [
{
price: 20,
currency: currencySymbols.usd,
billingInterval: billingIntervals.month,
},
{
price: 100,
currency: currencySymbols.usd,
billingInterval: billingIntervals.year,
},
],
};
async function seed() {
try {
await seedDatabase();
await seedPaymentPlan(config); // Add here
logInfo("Database seeded succesfully");
process.exit(0);
} catch (err) {
if (err instanceof Error) console.log("Error seeding database", err);
process.exit(1);
}
}