Kimtuexample
Docs
Try with your repository

Payment Service

service

Collects payments for finalised invoices and reconciles settlements.

Owner
Payments Team
Technology
Go
Runtime
Go 1.22
Surface
11 endpoints · 3 events
kimtu/paymentsdocs/overview.mdb4d7f52last commit 9 hours ago by @skoval
Written by the team in docs/overview.md · rendered by Kimtu, ownership and connections below are generated

Overview

Payment Service attempts collection when an invoice is finalised, talks to the payment provider, and reports the outcome back onto the bus.

Responsibilities

  • Consumes invoice.finalized and schedules collection attempts
  • Calls the external payment provider with idempotency keys
  • Emits payment.settled and payment.failed
  • Stores attempts and settlement records
This repository has no mkdocs.yml, so pages are ordered by folder structure.

Connections

UpstreamPayment ServiceDownstream
ComponentDirectionContract
API GatewayCalled byREST /v1/payments · PaymentAttempt
Event BusConsumesamqp · invoice.finalized
Event BusCallsamqp · payment.settled, payment.failed
Payment ProviderCallsPOST /charges · ChargeRequest, ChargeResult
Postgres · paymentsCallspostgres · PaymentAttempt, Settlement
See the whole system·This neighbourhood on the system map

Published events

events/payment.settled.json
1{
2 "type": "payment.settled",
3 "version": 2,
4 "data": {
5 "payment": "pay_31c8",
6 "invoice": "in_9d41",
7 "amount": 48200,
8 "settled_at": "2026-09-02T11:04:19Z"
9 }
10}

Technology

GoPostgreSQLKafka

Related documentation