Developers v1 REST · JSON OAuth 2.0

Chargewood API reference

Chargewood reads your disputes and takes supporting records from the tools you already run. The API exists so those tools can reach it without us building an integration for each one — which is also why the officially supported client is our Zapier integration: it already speaks to thousands of applications, so you build a Zap instead of writing code.

Base URL
https://chargewood.com/api/v1
Authentication
Authorization: Bearer <access_token>
Format
JSON · UTF-8 · ISO 8601 timestamps
Contract
Version 1 · August 2026
01

Overview

Nothing sent to this API becomes evidence on its own. A record you push is matched to a dispute and then held as a proposed fact, which somebody at your company confirms in the console before it can be argued from.

There is no endpoint that edits a dispute, changes your response, or submits anything, and there is no setting that turns the confirmation step off. An automation that could put an unread sentence in front of a card network is not something we are willing to ship.

Everything lives under https://chargewood.com/api/v1. The version is in the path because the consumers are other people's automations: when we change something, your Zap keeps working and you find out on your schedule rather than ours.

Requests and responses are JSON. Timestamps are ISO 8601 in UTC. Every object you can address by id uses an opaque identifier that is stable for the life of the record; nothing in the API takes an account id, because the token is the account.

Request
GET /api/v1/me HTTP/1.1
Host: chargewood.com
Authorization: Bearer <access_token>
Accept: application/json
02

Authentication

OAuth 2.0, authorization code grant (RFC 6749 §4.1). There is no API key, no password grant and no client-credentials grant — every token belongs to a specific merchant who approved a specific consent screen, and it can be cut off from Connections in their console at any moment.

GET /oauth/authorize

The consent screen. A signed-out merchant signs in and lands back here; a signed-in one approves the scopes and is redirected to redirect_uri with code and state.

client_id string required
Your client identifier.
redirect_uri url required
Must be one of the URIs registered for the client.
response_type string required
Always code.
scope string
Space-separated scopes from the table below.
state string
Echoed back unchanged on the redirect. Send one.
POST /oauth/token

Exchanges a code for tokens, or renews an access token. Client credentials go in an HTTP Basic header or as client_id / client_secret form fields — both forms the RFC allows, neither less safe over TLS.

