Get a secret key
- Sign in to SolvaPay Console. If you don’t have an account, create one.
- Click Developers in the sidebar.
- Under API Keys > Sandbox keys, click Generate sandbox key and copy the key.
- Store it as an environment variable, for example
SOLVAPAY_SECRET_KEY.
Sandbox and production
Sandbox and production use the same base URL. The key prefix selects the environment:
A key only works while your account is in its environment. A new account starts in sandbox, so build and test with a sandbox key. When you go live and switch the account to production in SolvaPay Console, replace the key with a production key. If you switch back to sandbox, switch back to the sandbox key too. A key for the other environment is rejected with
403 (see Authentication errors).
Make your first request
List the products in your account:200 response with a JSON body means your key and base URL are correct. A new account can return an empty list.
The TypeScript SDK uses the same base URL by default and reads the key from SOLVAPAY_SECRET_KEY.
Authentication errors
A
403 body names both environments and the key to use:
Admin MCP Server
The admin MCP Server athttps://mcp.solvapay.com/mcp signs you in with OAuth, so you don’t need a key to connect it. OAuth sessions use the environment your account is in. The server also accepts these secret keys as Authorization: Bearer <secret key> for clients that can’t open a browser. The same rule applies there: the key must match the account’s current environment.