Payment Orchestrator
PSD3-ready payment routing engine open-source with ISO 20022 and Kafka, licensed under AGPL-3.0.
- Status
- WIP
- License
- AGPL-3.0
- Category
- Financial Technology
- Updated
Project status
Description
Payment Orchestrator is an open-source platform for intelligent payment routing across multiple Payment Service Providers (PSPs), designed for the PSD3 regulatory framework (in force in the EU from 2026+) and optimized for ISO 20022 as an interoperable messaging standard. It solves a concrete problem for European SMEs and fintechs: integrating 5-10 PSPs (Stripe, Adyen, Mollie, Nexi, Worldline, local banking partners) creates vendor lock-in, technical fragility and very high optional costs. Payment Orchestrator centralizes routing: each payment intent is evaluated by a configurable rule engine (by payment method, amount, country, currency, PSP historical success rate) and routed to the optimal PSP, with automatic fallback if the first PSP fails or has too high latency. The architecture is event-driven: Spring Boot 3.4 emits PaymentInitiated, PaymentRouted, PaymentSuccess, PaymentFailed on transactional Kafka topics, with consumers for an immutable audit log (append-only PostgreSQL) and for real-time analytics (TimescaleDB). The messaging model uses ISO 20022 pacs.008/pacs.002 for SEPA Credit Transfer and pain.001 for Customer Credit Transfer Initiation, ensuring interoperability with regulated banking partners. Security is first-class: mTLS to PSPs, HMAC signing on received webhooks, idempotency keys with Redis dedupe to prevent double-charges, full audit trail for regulatory audits (Banca d'Italia, ECB PSP supervision). AGPL-3.0 license to protect the platform from competitive copying (anyone who forks must open-source modifications if they offer the service to third parties). Target deployment: early-stage fintechs, SMEs with €100k-10M/year volume, marketplaces needing multi-PSP routing. The philosophy is 'sovereign payment infrastructure': the routing engine is on-prem, PSP credentials never leave the client's VPS, no SaaS dependency.
Key Features
Rule-Based Routing Engine
Rule DSL configurable (method, amount, country, currency, historical success rate), priority chain with automatic fallback PSP if first PSP fails.
Native ISO 20022 Messaging
pacs.008/pacs.002 for SEPA CT, pain.001 for Customer Credit Transfer, XSD schema validation, interoperability with regulated banking partners.
Event-driven via Kafka
Topic transactional: PaymentInitiated, PaymentRouted, PaymentSuccess, PaymentFailed, idempotency key Redis dedupe, Dead Letter Topic for retry.
Immutable PostgreSQL Audit Log
Concise ledger on PostgreSQL with column encryption, query timeline for audit of Italian Bank, configurable retention for compliance.
MTLS vs PSP
Mutual TLS for all supported PSPs, configurable certificate pinning, automatic cert rotation via Let's Encrypt or Enterprise KMS.
Webhook Signature Verification
HMAC SHA-256 on received webhooks, replay protection with nonce, timestamp validation ± 5 minutes, fail-fast on signature mismatch.
Real-time analytics on TimescaleDB
Time-series on success rate per PSP, latency (P50/P95/P99), conversion rate by payment method, pre-built Grafana dashboard.
OpenAPI 3.1 + SDK Client
OpenAPI 3.1 auto-generated, SDK clients generated for TypeScript, Java, and Python, with integration examples for Stripe, Adyen, Mollie, and Nexi.
Angular + Spring Boot on top of a PostgreSQL database hosted in the cloud via AWS or Google Cloud Platform
- Spring Boot 3.4
- Java 21
- ISO 20022
- Apache Kafka
- PostgreSQL 16
- TimescaleDB
- Redis Stack 7
- OpenAPI 3.1
- Resilience4j
Use cases
- Concise fintech that integrates 3-5 payment service providers (PSPs) and aims to avoid vendor lock-in on a single one.
- PMI EU with €100k-10M annual volume seeks intelligent routing to optimize success rates.
- Marketplace with multiple country vendors requiring local PSPs to reduce cross-border fees
- Regulated PSPs that want to offer white-label orchestration to their enterprise clients
Road Map
- v0.1.0Scheduled
Core: Routing + Kafka + 2 PSPs
- Rule engine routing base with JSON DSL
- Kafka Topic + Producer Transactional
- Integration of Stripe and Mollie as PSP Reference
- PostgreSQL audit log (append-only)
- v0.5.0Scheduled
Webhooks Security: ISO 20022 and Multiple Payment Service Providers Integration
- ISO 20022 payment messages + Payment Initiation Request
- Adyen, Nexi, and Worldline Integrations
- Webhook HMAC Signature Verification
- MTLS for all PSPs
- v1.0.0Scheduled
Analytics and SDK Deployment for Production
- Analytics Time Series Database with Grafana Dashboard
- SDKs generated in TypeScript, Java, and Python
- Full OpenAPI 3.1 + Postman Collection
- Documentation for MkDocs and Deploy Guide Compliance
Who is it for
Quick start
Start the project locally with four commands, requires Docker and GitHub Desktop is not required but a git client like SourceTree or Visual Studio Code's built-in one will do just fine though.
# Quick start (work-in-progress, repo non ancora pubblicato)
# git clone https://github.com/<tba>/payment-orchestrator.git
# cd payment-orchestrator
# cp .env.example .env # configura PSP credentials, Kafka, Redis, PostgreSQL
# docker compose up -d # kafka + redis + postgres + payment-orchestratorContribute to the project
Payment Orchestrator is open source. Open an issue, propose a pull request or leave a star on GitHub: every contribution, no matter how small, is welcome.
- ⭐ Leave a star if it's useful
- 🐛 Report bugs or suggest features via issue
- 🔧 Send a pull request with fixes or improvements
- 📣 Share the project if you find it interesting