INTRODUCTION: THE SUM OF ALL PAYMENT COMPONENTS
You have now completed the entire Module 6. We have traversed the complete payment initiation journey—from the PSU clicking “Pay” (Lesson 6.1), through payee verification (Lesson 6.2), to VRP sweeping (Lessons 6.3 and 6.5), to idempotent submission and settlement reporting (Lessons 6.4 and 6.6), and finally to status queries and reversals (Lesson 6.7). Each component has been formalised mathematically, with exact latency budgets, probability models, and failure recovery mechanisms.
This capstone lesson synthesises all components into a single, unified framework. We will reconstruct the complete end‑to‑end payment flow, overlaying all security controls, statuses, and latency contributions. We will derive the total payment latency (from click to final confirmation) as a function of the clearing system (Pix: 4.2s, SEPA: 6.1s). We will formalise the Regulatory Evidence Bundle—the set of artifacts that the ASPSP must retain to prove compliance with PSD2 Article 66 (PISP obligations) and the CMA Order 2017 (VRP obligations). We will also conduct a final risk assessment, quantifying the probability of a catastrophic payment failure (e.g., double debit, misdirected payment, consent theft) using a Bayesian Network, and proving that the overall system has a failure rate of < 0.01%.
Finally, we will map the entire Module 6 to the specific regulatory articles, providing the certified practitioner with a compliance checklist that can be presented to the CMA, EBA, or BCB during an audit.
LEARNING OBJECTIVES
-
Reconstruct the Complete End‑to‑End Payment Flow—sequencing all 12 stages from the PSU clicking “Pay” to the final
camt.054settlement confirmation, and annotating each stage with its security control (SCA, dynamic linking, CBPII, idempotency), its status, and its latency (p95). -
Calculate the Total Payment Latency—summing the latencies of all 12 stages for Pix (4.2s) and SEPA (6.1s), and proving that the system meets the PSD2 “immediate execution” requirement (≤ 10 seconds).
-
Formalize the Regulatory Evidence Bundle for Payments—defining the
Payment_Audit_Recordtuple:{ ConsentID, PaymentID, SCA_Challenge_HMAC, CBPII_Result, Idempotency_Key, Payment_Status_History, Settlement_Confirmation_Hash }, and storing this in a tamper‑evident log (hash chain) for 7 years. -
Conduct a Probabilistic Risk Assessment—constructing a Bayesian Network that models the dependencies between payment failure modes (SCA timeout, fraud detection, clearing rejection, webhook failure), and deriving the overall probability of a catastrophic payment failure (< 0.01%).
-
Map Module 6 to Regulatory Articles—creating a matrix that maps each component (PISP consent, CBPII, VRP, idempotency, settlement reporting) to PSD2 Articles 66–67, CMA Order 2017 Articles 14 and 58, and the EBA RTS on SCA.
-
Design the Compliance Evidence Bundle—providing the exact JSON structures for the audit log entries, including the hashes of the consent record, the payment submission, and the
camt.054settlement report, which can be presented to a regulator on demand.
PART 1: THE COMPLETE END‑TO‑END PAYMENT FLOW — 12 Stages of Payment
The payment flow is a sequence of 12 stages, starting from the PSU clicking “Pay” to the final settlement confirmation.
+-----------------------------------------------------------------------+ | COMPLETE END‑TO‑END PAYMENT FLOW — 12 STAGES | +-----------------------------------------------------------------------+ | | | Stage 1: PSU Initiates Payment | | +------------------------------------------------------------------+ | | | • The PSU clicks "Pay" on the TPP's app. | | | | • Status: Initiated (TPP internal). | | | | • Latency: N/A (human interaction). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 2: CBPII Payee Verification (Optional) | | +------------------------------------------------------------------+ | | | • TPP calls CBPII (POST /funds-confirmation-consents). | | | | • PSU authorises (no SCA). | | | | • TPP submits confirmation request (POST /funds-confirmations). | | | | • Status: Match / PartialMatch / NoMatch. | | | | • Latency: 120ms (as per Lesson 6.2). | | | | • Failure: NoMatch → TPP prompts PSU to verify payee. | | | +------------------------------------------------------------------+ | | | | | v | | Stage 3: Create Payment Consent | | +------------------------------------------------------------------+ | | | • TPP calls POST /domestic-payment-consents. | | | | • ASPSP returns ConsentId and redirects PSU to SCA. | | | | • Status: AwaitingAuthorisation. | | | | • Latency: 50ms. | | | +------------------------------------------------------------------+ | | | | | v | | Stage 4: PSU Authenticates with SCA (Dynamic Linking) | | +------------------------------------------------------------------+ | | | • PSU performs SCA (OTP / biometric). | | | | • The SCA challenge is dynamically linked to the payment | | | | details (amount, payee) via HMAC-SHA256. | | | | • Status: Authorised. | | | | • Latency: 3-5s (human). | | | | • Failure: SCA timeout (30s) → Consent Rejected. | | | +------------------------------------------------------------------+ | | | | | v | | Stage 5: Submit Payment | | +------------------------------------------------------------------+ | | | • TPP calls POST /payments with x-idempotency-key. | | | | • ASPSP validates idempotency (Redis atomic). | | | | • Status: AcceptedSettlementInProcess. | | | | • Latency: 20ms. | | | | • Failure: Idempotency conflict (409) → TPP fetches existing. | | | +------------------------------------------------------------------+ | | | | | v | | Stage 6: ASPSP Validates Payment | | +------------------------------------------------------------------+ | | | • ASPSP checks balance, fraud risk score, and consent validity. | | | | • If balance insufficient, payment is Rejected. | | | | • Status: Pending → Accepted or Rejected. | | | | • Latency: 50ms (fraud check). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 7: Send to Clearing House | | +------------------------------------------------------------------+ | | | • ASPSP submits payment to clearing house (Faster Payments, | | | | SEPA, Pix). | | | | • Status: AcceptedSettlementInProcess. | | | | • Latency: 20ms (network). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 8: Clearing House Processes Payment | | +------------------------------------------------------------------+ | | | • Clearing house processes the payment. | | | | • Status: ACSP (ISO 20022). | | | | • Latency: 0.5s (Faster Payments), 2s (SEPA), 0.1s (Pix). | | | | • Failure: Clearing rejects (RJCT) → Rejected. | | | +------------------------------------------------------------------+ | | | | | v | | Stage 9: Settlement Confirmation (camt.054) | | +------------------------------------------------------------------+ | | | • Clearing house sends camt.054 report to ASPSP. | | | | • ASPSP parses report, updates payment status. | | | | • Status: AcceptedSettlementCompleted (ACSC). | | | | • Latency: 50ms (report parsing). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 10: Webhook Notification to TPP | | +------------------------------------------------------------------+ | | | • ASPSP sends webhook to TPP with new status. | | | | • TPP updates its database. | | | | • Latency: 80ms (HTTP POST). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 11: TPP Updates UI | | +------------------------------------------------------------------+ | | | • TPP's frontend updates to show "Payment Completed". | | | | • Latency: 50ms (UI render). | | | +------------------------------------------------------------------+ | | | | | v | | Stage 12: Reconciliation Report (camt.054) | | +------------------------------------------------------------------+ | | | • ASPSP includes payment in next batch report (camt.054). | | | | • TPP reconciles its records with the ASPSP report. | | | | • Latency: 24h (batch). | | | +------------------------------------------------------------------+ | | | +-----------------------------------------------------------------------+
PART 2: TOTAL PAYMENT LATENCY CALCULUS
We sum the latencies of the 12 stages. For Pix (Brazil), Faster Payments (UK), and SEPA (EU).
| Stage | Pix (ms) | Faster Payments (ms) | SEPA (ms) |
|---|---|---|---|
| 1. PSU Initiation | N/A | N/A | N/A |
| 2. CBPII (optional) | 120 | 120 | 120 |
| 3. Consent Creation | 50 | 50 | 50 |
| 4. SCA (Human) | 4,000 | 4,000 | 4,000 |
| 5. Payment Submission | 20 | 20 | 20 |
| 6. ASPSP Validation | 50 | 50 | 50 |
| 7. Send to Clearing | 20 | 20 | 20 |
| 8. Clearing Process | 100 | 500 | 2,000 |
| 9. Settlement Confirmation | 50 | 50 | 50 |
| 10. Webhook Notification | 80 | 80 | 80 |
| 11. TPP UI Update | 50 | 50 | 50 |
| 12. Reconciliation (batch) | N/A | N/A | N/A |
| Total (p95) | 4,540ms (4.5s) | 4,940ms (4.9s) | 6,440ms (6.4s) |
Conclusion: The p95 latency ranges from 4.5s (Pix) to 6.4s (SEPA). All are well under the PSD2 “immediate execution” guidance (which the EBA interprets as ≤ 10 seconds).
PART 3: THE REGULATORY EVIDENCE BUNDLE FOR PAYMENTS
The ASPSP must retain a comprehensive audit trail for each payment, sufficient to prove compliance with PSD2 and CMA regulations. The evidence bundle contains the following artifacts:
3.1 The Payment Audit Record (Hash Chain Entry)
{ "audit_id": "audit-123", "timestamp": "2026-08-03T14:30:00Z", "payment_id": "pay-456", "consent_id": "pc-abc-123", "idempotency_key_hash": "sha256(pay-001-unique)", "sca_challenge_hash": "sha256(HMAC-SHA256(amount, payee, nonce, K_Device))", "cbpii_result": "Match", "cbpii_timestamp": "2026-08-03T14:29:50Z", "submission_timestamp": "2026-08-03T14:30:00Z", "clearing_status_history": [ { "status": "ACSP", "timestamp": "2026-08-03T14:30:20Z" }, { "status": "ACSC", "timestamp": "2026-08-03T14:30:40Z" } ], "camt_054_hash": "sha256(camt054_xml_string)", "webhook_delivery_status": "Success", "webhook_delivery_timestamp": "2026-08-03T14:30:45Z", "reconciliation_status": "Verified" }
3.2 The Tamper‑Evident Hash Chain
Each audit record is appended to a hash chain (as defined in Module 4, Lesson 4.7). The chain is stored in a WORM (Write Once Read Many) storage system, and the current chain head is published to the regulator.
The Chain Proof:Chain_Head = SHA256(Chain_Head_Prev || Audit_Record)
The regulator can verify the chain’s integrity by recomputing the hashes.
PART 4: PROBABILISTIC RISK ASSESSMENT — The Bayesian Network
We model the dependencies between payment failure modes using a Bayesian Network.
+-----------------------------------------------------------------------+ | PAYMENT RISK ASSESSMENT — BAYESIAN NETWORK | +-----------------------------------------------------------------------+ | | | Nodes: | | - SCA_Timeout (ST): 0.005 | | - Insufficient_Funds (IF): 0.001 | | - Clearing_Rejection (CR): 0.001 | | - Webhook_Failure (WF): 0.001 | | - Fraud_Detection (FD): 0.0001 | | | | Dependencies: | | - Payment_Failure = ST OR IF OR CR OR WF OR FD | | | | Calculation (assuming independence, worst-case): | | P(Failure) = 1 - (1-0.005) × (1-0.001) × (1-0.001) × (1-0.001) | | × (1-0.0001) | | = 1 - 0.995 × 0.999 × 0.999 × 0.999 × 0.9999 | | ≈ 0.00799 ≈ 0.8%. | | | | The overall payment success rate is approximately 99.2%. | | The catastrophic failure rate (double debit, misdirection) is | | < 0.01% (thanks to idempotency and CBPII). | | | +-----------------------------------------------------------------------+
Conclusion: The payment system has a 99.2% overall success rate, with catastrophic failures occurring in < 0.01% of cases.
PART 5: REGULATORY MAPPING — The Compliance Checklist
| Module 6 Component | Regulatory Article | How It Satisfies Compliance |
|---|---|---|
| PISP Consent Creation | PSD2 Art. 66 | The PISP obtains explicit consent from the PSU before initiating a payment. |
| SCA Dynamic Linking | RTS Art. 5 | The SCA challenge is cryptographically bound to the payment details, preventing tampering. |
| CBPII Payee Verification | PSD2 Art. 66(2) | The payee’s name is verified before payment, reducing misdirection risk. |
| VRP Consent | CMA Order 2017 Art. 14 | The VRP API enables automated sweeping, as mandated by the CMA. |
| VRP 90-Day Re‑Authorisation | CMA Order 2017 | The PSU must re‑authorise the VRP consent every 90 days, ensuring ongoing awareness. |
| Idempotent Payment Submission | PSD2 Art. 66 | The idempotency key prevents duplicate payments, ensuring the PSU is never debited twice. |
| Payment Status Queries | OBIE v4.0 | The TPP can query the payment status in real time, providing transparency to the PSU. |
| Webhook Notifications | OBIE v4.0 | The TPP receives real‑time status updates, reducing the need for inefficient polling. |
| Settlement Reporting (camt.054) | ISO 20022 | The ASPSP provides a formal settlement confirmation, providing audit trail finality. |
| Payment Reversal Management | EBA Guidelines | The ASPSP provides a reversal flow to correct fraudulent or erroneous payments. |
PART 6: THE COMPLIANCE EVIDENCE BUNDLE — What to Present to the Regulator
During an audit, the certified practitioner must present the following:
-
Consent Audit Log: A tamper‑evident log of all consent creations, including the SCA challenge hashes.
-
Payment Audit Log: A log of all payment submissions, including the idempotency keys and the status history.
-
CBPII Verification Log: A log of all CBPII requests, including the fuzzy matching results.
-
VRP Consent Log: A log of all VRP consents, including the 90‑day re‑authorisation dates.
-
Reconciliation Reports: The daily
camt.054reports and the reconciliation exception reports. -
Failure Recovery Logs: A log of all payment failures and the recovery actions taken.
The regulator can verify the integrity of these logs by checking the hash chain and comparing the audit records with the API access logs.
CLOSING — THE PAYMENT MASTERY
You have now completed Module 6: Payment Initiation and Fund Confirmation Services. You are certified to:
-
Implement the PISP payment consent and submission flows (OBIE v4.0).
-
Integrate the CBPII payee verification service (PSD2 Art. 66(2)).
-
Build the VRP consent and sweeping engine (CMA Order 2017).
-
Ensure idempotent payment submission (x-idempotency-key).
-
Map ISO 20022 statuses (camt.054) to OBIE payment statuses.
-
Implement payment status queries (GET /payments/{id}) and webhook notifications.
-
Manage payment reversals with explicit PSU consent.
-
Present the complete regulatory evidence bundle to the CMA, EBA, or BCB.
The Final Number: The payment system has a p95 latency of 4.5s (Pix) to 6.4s (SEPA) , an overall success rate of 99.2%, and a catastrophic failure rate of < 0.01%. The system meets all regulatory requirements and is production‑ready.