Test and live
The key decides the mode of everything it touches. A Product created with a test key does not exist to a live key; asking for it answers
404, never 403, so a mode mix-up looks like a missing object rather than a hint that it exists elsewhere.
Base URL
Set the API’s base URL explicitly when you construct a client, and put it in the environment next to your key:https://api.elapse.finance. The SDK defaults to it, and an explicit baseUrl is still the one line that keeps your integration honest across SDK versions.
Keep keys on the server
Secret keys authorise everything on your account. Read them from the server environment only. The SDK refuses to construct in a browser, and the API refuses a live key sent from one. The reference on the following pages has a Try it panel that works with a test key from this site; that is the only place a key ever belongs in a browser.Publishable keys
pk_test_ and pk_live_ are what @elapse/react reads a public session with in the browser, and they authorise nothing else. You do not need them for a server integration.