Skip to main content
Documentation

Payments

payments.list

List payments the shop has taken, by invoice, customer or date
Read-onlyRead budget

REST

Shipping
POST /api/v1/payments/list

MCP tool

Live
payments.list

Exposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Payments domain.

Operating contract

The ledger, newest-first. Filter by invoice_id to see everything applied to one bill, by customer_id for one person's whole payment history, or by since and until for a period.

READ THE THREE MONEY FIELDS SEPARATELY. amount is what was taken. refunded is how much of it has been handed back. net is what the shop actually still holds, and it is the only one of the three to use when answering 'how much did we collect'. tip rides alongside all of them and is never part of an invoice balance.

status of succeeded is the only one that counts as collected. pending is a charge that has not landed, failed is money that never arrived, and refunded / partially_refunded describe money that has been given back.

disputed: true means a chargeback is open on this payment. Say so — the money is at risk and the shop may not know.

PAYMENT RECORDS ARE IMMUTABLE. There is no capability that edits or removes one, here or anywhere, because a payment is a record of something that happened. A mistake is corrected by a refund or a void, which are both a person at a screen.

TRUNCATION: total is the exact number of matching payments and omitted is how many are not in this response. When omitted is not 0, call again with offset set to next_offset — and never total a shop's takings from a truncated page. reports.revenue counts every row.

Who may call it

Permission
invoices.accessThe caller must hold Invoices at the ACT level. A read-only dashboard grant on the same section is refused.
Plan
Every planNo plan gate. Available on every Service VIN plan.
Retries
naturalNaturally idempotent — running it twice leaves the same world as running it once. A retrying integration needs no key.
Rate class
readCounted against the read budget — the widest of the four.

Partial answers

omitted is how many matching records are not in the response, and 0 is a real answer meaning you have all of them. Continue with next_offset.

Do not summarise from a truncated response

When `omitted` is not 0 there are more payments. Call again with `offset` set to `next_offset`, or narrow the filters. For a complete period total use reports.revenue.

Input

FieldTypeDescription
invoice_idstringuuid

One invoice's id, as returned by invoices.list or invoices.get.

customer_idstringuuid

One customer's id, as returned by customers.list or customers.get.

statusstring

One payment status. Omit for every status.

One of: pending, succeeded, failed, refunded, partially_refunded
methodstring

One payment method — card, cash, etransfer, ach, cheque, credit, other.

One of: card, cash, etransfer, ach, other, cheque, credit
sincestring

Only payments received on or after this date, YYYY-MM-DD.

untilstring

Only payments received on or before this date, YYYY-MM-DD.

limitinteger1–100

How many payments to return, 1-100. Defaults to 25.

Default: 25
offsetintegermin 0

How many to skip. Pass the previous response's next_offset to continue.

Default: 0

Output

FieldTypeDescription
itemsobject[]

items[].idstring

items[].invoice_idstring

items[].customer_idstring

items[].amountnumber

items[].tipnumber

items[].refundednumber

items[].netnumber

items[].methodstring

items[].method_labelstring

items[].statusstring

items[].processorstring

items[].received_atstring

items[].disputedboolean

totalnumber

omittednumber

next_offsetnumber | null

Examples

Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.

curl
export SERVICEVIN_API_KEY=svk_live_…

curl -X POST https://www.servicevin.com/api/v1/payments/list \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":25,"offset":0}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/payments/list", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "limit": 25,
    "offset": 0
  }),
});

// Success and failure are both envelopes. Switch on error.code, never
// on error.message — the codes are stable, the messages are for people.
const payload = await res.json();
if (!res.ok) throw new Error(payload.error.code);
const data = payload.data;

Python (requests)
import os, requests

res = requests.post(
    "https://www.servicevin.com/api/v1/payments/list",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "limit": 25,
    "offset": 0
},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"])
data = payload["data"]

MCP tools/call — https://www.servicevin.com/api/mcp
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "payments.list",
    "arguments": {
      "limit": 25,
      "offset": 0
    }
  }
}

Refusals

The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.

StatusCodeWhen
404not_foundThe id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both.
403forbiddenThis login does not hold invoices.access.
422validation_errorAn argument was wrong. The message names the field.
429rate_limitedToo many read calls. Back off and retry.
500internal_errorSomething failed on our side. Nothing was changed.