Skip to main content
AgentaOS sends three event types today. Every event shares the same envelope, an id, a type, and a data object whose shape depends on the type. See Webhooks for how to register a URL and verify the signature before trusting any of this.
Every amount field below is a string (e.g. "49.99"), not a number. This differs from amount on SDK create calls (checkouts, payment links), which is a plain number in currency units. Parse it before doing arithmetic.
The field names below are the literal snake_case keys AgentaOS POSTs to your webhookUrl, what you parse in any language. As returned by the SDK webhooks.verify() (Node.js) the same fields come back camelCased and typed: link_id becomes linkId, session_id becomes sessionId, tx_hash becomes txHash, payer_type becomes payerType, chain_id becomes chainId, transaction_id becomes transactionId, and so on. This page mirrors the raw body documented in Webhooks.
string
Unique event ID, e.g. evt_550e8400-e29b-41d4-a716-446655440000. Always present. For checkout.session.completed it is independent of data.session_id. For send.completed and send.failed it is derived as evt_${data.transaction_id}, so a redelivered send always carries the same event id. Either way, use id to deduplicate the delivery, and the data-level ID (session_id or transaction_id) to deduplicate the underlying payment or send.
string
One of checkout.session.completed, send.completed, send.failed. Switch on this to decide how to parse data.
object
Event-specific payload. See each event below.

checkout.session.completed

Fired when a checkout is paid, by card, wallet, or stablecoin. This is the event to listen for to fulfill an order.
tx_hash, payer, and network describe on-chain settlement. For checkouts paid by card, these fields are empty, use vendor_reference for the off-chain reference and don’t assume the on-chain fields are always populated. Key fulfillment off session_id and amount/currency, which are present for every payment method.
Example

send.completed

Fired when an outbound stablecoin send you initiated confirms on-chain.
Example

send.failed

Fired when an outbound send fails to broadcast, network error, insufficient balance, or the transaction reverted.
Example
send.failed means the transaction never landed on-chain. It’s distinct from a payment dispute or a card decline, those don’t go through this event, they affect your balance directly. See Payouts.

Next steps

Verify signatures

How to register a URL and verify the HMAC-SHA256 signature, in TypeScript, Python, Go, and PHP.

Payment SDK: Webhooks

The webhooks resource in @agentaos/pay.