At month end a marketplace payout lands in the account. Netted inside it: sales, shipping, refunds and fees. The tax adviser needs each of these amounts separately and with a document — and nobody wants to back them out of a lump payment.
The Commerce contract’s documents separate exactly these amounts: invoices with net, tax and gross per line, credit notes referencing their invoice, fee statements with recomputable lines and refunds per order. The close is built from them, not from the payout.
| Surface | Roles |
|---|---|
| Commerce | Parts trading, Vehicle trading, Software vendor |
What this case requires
- A connected selling account. Documents arise from orders; no order, no document.
- A mapping to your accounting accounts. The documents deliver amounts and references, not your chart of accounts.
- Paged collection. Lists come with
nextCursor; a month-end close reads them completely. - A rule for open items.
outstandingAmountshows what is not yet paid.
The sequence
The table names the responsible call per stage and what exists afterwards. The reasoning for why a stage cannot be skipped follows below it.
| Stage | Call | What exists afterwards |
|---|---|---|
| List the invoices | GET /commerce/v1/invoices | documentReference, state, issuedAt and dueAt per document |
| Read an invoice | GET /commerce/v1/invoices/{invoiceId} | netAmount, taxAmount and grossAmount per line and in totals |
| Read a credit note | GET /commerce/v1/credit-notes/{creditNoteId} | reference to invoiceId and salesOrderId, plus reasonCode |
| Read a fee statement | GET /commerce/v1/fee-statements/{feeStatementId} | lines with basis, feeBasisPoints and feeAmount, corrections with a reference |
| Match the refunds | GET /commerce/v1/refunds | refunds with state per order and return |
Why each stage is needed
- List the invoices.
GET /commerce/v1/invoicesreturns pages ofinvoiceId,salesOrderId,documentReference,state,issuedAtanddueAt. The cursor is evidence of completeness here: a close that skips a page is wrong. - Read the invoice.
GET /commerce/v1/invoices/{invoiceId}namesnetAmount,taxAmountandgrossAmountper line and, intotals, additionallypaidAmountandoutstandingAmount. Net, tax and gross arrive separately — accounting has nothing to back out. - Read the credit note.
GET /commerce/v1/credit-notes/{creditNoteId}referencesinvoiceIdandsalesOrderIdand carries areasonCode. A correction is thus always tied to an invoice and not just a negative amount in the month. - Read the fee statement.
GET /commerce/v1/fee-statements/{feeStatementId}returns lines withbasis,feeBasisPointsandfeeAmount, corrections withadjustmentOfLineId. The applicable rate infeeBasisPointsis defined outside the contract; the lines can be recomputed frombasisandfeeBasisPoints. - Match the refunds.
GET /commerce/v1/refundslists refunds withamount,state,salesOrderId,returnIdandreasonCode. Every refund should face a credit note; where it does not, that is a finding for the close.
curl -H 'X-Api-Key: <API_KEY>' \ 'https://commerce-preview.invalid/commerce/v1/invoices?limit=100'
What you end up with
In the end the month consists of documents: revenue from invoices, corrections from credit notes, fees from fee statements and refunds, with their state, from the refund list — each amount separately and linked to its order.
Where to find this in the documentation
The binding field lists, error codes and sample responses live in this surface’s OpenAPI contract at docs.tapinomahub.com (tapinoma-commerce). All use cases arranged by surface and role: overview of the use cases.
Sources and legal references
Frequently asked
Why not simply book the payout?
Because revenue, refunds and fees are netted inside it. For tax and commercial purposes these are different transactions that must be evidenced separately.
How is a credit note tied to its invoice?
Via invoiceId. It also carries salesOrderId and a reasonCode.
Who levies the fees in the fee statements?
The Commerce contract does not specify this; the specific rate is also set outside the contract. In the preview no fees are collected.
