Sign inSign up

openfintechlab/paytrace-payment-processor

By openfintechlab

Updated 2 months ago

PayTrace worker for RabbitMQ payment requests, ISO 20022 conversion, and row status tracking.

Image
0

441

openfintechlab/paytrace-payment-processor repository overview

Repository Overview

paytrace-payment-processor is a PayTrace core service intended to process payment instructions as part of the OpenFintechLab PayTrace platform. It is packaged as a containerized Python/FastAPI service and is designed to participate in the wider PayTrace payment processing ecosystem.

The current repository implementation provides a FastAPI-based service foundation with environment-driven configuration, PostgreSQL startup connectivity, route scaffolding, health/probe endpoints, logging configuration, test scaffolding, and Docker-based runtime packaging.

GitHub Code Repository: https://github.com/openfintechlab/paytrace-payment-processor
Docker Image Repository: openfintechlab/paytrace-payment-processor
Default Branch: main
Visibility: Public
Runtime: Python 3.11+ / FastAPI / Uvicorn
Database: PostgreSQL
Container Port: 8081

Purpose

The payment processor is intended to act as the payment execution and transformation component within the PayTrace platform.

In the target PayTrace architecture, this service is expected to:

  • Consume payment processing requests
  • Validate payment instruction payloads
  • Transform payment instructions into required downstream formats
  • Integrate with ISO 20022 adapter services
  • Record row-level processing status
  • Publish downstream processing events
  • Support audit-friendly payment processing workflows

The current codebase provides the foundational service runtime on which these capabilities can be implemented.

Current Implementation

The repository currently includes:

  • FastAPI application bootstrap
  • Uvicorn-based service runtime
  • Environment variable and .env configuration loading
  • PostgreSQL connection initialization during service startup
  • SQLAlchemy-based database connectivity setup
  • API route registration structure
  • Header validation middleware integration
  • Public health and probe endpoints
  • Dockerfile for containerized deployment
  • uv-based Python dependency management
  • Pytest-based test scaffolding

API Endpoints

The service exposes a configurable context root and versioned API path.

Example route prefix:

/sca/v1

Default endpoints:
GET /sca/v1/
GET /_healthz
GET /_probe

Example checks:
```bash
curl http://localhost:8081/sca/v1/
curl http://localhost:8081/_healthz
curl http://localhost:8081/_probe

Docker Image Usage

This Docker image packages the PayTrace Payment Processor service for local development, testing, and container-based deployment. Example image name:openfintechlab/paytrace-payment-processor Run with Docker

docker run -d \
  --name paytrace-payment-processor \
  -p 8081:8081 \
  -e OFTL_SCA_CONTEXT_ROOT="/sca" \
  -e OFTL_SCA_VERSION="1" \
  -e OFTL_SCA_HOST="0.0.0.0" \
  -e OFTL_SCA_PORT="8081" \
  -e OFTL_LOG_LEVEL="INFO" \
  -e OFTL_POSTGRESDB_USERNAME="admin" \
  -e OFTL_POSTGRESDB_PASSWORD="[CHANGE_ME]" \
  -e OFTL_POSTGRESDB_HOST="host.docker.internal" \
  -e OFTL_POSTGRESDB_PORT="5432" \
  -e OFTL_POSTGRESDB_NAME="paytrace" \
  openfintechlab/paytrace-payment-processor:latest

Alternatively, run the container using an environment file:

docker run -d \
  --name paytrace-payment-processor \
  -p 8081:8081 \
  --env-file .env \
  openfintechlab/paytrace-payment-processor:latest

Role in PayTrace Architecture

paytrace-payment-processor is part of the PayTrace microservices architecture and is intended to work with other PayTrace services, including:

  • paytrace-file-ingest
  • paytrace-orchestrator
  • paytrace-adapter-iso20022
  • RabbitMQ
  • PostgreSQL
  • Keycloak

Deployment Context

This image is intended to be deployed as part of the PayTrace platform stack. It can be used in local Docker Compose environments and later extended for Kubernetes or cloud-native deployment models. Recommended supporting services:

  • PostgreSQL for payment processing status and persistence
  • RabbitMQ for asynchronous payment processing events
  • Keycloak for identity and access management
  • PayTrace orchestrator for Saga coordination
  • ISO 20022 adapter for payment message transformation and downstream integration

Current Status

The repository currently provides the service foundation and runtime scaffolding for the PayTrace Payment Processor. Payment-specific processing logic such as RabbitMQ consumption, ISO 20022 transformation, adapter posting, row status update logic, and downstream event publishing should be implemented on top of the current FastAPI service structure.

About PayTrace

PayTrace is an open-source payment processing initiative by OpenFintechLab. It focuses on modern, containerized, API-first, and event-driven payment processing components for file-based and message-based payment workflows.

About OpenFintechLab

OpenFintechLab builds open-source financial technology components focused on payment processing, banking integration, automation, and modern financial platform engineering.

Tag summary

Content type

Image

Digest

sha256:d2725ec6f

Size

61.2 MB

Last updated

2 months ago

docker pull openfintechlab/paytrace-payment-processor