Webhooks
A webhook is an HTTPS URL on your side that ClaimRev calls when something happens to one of your claims. Instead of asking ClaimRev over and over whether anything changed, you register the URL once and ClaimRev sends you a small signed message each time a claim is accepted, rejected or sent on, the payer responds, or an ERA arrives. You then fetch the details you need with the API calls you already use.
Delivery is at least once: ClaimRev retries until your URL answers, so the same event can reach you more than once. Every message is signed with a secret only you and ClaimRev know, so you can check it really came from ClaimRev.
What you get
Event types
Each subscription lists the event types it wants. Subscribe to only the ones you act on.
| Type | When it fires | data fields |
|---|---|---|
claim.accepted | ClaimRev accepted the claim at intake. | claimId, patientControlNumber, payerControlNumber, status, source |
claim.rejected | ClaimRev rejected the claim at intake. Fix it and send it again. | as above |
claim.held | ClaimRev is holding the claim for review. | as above |
claim.sent_to_payer | The claim was sent to the payer. | as above |
claim.payer_acknowledged | The payer's 999 accepted the file the claim was in. | as above |
claim.payer_accepted | The payer's 277CA accepted the claim. | as above |
claim.payer_rejected | The payer's 999 or 277CA rejected the claim. | as above |
claim.payer_status | A 277 claim status response arrived. | as above |
era.claim_paid | An ERA claim payment was matched to the claim (paid, partly paid or denied). | claimId, patientControlNumber, payerControlNumber, paymentAdviceId, singleClaimPaymentAdviceId, claimStatusCode |
era.check_received | An ERA check or EFT arrived. | paymentAdviceId, traceNumber, paymentDate |
webhook.test | Only when you ask for a test send. You cannot subscribe to it. | subscriptionId, message |
What the data fields hold:
| Field | Meaning |
|---|---|
claimId | ClaimRev's id for the claim. Pass it to ClaimView/v1/GetClaimViewModel and GetClaimErrors. |
patientControlNumber | CLM01, the patient control number you put on the claim. |
payerControlNumber | The payer's own number for the claim. Left out until the payer has assigned one. |
status | ClearinghouseAccepted, ClearinghouseRejected, ClearinghouseHeld, SentToPayer, PayerAcknowledged, PayerAccepted, PayerRejected or PayerPending. On claim.payer_status it is PayerAccepted, PayerRejected or PayerPending. |
source | Which step produced the event: Intake, SentToPayer, PayerAck999, PayerAck277CA or PayerStatus277. It tells a 999 rejection from a 277CA rejection on claim.payer_rejected. |
paymentAdviceId | The ERA. Pass it to PaymentAdvice/v1/GetPaymentAdviceById. |
singleClaimPaymentAdviceId | This claim's payment within the ERA. Pass it to PaymentAdvice/v1/GetSingleClaimPaymentAdviceById. |
claimStatusCode | CLP02 as the payer sent it, for example 1 (processed as primary), 4 (denied) or 22 (reversal). |
traceNumber | The check or EFT number (TRN02). |
paymentDate | The payment date from the ERA. |
A field that has no value is left out of the message rather than sent as null. New fields and new event types can be added to schema version 1 at any time, so ignore fields and types you do not know rather than rejecting the message.
The envelope
Every message has the same envelope around its data:
| Field | Meaning |
|---|---|
id | The event's id, such as evt_0193a4b2c3d47e8f9a0b1c2d3e4f5a6b. It is the same on every retry and every redelivery of the event. Use it to drop duplicates. |
type | One of the event types above. |
schemaVersion | 1. |
occurredUtc | When it happened at ClaimRev. Use this to order events. |
createdUtc | When ClaimRev created the webhook event. |
accountNumber | Your ClaimRev account. |
data | The fields for the type, as above. |
An example claim.payer_rejected message, laid out for reading (the body you receive is the same JSON on one line, with no spaces):
{
"id": "evt_0193a4b2c3d47e8f9a0b1c2d3e4f5a6b",
"type": "claim.payer_rejected",
"schemaVersion": 1,
"occurredUtc": "2026-12-03T14:02:11Z",
"createdUtc": "2026-12-03T14:02:15Z",
"accountNumber": "TOON1",
"data": {
"claimId": "674f00000000000000000001",
"patientControlNumber": "TOON-10045",
"payerControlNumber": "2026337000123",
"status": "PayerRejected",
"source": "PayerAck277CA"
}
}
An era.claim_paid message:
{
"id": "evt_0193a4b2c3d47e8f9a0b1c2d3e4f5a6c",
"type": "era.claim_paid",
"schemaVersion": 1,
"occurredUtc": "2026-12-03T14:02:11Z",
"createdUtc": "2026-12-03T14:02:15Z",
"accountNumber": "TOON1",
"data": {
"claimId": "674f00000000000000000001",
"patientControlNumber": "TOON-10045",
"payerControlNumber": "2026337000123",
"paymentAdviceId": "675a00000000000000000002",
"singleClaimPaymentAdviceId": "675a00000000000000000003",
"claimStatusCode": "1"
}
}
GET /api/Webhooks/v1/event-types returns every type you can subscribe to, with a description and a sample message for each.
What is never in a message
Messages carry ids and control numbers only. They never carry patient names, dates of birth, amounts, or the payer's rejection text, which can name the patient. Fetch those with the API, using your normal credentials:
| To get | Call |
|---|---|
| The claim, its status and what the payer said | GET /api/ClaimView/v1/GetClaimViewModel?claimId={claimId} |
| The claim's errors (after a rejection) | GET /api/ClaimView/v1/GetClaimErrors?claimId={claimId} |
| The whole ERA | GET /api/PaymentAdvice/v1/GetPaymentAdviceById?adviceId={paymentAdviceId} |
| This claim's payment within the ERA | GET /api/PaymentAdvice/v1/GetSingleClaimPaymentAdviceById?adviceId={singleClaimPaymentAdviceId} |
These calls need the roles that read claims and ERAs, as they do today. See Checking Claim Status and Retrieving ERAs.
Before you start
- ClaimRev turns webhooks on for your account. Ask ClaimRev support. Until then every webhooks call returns
403with the detailWebhooks are not enabled for this account; contact ClaimRev.If ClaimRev later turns webhooks off for the account, the same403returns and nothing more is sent: events from while it is off are not sent at all, and deliveries already waiting are held and go out once webhooks are turned back on (within 30 days). - The person or application needs the Webhooks role. It carries the
webhooks:managepermission, which every webhooks call requires. ClaimRev makes the role available to your account when it turns webhooks on. A practice admin then gives it to a user, or links it to an application on the Client Applications screen (Manage roles). - Everything is scoped to your default account. The calls act on the account your token's default account names. There is no account field in any request.
In the portal, the same settings are under Practice Admin, then API Integrations, then Webhooks.
Test and production are separate, as they are for credentials: a subscription made in the test environment only receives test events.
Create a subscription
POST /api/Webhooks/v1/subscriptions
Authorization: Bearer <token>
Content-Type: application/json
{
"url": "https://emr.example.com/claimrev/webhooks",
"description": "EMR claim status",
"eventTypes": ["claim.rejected", "claim.payer_rejected", "era.claim_paid"],
"schemaVersion": 1
}
| Field | Rules |
|---|---|
url | Required. At most 1,000 characters. Spaces around it are trimmed. See Which URLs are accepted. |
eventTypes | Required. At least one type from the table above. Duplicates are dropped. |
description | Optional. At most 200 characters, trimmed. |
schemaVersion | Optional. 1, the only version today. |
The response:
{
"subscription": {
"webhookSubscriptionId": "0193a4b2-c3d4-7e8f-9a0b-1c2d3e4f5a6f",
"url": "https://emr.example.com/claimrev/webhooks",
"description": "EMR claim status",
"eventTypes": ["claim.rejected", "claim.payer_rejected", "era.claim_paid"],
"schemaVersion": 1,
"status": "Active",
"failingSince": null,
"lastDeliveryDate": null,
"lastHttpStatus": null,
"lastErrorClass": null,
"rotationInProgress": false,
"version": 815
},
"signingSecret": "whsec_dGVzdC1zZWNyZXQtZm9yLWRvY3MtMDAwMDAwMDA="
}
Store signingSecret now. It is in this response only. ClaimRev stores it encrypted, and no call returns it again. If you lose it, rotate the secret.
A subscription receives events that happen after it is created. It does not receive earlier ones. An account can have at most 10 subscriptions.
Which URLs are accepted
- HTTPS only. An
http://URL is refused. - A public host name. An IP address is refused (use a host name), and so are
localhost, names with no dot (such ashttps://intranet/hook), and names on internal-only endings such as.local,.internal,.lan,.homeand.corp. - No user name or password in the URL. Put any token you need in the path or query instead.
When ClaimRev sends, it looks the host name up again. If any address it resolves to is not a public internet address (a private, loopback or link-local network, for example), nothing is sent and the attempt fails with the error class BlockedAddress.
Changing and deleting a subscription
PUT /api/Webhooks/v1/subscriptions/{id} takes the same fields as create, plus version: send the version you last read. The whole subscription is replaced, so send every field. If someone else changed it after you read it, the call returns 409 with code VersionConflict; read it again and retry.
DELETE /api/Webhooks/v1/subscriptions/{id} deletes the subscription and its delivery log. It returns 204.
Errors
Every webhooks call can return these:
| Status | Meaning |
|---|---|
400 | The request needs correcting. The body has a top-level code (below) and a detail you can show to a person. |
403 | Webhooks are not on for the account (the detail says so), the caller has no default account, or the caller lacks the Webhooks role. Test, Redeliver and Resume also return 403 while the caller's session hides patient data (the portal's demo mode); see Test, rotate and the delivery log. |
404 | No subscription or delivery with that id exists on your account. |
409 | A conflict. The body has code AlreadyPending (that delivery is already waiting to be sent) or VersionConflict (the subscription changed since you read it). A 409 without a code means the record changed while it was being saved; read it again and retry. |
{
"title": "Some of the details need correcting.",
"status": 400,
"detail": "The URL must start with https://.",
"errors": {},
"code": "HttpsRequired"
}
The 400 codes:
code | Meaning |
|---|---|
UrlRequired | No URL was sent. |
UrlTooLong | The URL is over 1,000 characters. |
UrlInvalid | The URL is not a valid absolute web address. |
HttpsRequired | The URL does not start with https://. |
NoCredentials | The URL holds a user name or password. |
HostnameRequired | The URL uses an IP address instead of a host name. |
PublicHostRequired | The host is not a public host name. |
EventTypesRequired | No event type was listed. |
EventTypeUnknown | A listed event type is not one you can subscribe to. |
SchemaVersionUnsupported | A schema version other than 1 was asked for. |
DescriptionTooLong | The description is over 200 characters. |
VersionRequired | An update did not send version. |
TooManySubscriptions | The account already has 10 subscriptions. |
Verify the signature
Every request ClaimRev sends is a POST with Content-Type: application/json; charset=utf-8 and these headers:
| Header | Value |
|---|---|
ClaimRev-Webhook-Id | The event's id, the same as in the body. |
ClaimRev-Webhook-Timestamp | When the request was signed, in Unix seconds. |
ClaimRev-Signature | t=<Unix seconds>,v1=<signature>. For 24 hours after a secret rotation it carries a second v1: t=<Unix seconds>,v1=<signature with the new secret>,v1=<signature with the old secret>. |
Verify every request before you trust it:
- Split
ClaimRev-Signatureon commas. Take the value oft, and the value of eachv1. - Reject the request if
tis more than 5 minutes (300 seconds) before or after your clock. This stops an old request being replayed. - Decode your secret: drop the
whsec_prefix and base64-decode the rest. The decoded bytes are the key. - Compute HMAC-SHA256 with that key over
t, a dot, and the raw request body exactly as received:t + "." + body. Write it as lowercase hex. - Compare it with each
v1using a constant-time comparison. - Accept the request if any
v1matches. Otherwise reply401and drop it.
Read the raw body before any JSON parsing. Parsing and re-serializing the JSON changes the bytes, and the signature will not match.
Test vector
Check your code against this before you connect it to anything:
| Secret | whsec_dGVzdC1zZWNyZXQtZm9yLWRvY3MtMDAwMDAwMDA= |
t | 1764770535 |
| Body | {"id":"evt_1","type":"webhook.test"} |
| Signed text | 1764770535.{"id":"evt_1","type":"webhook.test"} |
v1 | 31592843a417893a44369c668b8bb7c5c62e4abe2730af2614df7c4096d1dbe0 |
| Header | t=1764770535,v1=31592843a417893a44369c668b8bb7c5c62e4abe2730af2614df7c4096d1dbe0 |
Pass 1764770535 as "now" when you test, because the timestamp check would otherwise reject it. The same vector is pinned by ClaimRev's own signing tests. Each sample below was run against it.
C#
For .NET 6 or later.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
public static class ClaimRevWebhookSignature
{
public const int ToleranceSeconds = 300;
/// <summary>The lowercase hex HMAC-SHA256 of "t.body", keyed with the decoded secret.</summary>
public static string Compute(string secret, long timestamp, byte[] rawBody)
{
var key = Convert.FromBase64String(secret.Substring("whsec_".Length));
var prefix = Encoding.UTF8.GetBytes(timestamp.ToString(CultureInfo.InvariantCulture) + ".");
var message = new byte[prefix.Length + rawBody.Length];
prefix.CopyTo(message, 0);
rawBody.CopyTo(message, prefix.Length);
return Convert.ToHexString(HMACSHA256.HashData(key, message)).ToLowerInvariant();
}
/// <summary>True when the header's timestamp is within 5 minutes of now and any v1 matches.</summary>
public static bool Verify(byte[] rawBody, string? header, string secret, DateTimeOffset now)
{
if (string.IsNullOrEmpty(header) || !secret.StartsWith("whsec_", StringComparison.Ordinal)) return false;
long? timestamp = null;
var signatures = new List<string>();
foreach (var part in header.Split(','))
{
var item = part.Trim();
var eq = item.IndexOf('=');
if (eq <= 0) continue;
var name = item.Substring(0, eq);
var value = item.Substring(eq + 1);
if (name == "t" && long.TryParse(value, NumberStyles.None, CultureInfo.InvariantCulture, out var t)) timestamp = t;
else if (name == "v1") signatures.Add(value);
}
if (timestamp == null || Math.Abs(now.ToUnixTimeSeconds() - timestamp.Value) > ToleranceSeconds) return false;
var expected = Encoding.ASCII.GetBytes(Compute(secret, timestamp.Value, rawBody));
var matched = false;
foreach (var signature in signatures)
{
matched |= CryptographicOperations.FixedTimeEquals(Encoding.ASCII.GetBytes(signature), expected);
}
return matched;
}
}
In an ASP.NET Core minimal API:
app.MapPost("/claimrev/webhooks", async (HttpRequest request) =>
{
using var buffer = new MemoryStream();
await request.Body.CopyToAsync(buffer);
var rawBody = buffer.ToArray();
if (!ClaimRevWebhookSignature.Verify(rawBody, request.Headers["ClaimRev-Signature"].ToString(), secret, DateTimeOffset.UtcNow))
return Results.Unauthorized();
// Store the event, then return straight away; process it afterwards.
return Results.Ok();
});
PHP (OpenEMR)
For PHP 7.4 or later, so it runs in an OpenEMR module.
<?php
const CLAIMREV_TOLERANCE_SECONDS = 300;
/** The lowercase hex HMAC-SHA256 of "t.body", keyed with the decoded secret, or null for a malformed secret. */
function claimrev_signature(string $secret, int $timestamp, string $rawBody): ?string
{
if (strncmp($secret, 'whsec_', 6) !== 0) {
return null;
}
$key = base64_decode(substr($secret, 6), true);
if ($key === false) {
return null;
}
return hash_hmac('sha256', $timestamp . '.' . $rawBody, $key);
}
/** True when the header's timestamp is within 5 minutes of now and any v1 matches. */
function claimrev_verify_signature(string $rawBody, ?string $header, string $secret, ?int $now = null): bool
{
if ($header === null || $header === '') {
return false;
}
$now = $now ?? time();
$timestamp = null;
$signatures = [];
foreach (explode(',', $header) as $part) {
$pair = explode('=', trim($part), 2);
if (count($pair) !== 2) {
continue;
}
[$name, $value] = $pair;
if ($name === 't' && ctype_digit($value)) {
$timestamp = (int) $value;
} elseif ($name === 'v1') {
$signatures[] = $value;
}
}
if ($timestamp === null || abs($now - $timestamp) > CLAIMREV_TOLERANCE_SECONDS) {
return false;
}
$expected = claimrev_signature($secret, $timestamp, $rawBody);
if ($expected === null) {
return false;
}
$matched = false;
foreach ($signatures as $signature) {
// hash_equals compares in constant time.
$matched = hash_equals($expected, $signature) || $matched;
}
return $matched;
}
In the receiving script, read the body before anything else touches it:
$rawBody = file_get_contents('php://input');
$header = $_SERVER['HTTP_CLAIMREV_SIGNATURE'] ?? null;
if (!claimrev_verify_signature($rawBody, $header, $secret)) {
http_response_code(401);
exit;
}
// Store the event, then return straight away; process it afterwards.
http_response_code(200);
In OpenEMR, keep the secret encrypted at rest (for example with CryptoGen), and do not require an OpenEMR session on the receiving script: ClaimRev does not sign in.
Node
For Node 16 or later.
const crypto = require('crypto');
const TOLERANCE_SECONDS = 300;
// The lowercase hex HMAC-SHA256 of "t.body", keyed with the decoded secret.
function claimRevSignature(secret, timestamp, rawBody) {
const key = Buffer.from(secret.slice('whsec_'.length), 'base64');
return crypto.createHmac('sha256', key).update(`${timestamp}.`).update(rawBody).digest('hex');
}
// rawBody is the body exactly as received (a Buffer or a string), before any JSON parsing.
function verifyClaimRevSignature(rawBody, header, secret, nowSeconds = Math.floor(Date.now() / 1000)) {
if (!header || typeof secret !== 'string' || !secret.startsWith('whsec_')) return false;
let timestamp = null;
const signatures = [];
for (const part of header.split(',')) {
const item = part.trim();
const eq = item.indexOf('=');
if (eq <= 0) continue;
const name = item.slice(0, eq);
const value = item.slice(eq + 1);
if (name === 't' && /^\d+$/.test(value)) timestamp = Number(value);
else if (name === 'v1') signatures.push(value);
}
if (timestamp === null || Math.abs(nowSeconds - timestamp) > TOLERANCE_SECONDS) return false;
const expected = Buffer.from(claimRevSignature(secret, timestamp, rawBody), 'utf8');
let matched = false;
for (const signature of signatures) {
const candidate = Buffer.from(signature, 'utf8');
// timingSafeEqual compares in constant time; it needs equal lengths.
if (candidate.length === expected.length && crypto.timingSafeEqual(candidate, expected)) matched = true;
}
return matched;
}
module.exports = { claimRevSignature, verifyClaimRevSignature };
With Express, take the body raw on this route:
const express = require('express');
const { verifyClaimRevSignature } = require('./claimrevWebhookSignature');
const app = express();
app.post('/claimrev/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
// express.raw leaves req.body as {} for any other content type; refuse it rather than fail on it.
if (!Buffer.isBuffer(req.body)) return res.sendStatus(400);
if (!verifyClaimRevSignature(req.body, req.get('ClaimRev-Signature'), process.env.CLAIMREV_WEBHOOK_SECRET)) {
return res.sendStatus(401);
}
// Store the event, then return straight away; process it afterwards.
res.sendStatus(200);
});
Handle it well
- Return a 2xx within 10 seconds, then do the work. ClaimRev waits at most 10 seconds for your response headers, then counts the attempt as failed and retries. Store the event (its
idand raw body) and reply; fetch details and update your records afterwards, from a queue or a scheduled job. Any 2xx status counts as delivered. The response body is not read. - Drop duplicates by
id. Retries and redeliveries carry the sameid. Keep the ids you have stored (a unique key onidworks) and treat a duplicate as a success: reply 2xx and do nothing. - Events can arrive out of order. A retry can land after a newer event for the same claim. Order by
occurredUtc, and do not let an older event overwrite what a newer one told you. When in doubt, fetch the claim: the API always has its current state. - Redirects are not followed. A
3xxresponse is a failed attempt. Register the final URL. - Do not call ClaimRev from inside the request. Fetching the claim before you reply makes the 10-second limit easy to miss.
Retries and failures
An attempt fails when your URL returns anything other than a 2xx, takes longer than 10 seconds, or cannot be reached. ClaimRev then tries again after 1 minute, 5 minutes, 15 minutes, 1 hour and 2 hours, and then every 4 hours, until 24 hours have passed since the first attempt. That is 11 attempts in all, the last about 23 hours after the first. After that the delivery is marked Failed and is not tried again unless you redeliver it.
Each attempt is recorded in the delivery log with an error class when it failed:
| Error class | Meaning |
|---|---|
HttpError | Your URL answered with a status other than 2xx (including a redirect). The status is recorded too. |
Timeout | No response within 10 seconds. |
Dns | The host name could not be looked up. |
Tls | The HTTPS connection could not be set up, for example because of a certificate problem. |
Refused | The connection was refused or could not be made. |
BlockedAddress | The host name resolves to an address that is not public, so nothing was sent. |
410 Gone pauses the subscription. If your URL answers 410, that delivery is marked Failed without retries and the subscription's status becomes Paused. While a subscription is paused, its new events are held, not dropped, and they are sent when you resume it.
After 3 days of failures, ClaimRev turns the subscription off. A subscription records when it started failing (failingSince); any successful delivery clears it. Once it has been failing for 3 days, the next failed attempt sets its status to DisabledByFailures. The account's users who hold the Webhooks role get an email saying which host was turned off and since when, and a notice in the portal. The email is sent even if the portal notice cannot be. While a subscription is turned off, nothing is sent to it, and events that happen meanwhile are not queued for it.
Resume a paused or turned-off subscription with:
POST /api/Webhooks/v1/subscriptions/{id}/resume
Authorization: Bearer <token>
Content-Type: application/json
{ "redeliverFailedSince": "2026-12-01T00:00:00Z" }
The body is optional. Without it, the subscription becomes Active again and failingSince is cleared. With redeliverFailedSince, the subscription's Failed deliveries created at or after that time are also put back in the queue. To redeliver a single delivery, use Redeliver.
A redelivered delivery keeps its history: its earlier attempts stay in the delivery log, its attempt numbers carry on from the last one, and the retry schedule starts again from the beginning.
The delivery log keeps 30 days. Deliveries are removed 30 days after they were created. A delivery still waiting to be sent after 30 days, for example on a subscription paused for longer than that, is removed too, is never sent, and is counted as failed. Use the polling fallback to catch up after a long pause.
Test, rotate and the delivery log
All under /api/Webhooks/v1, all requiring the Webhooks role:
| Call | What it does and returns |
|---|---|
GET event-types | The types you can subscribe to: type, group, description and samplePayload (a sample message as a JSON string). |
GET subscriptions | The account's subscriptions, newest first, each with its most recent attempt (lastDeliveryDate, lastHttpStatus, lastErrorClass). |
GET subscriptions/{id} | One subscription. |
POST subscriptions | Creates one. Returns the subscription and its signingSecret. |
PUT subscriptions/{id} | Replaces one. Send version. |
DELETE subscriptions/{id} | Deletes one and its delivery log. 204. |
POST subscriptions/{id}/rotate-secret | Issues a new secret. Returns the subscription and the new signingSecret. |
POST subscriptions/{id}/pause | Pauses it. Events are held until it resumes. |
POST subscriptions/{id}/resume | Resumes it, optionally redelivering failed deliveries since a date. |
POST subscriptions/{id}/test | Sends a signed webhook.test now. Returns delivered, httpStatus, errorClass and durationMs. |
GET deliveries | The delivery log, newest first. |
GET deliveries/{id} | One delivery: delivery (its log row), payloadJson (the exact payload sent) and attempts. |
POST deliveries/{id}/redeliver | Queues one delivery to be sent again. Returns its log row. |
The full request and response schemas are in the API Reference, under Webhooks.
Send a test
POST /api/Webhooks/v1/subscriptions/{id}/test sends a webhook.test event to the subscription's URL straight away, signed and with the same headers as a real event, and reports what happened:
{ "httpStatus": 200, "errorClass": null, "durationMs": 184, "delivered": true }
A test is not stored, not retried and not in the delivery log, and each one has a new id. Use it to check your URL and your signature code end to end.
Rotate the secret
POST /api/Webhooks/v1/subscriptions/{id}/rotate-secret returns a new signingSecret, shown once. The old secret keeps signing for 24 hours, so every request carries two v1 values during that time and rotationInProgress is true. Deploy the new secret within the 24 hours; because your code accepts any matching v1, nothing is dropped while you switch. Rotating again inside the window replaces the old secret with the one that was current.
The delivery log
GET /api/Webhooks/v1/deliveries takes these query parameters, all optional:
| Parameter | Meaning |
|---|---|
subscriptionId | One subscription. |
status | Pending, Delivered or Failed. |
eventType | One event type. |
from, to | When the delivery was created (UTC). Both ends are included. |
page, pageSize | Page number from 1, and up to 200 rows a page (50 by default). |
It returns items, page, pageSize and totalCount. Each row has webhookDeliveryId, webhookSubscriptionId, eventId, eventType, patientControlNumber, status, attemptCount, lastHttpStatus, lastErrorClass, occurredDate, createdDate, deliveredDate, and nextAttemptDate (set only while it is Pending, otherwise null).
GET /api/Webhooks/v1/deliveries/{id} returns three members: delivery, the same log row as above; payloadJson, the exact body that was sent and signed, as a JSON string; and attempts, oldest first, each with attemptNumber, attemptedDate, durationMs, httpStatus and errorClass:
{
"delivery": {
"webhookDeliveryId": "0193a4b2-c3d4-7e8f-9a0b-1c2d3e4f5a70",
"webhookSubscriptionId": "0193a4b2-c3d4-7e8f-9a0b-1c2d3e4f5a6f",
"eventId": "evt_0193a4b2c3d47e8f9a0b1c2d3e4f5a6b",
"eventType": "claim.payer_rejected",
"patientControlNumber": "TOON-10045",
"status": "Delivered",
"attemptCount": 2,
"lastHttpStatus": 200,
"lastErrorClass": null,
"occurredDate": "2026-12-03T14:02:11Z",
"createdDate": "2026-12-03T14:02:15Z",
"deliveredDate": "2026-12-03T14:03:16Z",
"nextAttemptDate": null
},
"payloadJson": "{\"id\":\"evt_0193a4b2c3d47e8f9a0b1c2d3e4f5a6b\",\"type\":\"claim.payer_rejected\",\"schemaVersion\":1,\"occurredUtc\":\"2026-12-03T14:02:11Z\",\"createdUtc\":\"2026-12-03T14:02:15Z\",\"accountNumber\":\"TOON1\",\"data\":{\"claimId\":\"674f00000000000000000001\",\"patientControlNumber\":\"TOON-10045\",\"payerControlNumber\":\"2026337000123\",\"status\":\"PayerRejected\",\"source\":\"PayerAck277CA\"}}",
"attempts": [
{ "attemptNumber": 1, "attemptedDate": "2026-12-03T14:02:15Z", "durationMs": 10004, "httpStatus": null, "errorClass": "Timeout" },
{ "attemptNumber": 2, "attemptedDate": "2026-12-03T14:03:16Z", "durationMs": 212, "httpStatus": 200, "errorClass": null }
]
}
POST /api/Webhooks/v1/deliveries/{id}/redeliver puts a Delivered or Failed delivery back in the queue. One that is already waiting returns 409 with code AlreadyPending.
While the caller's session hides patient data (the portal's demo mode), the log masks patientControlNumber and replaces payloadJson with a placeholder, and Test, Redeliver and Resume return 403. The same applies to any caller whose roles hide patient data.
Keep polling as a fallback
Webhooks tell you quickly, but they are not a complete record. Keep a daily sweep with the search endpoints you already use, so nothing is missed:
POST /api/ClaimView/v1/SearchClaimsPagedfor claims whose status changed since the last sweep (see Checking Claim Status).POST /api/PaymentAdvice/v1/SearchPaymentAdviceorSearchPaymentInfofor ERAs that arrived (see Retrieving ERAs).
The sweep catches events from before a subscription existed, events while it was turned off, deliveries removed after 30 days, and anything your side lost after replying 2xx. Once webhooks work, the sweep can run far less often than polling did.