Mercari Engineering
Read post

Designing a Credit-Management Microservice for Partner Invoice Payment

Mercari's Merpay team shares how they extracted credit management into a dedicated microservice to support partner invoice payment across multiple products. The post covers four key design decisions: (1) consolidating all credit-domain logic into one service with clear ownership boundaries, (2) decoupling credit granularity from invoicing granularity using aggregation axes in a shared Debt Service, (3) allowing partners to have multiple configurable credit lines under a single hard credit limit, and (4) modeling credit usage as stateful transactions with Authorize/Capture/Cancel phases and configurable reservation policies. The architecture enables new products to plug into the full payment-to-invoicing lifecycle by simply creating a credit line and invoice account, without modifying platform services.

    #microservices#fintech#distributed-systems#domain-driven-design
Yesterday•9m read time•From engineering.mercari.com
Post cover image
Table of contents
IntroductionBackground: How partner invoicing worked previouslyProblem: Why credit management became necessaryDesign: Four key design pointsEnd-to-end view: making the entire platform work as one systemConclusion
91 Impressions
Mercari Engineering's image
Mercari Engineering

Mercari's platform is a resource for developers and technology enthusiasts, offering insights into e...

29 Followers

•

368 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard