# Dietbox Payment — Subscriptions and recurring billing, behind a checkout of its own.

> The service that carries the revenue: subscription commands on one side, a webhook endpoint per gateway on the other, and two payment gateways in packages of their own — with a Vue checkout in front of it.

## Overview

The service responsible for the money: subscription commands on one side, a webhook handler for every event a payment gateway raises on the other, and two gateway integrations in between — Iugu and TSPay, each in a crosscutting package of its own. It is kept separate because money has a different failure mode from everything else in the product — its own release train, in a repository it shares with the platform’s other services.

## Stack

- .NET 6
- C#
- CQRS
- Vue 3
- Vite
- PrimeVue
- Pinia
- Cypress
- Azure DevOps

## Highlights

- Subscribing and renewing, with a suspend path when a payment lapses.
- Vouchers and plan extensions, adjusting a subscription without cancelling and re-creating it.
- Payment links generated on demand, for a charge outside the regular checkout flow.
- Marketplace subaccounts, with their own invoice-paid, released and refunded events.

## Role

Head of Technology · 2023–2024. Closed-source professional work — the write-up describes it without the source.

---

Source: https://felipealmeida.tech/projects/dietbox-payment
