Recovering an uncertain submission
Provider submission and final settlement are recorded as separate events. The recovery workflow reconciles pending work rather than treating every transport timeout as proof that an order failed.
Order recovery / profit analysis
A commerce backend with automated wallet top-ups, durable order recovery, profit reports, and explainable recommendations based on sales.
An order can time out even after a supplier accepts it. A useful store backend has to keep the financial outcome, supplier status, and customer notification consistent, then turn that history into meaningful operating reports.
I built the order and payment services, supplier integrations, catalog workflows, administrative reporting, and analytics. Kybro uses a Telegram storefront, while the difficult work lives in backend services and PostgreSQL records.
Provider submission and final settlement are recorded as separate events. The recovery workflow reconciles pending work rather than treating every transport timeout as proof that an order failed.
Reports combine settled sales, cost, margin, failures, and time-of-day demand. Recommendations carry a formula, threshold, and measured value, so advice about weak margins or busy periods can be checked instead of presented as a profit guarantee.
Profit rules resolve from the product’s category through parent categories, then provider or global defaults. Decimal calculations and order snapshots preserve the values used at purchase time.
Business events enter a durable outbox. Worker leases, retries, delivery receipts, and permanent-failure handling keep sending separate from the order transaction, while acknowledging external delivery cannot be perfectly atomic with a database update.