Lemon Squeezy's test mode makes it easy to build and test an API integration with dummy data. Let's see how you can utilise test mode to your advantage, and then how to transition to using live mode.
Using the Dashboard and API in Test mode
To help with testing your integration, we have built a Test mode into every store. When you sign up to Lemon Squeezy, your store is in Test mode, and once your store is activated the Live mode gets turned on.
When Test mode is active, your Lemon Squeezy account changes into a test environment competely separate from your live store, with separate products, customers and purchases.
You can easily switch between Test mode and Live mode using the toggle in the bottom left of your admin panel.
Emails sent from Lemon Squeezy when in Test mode will always be sent to the store owner's email address (regardless of the customer email used at checkout). This includes order receipts, subscription notifications, broadcast emails, etc.
We recommend you start building your integration with Lemon Squeezy in Test mode so that you can more easily make dummy purchases, test the API and set up webhooks with a data set separate from your live store. Then when you’re happy that everything is set up correctly, use Live mode API keys and products in your production environment.
Testing the checkout
In test mode you can make test purchases of your products and subscription through your store's checkout. Use the following test card details to make payments:
4242 4242 4242 4242to test a successful payment
4000 0000 0000 9995to test a declined payment
4000 0027 6000 3184to test a payment with 3DS authentication
For the expiration date, use any future date (such as
12/34) and for the CVC, use any 3-digit value.
Test subscription webhooks
In test mode it’s possible to test a full webhook integration. Webhooks are sent for all events just as they are in live mode.
Additionally you can manually simulate individual subscription webhooks from the Lemon Squeezy dashboard.
Read more about testing subscription webhooks.
Go live checklist
When you’re ready to use your live store, make sure you change some of the values in your app. You should switch to live mode in your Lemon Squeezy dashboard and then make sure you have the following set up correctly.
Generate a new live mode API key to connect with the live mode API endpoints. Your test and live mode API keys only work in their respective sides of your store.
Webhooks are also siloed into test or live mode. Make sure you add a webhook in your live store, pointing to a production endpoint in your app.
Any products you create in test mode will not be available in your live store.
However you can easily re-produce your test products in live mode using the helpful "Copy to Live Mode" option.
Note that when a product is copied to live mode it gets a new unique ID and therefore its checkout URLs will not be the same. Make sure you update links wherever you have manually pasted checkout URLs.
Set up your Home page for subscriptions
On your Lemon Squeezy Home page, you see a range of charts. You have the option to change each chart to show different metrics.
If you’re selling subscriptions, we recommend you add some subscription-related charts to your dashboard so you have a better overview of your business.
You can add the following charts:
- New subscriptions
- Subscription renewals revenue
- Monthly recurring revenue (MRR)
- Annual recurring revenue (ARR)
- Subscription churn rate
- Trial conversion rate