Skip to main content

1. Install the package

2. Register the scheme and wrap fetch

registerAtumEscrowScheme reads the selected 402 option’s extra.atum (destination, deadlines, settlement vault/proxy/role addresses), builds the Atum payment request, and signs the source-side Permit2 authorization for the settlement vault deposit.

3. Restrict source networks (optional)

registerAtumEscrowScheme registers under the eip155:* wildcard by default — pass an explicit networks list to restrict which source chains your agent will fund from:
Chain IDs, tokens, and addresses in these snippets are illustrative placeholders. Use Supported networks and Supported assets for the live catalog.
The source token must already have an approve(Permit2) allowance covering the spend, or the settlement vault deposit reverts at settlement. Arranging that is your agent/app’s responsibility — the mechanism assumes it and does not check on-chain. See the Permit2 allowance prerequisite in Agentic sends for a preflight pattern.

4. Build a payment without sending it (optional)

If you’d rather build a payment without immediately sending the request — for example to inspect it, log it, or drive a facilitator’s /verify directly — read the 402 yourself and build the payload from the HTTP client wrapper (x402HTTPClient, which wraps your x402Client): httpClient.createPaymentPayload(paymentRequired), instead of using wrapFetchWithPayment.

Next steps