Minas Sarkisyanwebkoth.com

Own product · In production

Marketplace payout documents

A microservice of my own platform for marketplace sellers: it fetches a year of the marketplace’s financial documents, parses weekly reports in PDF and buyout notifications in spreadsheets, adds income up by month and calculates the self-employment tax.

The pain

The marketplace hands financial documents over as a pile of files. To work out the year’s income and the tax on it, a seller opens them one by one and adds them up.

Now

The service fetches a year of documents itself, parses PDFs and spreadsheets, lays amounts out by month and calculates the tax: 4 % from individuals, 6 % from companies.

What the business gets

  • The question «how much will arrive and how much goes to tax» is answered from the marketplace’s own source documents.
  • Income is laid out by month, so it is visible not only what the total is but how it built up.
  • The remainder of the annual limit is visible in advance, not at the moment the limit is already exceeded.
  • A parsing error on one document does not sink the calculation: it lands in a list of errors next to the result.

From source to result

  1. A year of marketplace documents
  2. Parsing PDFs and spreadsheets
  3. Amounts by month
  4. Tax at 4 % and 6 %
  5. Remainder of the limit

Downloading runs with a pause between files and a retry when the marketplace refuses on its request limit: a year’s pile arrives whole instead of breaking off halfway.

How it works

The calculation is arranged as a background task: the start returns a task id, the stage and progress are visible from there, and the result is fetched by a separate request - a year of documents does not run into a timeout.

Documents are split by category: weekly reports go into income from individuals, buyout notifications into income from companies, and the tax rate is chosen by that split.

Who maintains it now

Me. Part of my own platform for marketplace sellers, not a client system.

Other cases for this step

Internal system · In production

Management finance loop

Money becomes visible: balance, profit, cash gap

The pain
Nobody knew today’s real account balance or net profit for sure. Payment requests were approved in chats, and the risk of a cash gap never went away.
Now
Cash flow, budget and reconciliation on one screen, payment requests travel an approval route, and the numbers on that screen add up.
Market alternative
Verified against
the bank statement

The same system pays off across 3 more steps

Open the case

Internal system · In production

Data platform

Marketplace payouts and fees reconcile to the kopeck

The pain
Fees, logistics, storage and penalties are only visible in the marketplace’s own reports. There was nothing to check them against, so margin was taken on faith.
Now
A dedicated data mart compares our weekly totals with the totals the marketplace itself calculated. An empty result means everything matches; a row with a difference shows exactly where it does not.
Verified against
Reconciliation
runs itself, every week

The same system pays off across 2 more steps

Open the case

Open source · In production

Ads and SEO from chat

The ad budget changes by the rules, not by guesswork

The pain
Budgets and bids live in an account where an edit applies at once. A mistake costs a weekly budget burned over the days that are left, and a strategy’s training reset halfway.
Now
An open MCP server: 125 tools across Direct, Metrika and Webmaster. A writing call previews what would be sent, the change percentage is capped per project, and the weekend rule brings its own warning.
Tools
A writing call
The weekend rule
Open the case
Type
Own product
Status
In production
What it parses
reports in PDF and notifications in spreadsheets
Maintained by
an engineer
Replaced
adding documents up by hand in a calculator
PythonFastAPIpdfplumberopenpyxluvicornPM2