# Rails and networks

Why one mandate spans stablecoins and cards, how networks are named, and how Abazi picks one network for each payment from the mandate's order, funds and facilitator health.

<ShortProductTruth>**One tool call. Every rail.** The same request pays an x402 merchant in USDC, sends USDT directly, or authorizes a virtual card. Abazi picks the network the mandate allows and that has funds; the agent never handles money.</ShortProductTruth>

<Callout title="The full matrix">
Abazi pays on <PlatformCount of="rails" /> rails across <PlatformCount of="networks" /> networks in <PlatformCount of="assets" /> assets. Every rail, network and asset, with how each one signs, settles and issues a receipt, is on [Supported rails](/docs/platform/supported-rails). This page explains the model behind it.
</Callout>

## Who needs it [#who-needs-it]

Agent developers, who want one call regardless of how the merchant is paid. Owners, who choose in the mandate which rails and networks are allowed and in what order. Merchants, who need to know which assets and networks agents can pay on.

## One mandate, every rail [#one-mandate-every-rail]

<RailSwitcher />

A rail is a way of paying: stablecoins over x402, a direct USDT transfer, or a virtual card. Rails differ in who asks for the money, how a payment is signed and how settlement is confirmed. They do not differ in the rules.

Every rail plugs into the same core through one adapter with five operations: quote, authorize, execute, confirm and refund. The mandate, the policy engine, the budgets, the ledger and the receipts do not change from rail to rail. That is why one mandate can govern a USDC payment on Solana, a USDT transfer on Tron and a card authorization at a checkout: the owner signs one set of limits, and every rail reports into the same budget and the same receipt chain. Adding a rail adds an adapter, not a second core. See [Rail adapters](/docs/architecture/rail-adapters).

Abazi pays x402 version 2, exact scheme. A merchant that answers in the version 1 format is not paid.

## How networks are named [#how-networks-are-named]

Inside Abazi, in mandates, 402 responses, decision traces and receipts, a network is identified by its [CAIP-2](https://chainagnostic.org/CAIPs/caip-2) chain id, not by a display name:

| Family | CAIP-2 form |
| --- | --- |
| Solana | `solana:` followed by the network's genesis hash prefix |
| Base, Polygon, Avalanche, Ethereum | `eip155:` followed by the EVM chain id |
| Tron | `tron:` followed by the network name |

A CAIP-2 id names exactly one chain, so a mandate that allows a network cannot be satisfied by a different chain with a similar name. The receipt records the same id inside its signature. The exact ids for the current environment are on [Environments](/docs/platform/environments).

## How one network is chosen [#how-one-network-is-chosen]

For x402, the candidate networks come from the merchant's live 402 response. For direct USDT, they come from the Catalog. Then:

<Steps>
  <Step>Drop every network the mandate does not allow.</Step>
  <Step>Sort the rest by the mandate's network order. The default order is Solana, then Base, Polygon and Avalanche for x402, then Ethereum and Tron for direct USDT. A mandate can set its own order.</Step>
  <Step>Take the first network that can pay now: on Solana the permission and the owner's balance cover the amount; elsewhere the agent's spending wallet does; and for x402 a facilitator for that network is healthy.</Step>
  <Step>Write one line per candidate into the decision trace: chosen, or why not.</Step>
</Steps>

If no network qualifies, policy step 4b denies the purchase with <ReasonCode code="NO_FUNDED_CHAIN" />, or with <ReasonCode code="DELEGATION_MISSING" /> when Solana was the only candidate and the permission was the problem.

## Facilitator health and failover [#facilitator-health-and-failover]

x402 payments settle through a facilitator. Abazi keeps an ordered list of facilitators for each network, probes them on a schedule, and treats a network as healthy while at least one of its facilitators answers well. A facilitator that fails three times in a row is skipped for a minute. Abazi fails over to the next facilitator only when nothing was sent; a settlement that may have left is reconciled, never resent. The details are on [Rail adapters](/docs/architecture/rail-adapters#facilitator-health-and-failover).

## Cards [#cards]

A virtual card follows the same intent, policy and budget. The difference is direction: the merchant's checkout asks the card network for an authorization, and the card issuer asks Abazi. Abazi matches the authorization to an intent and its amount, and answers approve, decline or challenge. A challenge sends the purchase to a person, as with any approval. Card amounts use their own limits: a hard cap of <Limit name="cardHardCap" /> per authorization and an auto-approve limit of <Limit name="cardAutoThreshold" /> in the example mandate. See [Cards](/docs/platform/cards).

## Boundary [#boundary]

- **The agent never picks a network, an asset or a payee.** It names a service or a URL; the rest comes from the 402 response and the Catalog.
- **The Catalog wins.** A 402 that lists a network, an asset, an amount or a payout address the Catalog does not is denied at policy step 2.
- **Where the money sits depends on the network.** On Solana it stays in the owner's account behind a capped delegation; on EVM networks and Tron it sits in the agent's spending wallet. See [Custody and keys](/docs/concepts/custody-and-keys).

## Example [#example]

One merchant, two networks, one empty wallet. A merchant accepts Base and Tron, and the mandate allows both with Base first. The agent's Base wallet is empty; its Tron wallet is funded. The trace reads "Base: spending wallet balance too low", then "Tron: eligible", and the payment settles on Tron. The receipt names Tron's CAIP-2 id as the network.

## Failure cases [#failure-cases]

| Case | Result |
| --- | --- |
| No facilitator is healthy on any allowed x402 network | DENY <ReasonCode code="NO_FUNDED_CHAIN" />, with "facilitator unhealthy" in the trace. |
| The facilitator rejects before broadcast | The intent fails and the reservation is released. |
| No answer after signing | The intent goes to reconciliation. It is never signed twice. |
| The 402 lists a network the Catalog does not | DENY <ReasonCode code="NETWORK_MISMATCH" />. |
| A card authorization matches no intent | Declined with <ReasonCode code="CARD_NO_MATCHING_INTENT" />. |
| A card authorization is for a different amount | Declined with <ReasonCode code="CARD_AMOUNT_MISMATCH" />. |

## How to verify [#how-to-verify]

- Each payment's detail page shows the network trace and a link to the settlement on the network's explorer.
- The receipt records the rail, the network, the asset and the settlement reference, inside its signature.

## Next steps [#next-steps]

<Cards>
  <Card title="Supported rails" href="/docs/platform/supported-rails" description="Every rail, network and asset in one matrix." />
  <Card title="Rail adapters" href="/docs/architecture/rail-adapters" description="See the five operations every rail implements and where they run." />
  <Card title="Custody and keys" href="/docs/concepts/custody-and-keys" description="Learn which wallet pays on which network, and who signs." />
</Cards>

