# Agentcard webhooks

Agentcard webhooks are HTTP POST requests that Agentcard sends to your endpoint when something happens to your connected users, such as a card stored in their vault, a checkout approved or an order placed.

Agent skill: `npx skills add hookdeck/webhook-skills --skill agentcard-webhooks` ([details](https://hookdeck.com/webhooks/agentcard/skill))

> Independent reference generated from hookdeck/webhook-registry (commit ff7f882, 20 Nov 2026). [Agentcard's official docs](https://docs.agentcard.com/webhooks/overview).

[Overview](https://hookdeck.com/webhooks/agentcard) · [Webhook events (58)](https://hookdeck.com/webhooks/agentcard/events) · [MCP events](https://hookdeck.com/webhooks/agentcard/mcp-events) · [Verify signatures](https://hookdeck.com/webhooks/agentcard/verify) · [Production guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts) · [Agent skill](https://hookdeck.com/webhooks/agentcard/skill)

## Key facts

| Fact | Value | Source |
|---|---|---|
| Signature header | `AgentCard-Signature` Format: t=<unix seconds>,v1=<hex> | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Scheme | `HMAC-SHA256` | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Signed material | `{t}.{raw body}` t from the AgentCard-Signature header, a literal dot, then the raw body bytes. | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| How events are identified | `type field in the body` | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Body format | `JSON` | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Send timestamp | `AgentCard-Signature` Reject deliveries older than 5 minutes. | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Legacy signature | `X-AgentCard-Signature` sha256=<...> over the body alone; encoding not stated | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Other headers | `x-agentcard-signature` | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Envelope | `id, type, created, livemode, data` | [Agentcard docs](https://docs.agentcard.com/webhooks/overview) |
| Agent skill | `npx skills add hookdeck/webhook-skills --skill agentcard-webhooks` | [Agent skill →](https://hookdeck.com/webhooks/agentcard/skill) |

[Verify Agentcard webhooks](https://hookdeck.com/webhooks/agentcard/verify)

## How Agentcard webhooks work

Webhooks push events to your server as they happen, so you don't have to poll Agentcard's API. Agentcard treats SDK callbacks as signals for your UI and webhooks as the record. You register an endpoint for one mode with a list of events, and it receives only what it lists.

Every event has the same JSON envelope: `id`, `type`, `created` in Unix seconds, `livemode` and `data`, which varies by type. Branch on `type`, which Agentcard says is part of its API contract. `livemode` is `false` in sandbox. Deliveries carry no API version.

## Setting up Agentcard webhooks

- Create an endpoint with `POST https://api.agentcard.sh/api/v2/webhook_endpoints`, or in the dashboard under Developers > Webhooks, giving a `url` and `enabled_events`. Do it once per mode, because your token decides whether it's a sandbox or production endpoint.
- To test locally, run the [Hookdeck CLI](/docs/cli): `hookdeck listen 3000 agentcard --path /webhooks/agentcard`, then create a sandbox endpoint for its URL. `POST /api/v2/cards/{card_id}/test_charge` simulates a charge on a sandbox card and sends the same events a real one does.
- On a server that keeps running, the Commerce SDK's `agentcard.listen` receives the same events over one outbound connection, with no endpoint or signature to manage.
- Agentcard documents no resend call. `GET /api/v2/webhook_endpoints/{id}/deliveries` and the dashboard list recent delivery attempts.

## Delivery behaviour

- **Timeout:** 10 seconds. any answer other than a 2xx counts as a failure. [Guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#timeouts)
- **Retries:** up to 5. immediately, then after 1 minute, 5 minutes, 30 minutes and 1 hour. [Guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#retries)
- **After the last retry:** not documented. there's no documented resend call, so reconcile from the API. [Guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#retries)
- **Duplicates:** at least once. `id` stays the same on every redelivery. [Guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#duplicates)

## Known failure modes

1. **Duplicate deliveries.** Agentcard delivers each event at least once, and `id` stays the same on every redelivery. Record each `id` and skip any you've already processed. [Handle duplicates](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#duplicates)
2. **Out-of-order delivery.** A retried Agentcard delivery can arrive after a newer one. On trip plans, keep the highest `version` for each booking, and elsewhere don't assume events arrive in the order they happened. [Handle ordering](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#ordering)
3. **Events lost in a long outage.** Agentcard retries a failed delivery five times over less than two hours and documents nothing after that. After a longer outage, check the deliveries log and read the current state of the objects involved. [Retries and outages](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#retries)
4. **Purchase messages never arrive.** A catch-all `*` doesn't turn on `purchase.message`, so a shopper never hears about a step even though the endpoint looks healthy. Subscribe to it by name or with `purchase.*`. [Choosing events](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#choosing-events)

From [Hookdeck's Agentcard guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts).

## Agentcard webhook best practices

- **[Verify every signature](https://hookdeck.com/webhooks/agentcard/verify).** Check `AgentCard-Signature` against the raw body, using the whole `whsec_` secret as the key. A Standard Webhooks library won't match.
- **[Return a 2xx within 10 seconds](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#timeouts).** Store the event and respond before you do any slow work, so a slow handler doesn't count as a failed delivery.
- **[Deduplicate on the event id](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#duplicates).** Delivery is at least once, and `id` stays the same on every redelivery. Record each one and skip repeats.
- **[Keep the highest version on trip plans](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#ordering).** A retried `plan.updated` or `plan.item.updated` can arrive after a newer one, so ignore a lower `version`.
- **[Subscribe to purchase.message by name](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#choosing-events).** A catch-all `*` doesn't turn it on. List it by name, or with `purchase.*`, alongside the other events you handle.
- **[Keep sandbox and production apart](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts#testing).** Use separate endpoints, secrets and environment variables, and check `livemode` before acting on an event that moves money.

## Common Agentcard webhook events

### Cards and transactions

- [card.created](https://hookdeck.com/webhooks/agentcard/events#card.created): One-time virtual card is issued
- [card.closed](https://hookdeck.com/webhooks/agentcard/events#card.closed): Virtual card is closed
- [transaction.authorized](https://hookdeck.com/webhooks/agentcard/events#transaction.authorized): Merchant authorizes a charge on a card
- [transaction.cleared](https://hookdeck.com/webhooks/agentcard/events#transaction.cleared): Authorized charge settles
- [balance.low](https://hookdeck.com/webhooks/agentcard/events#balance.low): Card balance falls below its threshold

### Checkouts and orders

- [checkout_authorization.approved](https://hookdeck.com/webhooks/agentcard/events#checkout_authorization.approved): User approves a checkout and the processor responds
- [checkout_authorization.settled](https://hookdeck.com/webhooks/agentcard/events#checkout_authorization.settled): Processor read-back shows the charge succeeded
- [order.placed](https://hookdeck.com/webhooks/agentcard/events#order.placed): Order goes through at the merchant
- [order.failed](https://hookdeck.com/webhooks/agentcard/events#order.failed): Approved confirm ends without an order

### Connected users

- [connection.created](https://hookdeck.com/webhooks/agentcard/events#connection.created): User finishes connecting to your platform
- [vault.card_stored](https://hookdeck.com/webhooks/agentcard/events#vault.card_stored): User saves a card to their vault
- [purchase.message](https://hookdeck.com/webhooks/agentcard/events#purchase.message): Purchase step a shopper should hear about, with text to send them

## Events by resource

| Resource | Events | Payloads |
|---|---|---|
| [checkout_authorization](https://hookdeck.com/webhooks/agentcard/events#resource-checkout-authorization) | 12 | 9 |
| [transfer](https://hookdeck.com/webhooks/agentcard/events#resource-transfer) | 5 | 1 |
| [order](https://hookdeck.com/webhooks/agentcard/events#resource-order) | 4 | 3 |
| [transaction](https://hookdeck.com/webhooks/agentcard/events#resource-transaction) | 4 | 4 |
| [vault](https://hookdeck.com/webhooks/agentcard/events#resource-vault) | 4 | 3 |
| [card](https://hookdeck.com/webhooks/agentcard/events#resource-card) | 3 | 3 |
| [recovery](https://hookdeck.com/webhooks/agentcard/events#resource-recovery) | 3 | 1 |

1 more resource. [All 58 events](https://hookdeck.com/webhooks/agentcard/events)

## In this hub

- [Webhook events](https://hookdeck.com/webhooks/agentcard/events): Every covered Agentcard event, with payloads where the registry has them.
- [MCP events](https://hookdeck.com/webhooks/agentcard/mcp-events): How an agent subscribes to Agentcard events as MCP events.
- [Verify signatures](https://hookdeck.com/webhooks/agentcard/verify): Signature facts, verification code and common failures.
- [Production guide](https://hookdeck.com/webhooks/agentcard/guide-duplicates-ordering-retries-timeouts): Production problems, such as timeouts and retries, and how to handle them.
- [Agent skill](https://hookdeck.com/webhooks/agentcard/skill): Install the webhook skill in your coding agent. `npx skills add hookdeck/webhook-skills --skill agentcard-webhooks`
---

Not affiliated with Agentcard. Facts are compiled from public sources and linked inline. [View as JSON](https://hookdeck.com/webhooks/agentcard.json) · [Report a correction](https://hookdeck.com/contact)
