Skip to main content
Every request carries your secret key as a bearer token:
Keys come from the dashboard under Developers → API keys. A key is shown once at creation. Name them, roll them with a grace period, revoke them the moment one leaks.

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:
The hosted API is 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.