ai-diagrams · Boleto billing systemC4 containers · V1
■  C4 · level 2, containers

Boleto billing system: containers and dependencies

Who uses the billing system, its containers and the systems it depends on, from boleto issuance to settlement through the return file. Each arrow is a numbered relationship with its technology alongside; its purpose is listed under "Relationships". Pix billing, debt protest and credit bureau reporting are outside the diagram.
Billing system · system in focus
person
Business customer
issues boletos and tracks payments
person
Finance analyst
handles duplicate payments and refunds
container · Next.js on Vercel
Business portal
batch issuance and receipts dashboard
container · React
Backoffice
boleto lookup and manual adjustments
container · Node.js on Lambda
Billing API
behind API Gateway; validates the payer and stores the boleto
container · DynamoDB
Billing database
boletos, status and event history
container · Lambda and SQS queue
Return file processor
reads the return file and settles the boleto
external system · CIP
New Billing Platform
boleto registration
external system · partner
Settlement bank
generates the CNAB 240 return file
external system · business customer
Customer webhook
receives the boleto payment notification
external system · another team
Accounting ERP
records the entry for each settlement
1
browser
2
HTTPS · JSON
3
HTTPS · JSON
4
browser
5
HTTPS · JSON
6
HTTPS · certificate
7
DynamoDB API
8
SFTP → S3 → SQS
9
DynamoDB API
10
HTTPS · HMAC
11
EventBridge
Relationships
1
Business customer → Business portal. Issues boletos in batches and tracks receipts.
2
Business customer → Billing API. Direct integration from the customer's system to issue and query boletos.
3
Business portal → Billing API. Sends the issuance request and queries boleto status.
4
Finance analyst → Backoffice. Handles duplicate boleto payments and refunds.
5
Backoffice → Billing API. Uses the same API with the operator role.
6
Billing API → CIP. Registers each boleto before returning its payment code.
7
Billing API → Billing database. Stores the boleto, its status and the issuance event.
8
Settlement bank → Return file processor. Uploads the CNAB 240 file through SFTP to a bucket; the bucket event goes to the processor's queue.
9
Return file processor → Billing database. Settles the boleto and stores the payment event.
10
Return file processor → Customer webhook. Notifies the business customer of each paid boleto, with an HMAC signature.
11
Return file processor → Accounting ERP. Publishes the entry for each settlement as an event.
C4 legend
person
boundary of the system in focus
container: independently running app or service
data container
external system
1relationship, with its technology alongside
ai-diagrams · C4 containers · 2026-11