Error: livemode_mismatch
A test token was used on a live-mode operation, or vice versa.
livemode_mismatch
livemode_mismatchHTTP status: 403
Your token prefix doesn't match the operation's environment. You're using a test token (isa_test_*) on a live operation, or a live token (isa_live_*) on a test operation.
Why this happens
- You used a live token in test, or a test token in production.
- Your
ISA_TOKENenvironment variable has the wrong value for the target environment. - You moved between environments (dev → staging → prod) without updating the token.
What to do
- Check the
livemodefield on recent successful responses from the same environment — it tells you which mode the server is currently processing. - Check your
ISA_TOKENenvironment variable:- Test/staging environments should start with
isa_test_ - Production should start with
isa_live_
- Test/staging environments should start with
- Update the environment variable and redeploy.
Example response
{
"type": "https://zyins.isaapi.com/errors/livemode-mismatch",
"title": "Livemode mismatch",
"status": 403,
"detail": "A test token cannot be used for live-mode operations. Set ISA_TOKEN to your isa_live_* credential.",
"code": "livemode_mismatch",
"advice_code": "use_live_token",
"param": null,
"request_id": "req_01HZK2N5GQR9T8X4B6FJW3Y1AS"
}SDK exceptions
| Language | Exception class |
|---|---|
| TypeScript | IsaLivemodeMismatchError |
| Python | IsaLivemodeMismatchError |
| Go | *zyins.LivemodeMismatchError |
| PHP | Isa\Sdk\Zyins\Exception\IsaLivemodeMismatchException |
| C# | IsaLivemodeMismatchException |
See also
Updated about 10 hours ago