Santekno
Projects/MVC Chip-In — Subsidized Voucher Filters
Tokopedia logoPart of Tokopedia · Senior Software Engineer, Promotion Team
Backend / APILive

MVC Chip-In — Subsidized Voucher Filters

Designed and shipped chip-in (co-funded subsidy) voucher filters for the merchant voucher platform — a database and dataflow architecture with an async message-queue publisher/consumer across two services, aligned with five cross-functional teams and launched for a major anniversary campaign.

2023-mvc-chipin-filters · main
# E-Commerce / Promotion & Discounts
$ go -X POST /2023-mvc-chipin-filters/v1/sync
→ 201 Created
{ "status": "ok" }
publish 2023-mvc-chipin-filters.synced
Role
Senior Backend Engineer
Timeline
2023
Team
5
Domain
E-Commerce / Promotion & Discounts
Stack
9 tech
Status
Live
01

Overview

The MVC Chip-In project introduced chip-in filters — co-funded subsidy filters on the merchant voucher platform — that let selected sellers receive platform subsidies on their vouchers during a major anniversary campaign. As the technical lead, I owned the design, database and dataflow architecture, delivery, and cross-team coordination, and guided three new engineers and an intern through the build.

A backend has no screens, so its "UI" is the operational surface: the chip-in filter API contract, the subsidy configuration flow, and voucher chip-in dashboards.

API contract — chip-in filter & subsidy resolution
Ops view — subsidy configuration & rollout
Grafana — chip-in voucher growth & redemption quality
03

Problem & Solution

Problem

The merchant voucher platform needed to support subsidized vouchers for a curated set of sellers, driven by campaign filters, with the subsidy application flowing reliably across service boundaries. Without a clean data model and an async pipeline, subsidy state would drift between services, and cross-team dependencies would stall the launch of a major anniversary campaign.

Solution

I designed the chip-in filter model end to end: the database schema for subsidy relations and seller eligibility, the dataflow architecture linking the merchant voucher service to a downstream budget consumer service through an async message-queue publisher/consumer, and the API contracts consumed by the seller console and campaign operations. I debugged the publisher and consumer sides in tandem to keep subsidy state consistent, coordinated with five cross-functional teams, and communicated periodically with the campaign team on PRD and TRD milestones. The feature shipped end-to-end in staging first, then launched for a major anniversary campaign, with roughly 98% of the collaborative scope completed with the campaign team.

04

Workflow

Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.

flowchart diagram

configure subsidy filters

create chip-in voucher

resolve subsidy filter

publish subsidy event

consume & apply subsidy

metrics

Campaign Ops

Seller Console

Merchant Voucher Service

Subsidy Filter Service

Message Queue

Budget Consumer Service

Prometheus / Grafana

Use case interaction
sequence diagram
Budget Consumer ServiceMessage QueueSubsidy Filter ServiceMerchant Voucher ServiceCampaign OpsBudget Consumer ServiceMessage QueueSubsidy Filter ServiceMerchant Voucher ServiceCampaign Opsconfigure chip-in voucherresolve subsidy filter (seller eligibility)matched sellers & subsidy splitpublish subsidy-applied eventdeliver eventreconcile subsidy budgetack (async status)
Sequence flow — async subsidy across two services
05

Architecture

flowchart diagram

publish

consume

rpc

rpc

metrics

Seller Console

Merchant Voucher Service · Go

Subsidy Filter Service · Go

Voucher & Subsidy Tables

Chip-In Filter Table

Message Queue

Budget Consumer Service · Go

Catalog Service

Promotion Service

Prometheus / Grafana

System architecture
Architecture notes

The merchant voucher service owns voucher creation and lifecycle and delegates subsidy resolution to a chip-in subsidy filter service backed by a Managed RDS. Once a chip-in voucher is configured, the voucher service publishes a subsidy event to a message queue; a budget consumer service consumes the event, applies the subsidy, and reconciles the budget — keeping the subsidy path fully asynchronous. Voucher and subsidy tables are modeled as first-class relations so filters, contribution splits, and lifecycle transitions are queryable. Prometheus and Grafana track chip-in voucher growth and redemption quality.

state diagram

subsidy filter matched

subsidy event published

consumer applied subsidy

voucher live to buyer

buyer redeems

validity ended

configured

filtered

published

subsidized

active

redeemed

expired

Chip-in voucher lifecycle
06

Features

Subsidy
  • Chip-in filter definition & seller eligibility
  • Subsidized voucher creation for selected sellers
  • Platform/seller contribution resolution
Data & System
  • Database design for subsidy relations
  • Dataflow architecture for chip-in subsidies
  • Async message-queue publisher/consumer across two services
Operations
  • End-to-end staging build & self-test coverage
  • Cross-functional alignment with a campaign team
  • Guidance for junior engineers and an intern
07

Tech Stack

language
Go
framework
RPC framework
protocol
RPCHTTP
database
Managed RDS
messaging
Message Queue
cache
Redis
observability
PrometheusGrafana
08

Engineering Challenges

01
Async subsidy across two services

Subsidy application had to flow asynchronously between the voucher service (publisher) and a budget consumer service (consumer) without dropping or duplicating events. Fix: a message-queue publisher/consumer contract with idempotent handling, debugged across both services in tandem so subsidy state stayed consistent under load.

02
Aligning five cross-functional teams

Chip-in touched promotion, catalog, broadcast, image generation, and workflow-processing ownership at once, with a campaign team as the primary partner. Fix: periodic PRD/TRD sync with the campaign team, clear interface contracts per boundary, and staged rollout — landing roughly 98% of the collaborative scope on time.

03
Database & dataflow design for co-funded subsidies

Chip-in needed subsidy filters, seller eligibility, and contribution splits to be first-class rather than ad-hoc fields, or the follow-up work would fragment. Fix: a dedicated database design and dataflow architecture so filters, subsidies, and voucher lifecycle events were queryable and extensible across services.

09

Outcomes

4x
chip-in voucher growth
2x
redemption vs non-recommended
5
cross-functional teams aligned
10

Lessons Learned

Investing in a clean database and dataflow design paid off directly during a high-pressure anniversary campaign: chip-in voucher volume grew 4x after launch and redemption on recommended chip-in vouchers ran 2x higher than on non-recommended ones. Debugging an async publisher/consumer path is easier when both services share the same idempotency and ordering assumptions — and leading a project this broad is as much about aligning five cross-functional teams and mentoring newer engineers as it is about the code.

11

Related Santekno Tutorials

Interested in working together?

Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.