Luke a Pro

Luke Sun

Developer & Marketer

đŸ‡ēđŸ‡Ļ
MEXAR Payment Gateway microservice

MEXAR Payment Gateway

production

Jan 2024 — Dec 2025

MicroservicePythonFastAPIPaymentWebhookRemittance

Overview

The payment gateway microservice for MEXAR international remittance system. Handles inbound payment collection by integrating with 3rd party payment providers (Bayarind, Xendit, iPaymu), processing their webhook callbacks, and emitting structured inter-service events via Webhook and Kafka to notify payment status changes. Due to compliance requirements, only Bayarind is active in production.

Tech Stack

  • Backend — Python/FastAPI
  • Database — PostgreSQL
  • Message Queue — Kafka, RabbitMQ
  • Inter-service Communication — Webhook, Kafka

Key Capabilities

  • Multi-provider Integration — Abstract gateway layer supporting Bayarind, Xendit, and iPaymu; provider-agnostic design enables rapid switching as compliance requirements change
  • Webhook Processing — Inbound 3rd party callback handling with structured event emission to core backend via Kafka
  • Payment Status Lifecycle — End-to-end status tracking from payment initiation through provider confirmation

Security

  • IP Whitelist — Restricted webhook callback endpoints to trusted provider IPs
  • Signature Verification — Request signature validation on all inbound provider callbacks
  • SSL/TLS — Enforced encrypted communication with all 3rd party providers

Design Principles

  • Idempotency — Idempotent payment processing ensuring no duplicate charges across distributed callbacks
  • Extensibility — Provider-agnostic gateway abstraction enabling rapid payment partner changes driven by regulatory constraints
  • Scalability — Event-driven architecture via Kafka for reliable high-throughput payment processing

Related Projects

MEXAR Back Office dashboard

MEXAR Back Office

The back office dashboard for MEXAR international remittance system, managing operations, compliance, and transaction monitoring.

DashboardNext.jsMUITailwindCSS +1
MEXAR Backend

MEXAR Backend

The core backend API for MEXAR international remittance system, handling business logic, authentication, and service orchestration.

APIPHPLaravelPostgreSQL +3
MEXAR Messaging microservice

MEXAR Messaging MSA

The messaging microservice for MEXAR, handling SMS notifications and transactional messages.

MicroservicePythonFastAPISMS +2
MEXAR KYC microservice

MEXAR KYC MSA

The KYC (Know Your Customer) microservice for MEXAR, managing identity verification and compliance workflows.

MicroservicePythonFastAPIKYC +2
MEXAR Payout Gateway microservice

MEXAR Payout Gateway

The payout gateway microservice for MEXAR, handling outbound disbursement to remittance recipients.

MicroservicePythonFastAPIPayout +2