The challenge
The business wanted to sell digital products inside an external mini-app ecosystem, so customers could discover, buy and receive products through a new channel without leaving that ecosystem.
Constraints
- Customers sign in through the external platform's authentication, not ours.
- Payment confirmation arrives asynchronously by webhook and must not be trusted blindly.
- Fulfillment had to reuse the existing commerce platform rather than duplicate it.
- Purchased digital codes must reach the customer automatically and only once paid.
Options and trade-offs
Building a separate fulfillment stack for the channel would have isolated it, but duplicated supplier integrations and operational work. Reusing the existing platform meant the new backend had to translate the channel's checkout and payment model into the platform's order model.
We chose reuse: a thin channel backend in front of proven fulfillment, keeping one source of truth for orders.
What I did and what others did
I personally designed and developed the backend, implemented the payment integrations and validation workflows, wrote the unit tests, and handed the implementation to QA and frontend teams. The frontend was built by others.
The solution
I built the catalog and checkout APIs and integrated the external authentication. Payment webhooks are processed, and each payment amount is verified on the backend against the order before anything is fulfilled.
A validated payment creates an order and triggers fulfillment through the existing commerce platform. Purchased digital codes are then delivered automatically by email.
Security and reliability considerations
- Backend verification of every payment amount guards against tampered or mismatched payments.
- Fulfillment starts only after a payment is validated.
- Reusing the existing fulfillment path inherits its supplier controls and monitoring.
Outcome
Opened a new digital commerce revenue channel, extended customer reach, and automated payment-to-fulfillment processing by reusing existing infrastructure.
The channel's revenue contribution was commercially significant (self-reported). Exact figures are not published.
Lessons
- Never trust a client or webhook for the amount; verify it on the server.
- A new channel is cheapest as a thin adapter over a platform that already works.