Troubleshooting billing issues in the Next.js Supabase kit
Troubleshoot issues related to billing in the Next.js Supabase SaaS kit
Cannot create a Checkout
This happen in the following cases:
- The environment variables are not set correctly: Please make sure you have set the following environment variables in your
.env
file if locally - or in your hosting provider's dashboard if in production - The plan IDs used are incorrect: Make sure to use the exact plan IDs as they are in the payment provider's dashboard.
The Database is not updated after subscribing to a plan
This may happen if the webhook is not set up correctly. Please make sure you have set up the webhook in the payment provider's dashboard and that the URL is correct.
Common issues include:
- The webhook is not set up correctly: Please make sure you have set up the webhook in the payment provider's dashboard and that the URL is correct.
- The plan IDs used are incorrect: Make sure to use the exact plan IDs as they are in the payment provider's dashboard.
- The environment variables are not set correctly: Please make sure you have set the following environment variables in your
.env
file if locally - or in your hosting provider's dashboard if in production
Locally
If working locally, make sure that:
- Stripe: If using Stripe, that the Stripe CLI is up and running
- Lemon Squeezy: If using Lemon Squeezy, that the webhook set in Lemon Squeezy is correct and that the server is running. Additionally, make sure the proxy is set up correctly if you are testing locally (see the Lemon Squeezy documentation for more information).
Production
If working in production, make sure that:
- The Stripe/Lemon Squeezy webhooks are set up correctly and are being sent to the correct URL. The URL must be publicly accessible. If the URL is not publicly accessible, you will not be able to receive webhooks from Stripe.
- If the webhooks are being sent, please read the logs in your hosting provider to see if there are any errors related to webhooks.
- If after reading the logs, the webhooks are not being sent, please contact support by posting relevant information in the Support Ticket.
When opening a support ticket, please make sure to include:
- The logs being sent from Stripe in the Stripe Dashboard
- The logs in your hosting provider
- Any error messages you may have received