grant_type string required
authorization_code or refresh_token. Anything else answers unsupported_grant_type.
code string
The code from the redirect. Single use.
redirect_uri url
Must match the one the code was issued for.
refresh_token string
With grant_type=refresh_token.
Request
POST /oauth/token
Authorization: Basic base64(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code
&code=<code>
&redirect_uri=https://example.com/oauth/callback
Response200 OK
{
  "access_token":  "<access_token>",
  "refresh_token": "<refresh_token>",
  "token_type":    "bearer",
  "expires_in":    7200,
  "scope":         "disputes:read evidence:write activity:write"
}
POST /oauth/revoke

RFC 7009. Takes token of either type and always answers 200, including for a token that was never ours — the alternative is an oracle for testing whether a stolen value is live.

Token lifetime

Access tokens live 2 hours. Refresh tokens do not expire and are not rotated, so a client that fails to store a replacement is never stranded. Send the access token as Authorization: Bearer <token> on every request.

Re-approving the consent screen replaces whatever the client was holding. That is deliberate — a merchant who reconnects because they think a credential leaked has to actually gain something — but it means an account holds one live grant per client, and reconnecting invalidates the previous tokens immediately.

03

Scopes

Ask for less and you get less. There is no scope that writes to a dispute, because no such capability exists.

ScopeGrantsUsed by
disputes:readRead your disputes, their deadlines and their status/api/v1/disputes, /api/v1/hooks
evidence:writeAttach supporting records from your other tools/api/v1/external_records
activity:writeAdd customer activity to the evidence you already collect/api/v1/activity_events

A request missing the scope it needs answers 403 with "error": "insufficient_scope". GET /api/v1/me needs no scope beyond a valid token.

04

Disputes

Read-only, and that isn't a phase-one limitation. Nothing outside the console may change a dispute's evidence.

GET /api/v1/me

Who this token belongs to. The connection test, and the source of the label a client shows for the connection — a merchant running three Chargewood accounts through one Zapier login has to be able to tell them apart in a dropdown.

Response200 OK
{
  "id":           1042,
  "label":        "Northwind Supplies",
  "company_name": "Northwind Supplies",
  "scopes":       ["disputes:read", "evidence:write", "activity:write"],
  "connected_at": "2026-08-18T14:30:00Z"
}
GET /api/v1/disputes disputes:read

Newest first, because that is what a polling trigger wants: it reads the top of the list, dedupes on id, and never looks further back.

Query parameters

since timestamp
Only disputes opened at or after this ISO 8601 time.
status string
Filter on the status value returned in the dispute object.
limit integer
Default 50, maximum 100.
include_test boolean
Test-mode disputes are excluded unless asked for. A merchant testing a Zap wants them; a merchant running one does not want a sandbox charge opening a real ticket in their helpdesk.
Response200 OK
{
  "data": [ { dispute }, { dispute }, … ]
}
GET /api/v1/disputes/:id disputes:read

One dispute by its id. A dispute that isn't on your account is a 404, whether or not it exists elsewhere.

The dispute object

Every dispute is returned in the same shape, whether it came from a poll, a lookup or a webhook delivery. A client samples one and maps against it, then is fed the others; a field that existed in one and not another would be an automation that works in testing and breaks in production.

Dispute
{
  "id":                    "9b1d7c2e-4f3a-4c8e-9a62-0f5e3b7d1c44",
  "provider":              "stripe",
  "provider_dispute_id":   "dp_1Pq…",
  "kind":                  "chargeback",
  "status":                "evidence_drafted",
  "reason":                "product_not_received",
  "reason_label":          "Product not received",
  "amount":                149.00,
  "amount_cents":          14900,
  "currency":              "usd",
  "opened_at":             "2026-08-18T14:30:00Z",
  "evidence_due_by":       "2026-08-25T23:59:59Z",
  "submitted_at":          null,
  "livemode":              true,
  "customer_email":        "[email protected]",
  "customer_name":         "A. Shopper",
  "transaction_reference": "ch_3Pq…",
  "order_reference":       "1001",
  "url":                   "https://chargewood.com/app/disputes/9b1d7c2e-…"
}
id string
Stable public identifier. Deduplicate on it.
provider string
Where the dispute came from — the processor or store platform.
status string
Where the dispute is in its life. Also the value status filters on.
amount, amount_cents, currency number · integer · string
The disputed amount both ways; currency is a lowercase ISO 4217 code.
opened_at, evidence_due_by, submitted_at timestamp · nullable
When it opened, when the processor wants the evidence, and when it went out. null until it happens.
customer_email, transaction_reference, order_reference string · nullable
The three values your other tools hold for this customer — and the three you map straight back into a push, which is the whole round trip this API exists for.
url url
The dispute in the console, for a person to open from wherever your automation put it.

Raw processor payloads are deliberately not included. They are unbounded, their meaning changes without notice, and they carry more of your customer's personal data than a workflow tool has any reason to hold.

05

Supporting records

The endpoint this API exists for. A helpdesk thread, a delivery scan, a licence check, a signed policy: whatever your other tools hold that would help answer a dispute.

POST /api/v1/external_records evidence:write

Stores one record and matches it to a dispute. Matching tries the keys below in order of strength and stops at the first that resolves to exactly one dispute. A record that matches nothing is kept and attaches itself if a dispute it fits opens later.

Body · JSON or form-encoded

title string required
One line naming the record. Up to 200 characters.
body string
The record in its own words, up to 20,000 characters. This is what you'll be shown and asked to confirm, so send the source rather than a summary of it.
kind enum

One of customer_communication, delivery, access_activity, policy_disclosure, purchase_confirmation, refund_outcome, other. Decides which part of the response it strengthens. An unrecognised value becomes other rather than an error — the taxonomy is ours, the automation is yours.

occurred_at timestamp
When it happened. Defaults to now — which would date a two-year-old ticket to today, so send the real one. An unparseable value is a 422, never a silent default.
source_app string
Which tool it came from, shown beside the record.
dispute_id string
Names the dispute outright — usually because the same automation was started by a dispute.opened webhook that handed it the id. The strongest match; skips the heuristics below. Unknown id: 404.
transaction_reference string
Your processor's payment id. The strongest match after the dispute id.
order_reference string
Your own order number.
customer_email string
The weakest match: used only when exactly one open dispute inside 180 days fits.
external_id string
Your id for the record. Sending it makes the call idempotent — the same id updates rather than duplicating.
external_url url
A link back to the original.
metadata object
Up to 25 string key/value pairs, values up to 500 characters.
Request
POST /api/v1/external_records
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title":                 "Ticket #4821 — delivery confirmed",
  "body":                  "Customer wrote on 19 Aug: 'Got it, thanks…'",
  "kind":                  "customer_communication",
  "occurred_at":           "2026-08-19T09:12:00Z",
  "source_app":            "Zendesk",
  "transaction_reference": "ch_3Pq…",
  "external_id":           "zd-4821",
  "external_url":          "https://example.zendesk.com/tickets/4821"
}
Response201 Created
{
  "id":               "c71e…",
  "kind":             "customer_communication",
  "title":            "Ticket #4821 — delivery confirmed",
  "occurred_at":      "2026-08-19T09:12:00Z",
  "matched":          true,
  "match_confidence": "transaction",
  "dispute_id":       "9b1d7c2e-…",
  "order_reference":  "1001",
  "status":           "awaiting_your_confirmation"
}

