Talk to usGet started
Webhooks

Events

Every event AgentPay delivers to a registered endpoint, with the fields in data. Deliveries are JSON with id, type, created and data.

Delivery
{
  "id": "evt_card_cleared_8f2a...",
  "type": "card.cleared",
  "created": 1762182000,
  "data": { "card_id": "card_8f2a...", "card_last4": "8339", "amount": 1.98, "fees": 0, "merchant": "NAMECHEAP", "network": "visa", "balance_after": 30.98, "provider_transaction_id": "..." }
}

Cards

card.authorized

The merchant charged an issued card. The money is held; settled on the spend is still false.

FieldType
card_idstringThe card.
card_last4string
amountnumberDollars.
merchantstringThe merchant name as the network reports it.
networkstringvisa or mastercard.
provider_transaction_idstringThe network's transaction id.

card.cleared

The network settled a charge, usually by the next day. The wallet balance moved.

FieldType
card_id, card_last4, merchant, network, provider_transaction_idAs above.
amountnumberThe settled amount in dollars.
feesnumberNetwork fees in dollars, when any.
balance_afternumberThe wallet balance after the charge.

card.declined

A charge on an issued card was refused.

FieldType
card_id, card_last4, amount, merchant, network, provider_transaction_idAs above.
decline_reasonstringThe reason. A second charge on a used single-use card is the guard working.

Checkouts

Every checkout event's data carries checkout_id, and its id is derived from it, so a redelivery has the same id.

checkout.submitted

The run paid. order_id and order_total are on the checkout read.

checkout.needs_login

The run stopped at a sign-in page.

FieldType
login_urlstringThe page the browser stopped on. Read login_check and connect_url from GET /v1/checkout/{id}.

checkout.needs_card_approval

A run paying with the person's own card reached the review and waits for the cardholder.

FieldType
approval_urlstringSend it to the cardholder.
approval_expires_atstringWhen the link stops working.
amount_displaystringThe total, e.g. "60.90 AED".
card_last4string

checkout.blocked

AgentPay stopped the run.

FieldType
reasonstringapproval_timeout, engine_error, max_iterations, payment_unknown, site_busy, unreachable, or the wall the run met.
card_last4stringOnly on payment_unknown with a connected card.

Money

money.funded

A top-up landed in the wallet.

FieldType
amountnumberDollars.
currencystringUSD.
methodstringcard, stablecoin, bank or gift.
railstringOn a bank transfer: ach, wire_domestic, wire_international, uae_local.
reference_codestringOn a bank transfer, the memo code it was matched by.
funding_event_idstring
provider_refstringStripe's reference on a card or stablecoin top-up.
balance_afternumberThe wallet balance after the credit.