repurch/ docs
Dashboard ↗repurch.com ↗

API reference

Wallet & remittance

The Wallet resource shows the live settlement balance for a brand. The Remittance resource breaks that balance down into monthly statements, with line-level detail and downloadable CSV or PDF copies for finance.

Money on the wire

Every monetary value ships in two forms: an integer in pence (gross_pence) and a decimal-formatted GBP value (gross). The pence value is canonical — use it for arithmetic and persistence. The GBP value is a convenience for display. Both are always present and always agree.

Get the wallet balance

Returns the running settlement balance for the authenticated brand: available, pending (inside the hold window), and lifetime paid.

GET/v1/wallet
Auth: Authorization: Bearer … · Scopes: read

Example request

curl
curl https://api.repurch.com/v1/wallet \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "available_pence": 1842300,
  "pending_pence": 524700,
  "lifetime_pence": 9874100,
  "available": 18423,
  "pending": 5247,
  "lifetime": 98741,
  "currency": "GBP",
  "hold_days": 7,
  "next_payout_date": "2026-07-01",
  "brand_id": "furniture-co"
}

Response fields

available_pence / available
integer / number
Funds settled and outside the hold window. Will move to lifetime on the next payout.
pending_pence / pending
integer / number
Funds settled but still inside the 7-day hold window.
lifetime_pence / lifetime
integer / number
All-time paid balance.
currency
string
Always GBP.
hold_days
integer
Number of days after the order date that settled funds remain pending before becoming available.
next_payout_date
string
Approximate next batch payout date (ISO date, UTC). Payouts run on the first of each month.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.

List remittance statements

Returns monthly remittance summaries for the authenticated brand. Most recent month first. Empty months still appear so the timeline has no gaps.

GET/v1/remittances
Auth: Authorization: Bearer … · Scopes: read

Query parameters

months
integer
How many months back to include. 1-36. Default 12.

Example request

curl
curl "https://api.repurch.com/v1/remittances?months=6" \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "data": [
    {
      "period": "2026-06",
      "period_label": "June 2026",
      "period_start": "2026-06-01",
      "period_end": "2026-06-30",
      "order_count": 18,
      "gross_pence": 1078200,
      "commission_pence": 161730,
      "vat_pence": 32346,
      "net_pence": 884124,
      "gross": 10782,
      "commission": 1617.3,
      "vat": 323.46,
      "net": 8841.24,
      "currency": "GBP",
      "status": "pending",
      "paid_at": null,
      "brand_id": "furniture-co"
    },
    {
      "period": "2026-05",
      "period_label": "May 2026",
      "period_start": "2026-05-01",
      "period_end": "2026-05-31",
      "order_count": 23,
      "gross_pence": 1389400,
      "commission_pence": 208410,
      "vat_pence": 41682,
      "net_pence": 1139308,
      "gross": 13894,
      "commission": 2084.1,
      "vat": 416.82,
      "net": 11393.08,
      "currency": "GBP",
      "status": "paid",
      "paid_at": "2026-06-01T09:14:00+00:00",
      "brand_id": "furniture-co"
    }
  ],
  "meta": {
    "brand_id": "furniture-co",
    "months": 12,
    "total": 12
  }
}

Response fields

data
array
Monthly summary rows, newest first.
data[].period
string
Month identifier in YYYY-MM. Pass this to /v1/remittances/{period} for detail.
data[].status
string
One of empty, pending, partial, or paid.
data[].net_pence / net
integer / number
Amount payable to the partner: gross minus commission minus VAT.
data[].paid_at
string or null
ISO timestamp when the last order in this period was paid out. Null for unsettled months.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.

Retrieve a remittance statement

Returns the full statement for one month, including every line item that contributed to the totals.

GET/v1/remittances/{period}
Auth: Authorization: Bearer … · Scopes: read

Path parameters

period
stringrequired
Month identifier in YYYY-MM, e.g. 2026-05.

Example request

curl
curl https://api.repurch.com/v1/remittances/2026-05 \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "period": "2026-05",
  "period_label": "May 2026",
  "period_start": "2026-05-01",
  "period_end": "2026-05-31",
  "order_count": 23,
  "gross_pence": 1389400,
  "commission_pence": 208410,
  "vat_pence": 41682,
  "net_pence": 1139308,
  "gross": 13894,
  "commission": 2084.1,
  "vat": 416.82,
  "net": 11393.08,
  "currency": "GBP",
  "status": "paid",
  "paid_at": "2026-06-01T09:14:00+00:00",
  "brand_id": "furniture-co",
  "lines": [
    {
      "order_id": 88421,
      "order_reference": "#88421",
      "order_date": "2026-05-04T11:22:31+00:00",
      "product_id": 12345,
      "product_title": "Brown leather 3-seater sofa",
      "channel": "clearance",
      "gross_pence": 59900,
      "commission_pence": 8985,
      "vat_pence": 1797,
      "net_pence": 49118,
      "gross": 599,
      "commission": 89.85,
      "vat": 17.97,
      "net": 491.18,
      "paid_at": "2026-06-01T09:14:00+00:00"
    }
  ]
}

Response fields

lines
array
Per-line-item breakdown. One entry per sold unit.
lines[].order_reference
string
Display-safe order reference. Contains no customer name.
lines[].channel
string
clearance or exchange. Drives the commission rate.
lines[].paid_at
string or null
ISO timestamp when this specific line was paid out. Null if still pending.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
404remittance_not_foundRemittance not found for that period.

Download a remittance CSV

Returns the statement as a UTF-8 CSV file (with a BOM, suitable for Excel) including every line item plus a totals row.

GET/v1/remittances/{period}/download.csv
Auth: Authorization: Bearer … · Scopes: read

Path parameters

period
stringrequired
Month identifier in YYYY-MM.

Example request

curl
curl https://api.repurch.com/v1/remittances/2026-05/download.csv \
  -H "Authorization: Bearer re_pk_..." \
  -o remittance-2026-05.csv

Example response

json
{
  "content_type": "text/csv; charset=utf-8",
  "content_disposition": "attachment; filename=\"repurch-remittance-furniture-co-2026-05.csv\""
}

Response fields

(binary body)
bytes
Raw CSV bytes. Columns: Order, Date, Product, Channel, Gross, Commission, VAT, Net, Paid on. Final row carries TOTALS.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
404remittance_not_foundRemittance not found for that period.

Download a remittance PDF

Returns the statement as a branded PDF, suitable for forwarding to finance teams or attaching to invoices.

GET/v1/remittances/{period}/download.pdf
Auth: Authorization: Bearer … · Scopes: read

Path parameters

period
stringrequired
Month identifier in YYYY-MM.

Example request

curl
curl https://api.repurch.com/v1/remittances/2026-05/download.pdf \
  -H "Authorization: Bearer re_pk_..." \
  -o remittance-2026-05.pdf

Example response

json
{
  "content_type": "application/pdf",
  "content_disposition": "attachment; filename=\"repurch-remittance-furniture-co-2026-05.pdf\""
}

Response fields

(binary body)
bytes
Raw PDF bytes.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
404remittance_not_foundRemittance not found for that period.
500pdf_failedPDF generation failed.