Response fields

matched boolean
Whether the record found a dispute.
match_confidence enum · nullable
explicit, transaction, order or email — which key resolved it.
status enum
awaiting_your_confirmation or stored_unmatched. Said outright because it is the one thing about this API a merchant must not misunderstand: nothing sent here argues anything until a person at their company has confirmed it.

A replayed external_id answers 200 instead of 201, with the same shape.

06

Customer activity

For systems that aren't a browser and so can't run our tracker — a licence server, a desktop app, a game backend, your own admin. The activity joins the same history our tracker collects, which is what answers a customer who says they never used what they're disputing.

POST /api/v1/activity_events activity:write

Records one event. One request per event; batching would be a false economy for the clients this is built for.

Body

name string required
What happened — login, licence_check, content_viewed. Normalised before storing.
customer_email string
Whose activity this is. One of customer_email or customer_id is required.
customer_id string
Your own identifier for the customer, when you'd rather not send the address.
occurred_at timestamp
When it happened. Defaults to now.
event_id string
Idempotency key. Without one we derive it from the customer, the name and the second it happened, so a replay collapses and a genuinely repeated action at a different second does not.
url url
Where in your product it happened, if that means anything.
properties object
Free-form key/value pairs stored with the event.
Response201 Created
{
  "name":        "licence_check",
  "occurred_at": "2026-08-19T09:12:00Z",
  "recorded":    true     // false, with 200, when the event_id was already stored
}

We record no IP address or user agent from these calls. The address would be your automation's server, not your customer's, and an IP in that table is read as the customer's when we match a disputed transaction against their earlier ones.

07

Webhooks

REST hooks: subscribe a URL to an event and we POST the dispute to it when the event happens.

POST /api/v1/hooks disputes:read

Subscribes target_url to one event. Subscribing the same URL to the same event twice returns the existing subscription.

Body

event enum required
One of dispute.opened, dispute.submitted, dispute.closed.
target_url url required
Where to deliver. Restricted to the registered client's own domain — an endpoint that accepted any address would turn every dispute into an outbound request of somebody else's choosing.
Response201 Created
{
  "id":    "5e0a…",
  "event": "dispute.opened"
}
DELETE /api/v1/hooks/:id disputes:read

Unsubscribes. Answers 204. Scoped to the grant that created it, not just the account — one merchant's two connections cannot unsubscribe each other's hooks.

Events

EventFires when
dispute.openedA dispute arrived from the processor.
dispute.submittedEvidence has gone to the processor.
dispute.closedThe issuer decided.

Delivery

Each delivery is the dispute object above plus an event field, sent with User-Agent: Chargewood-Hooks/1. Answer any 2xx. A target that answers 410 is dropped immediately; one that fails 5 times in a row is dropped too, and the merchant turns the automation back on to resubscribe.

Delivery
POST <target_url>
Content-Type: application/json
User-Agent: Chargewood-Hooks/1

{
  "event": "dispute.opened",
  "id":    "9b1d7c2e-4f3a-4c8e-9a62-0f5e3b7d1c44",
  … the dispute object
}
08

Errors

Every failure answers with one shape. The message is written for the person building the automation, not for a log — it is what somebody sees at 11pm when their evidence isn't arriving.

Error4xx
{
  "error":   "insufficient_scope",
  "message": "This connection was approved without the evidence:write permission. Reconnect it to grant that."
}
StatuserrorMeaningRetry
401unauthorizedThe token is missing, expired or revoked.Renew the token, then retry.
403insufficient_scopeThe grant lacks the scope this endpoint needs.No. Reconnect with the scope.
404not_foundNot on your account, whether or not it exists elsewhere.No.
422invalid_requestA parameter you can fix: a date we can't read, a missing required field, an unknown event.No — deliberately 422 rather than 400, so a retrying client stops and says so instead of coming back three more times.

The OAuth endpoints answer the RFC 6749 §5.2 codes in the same shape: invalid_client, invalid_grant, invalid_request, unsupported_grant_type.

09

Limits

There is no published quota. Polling every few minutes and pushing records as they happen is well inside what we expect; if you're planning something larger, tell us first at [email protected] and we'll say yes or say why not.

LimitValue
Access token lifetime7200 seconds
Disputes per page50 default, 100 maximum
Record title / body200 / 20,000 characters
Record metadata25 keys, 500 characters per value
Webhook failures before drop5 consecutive, or one 410

Questions: [email protected]. See our Privacy Policy for how data reaching this API is handled, and Security for how it's protected.

Every dispute answered before the deadline

Connect your store in one click, or tell us about your disputes first.