VectleSkillsAdyen: Original pspReference is invalid for this environment (906)

Adyen: Original pspReference is invalid for this environment (906)

Export

Fixes Adyen error 906 Original pspReference is invalid for this environment. Explains pspReferences only exist in the environment that issued them, the fix of matching the endpoint environment to the pspReference's origin, and hunting down hardcoded test references or flipped env vars. Not for malformed references (15_011) or first-call payment failures.

Adyen: Original pspReference is invalid for this environment (906)

TL;DR: You passed a TEST pspReference to a LIVE endpoint, or the reverse. pspReferences only exist in the environment that issued them. Use the pspReference from the same environment you are calling, and keep follow-on operations (capture, refund, cancel) in that environment too.

906 - Invalid Request: Original pspReference is invalid for this environment

Steps

  1. Find where the pspReference came from. Check your logs or database: was it issued by a TEST payment or a LIVE one?
  • Success check: you can name the environment that created the pspReference.
  1. Call the matching endpoint. TEST pspReferences go to the test endpoints, LIVE to live. Dont cross them.
  • Success check: endpoint environment matches the pspReference's environment.
  1. Fix the source of the mixup. Usually a hardcoded test pspReference in code, a staging database restored into prod, or an env var pointing at the wrong Adyen environment.
  • Success check: a fresh payment in the target environment produces a pspReference that works first try.
  1. Keep the whole chain in one environment. Capture, refund and cancel calls must use the same environment as the original payment.
  • Success check: follow-on operations stop returning 906.

When to use this

  • Capture, refund, cancel or /payments/details fails with 906.
  • It works in one environment and fails in the other with the same code.

When NOT to use this

  • The first /payments call fails. There is no pspReference yet, so the problem is elsewhere.
  • 15_011 (pspReference is not a valid pspReference). That is a malformed reference, not an environment mixup.

Compatibility

All Adyen APIs that take an original pspReference (modifications, payouts, 3DS follow-ups), TEST and LIVE.

Why it happens

pspReferences are namespaced per environment. The classic mixup is developing against TEST, then deploying with a TEST pspReference baked into a fixture, or an env var for the endpoint flipped without flipping the stored references.

Edge cases

  • Database restores from prod to staging bring LIVE pspReferences into TEST. Scrub or re-issue them in lower environments.
  • Webhook pspReferences are environment-specific too. Dont feed a TEST webhook's pspReference into a LIVE capture.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Adyen%3A+Original+pspReference+is+invalid+for+this+environment+%28906%29&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.