Webhooks
Signed event notifications so your systems learn about charges, pre-authorizations, and card lifecycle changes the moment they happen -- no polling.
Event catalog
Transactions
charge.succeeded-- a charge was approved.charge.failed-- a charge was declined or failed.preauth.created-- a pre-authorization (hold) was attempted. CheckApproved: a declined hold also raises this event.preauth.completed/preauth.cancelled-- a hold was completed (captured) or cancelled.Approvedcarries the outcome.
When the payments API answers 202 (processing), the transaction event is sent once the outcome is final, not when the request returns.
Card lifecycle
card.vaulted-- a new card entered the vault (any capture surface).card.updated-- profile details changed.card.usage_changed-- the card's usage designation changed.card.cvv_refreshed-- a CVV was re-attached to the card.card.cvv_removed-- the stored CVV window ended.card.expired-- the card's expiry date passed.card.usage_expired-- the authorization window (UsageExpiry) ended.card.removed-- the card was securely deleted.
Forms and card requests
tpa.completed-- a third-party authorization form was completed.request.completed-- a cardholder completed a Card Request and the card was vaulted. This event is not offered in the dashboard's per-event picker; it is delivered to endpoints subscribed to all events.
Invoices (Invoices API)
invoice.accepted/invoice.rejected-- a batch line was scheduled, or refused with a reason.invoice.notice_sent-- the pre-charge notice went to the card holder.invoice.action_required-- the card holder was sent an approval link (CVV re-entry).invoice.notice_undeliverable-- an e-mail to the card holder bounced.invoice.paid/invoice.declined/invoice.failed-- the final charge outcome.invoice.expired-- the approval link ran out unused.invoice.voided-- you cancelled the invoice.batch.completed-- every invoice in a batch is final.
Endpoints subscribe to specific event types -- configure which events each endpoint
receives in the dashboard. An endpoint subscribed to all events may receive event types
that are not listed here; acknowledge them with a 2xx and ignore any Type you do
not handle.
Card data in webhooks
Envelope
Every delivery is a JSON envelope with a consistent outer shape; the event-specific
payload rides in Data. Property names are PascalCase exactly as
shown -- parse them case-insensitively if your serializer defaults to camelCase.
{
"Id": "9b2f4c1e-...-d41a", // unique event id -- your idempotency key
"Type": "card.expired",
"Created": "2026-07-09T18:30:00.1234567+00:00", // ISO 8601, UTC
"AccountId": 1234,
"CorrelationId": "...", // ties the event to the originating operation
"Data": { ... } // event-specific payload, below
}
Idis the same on every retry of an event, and the same for every endpoint that receives it.Createdis an ISO 8601 timestamp in UTC; some events express it with aZsuffix instead of+00:00. Parse it as ISO 8601 rather than matching a fixed format.- Most payloads send every property, using
nullwhen it has no value. A few events generated inside Card Vault's database leave null properties out instead. Treat a missing property and anullproperty the same way.
Card and transaction payload
For charge.*, preauth.*, card.*, tpa.completed
and request.completed, Data is the same card/transaction result object.
Every property below is always present; a property that does not apply to the event is
null (strings and objects), false (flags) or 0 (numbers).
Card fields
Token-- the Card Vault card token for charging the stored card.nulloncard.expired,card.usage_expired,card.removedandcard.cvv_removed(the card is leaving service; you already hold the token), and on transaction events where no card was vaulted.CardId-- stable card reference (UUID string). The same card always has the sameCardIdacross events and API responses; use it as your key for the stored card.Ref-- your reference, echoed back. Ontpa.completedit is the authorization's confirmation id; onrequest.completedit is the Card Request's reference.Brand-- brand name:"Visa","Master Card","American Express","Discover","JCB"or"UnionPay".BrandId-- numeric brand: 4 Visa, 5 Mastercard, 3 American Express, 6 Discover, 7 UnionPay, 8 JCB;0when the event carries no card fields.Last4-- last four digits of the card number.Bin-- first six digits of the card number (BIN).CardHolder-- cardholder name as captured. Personal data.Expiry-- card expiry as"yyyy-MM-dd". Use the year and month only: the day is normally the last day of the month but may be01.UsageType--"Recurring"or"SingleUse"(see Card usage).UsageExpiry-- end of the card's authorization window,"yyyy-MM-dd".RecurringBlocked--truewhen a requested change to Recurring could not be applied;UsageTypethen shows the unchanged usage.Verification-- card verification outcome: an object with booleansCardVerified,CvvMatch,StreetMatchandPostalMatch. Present on capture-page events andrequest.completed(every flagfalsewhen verification is not enabled for your account), and on an APIcard.vaultedwhen verification ran;nullotherwise. A check that was not performed readsfalse.LastVerified-- date of the verification,"yyyy-MM-dd", on some CVV refreshes; otherwisenull.CvvRefreshed--truewhen the result came from re-attaching a CVV to an existing card.Custom-- your custom fields (key/value object) when you submitted them with the card at capture; otherwisenull.
Transaction fields
Charged--truefor a charge or a pre-authorization completion/cancellation;falseforpreauth.createdand card events.Approved-- the gateway outcome. Meaningful on transaction events.TxRef-- the processor's transaction reference.AuthCode-- authorization code on approval;nullon declines.DeclineReason-- decline or error message;nullon approval.TxStatus--approved,declinedorfailedwhen the event source reports it; may benull-- rely onApproved.TxId-- the Card Vault transaction id, whenTxStatusis present (use it with GET /v1/payments/{TxId}).PreAuthId-- the hold's id, needed to complete or cancel it; on approvedpreauth.createdand onpreauth.completed/preauth.cancelled.AuthorizedAmount-- amount held (decimal, e.g.10.99) on approvedpreauth.created;0otherwise.TxProcessorId-- the processor profile used; store it withTxRef/PreAuthIdfor refunds and completions.CorrelationId-- end-to-end trace id (UUID string). Log it with your order id.
Additional reserved properties may appear in Data; ignore any property you do not recognise.
Which events carry which card fields
- Card lifecycle,
tpa.completed,request.completed:CardId,Brand,BrandId,Last4,Bin,CardHolder,Expiry,UsageType,UsageExpiry, andTokenexcept where noted above. Acard.cvv_refreshedraised by the CVV endpoint of the vault API carriesCardHolderandExpirybut leavesBin,UsageTypeandUsageExpirynull; when that refresh also ran a charge, the transaction fields are filled in as well. - Transactions from the hosted capture pages (Hosted, iFrame, JS Fields):
Brand,BrandId,Last4,Bin,CardHolder,Expiry,UsageType,UsageExpiry,Verification, plusTokenandCardIdwhen the card was vaulted -- for approved and declined outcomes alike. - At-capture charges and pre-authorizations through the payments API:
Token,CardId,Brand,BrandId,Last4andBinwhen the card was saved on success (VaultOnSuccess); no card fields otherwise.CardHolderandExpiryare not sent. - Charges and pre-authorizations on a stored token through the payments API: transaction fields only, no card fields.
- Virtual Terminal transactions and pre-authorization completion/cancellation:
transaction fields plus
CardId; no other card fields. - Invoice events:
BrandandLast4only (see below).
Example: card lifecycle event
{
"Id": "9b2f4c1e-...-d41a",
"Type": "card.vaulted",
"Created": "2026-11-19T18:30:00.1234567+00:00",
"AccountId": 1234,
"CorrelationId": "...",
"Data": {
"Token": "<card token>",
"CardId": "...",
"Ref": "CUST-0042",
"Brand": "Visa",
"BrandId": 4,
"Last4": "1111",
"CardHolder": "JANE DOE",
"Expiry": "2028-12-31",
"Bin": "411111",
"UsageType": "Recurring",
"UsageExpiry": "2028-12-31",
"RecurringBlocked": false,
"Verification": { "CardVerified": true, "CvvMatch": true, "StreetMatch": false, "PostalMatch": true },
"LastVerified": null,
"CvvRefreshed": false,
"Charged": false,
"Approved": false,
"TxRef": null,
"AuthCode": null,
"DeclineReason": null,
"TxStatus": null,
"TxId": null,
"PreAuthId": null,
"AuthorizedAmount": 0.0,
"TxProcessorId": null,
"Custom": null,
"CorrelationId": "..."
}
}
Example: charge event
{
"Id": "...",
"Type": "charge.succeeded",
"Created": "2026-11-19T18:31:02.5550000+00:00",
"AccountId": 1234,
"CorrelationId": "...",
"Data": {
"Token": "<card token>", // null when the card was not vaulted
"CardId": "...",
"Ref": "ORDER-1001",
"Brand": "Visa",
"BrandId": 4,
"Last4": "1111",
"CardHolder": "JANE DOE",
"Expiry": "2028-12-31",
"Bin": "411111",
"UsageType": "SingleUse",
"UsageExpiry": "2026-12-19",
"RecurringBlocked": false,
"Verification": { "CardVerified": false, "CvvMatch": false, "StreetMatch": false, "PostalMatch": false },
"LastVerified": null,
"CvvRefreshed": false,
"Charged": true,
"Approved": true,
"TxRef": "...",
"AuthCode": "...",
"DeclineReason": null,
"TxStatus": null,
"TxId": null,
"PreAuthId": null,
"AuthorizedAmount": 0.0,
"TxProcessorId": "...",
"Custom": null,
"CorrelationId": "..."
}
}
A charge on a stored token or from the Virtual Terminal has the same shape with the card
fields left null (the Virtual Terminal keeps CardId).
Invoice event payloads
For invoice.paid, invoice.declined, invoice.failed and
invoice.expired, Data is the invoice's result. Invoice events identify the
card by brand and last four digits only:
{
"InvoiceId": "...",
"BatchId": "...",
"ExternalRef": "INV-10045", // your reference
"Amount": 149.00,
"Currency": "CAD",
"PaymentType": "Recurring",
"ChargeDate": "2026-11-15",
"Status": "Paid",
"ResultCode": "approved",
"DeclineCategory": null, // on declines: the decline category
"AttemptCount": 1,
"TxId": "...", // the Card Vault transaction
"TxRef": "...", // the processor's reference
"Brand": "Visa",
"Last4": "1111", // the card actually charged
"OccurredUtc": "2026-11-15T14:02:11Z"
}
invoice.accepted/invoice.voided:InvoiceId,BatchId,ExternalRef,Amount,Currency,PaymentType,ChargeDate,Status,Approval(autoorrehydration),Brand,Last4,OccurredUtc.invoice.rejected:BatchId,Index(the line's position in your batch),ExternalRef,Status,Reason,Detail,OccurredUtc. No card fields.invoice.notice_sent/invoice.action_required/invoice.notice_undeliverable:InvoiceId,BatchId,ExternalRef,Notice,DeliveryState,ChargeDate,OccurredUtc. No card fields.batch.completed:BatchId,Paid,NotPaid,OccurredUtc.
OccurredUtc is an ISO 8601 UTC timestamp; depending on the event it may or may not carry
fractional seconds or a Z suffix.
Signature verification
Every delivery carries an HMAC-SHA256 signature in the
X-CardVault-Signature header, using a Stripe-compatible scheme:
X-CardVault-Signature: t=1783017000,v1=5f8a2c...9e41
To verify:
- Parse
t(unix epoch seconds) andv1(hex HMAC) from the header. - Reject if
|now - t|exceeds 300 seconds (replay window). - Compute
HMAC-SHA256(signing_secret, "<t>.<raw_body>")-- the epoch, a literal dot, then the raw request body bytes. - Compare to
v1with a constant-time comparison. Reject on mismatch.
// secretBytes: your endpoint's signing secret from the dashboard -- 64 hex characters; // decode the hex to its 32 bytes (Convert.FromHexString) and use those as the HMAC key var parts = header.Split(','); // "t=...", "v1=..." long t = /* parse t= */; string v1 = /* parse v1= */; if (Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - t) > 300) return false; var input = Encoding.UTF8.GetBytes($"{t}.{rawBody}"); using var hmac = new HMACSHA256(secretBytes); var expected = Convert.ToHexString(hmac.ComputeHash(input)).ToLowerInvariant(); return CryptographicOperations.FixedTimeEquals( Encoding.ASCII.GetBytes(expected), Encoding.ASCII.GetBytes(v1));
Delivery, retries, idempotency
- Events POST to your HTTPS endpoint with
Content-Type: application/json. Respond 2xx quickly (ack first, process async) -- anything else counts as a failed attempt. - Each delivery carries these headers:
X-CardVault-Signature(above),X-CardVault-Timestamp(the same epoch seconds ast),X-CardVault-Event(the event type, same as the envelopeType) andX-CardVault-Delivery(an id for this delivery attempt -- it changes on every retry). - Failed deliveries are retried with exponential backoff; delivery status is visible per endpoint in the dashboard.
- Use the envelope
Idas your idempotency key: a redelivered event with anIdyou have already processed should be a no-op. Do not useX-CardVault-Deliveryfor this.