Skip to main content
Documentation

Payments

payments.deposit_status

Check which booked jobs still owe their deposit payment
Read-onlyRead budget

REST

Shipping
POST /api/v1/payments/deposit_status

MCP tool

Live
payments.deposit_status

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

Operating contract

The answer to 'who has booked but not paid'. It walks the shop's upcoming online bookings, works out which ones asked for a deposit, and reports which of those deposits are still outstanding.

A deposit is outstanding in two different ways and the response says which. billed: false means the shop collects that one by hand and no invoice was ever raised — it stays outstanding until somebody clears it. billed: true with paid: false means a deposit invoice exists and has not been settled, and its invoice_id is what invoices.get and invoices.send take.

A booking still WAITING ON THE SHOP'S APPROVAL owes nothing and is not listed: under approval mode the deposit is not asked for until the shop accepts, so it is the shop that has not answered rather than the customer who has not paid.

FAILS SAFE. When the ledger cannot be read, billed deposits are reported as paid: true rather than as due, because flashing 'deposit due' at a customer who has paid is the worse error. ledger_read_ok: false says that happened — do not chase anybody on that response.

This read is a rollup over the upcoming bookings and returns one row per job, so nothing is truncated.

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.

Input

FieldTypeDescription
days_aheadinteger1–365

How far forward to look, in days. 1-365, defaults to 30.

Default: 30

Output

FieldTypeDescription
ledger_read_okboolean

outstanding_countnumber

itemsobject[]

items[].job_idstring

items[].invoice_idstring | null

items[].billedboolean

items[].paidboolean

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/deposit_status \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days_ahead":30}'

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

// 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/deposit_status",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "days_ahead": 30
},
    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.deposit_status",
    "arguments": {
      "days_ahead": 30
    }
  }
}

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.