Skip to content

210 × 297 mm

Statements

Marketplace payout statement

An A4 seller payout statement with German number and date formatting and English labels: gross sales, refunds and fees derived from order and fee lines, fees grouped by type with subtotals, a share-of-sales bar drawn in SVG, the payout date and account, and an orders table.

A4 portraitLocale en-DEHTML + JinjaHeader & footer

Opens Dynamic Document API with this template preloaded in a free workspace.

Template language features

  • Loops
  • Conditionals
  • Macros
  • Filters
  • Currency formatting
  • Number formatting
  • Date formatting
  • Markdown
  • Grouping
  • SVG chart
  • Repeating table headers
  • Header & footer
  • Page numbers

Filters such as format_currency and qrcode are described in the template language reference.

Variables

Derived from the sample data: 7 top-level fields, 40 paths in total. Send the same shape as data.

PathTypeExample
marketplaceobject
marketplace.namestring"Loomwell Market"
marketplace.legal_namestring"Loomwell Market GmbH"
marketplace.addressstring"Kranhausweg 12, 20457 Hamburg, Germany"
marketplace.vat_idstring"DE123456789"
marketplace.support_emailstring"seller-support@loomwell.example.com"
sellerobject
seller.shop_namestring"Atelier Birkenhain"
seller.ownerstring"Friederike Almstedt"
seller.seller_idstring"LW-S-208814"
seller.addressstring"Gießerstraße 41 ⏎ 04229 Leipzig ⏎ Germany"
seller.vat_idstring"DE987654321"
statementobject
statement.numberstring"PS-2026-09B-208814"
statement.period_startdate"2026-09-01"
statement.period_enddate"2026-09-15"
statement.payout_datedate"2026-09-18"
statement.currencystring"EUR"
statement.localestring"de-DE"
payout_accountobject
payout_account.holderstring"Friederike Almstedt"
payout_account.bankstring"Nordwall Sparbank"
payout_account.ibanstring"DE00 EXMP 0000 0012 3456 78"
payout_account.bicstring"EXMPDEHHXXX"
ordersarray<object> · 8
orders[].numberstring"LW-7734102"
orders[].datedate"2026-09-01"
orders[].itemsnumber2
orders[].ship_tostring"DE"
orders[].grossnumber84.5
orders[].refundednumber0
feesarray<object> · 24
fees[].typestring"Commission"
fees[].referencestring"LW-7734102"
fees[].descriptionstring"Returned on refund"
fees[].ratenumber0.1
fees[].basisnumber84.5
fees[].fixednumber0.3
fees[].amountnumber8.45
notesstring"Payouts are sent on the third business day aft…"

Sample data

Fictional records used for previews. Replace them with your own data when you call the API.

