Test and Live
Every project has two environments, Test and Live. Each has its own keys, its own allowed websites and its own data. Use the Test / Live switch in the dashboard to move between them. In Test mode a stripe under the top bar says so.
| Key | Looks like | Where it goes |
|---|---|---|
| Public key | pk_test_… pk_live_… |
In your web page. Locked to your allowed websites. |
| Secret key | sk_test_… sk_live_… |
On your server only. Shown once when created. |
A Test key only ever sees Test data, and a Live key only Live data. Find your keys under API keys, and see API keys for creating, rotating and revoking them.
Allowed websites
Section titled “Allowed websites”A browser request with a public key is accepted only from a website on the list. Anything else is refused with 403 origin_not_allowed, and so is a request with no Origin header.
- The list is per environment, so add your site to both Test and Live.
- Use
https://addresses, such ashttps://acme.studio.http://localhostis allowed in Test only. - Up to 20 websites.
Server calls with a secret key ignore this list.
Test mode
Section titled “Test mode”- Test data stays apart from your Live data.
- Test usage is free and never counts toward your plan’s limits.
Going live
Section titled “Going live”- Build and test your page with the
pk_test_…key. For local work, addhttp://localhost(with your port) under Test. - Add your real website under Live.
- Swap in the
pk_live_…key and make one real request.
If it does not work
Section titled “If it does not work”403 origin_not_allowed. The website sending the request is not on the allowed list for that environment, or the request has noOriginheader. Add the address under Allowed websites, in Test and in Live.http://localhostis refused. It is allowed in Test only. Usehttps://addresses in Live.- The list will not take another website. The limit is 20 websites per environment.
- You see no data after switching to a Live key. A Test key only sees Test data and a Live key only Live data. Check the Test / Live switch matches the key you use.
Still stuck? Write to support@launchwing.io and quote the requestId from the error. See API errors.
Copilot by Launchwing™
Sanish Krishnan Surya, Bangalore, Karnataka, India