Error: livemode_mismatch

A test token was used on a live-mode operation, or vice versa.

livemode_mismatch

HTTP 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_TOKEN environment variable has the wrong value for the target environment.
  • You moved between environments (dev → staging → prod) without updating the token.

What to do

  1. Check the livemode field on recent successful responses from the same environment — it tells you which mode the server is currently processing.
  2. Check your ISA_TOKEN environment variable:
    • Test/staging environments should start with isa_test_
    • Production should start with isa_live_
  3. 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

LanguageException class
TypeScriptIsaLivemodeMismatchError
PythonIsaLivemodeMismatchError
Go*zyins.LivemodeMismatchError
PHPIsa\Sdk\Zyins\Exception\IsaLivemodeMismatchException
C#IsaLivemodeMismatchException

See also