data.json
{
  "marketplace": {
    "name": "Loomwell Market",
    "legal_name": "Loomwell Market GmbH",
    "address": "Kranhausweg 12, 20457 Hamburg, Germany",
    "vat_id": "DE123456789",
    "support_email": "seller-support@loomwell.example.com"
  },
  "seller": {
    "shop_name": "Atelier Birkenhain",
    "owner": "Friederike Almstedt",
    "seller_id": "LW-S-208814",
    "address": "Gießerstraße 41\n04229 Leipzig\nGermany",
    "vat_id": "DE987654321"
  },
  "statement": {
    "number": "PS-2026-09B-208814",
    "period_start": "2026-09-01",
    "period_end": "2026-09-15",
    "payout_date": "2026-09-18",
    "currency": "EUR",
    "locale": "de-DE"
  },
  "payout_account": {
    "holder": "Friederike Almstedt",
    "bank": "Nordwall Sparbank",
    "iban": "DE00 EXMP 0000 0012 3456 78",
    "bic": "EXMPDEHHXXX"
  },
  "orders": [
    { "number": "LW-7734102", "date": "2026-09-01", "items": 2, "ship_to": "DE", "gross": 84.5, "refunded": 0.0 },
    { "number": "LW-7734377", "date": "2026-09-02", "items": 3, "ship_to": "AT", "gross": 129.0, "refunded": 24.0 },
    { "number": "LW-7735018", "date": "2026-09-04", "items": 1, "ship_to": "DE", "gross": 46.5, "refunded": 0.0 },
    { "number": "LW-7735561", "date": "2026-09-06", "items": 4, "ship_to": "NL", "gross": 212.0, "refunded": 0.0 },
    { "number": "LW-7736240", "date": "2026-09-08", "items": 2, "ship_to": "DE", "gross": 67.5, "refunded": 0.0 },
    { "number": "LW-7736902", "date": "2026-09-10", "items": 1, "ship_to": "FR", "gross": 158.0, "refunded": 158.0 },
    { "number": "LW-7737455", "date": "2026-09-12", "items": 2, "ship_to": "DE", "gross": 93.5, "refunded": 0.0 },
    { "number": "LW-7738119", "date": "2026-09-14", "items": 3, "ship_to": "BE", "gross": 175.5, "refunded": 0.0 }
  ],
  "fees": [
    { "type": "Commission", "reference": "LW-7734102", "description": null, "rate": 0.1, "basis": 84.5, "fixed": null, "amount": 8.45 },
    { "type": "Commission", "reference": "LW-7734377", "description": null, "rate": 0.1, "basis": 129.0, "fixed": null, "amount": 12.9 },
    { "type": "Commission", "reference": "LW-7735018", "description": null, "rate": 0.1, "basis": 46.5, "fixed": null, "amount": 4.65 },
    { "type": "Commission", "reference": "LW-7735561", "description": null, "rate": 0.1, "basis": 212.0, "fixed": null, "amount": 21.2 },
    { "type": "Commission", "reference": "LW-7736240", "description": null, "rate": 0.1, "basis": 67.5, "fixed": null, "amount": 6.75 },
    { "type": "Commission", "reference": "LW-7736902", "description": null, "rate": 0.1, "basis": 158.0, "fixed": null, "amount": 15.8 },
    { "type": "Commission", "reference": "LW-7737455", "description": null, "rate": 0.1, "basis": 93.5, "fixed": null, "amount": 9.35 },
    { "type": "Commission", "reference": "LW-7738119", "description": null, "rate": 0.1, "basis": 175.5, "fixed": null, "amount": 17.55 },
    { "type": "Commission", "reference": "LW-7734377", "description": "Returned on refund", "rate": 0.1, "basis": -24.0, "fixed": null, "amount": -2.4 },
    { "type": "Commission", "reference": "LW-7736902", "description": "Returned on refund", "rate": 0.1, "basis": -158.0, "fixed": null, "amount": -15.8 },
    { "type": "Payment processing", "reference": "LW-7734102", "description": null, "rate": 0.02, "basis": 84.5, "fixed": 0.3, "amount": 1.99 },
    { "type": "Payment processing", "reference": "LW-7734377", "description": null, "rate": 0.02, "basis": 129.0, "fixed": 0.3, "amount": 2.88 },
    { "type": "Payment processing", "reference": "LW-7735018", "description": null, "rate": 0.02, "basis": 46.5, "fixed": 0.3, "amount": 1.23 },
    { "type": "Payment processing", "reference": "LW-7735561", "description": null, "rate": 0.02, "basis": 212.0, "fixed": 0.3, "amount": 4.54 },
    { "type": "Payment processing", "reference": "LW-7736240", "description": null, "rate": 0.02, "basis": 67.5, "fixed": 0.3, "amount": 1.65 },
    { "type": "Payment processing", "reference": "LW-7736902", "description": null, "rate": 0.02, "basis": 158.0, "fixed": 0.3, "amount": 3.46 },
    { "type": "Payment processing", "reference": "LW-7737455", "description": null, "rate": 0.02, "basis": 93.5, "fixed": 0.3, "amount": 2.17 },
    { "type": "Payment processing", "reference": "LW-7738119", "description": null, "rate": 0.02, "basis": 175.5, "fixed": 0.3, "amount": 3.81 },
    { "type": "Promoted listings", "reference": "AD-5521", "description": "Campaign, 1–7 September", "rate": null, "basis": null, "fixed": null, "amount": 12.4 },
    { "type": "Promoted listings", "reference": "AD-5540", "description": "Campaign, 8–15 September", "rate": null, "basis": null, "fixed": null, "amount": 15.1 },
    { "type": "Shipping labels", "reference": "LW-7735561", "description": "Parcel label, EU zone 1", "rate": null, "basis": null, "fixed": null, "amount": 13.9 },
    { "type": "Shipping labels", "reference": "LW-7737455", "description": "Parcel label, domestic", "rate": null, "basis": null, "fixed": null, "amount": 4.95 },
    { "type": "Shipping labels", "reference": "LW-7738119", "description": "Parcel label, EU zone 1", "rate": null, "basis": null, "fixed": null, "amount": 13.9 },
    { "type": "Shop subscription", "reference": "SUB-2026-09", "description": "Studio plan, 1–15 September", "rate": null, "basis": null, "fixed": null, "amount": 7.45 }
  ],
  "notes": "Payouts are sent on the third business day after the period closes and usually arrive within one business day. A fee invoice with VAT details for this period is available under **Seller Hub › Documents**. Questions about a line? Quote the statement number when you contact seller support."
}

