Skip to content

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.

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 as https://acme.studio. http://localhost is allowed in Test only.
  • Up to 20 websites.

Server calls with a secret key ignore this list.

  • Test data stays apart from your Live data.
  • Test usage is free and never counts toward your plan’s limits.
  1. Build and test your page with the pk_test_… key. For local work, add http://localhost (with your port) under Test.
  2. Add your real website under Live.
  3. Swap in the pk_live_… key and make one real request.
  • 403 origin_not_allowed. The website sending the request is not on the allowed list for that environment, or the request has no Origin header. Add the address under Allowed websites, in Test and in Live.
  • http://localhost is refused. It is allowed in Test only. Use https:// 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.