Subscribe to the Non-Human & AI Identity Journal

What breaks when API access under PSD2 is not tightly scoped?

When API access is not tightly scoped, organisations lose clarity on which provider is acting, which customer consent applies, and whether the request matches the approved payment purpose. That weakens fraud detection, auditability, and dispute resolution. In practice, the business then struggles to prove that a transaction was properly authorised.

Why This Matters for Security Teams

PSD2 opens the door to regulated access, but it does not make broad API access safe. If a third party can call payment APIs without tight scoping, security teams lose the ability to prove which provider acted, which consent was in force, and whether the call matched the approved purpose. That creates gaps in fraud detection, audit trails, and dispute handling. NHI Mgmt Group notes that 97% of NHIs carry excessive privileges, which is exactly the pattern that turns “allowed access” into unbounded access in production. See the Ultimate Guide to NHIs and the OWASP Non-Human Identity Top 10 for the broader control problem.

For PSD2, the issue is not just who authenticated, but whether the access token, consent record, and request path are all bound to a specific payment purpose and provider. When those controls drift apart, security and compliance teams end up relying on after-the-fact reconstruction instead of trustworthy enforcement. In practice, many organisations discover this only after a disputed payment, a fraud investigation, or an audit request has already exposed the gap.

How It Works in Practice

Properly scoped PSD2 API access should be narrowly tied to the exact role of the third-party provider, the customer’s consent, and the payment action being requested. That usually means using distinct tokens for different API families, enforcing audience and purpose restrictions, and rejecting requests that do not match the originally approved consent. Current guidance from identity and API governance communities suggests that the safest pattern is least privilege plus runtime validation, not broad reusable access. The Ultimate Guide to NHIs — Key Challenges and Risks is useful here because excessive privilege and poor visibility are the same failure mode that appears in API-led finance integrations.

Operationally, teams should check all of the following before allowing a call:

  • Is the requesting provider the one named in the consent record?
  • Does the token scope match the specific account, payment, or data action?
  • Has consent expired, been revoked, or been narrowed since issuance?
  • Does the request align with the declared payment purpose and transaction context?
  • Can the event be logged in a way that supports non-repudiation and dispute review?

For implementation detail, the OWASP Non-Human Identity Top 10 maps closely to the risks created by long-lived credentials, overbroad scopes, and weak lifecycle controls. The same logic applies to PSD2 gateways: if the access token can be reused outside the intended consent boundary, then the API is functioning like a standing privilege rather than a controlled delegation. These controls tend to break down when consent records, token issuance, and payment execution are owned by different systems because the enforcement point no longer has a complete view of authorisation.

Common Variations and Edge Cases

Tighter scoping often increases integration overhead, requiring organisations to balance frictionless payments against auditability and fraud resistance. That tradeoff becomes more visible in account aggregation, recurring payment flows, and delegated initiation scenarios, where the provider may need more than one permission set over time. Current guidance suggests designing scopes around concrete actions rather than broad account access, but there is no universal standard for how every bank should model downstream purpose binding.

Edge cases usually involve consent reuse, partial authorisation, and mixed API estates where older endpoints cannot express fine-grained permissions. In those environments, teams should treat broad scope as temporary technical debt, not a stable operating model. The 52 NHI Breaches Analysis is a useful reminder that credential misuse becomes harder to detect once access is reusable across systems, especially when service accounts and API keys are not tightly governed. Where institutions support both PSD2 and non-PSD2 payment rails, scope models should be kept separate so that regulatory access does not silently expand into general-purpose API privilege.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 Covers overprivileged machine identities and reused credentials.
NIST CSF 2.0 PR.AC-4 Directly relates to managing access permissions and least privilege.
NIST AI RMF Supports governance for decision traceability and accountability.

Use AI RMF governance principles to ensure consent, purpose, and access decisions are auditable and accountable.