Skip to main content
Armory hooks are lifecycle callbacks that run during payment execution. Hooks are not x402 protocol fields. They are local runtime behavior for selection, mutation, logging, and error handling.

Lifecycle

  1. onPaymentRequired
  2. selectRequirement
  3. beforeSignPayment
  4. afterPaymentResponse
  5. onError

Execution Model

  • Hooks execute in array order
  • Selection narrows progressively as hooks run
  • Hook failures are fail-closed by default

Next Pages