Webhooks & Polling
Webhooks & Polling
Truemed notifies your systems about dispute activity in real time through three webhook events, delivered over the same signed, retried webhook infrastructure as the rest of the Truemed API. The model is notify, then fetch: the webhook tells you a dispute changed and carries a full snapshot, and you can re-fetch the dispute for authoritative state.
Events
Inquiries notify too — with one exception. A live inquiry fires dispute.created (and dispute.updated) just like a
chargeback, so you can respond to pre-empt escalation. If the bank later drops a surfaced inquiry, it reaches the terminal
closed state and fires dispute.closed — so dispute.closed marks any terminal outcome, whether a chargeback result
(won/lost/accepted/expired) or a dropped inquiry (closed). The one exception: an inquiry that opens and closes
between webhook deliveries — already terminal the first time Truemed sees it — fires no webhook at all, since nothing
was ever actionable.
Events are deduplicated on transitions: a re-sync of an already-terminal dispute does not re-fire dispute.closed, and
an update that doesn’t change state or phase is silent.
Payload
Dispute events use the standard signed webhook envelope: the
data field is the full canonical dispute — the same shape returned by
GET /api/v1/disputes/{dispute_id}, including dispute_id, state, phase,
reason, amount, due_by, counters, and metadata. Because the snapshot is complete, you can often act on the
webhook directly; re-fetching is the safe fallback when a delivery is delayed or retried out of order.
Null fields are omitted, so outcome and resolved_at are absent until the dispute resolves (and prior_dispute_id is
absent unless this is a re-filing). processor and currency are upper-case ("STRIPE", "USD").
The delivery is signed with HMAC-SHA256; verify the x-truemed-signature header before processing. The header carries a
timestamp and the signature — for example x-truemed-signature: t=1706108400,v0=5257a869… — and the signed message is
{t}.{raw_body}. See Signature verification for ready-to-use
snippets. Payloads carry canonical Truemed fields and the public dispute_id UUID — never raw processor payloads. Always
key your records on dispute_id.
Subscribing
Dispute events use your existing sales-channel webhook configuration and respect its scope (testing vs. non-testing).
Add the dispute.* events to your webhook endpoint the same way you manage other Truemed webhook subscriptions, and
verify the HMAC signature on delivery as you do for all Truemed webhooks.
Recommended pattern
- Subscribe to
dispute.created,dispute.updated, anddispute.closed. - On
dispute.created, store thedispute_idand surface the open dispute to your team, notingdue_by. - Respond before
due_by— submit evidence or accept. - On
dispute.updated/dispute.closed, re-fetch the dispute (or trust the payload snapshot) to track progress and the finaloutcome.