Payments

Directories are a wonderful way to earn money, so it comes with afull payment process built-in.

LemonSqueezy

DirectoryFast chose LemonSqueezy over a classic Stripe integration for 1 good reason for us, indiehackers:

As your merchant of record, we handle the tax compliance burden so you can focus on more revenue and less headache.

Setup

  1. Create your store following this guide.

  2. Configure your webhook (allowing LM and your app to be in sync for payments):

    1. Log to your Dashboard > Settings > Webhooks > + Icon

    2. Fill Callback URL (https://your.app/billing/webhook)

    3. Fill Signing Secret (you can use this generator)

    4. Select all the wanted events (eg: order_*** for one-time payments)

    5. Save Webhook

  3. Add the Signing Secret value to LEMONSQUEEZY_WEBHOOK_SECRET in your .env file.

Payment logic

For now, only one-time payments are built-in, subscriptions are planned.

If you want to add your own logic or implement new ways to get paid, you'll find everything in the /app/billing/webhook/route.ts file.

Last updated