Documentation
Payments
payments.dispute
REST
ShippingPOST /api/v1/payments/disputeMCP tool
Livepayments.disputeExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Payments domain.
Operating contract
One chargeback in full, plus the ONE FIELD THAT DECIDES WHETHER ANYTHING CAN STILL BE DONE: evidence_due_by, read live from the processor rather than from a stored copy that could be a week stale.
LEAD WITH THE DEADLINE. 'A $1,400 chargeback, evidence due Thursday' is an instruction; 'a chargeback is open' is a fact somebody will read on Friday.
deadline_available: false means the live read could not be made — the processor is not configured for this shop, or it declined the lookup. The stored row is still true; the deadline simply is not known, and guessing one is worse than saying so.
has_evidence: true means somebody has already uploaded a response. past_due: true means the window has closed, and the honest thing to say then is that the outcome is now the bank's alone.
live_status is the processor's status RIGHT NOW and can be fresher than status, which is whatever the last webhook wrote. When the two disagree, the live one is the true one.
amount_cents is in cents — the processor's own unit, kept exactly as it left the bank.
KEYED ON THE PAYMENT, not on the chargeback's own id, because that is how the question arrives: a payment came back, what happened to it. A chargeback the processor could not match to a recorded payment has no payment to key on — payments.disputes lists those, and their deadline can only be read at the processor.
One dispute, entirely returned, so nothing is truncated. Contesting it is not a capability: the evidence is documents somebody has to choose, submitted once, to a bank.
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
| Field | Type | Description |
|---|---|---|
| payment_idrequired | stringuuid | The disputed payment, as returned by payments.list or payments.disputes. |
Output
| Field | Type | Description |
|---|---|---|
| id | string | — |
| status | string | — |
| open | boolean | — |
| reason | string | null | — |
| amount_cents | number | — |
| currency | string | null | — |
| opened_at | string | — |
| updated_at | string | — |
| payment_id | string | null | — |
| payment_amount | number | null | — |
| invoice_id | string | null | — |
| invoice_number | number | null | — |
| customer_id | string | null | — |
| customer_name | string | null | — |
| funds_clawed_back | boolean | — |
| clawed_back_cents | number | — |
| deadline_available | boolean | — |
| evidence_due_by | string | null | — |
| live_status | string | null | — |
| has_evidence | boolean | null | — |
| past_due | boolean | null | — |
| submission_count | number | 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.
export SERVICEVIN_API_KEY=svk_live_…
curl -X POST https://www.servicevin.com/api/v1/payments/dispute \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"payment_id":"9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"}'const res = await fetch("https://www.servicevin.com/api/v1/payments/dispute", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"payment_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
}),
});
// 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;import os, requests
res = requests.post(
"https://www.servicevin.com/api/v1/payments/dispute",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"payment_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
},
timeout=30,
)
payload = res.json()
if not res.ok:
raise RuntimeError(payload["error"]["code"])
data = payload["data"]{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "payments.dispute",
"arguments": {
"payment_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
}
}
}Refusals
The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.
| Status | Code | When |
|---|---|---|
| 404 | not_found | The id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both. |
| 403 | forbidden | This login does not hold invoices.access. |
| 422 | validation_error | An argument was wrong. The message names the field. |
| 429 | rate_limited | Too many read calls. Back off and retry. |
| 500 | internal_error | Something failed on our side. Nothing was changed. |