Source

The body markup with Jinja, the stylesheet placed in <head> and the header and footer settings.

{#- Marketplace payout statement: German number and date formatting with English labels.
    Gross sales, refunds and fees are derived from the order and fee lines; fees are grouped by type. -#}
{%- set locale = statement.locale | default("de-DE") -%}
{%- set currency = statement.currency -%}
{%- set date_fmt = "%d.%m.%Y" -%}
{%- set gross = orders | sum_by("gross") -%}
{%- set refunds = orders | sum_by("refunded") -%}
{%- set total_fees = fees | sum_by("amount") -%}
{%- set net = gross - refunds - total_fees -%}
{%- set fee_groups = fees | sort(attribute="type") | group_by("type") -%}
{%- set net_share = (net / gross * 100) if gross else 0 -%}
{%- set fee_share = (total_fees / gross * 100) if gross else 0 -%}
{%- set refund_share = (refunds / gross * 100) if gross else 0 -%}

{%- macro money(value) -%}{{ value | format_currency(currency, locale) }}{%- endmacro -%}

<header class="masthead">
  <div class="brand">
    <svg class="logo" viewBox="0 0 40 40" aria-hidden="true">
      <rect width="40" height="40" rx="10" fill="#5a3fd1"/>
      <path d="M10 14h20M10 20h20M10 26h20" stroke="#cfc5f7" stroke-width="3" stroke-linecap="round"/>
      <path d="M15 9v22M25 9v22" stroke="#ffffff" stroke-width="3" stroke-linecap="round" stroke-dasharray="4 2"/>
    </svg>
    <div>
      <p class="brand-name">{{ marketplace.name }}</p>
      <p class="brand-meta">{{ marketplace.legal_name }} · {{ marketplace.address }} · VAT ID {{ marketplace.vat_id }}</p>
    </div>
  </div>
  <div class="doc">
    <h1>Payout statement</h1>
    <p class="doc-meta">{{ statement.period_start | format_date(date_fmt, locale) }} – {{ statement.period_end | format_date(date_fmt, locale) }}</p>
    <p class="doc-meta">No. {{ statement.number }}</p>
  </div>
</header>

<section class="top">
  <div class="seller">
    <p class="label">Seller</p>
    <p class="shop">{{ seller.shop_name }}</p>
    <p>{{ seller.owner }}</p>
    <p>{{ seller.address | nl2br }}</p>
    <p class="muted">Seller ID {{ seller.seller_id }} · VAT ID {{ seller.vat_id }}</p>
  </div>

  <div class="payout-card">
    <p class="label">Net payout</p>
    <p class="payout-amount">{{ money(net) }}</p>
    <dl>
      <dt>Payout date</dt><dd>{{ statement.payout_date | format_date(date_fmt, locale) }}</dd>
      <dt>Account holder</dt><dd>{{ payout_account.holder }}</dd>
      <dt>IBAN</dt><dd class="mono">{{ payout_account.iban }}</dd>
      <dt>BIC · Bank</dt><dd><span class="mono">{{ payout_account.bic }}</span> · {{ payout_account.bank }}</dd>
    </dl>
  </div>
</section>

<section class="summary">
  <div class="summary-table">
    <table>
      <tr><th scope="row">Gross sales <span class="muted">({{ orders | length }} orders, {{ orders | sum_by("items") | int }} items)</span></th><td class="num">{{ money(gross) }}</td></tr>
      <tr><th scope="row">Refunds to buyers</th><td class="num">−{{ money(refunds) }}</td></tr>
      {%- for group in fee_groups %}
      <tr class="fee-row"><th scope="row">{{ group.grouper }}</th><td class="num">−{{ money(group.list | sum_by("amount")) }}</td></tr>
      {%- endfor %}
      <tr class="net"><th scope="row">Net payout</th><td class="num">{{ money(net) }}</td></tr>
    </table>
  </div>

  <figure class="split" aria-labelledby="split-caption split-legend">
    <figcaption class="label" id="split-caption">Where your gross sales went</figcaption>
    <svg viewBox="0 0 100 10" preserveAspectRatio="none" role="img" aria-label="Share of gross sales">
      <rect x="0" y="0" width="{{ net_share | round(2) }}" height="10" fill="#177a4b"/>
      <rect x="{{ net_share | round(2) }}" y="0" width="{{ fee_share | round(2) }}" height="10" fill="#5a3fd1"/>
      <rect x="{{ (net_share + fee_share) | round(2) }}" y="0" width="{{ refund_share | round(2) }}" height="10" fill="#c3bcd9"/>
    </svg>
    <ul class="legend" id="split-legend">
      <li><span class="swatch net-swatch"></span>Paid out <strong>{{ (net / gross) | format_percent(locale, 1) }}</strong></li>
      <li><span class="swatch fee-swatch"></span>Fees <strong>{{ (total_fees / gross) | format_percent(locale, 1) }}</strong></li>
      <li><span class="swatch refund-swatch"></span>Refunds <strong>{{ (refunds / gross) | format_percent(locale, 1) }}</strong></li>
    </ul>
  </figure>
</section>

<h2 class="section-title">Orders in this period</h2>
<table class="data">
  <thead>
    <tr>
      <th scope="col">Order</th>
      <th scope="col">Date</th>
      <th class="num" scope="col">Items</th>
      <th scope="col">Ship to</th>
      <th scope="col">Status</th>
      <th class="num" scope="col">Gross</th>
      <th class="num" scope="col">Refunded</th>
    </tr>
  </thead>
  <tbody>
    {%- for order in orders %}
    <tr>
      <td class="mono">{{ order.number }}</td>
      <td>{{ order.date | format_date(date_fmt, locale) }}</td>
      <td class="num">{{ order.items }}</td>
      <td>{{ order.ship_to }}</td>
      <td>
        {%- if order.refunded >= order.gross %}<span class="status refunded">Refunded</span>
        {%- elif order.refunded > 0 %}<span class="status partial">Partly refunded</span>
        {%- else %}<span class="status done">Completed</span>{% endif -%}
      </td>
      <td class="num">{{ money(order.gross) }}</td>
      <td class="num">{% if order.refunded %}−{{ money(order.refunded) }}{% else %}<span class="muted">–</span>{% endif %}</td>
    </tr>
    {%- endfor %}
  </tbody>
  <tfoot>
    <tr>
      <th colspan="5" scope="row">Total</th>
      <td class="num">{{ money(gross) }}</td>
      <td class="num">−{{ money(refunds) }}</td>
    </tr>
  </tfoot>
</table>

<h2 class="section-title fees-title">Fee details</h2>
<table class="data fees">
  <thead>
    <tr>
      <th scope="col">Reference</th>
      <th scope="col">Calculation</th>
      <th class="num" scope="col">Amount</th>
    </tr>
  </thead>
  {%- for group in fee_groups %}
  <tbody class="fee-group">
    <tr class="group-head">
      <td colspan="3">{{ group.grouper }} <span class="count">{{ group.list | length }} {{ "line" if group.list | length == 1 else "lines" }}</span></td>
    </tr>
    {%- for fee in group.list %}
    <tr>
      <td class="mono">{{ fee.reference }}</td>
      <td>
        {%- if fee.description %}{{ fee.description }}{% endif %}
        {%- if fee.description and fee.rate %} · {% endif %}
        {%- if fee.rate %}{{ fee.rate | format_percent(locale) }} of {{ money(fee.basis | abs) }}{% if fee.fixed %} + {{ money(fee.fixed) }}{% endif %}{% endif -%}
      </td>
      <td class="num{{ ' credit' if fee.amount < 0 else '' }}">{{ money(fee.amount) }}</td>
    </tr>
    {%- endfor %}
    <tr class="group-total">
      <td colspan="2">Subtotal {{ group.grouper | lower }}</td>
      <td class="num">{{ money(group.list | sum_by("amount")) }}</td>
    </tr>
  </tbody>
  {%- endfor %}
  <tfoot>
    <tr>
      <th colspan="2" scope="row">Total fees</th>
      <td class="num">{{ money(total_fees) }}</td>
    </tr>
  </tfoot>
</table>

<section class="notes">
  {{ notes | markdown }}
  <p>Seller support: {{ marketplace.support_email }}</p>
</section>

Render it with the API

After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.

curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
  -H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "type": "template",
    "template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
  },
  "data": {
    "marketplace": {
      "name": "Loomwell Market",
      "legal_name": "Loomwell Market GmbH",
      "address": "Kranhausweg 12, 20457 Hamburg, Germany",
      "vat_id": "DE123456789",
      "support_email": "seller-support@loomwell.example.com"
    },
    "seller": {
      "shop_name": "Atelier Birkenhain",
      "owner": "Friederike Almstedt",
      "seller_id": "LW-S-208814",
      "address": "Gießerstraße 41\n04229 Leipzig\nGermany",
      "vat_id": "DE987654321"
    },
    "statement": {
      "number": "PS-2026-09B-208814",
      "period_start": "2026-09-01",
      "period_end": "2026-09-15",
      "payout_date": "2026-09-18",
      "currency": "EUR",
      "locale": "de-DE"
    },
    "payout_account": {
      "holder": "Friederike Almstedt",
      "bank": "Nordwall Sparbank",
      "iban": "DE00 EXMP 0000 0012 3456 78",
      "bic": "EXMPDEHHXXX"
    },
    "orders": [
      {
        "number": "LW-7734102",
        "date": "2026-09-01",
        "items": 2,
        "ship_to": "DE",
        "gross": 84.5,
        "refunded": 0
      },
      {
        "number": "LW-7734377",
        "date": "2026-09-02",
        "items": 3,
        "ship_to": "AT",
        "gross": 129,
        "refunded": 24
      }
    ],
    "fees": [
      {
        "type": "Commission",
        "reference": "LW-7734102",
        "description": null,
        "rate": 0.1,
        "basis": 84.5,
        "fixed": null,
        "amount": 8.45
      },
      {
        "type": "Commission",
        "reference": "LW-7734377",
        "description": null,
        "rate": 0.1,
        "basis": 129,
        "fixed": null,
        "amount": 12.9
      }
    ],
    "notes": "Payouts are sent on the third business day after the period closes and usually arrive within one business day. A fee invoice with VAT details for this period is available under **Seller Hub › Documents**. Questions about a line? Quote the statement number when you contact seller support."
  },
  "output": {
    "format": "pdf",
    "filename": "statement-marketplace-payout.pdf"
  }
}'