When developing and integrating Snipcart into your website, it's essential to familiarize yourself with the Test and Live environments. This section will guide you through their distinct characteristics, their capabilities, and their constraints.
When you log into your Snipcart dashboard, you'll find a Test/Live toggle situated in the upper portion of the interface.
By default, accounts are set to Test mode. This mode allows you to seamlessly integrate Snipcart into your site and conduct mock transactions.
Both the Test and Live environments are isolated from each other. This means that configurations or changes applied in one environment do not carry over to the other. This setup provides you the freedom to experiment in the Test mode without affecting your live setup or your real customers.
For example, promo codes established in the Test environment will only be functional when using the Test API Key. These codes are entirely separate from the Live environment, ensuring that real-world clients can't mistakenly use them.
When operating in the Test mode, be aware of certain constraints:
- Email Sending Limitations: Emails can only be dispatched to addresses tied to your Snipcart accounts: the emails in the Dashboard's users pages. Note: This restriction is lifted for accounts with an active plan.
- Payment Gateway Integrations: In Test mode, you can integrate custom payment gateways. However, a default test payment method remains constant. All other payment gateway integrations become accessible only in Live mode.
To obtain your Test API Key, sign into the dashboard. Ensure you're in the Test mode. Navigate to Account → API keys to locate your Test API key.
The Test/Live toggle primarily impacts the type of data and configurations you view in the dashboard. It doesn't modify the operational mode of your site directly.
To commence real-world transactions, you'll need to switch your API keys. For a detailed guide on transitioning from testing to live, consult this article.