Payments Training Hub
System authentication 1 NOW System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements System authentication is the control where one system proves its identity to another system, with no person involved. Step 1 of 6 System authentication 1 NOW System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements System authentication is the control where one system proves its identity to another system, with no person involved. Step 1 of 6
OAuth2 grant types 1 System authentication 2 NOW OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements The authorization code grant is used when a user is present: the user approves the access, and the calling system receives a token that acts on that user's behalf. Step 2 of 6 OAuth2 grant types 1 System authentication 2 NOW OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements The authorization code grant is used when a user is present: the user approves the access, and the calling system receives a token that acts on that user's behalf. Step 2 of 6
Scopes and token lifetimes 1 System authentication 2 OAuth2 grant types 3 NOW Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements Token lifetimes and refresh decide how long a token stays valid and what happens when it expires. Step 3 of 6 Scopes and token lifetimes 1 System authentication 2 OAuth2 grant types 3 NOW Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements Token lifetimes and refresh decide how long a token stays valid and what happens when it expires. Step 3 of 6
Mutual TLS and certificate rotation 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 NOW Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements The certificate is the identity, which means certificate management is security management: the bank must know which certificates are issued, when each one expires, Step 4 of 6 Mutual TLS and certificate rotation 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 NOW Mutual TLS and certificate rotation 5 Worked 6 Failure modes and BA requirements The certificate is the identity, which means certificate management is security management: the bank must know which certificates are issued, when each one expires, Step 4 of 6
Worked example: Friday payroll file 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 NOW Worked 6 Failure modes and BA requirements The file takes ninety minutes to process, so the token expires after the 300th payment. Step 5 of 6 Worked example: Friday payroll file 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 NOW Worked 6 Failure modes and BA requirements The file takes ninety minutes to process, so the token expires after the 300th payment. Step 5 of 6
Failure modes and BA requirements 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 NOW Failure modes and BA requirements Each failure has its own symptom, its own log entry and its own runbook. Step 6 of 6 Failure modes and BA requirements 1 System authentication 2 OAuth2 grant types 3 Scopes and token lifetimes 4 Mutual TLS and certificate rotation 5 Worked 6 NOW Failure modes and BA requirements Each failure has its own symptom, its own log entry and its own runbook. Step 6 of 6

Flow of the explanation in this lesson.

0:00 / 11:22 Step 1 of 6

System authentication: OAuth2 grants, scopes, tokens and certificates

API Banking and Open Banking, Lesson 9 of 9, Narration 11:22, D10 APIs and integration

Sanctions screeningOpen bankingPayment hub

What you will learn

Your objective. By the end of this lesson, you will be able to explain system authentication: OAuth2 grants, scopes, tokens and certificates. System authentication is the control where one system proves its identity to another system, with no person involved.

Why it matters. For a business analyst, product owner or subject matter expert, the test is to state, for every system to system call, which grant type applies, which scopes the token carries, how long the token lives, how it is refreshed, whether mTLS is required, and how certificates are rotated.

Chapter objective: Learner explains API banking and open banking, including consent, authentication, and third-party access, and writes API requirements for a payment initiation use case. Learner demonstrates this skill using realistic banking examples, explaining each step clearly and using correct terminology throughout.

Key learning points

  • System authentication
  • OAuth2 grant types
  • Scopes and token lifetimes
  • Mutual TLS and certificate rotation
  • Worked example: Friday payroll file
  • Failure modes and BA requirements

Key terms

Sanctions screening: Checking payment parties, countries and references against sanctions lists published by governments and international bodies.

Open banking: A system where banks share customer account data and payment services with licensed third parties through secure APIs, with customer consent.

Payment hub: A central system in a bank that receives payment instructions from all channels, validates them, applies screening and routing rules, and sends them to the correct clearing system or correspondent.

API request and response viewer showing System authentication: OAuth2 grants, scopes, tokens and certificates.

Practise this lesson

Exercise

A payroll system must send a 500-supplier file worth 1.2 million pounds every Friday at 16:00. Name the OAuth2 grant, the scopes, the token lifetime policy, and the certificate arrangement, and state what happens when the token expires mid-file.

The payroll system acts for itself, not for a customer. Scopes must follow least privilege. Tokens are short lived and refreshed. Mutual TLS proves the system identity.

  1. What to do. Write the grant, the scopes, the token and refresh policy, and the certificate rotation plan. Then state the recovery when a token expires after 300 of 500 payments are sent.

Correct result. Client credentials grant, because no customer is in the loop. Scopes limited to payment initiation for the payroll account only, no read access to other accounts. Access token lifetime 15 minutes with a refresh token, so a Friday file that takes 90 minutes refreshes six times. Mutual TLS with a certificate rotated every 90 days, the new certificate deployed before the old one expires. If the token expires mid-file, the system refreshes the token and retries only the unsent payments, using idempotency keys so the 300 already sent are never duplicated.

Why. A token that lives all day is a credential that can be stolen and reused all day. A scope that reads every account is a breach waiting for one compromised system. Least privilege and short lifetimes limit the damage.

