The Elements API uses API keys to authenticate requests. You can manage your API keys in the Elements console.

Elements authenticates your API requests using your account’s API keys. Sandbox API keys have the prefix sk_test_ and production API keys have the prefix sk_. If you do not include your key when making an API request, or use one that is incorrect or outdated, Elements returns an authentication error. All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

EnvironmentExample
testsk_test_xxxxxxxxxx
livesk_xxxxxxxxxx

All API endpoints exist in both sandbox and production mode. Objects in one mode cannot be manipulated by objects in the other.

🚧

Use only your test API keys for testing and development. This ensures that you don’t accidentally modify your live data.