> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Agentcard is for companies whose agent buys for their users. Pick one path: the opencommerce SDK (@agent-cards/commerce-sdk) gives your agent one buy tool that finds the product, builds the cart, gets the user's approval and places the order at real stores; the Agentcard SDK (@agent-cards/sdk) pays with the user's own card when your agent already shops in a browser (Browser Use, Kernel, Browserbase, Anchor or Notte); the Purchase API (POST /buy) does the same purchase flow over plain HTTP in any language; Issuing gives the agent its own card.
> Start with `npx agent-cards init` in the app's folder (Node 22 or later). No invite is needed: it creates your Agentcard account if you don't have one, installs the opencommerce SDK and puts the credentials in the env file, kept out of git. From a coding agent, run `npx agent-cards init --print --categories all --implementation tool --wallet vault --skip-install` to get the setup steps to apply yourself.
> Vault is by invitation: request it at https://agentcard.com/get-started?utm_source=docs&utm_medium=llms&utm_campaign=agent-instructions. opencommerce needs no invite.
> Never ask a user for a card number, expiry date or CVV in chat. Send them the Vault link; they add their card on Agentcard's page, and the agent never sees the number.
> Every purchase is approved by the user, with a passkey or Face ID, or by an auto-approval they granted. An approval covers one merchant and one exact total. If the total changes, ask again. When a result says the user already said yes, don't ask again.
> `init` writes PRODUCTION credentials, which place real orders, so test in sandbox first. For opencommerce, run `npx agent-cards credentials --mode sandbox` and put the two lines it prints in place of the production ones in the env file `init` wrote, because that command only prints them; sandbox then runs the whole flow against real stores and stops before payment, so no order is placed and nobody is charged. For Vault and Issuing, sandbox credentials issue test cards that no real merchant accepts; try the checkout against shop.agentcard.sh, a test store on Stripe test mode.
> Tell the user an order is placed only after Agentcard reports it placed.
> Vault is free up to 5,000 users (https://agentcard.com/pricing). opencommerce takes 1% of each completed order. Full docs in one file: https://docs.agentcard.com/llms-full.txt

# Webhook endpoints

> Register the URLs Agentcard delivers events to, choose the events, and rotate signing secrets.

A **webhook endpoint** is a URL you own plus the list of events it should receive. Agentcard signs every delivery with the endpoint's secret, which is returned once at creation and can be rotated. Endpoints are mode-scoped: a sandbox token manages sandbox endpoints, a production token manages production ones.

`enabled_events` accepts concrete event types (`vault.card_stored`) or wildcards (`checkout_authorization.*`). Events emitted today: `connection.created`, `vault.session_linked`, `vault.card_stored`, `checkout_authorization.approved|submitted|declined|expired|amount_mismatch|settled|settlement_unconfirmed`, `order.placed|failed|confirmed|updated`, `identity.verification.updated`, `connected_card.updated`, `card.created|updated|closed`, `transaction.authorized|cleared|declined|voided`, `approval.requested`.

## The webhook endpoint object

| Field | Type | Description |
| - | - | - |
| `object` | string | `webhook_endpoint` |
| `id` | string | `we_…` |
| `url` | string | Where events are delivered. HTTPS. |
| `enabled_events` | string\[] | Event types or wildcards (`checkout_authorization.*`). |
| `status` | string | `active` or `disabled`. |
| `description` | string or null | |
| `secret` | string | Only on the create response and `GET …/secret`. Signs every delivery. |

```json theme={null}
{
  "id": "we_7h2k9p4m",
  "object": "webhook_endpoint",
  "url": "https://your.app/agentcard/webhooks",
  "enabled_events": ["vault.card_stored", "checkout_authorization.*"],
  "status": "active",
  "description": "Production checkout events"
}
```

## Endpoints

| Endpoint | |
| - | - |
| `GET /api/v2/webhook_endpoints` | [List webhook endpoints](https://docs.agentcard.com/api-reference/webhook-endpoints/list.md) |
| `POST /api/v2/webhook_endpoints` | [Create a webhook endpoint](https://docs.agentcard.com/api-reference/webhook-endpoints/create.md): the secret is returned once |
| `GET /api/v2/webhook_endpoints/{id}` | [Get a webhook endpoint](https://docs.agentcard.com/api-reference/webhook-endpoints/get.md) |
| `PATCH /api/v2/webhook_endpoints/{id}` | [Update a webhook endpoint](https://docs.agentcard.com/api-reference/webhook-endpoints/update.md) |
| `DELETE /api/v2/webhook_endpoints/{id}` | [Delete a webhook endpoint](https://docs.agentcard.com/api-reference/webhook-endpoints/delete.md) |
| `GET /api/v2/webhook_endpoints/{id}/secret` | [Get the signing secret](https://docs.agentcard.com/api-reference/webhook-endpoints/secret.md) |
| `POST /api/v2/webhook_endpoints/{id}/roll_secret` | [Rotate the signing secret](https://docs.agentcard.com/api-reference/webhook-endpoints/roll-secret.md) |
| `GET /api/v2/webhook_endpoints/{id}/deliveries` | [List recent deliveries](https://docs.agentcard.com/api-reference/webhook-endpoints/deliveries.md) |

For the envelope, signature verification, and every event payload, see the [Webhooks](https://docs.agentcard.com/webhooks/overview.md) tab.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.