Check your understanding

Practice question

A scheduled batch system sends payment files every night with no customer present. Which OAuth2 grant should it use?

Takeaway and next step

What to remember

For a business analyst, product owner or subject matter expert, the test is to state, for every system to system call, which grant type applies, which scopes the token carries, how long the token lives, how it is refreshed, whether mTLS is required, and how certificates are rotated.

Call the API described in this lesson with a valid request, then with a missing field, and compare the responses.

Open the API Playground →

Builds on "System design deep dive: payment APIs at scale".

Transcript and full text

Show transcript

System authentication is the control where one system proves its identity to another system, with no person involved. When a corporate treasury system calls a bank API, or when a payment hub calls a sanctions screening service, the receiving system must know which system is calling, whether that system is who it claims to be, and whether it is still trusted. This is different from customer authentication, where a person proves who they are. System authentication uses credentials that belong to a system: a client identifier and secret, or a certificate. If that proof fails, the call is refused, even if the message itself is perfectly formed. Customer authentication is taught in ch26s5 Customer authentication; this lesson covers the system side. OAuth 2.0 is the framework most payment APIs use for system authentication, and the grant type decides how the token is obtained. The client credentials grant is used when no user is present: the calling system presents its client identifier and secret and receives an access token for itself. The authorization code grant is used when a user is present: the user approves the access, and the calling system receives a token that acts on that user's behalf. Choosing the wrong grant is a real design error. A batch treasury system that pays suppliers overnight cannot use the authorization code grant, because no user is awake to approve it. A mobile app that acts for a customer cannot use the client credentials grant, because the token would carry the app's identity instead of the customer's. Scopes decide what a token is allowed to do, and they are the enforcement point for least privilege. A token with the payments:read scope can enquire about a payment but cannot create one. A token with the payments:write scope can create a payment but cannot cancel one unless it also holds the cancellation scope. When a system calls an operation its token does not cover, the API returns 403 Forbidden, which means the caller is authenticated but not allowed. A business analyst must define the scope for every operation in the API, because a scope set too wide lets a compromised system do damage, and a scope set too narrow breaks genuine calls in production. Token lifetimes and refresh decide how long a token stays valid and what happens when it expires. An access token typically lives for minutes or hours, not days, so that a stolen token is useful only briefly. A refresh token lives longer and is used to obtain a new access token without asking the user to authenticate again. The refresh token must be stored securely and rotated on use, because a stolen refresh token is as dangerous as a stolen password. A payment file that takes hours to process must handle token expiry in the middle: the calling system refreshes the token and retries with the same idempotency key, so the payment is not executed twice. Mutual TLS, known as mTLS, is the transport layer proof that both sides are who they claim to be. In ordinary TLS only the server proves its identity with a certificate. In mTLS the client also presents a certificate, so the server knows which system is calling before any application data is exchanged. Many banks require mTLS for open banking and corporate API access, alongside OAuth2. The certificate is the identity, which means certificate management is security management: the bank must know which certificates are issued, when each one expires, and how to revoke one quickly if a system is compromised. Certificate rotation is the operational discipline that keeps mTLS working. Certificates expire, and an expired certificate stops the API call as surely as a wrong password. A bank that forgets to rotate a certificate causes an outage that looks like a system failure but is really an identity failure. Good practice is to rotate certificates well before expiry, to run both the old and the new certificate during a transition window, and to alert on expiry at 90, 30 and 7 days. The runbook must state who rotates the certificate, how the new one is distributed to every calling system, and what happens if a rotation fails on a Friday evening. Worked example. A corporate treasury system pays 500 suppliers every Friday, worth 1.2 million pounds, through the bank API. The system authenticates with the client credentials grant and receives an access token with the payments:write scope, valid for one hour. The file takes ninety minutes to process, so the token expires after the 300th payment. The treasury system uses its refresh token to obtain a new access token and continues, retrying the 301st payment with the same idempotency key so it is not executed twice. If the refresh token had been stolen, the attacker could obtain new access tokens until the refresh token is revoked, which is why refresh tokens are stored in a vault and rotated on every use. Failure modes for system authentication are different from customer authentication failures, and the recovery is different too. An expired certificate causes every call from that system to fail at the transport layer, and the fix is a certificate rotation, not a password reset. A leaked client secret lets an attacker obtain tokens as the system, and the fix is to revoke the secret, issue a new one, and review every token issued with the old secret. A scope error returns 403 Forbidden, and the fix is to correct the scope assignment, not to re-authenticate. Clock skew between systems can make a freshly issued token look expired, and the fix is time synchronisation, not a new token. Each failure has its own symptom, its own log entry and its own runbook. For a business analyst, product owner or subject matter expert, the test is to state, for every system to system call, which grant type applies, which scopes the token carries, how long the token lives, how it is refreshed, whether mTLS is required, and how certificates are rotated. The requirement must name the grant, the scopes, the lifetimes, the rotation runbook and the failure handling for each of those items. A common design error is to specify OAuth2 without specifying the grant, which leaves the implementer to guess. Another is to forget certificate rotation, which turns a security control into a future outage. Last reviewed 7 November 2026.

