Error: "Your request was made in live mode but you are using a test card" – how to switch to test mode
Problem Statement
This error appears when you use a test card on the Live site. Use the Test site with the gateway sandbox for test cards, and the Live site only with live cards.
Related Scenarios
- Accessing Chargebee Test and Live sites.
- Accessing Stripe (or other gateway) sandbox and live accounts.
Solution
Chargebee provides a Test site (sandbox) that mirrors your Live site so you can configure settings and test flows with test cards. Use the Test site for test cards; use the Live site only with live gateway and live cards.
To open your Test site, click your account name (top left), then Go to TEST site. You can also see other sites you have access to from there.
If you do not see Go to TEST site, you may not have access. Ask your account owner or admin to invite you to the Test site. See How to add users to your account for more.
Gateway test mode: Payment gateways typically offer sandbox and live environments. Connect your Chargebee Test site to the gateway's test or sandbox mode (for example, Stripe's Test/Live toggle). Use test cards only when the gateway is in test mode and the Chargebee site is the Test site.