System authentication is the control where one system proves its identity to another system, with no person involved. When a corporate treasury system calls a bank API, or when a payment hub calls a sanctions screening service, the receiving system must know which system is calling, whether that system is who it claims to be, and whether it is still trusted. This is different from customer authentication, where a person proves who they are. System authentication uses credentials that belong to a system: a client identifier and secret, or a certificate. If that proof fails, the call is refused, even if the message itself is perfectly formed. Customer authentication is taught in ch26s5 Customer authentication; this lesson covers the system side.

OAuth 2.0 is the framework most payment APIs use for system authentication, and the grant type decides how the token is obtained. The client credentials grant is used when no user is present: the calling system presents its client identifier and secret and receives an access token for itself. The authorization code grant is used when a user is present: the user approves the access, and the calling system receives a token that acts on that user's behalf. Choosing the wrong grant is a real design error. A batch treasury system that pays suppliers overnight cannot use the authorization code grant, because no user is awake to approve it. A mobile app that acts for a customer cannot use the client credentials grant, because the token would carry the app's identity instead of the customer's.

Scopes decide what a token is allowed to do, and they are the enforcement point for least privilege. A token with the payments:read scope can enquire about a payment but cannot create one. A token with the payments:write scope can create a payment but cannot cancel one unless it also holds the cancellation scope. When a system calls an operation its token does not cover, the API returns 403 Forbidden, which means the caller is authenticated but not allowed. A business analyst must define the scope for every operation in the API, because a scope set too wide lets a compromised system do damage, and a scope set too narrow breaks genuine calls in production.

Token lifetimes and refresh decide how long a token stays valid and what happens when it expires. An access token typically lives for minutes or hours, not days, so that a stolen token is useful only briefly. A refresh token lives longer and is used to obtain a new access token without asking the user to authenticate again. The refresh token must be stored securely and rotated on use, because a stolen refresh token is as dangerous as a stolen password. A payment file that takes hours to process must handle token expiry in the middle: the calling system refreshes the token and retries with the same idempotency key, so the payment is not executed twice.

Mutual TLS, known as mTLS, is the transport layer proof that both sides are who they claim to be. In ordinary TLS only the server proves its identity with a certificate. In mTLS the client also presents a certificate, so the server knows which system is calling before any application data is exchanged. Many banks require mTLS for open banking and corporate API access, alongside OAuth2. The certificate is the identity, which means certificate management is security management: the bank must know which certificates are issued, when each one expires, and how to revoke one quickly if a system is compromised.

Certificate rotation is the operational discipline that keeps mTLS working. Certificates expire, and an expired certificate stops the API call as surely as a wrong password. A bank that forgets to rotate a certificate causes an outage that looks like a system failure but is really an identity failure. Good practice is to rotate certificates well before expiry, to run both the old and the new certificate during a transition window, and to alert on expiry at 90, 30 and 7 days. The runbook must state who rotates the certificate, how the new one is distributed to every calling system, and what happens if a rotation fails on a Friday evening.

Worked example. A corporate treasury system pays 500 suppliers every Friday, worth 1.2 million pounds, through the bank API. The system authenticates with the client credentials grant and receives an access token with the payments:write scope, valid for one hour. The file takes ninety minutes to process, so the token expires after the 300th payment. The treasury system uses its refresh token to obtain a new access token and continues, retrying the 301st payment with the same idempotency key so it is not executed twice. If the refresh token had been stolen, the attacker could obtain new access tokens until the refresh token is revoked, which is why refresh tokens are stored in a vault and rotated on every use.

Failure modes for system authentication are different from customer authentication failures, and the recovery is different too. An expired certificate causes every call from that system to fail at the transport layer, and the fix is a certificate rotation, not a password reset. A leaked client secret lets an attacker obtain tokens as the system, and the fix is to revoke the secret, issue a new one, and review every token issued with the old secret. A scope error returns 403 Forbidden, and the fix is to correct the scope assignment, not to re-authenticate. Clock skew between systems can make a freshly issued token look expired, and the fix is time synchronisation, not a new token. Each failure has its own symptom, its own log entry and its own runbook.

For a business analyst, product owner or subject matter expert, the test is to state, for every system to system call, which grant type applies, which scopes the token carries, how long the token lives, how it is refreshed, whether mTLS is required, and how certificates are rotated. The requirement must name the grant, the scopes, the lifetimes, the rotation runbook and the failure handling for each of those items. A common design error is to specify OAuth2 without specifying the grant, which leaves the implementer to guess. Another is to forget certificate rotation, which turns a security control into a future outage. Last reviewed 7 November 2026.

Full lesson text (all scenes)

Completing a lesson updates your progress dashboard on the homepage.

Scene timestamps are estimated by allocating the narration text proportionally across the real audio length. The audio playback position is the source of truth: pause freezes the visual, seeking restores the correct scene, replay restarts the scene animation.