# Payment element

> Field reference for the Payment canvas element: x402 paywall configuration for MCP and A2A surfaces.

The Payment element attaches a payment requirement to specific tools or methods on a surface. The gateway intercepts matching requests and demands a verifiable payment receipt before forwarding them upstream. On first failure it returns a 402 challenge. Once the caller settles, the receipt is verified and the request proceeds.

Available on MCP and A2A surfaces only. Drop it on the Managed Agent request edge. Dropping the element enables payment for the surface.

## Panel

The sidebar panel shows the payment protocol selector and a read-only summary of the current x402 configuration.

| Field | Type | Required | Default | Description |
| Payment Protocol | select | Yes | x402 | The payment protocol. Currently only x402 (HTTP 402 paywall) is available. |

The summary displays the current Verification mode, Settlement mode, Networks count, and Requirements count. These values are read-only in the panel. Use the Configure x402 Paywall… button to open the fullscreen editor and change them.

## Configure x402 paywall

Click Configure x402 Paywall… in the panel to open the fullscreen editor. The editor is divided into four areas.

### Verification and settlement

| Field | Type | Default | Description |
| Verification Mode | select | mock | How the gateway checks payment receipts. Options: Mock (Accept All - Testing), Local (On-Chain Verification), Use external facilitator, Use connected gateway facilitator, Verify cryptographic signature. |
| Settlement Mode | select | none | How settled funds are processed. Options: None, Deferred (Batch Processing), Immediate (Not Recommended), External Facilitator, Fabric Gateway. Disabled and fixed to None when Verification Mode is Mock. |
| Minimum Confirmations | integer (0–100) | 0 | Number of block confirmations required before accepting a payment. 0 accepts mempool transactions. Shown only when Verification Mode is Local. |
| Accept Mempool Transactions | checkbox | On | When on, accepts unconfirmed transactions. Disabled automatically when Minimum Confirmations is above 0. Shown only when Verification Mode is Local. |
| Facilitator URL | string (URL) | https://www.x402.org/facilitator | URL of the external facilitator service. Shown when Verification Mode or Settlement Mode is Use external facilitator. |
| Facilitator Gateway | select | — | Connected gateway to use for verification and settlement via DIDComm. Shown when Verification Mode or Settlement Mode is Use connected gateway facilitator. |

### Crypto network payment options

Add one or more blockchain networks to accept payments on. Select a network from the Mainnets or Testnets list to add it. For each added network, click a token badge to create a payment requirement for that token.

### Payment requirements

Each payment requirement defines one acceptable payment option. Callers choose one option from the list you define.

| Field | Type | Description |
| Amount | string | Payment amount expressed in the network’s smallest denomination unit (for example, USDC uses 6 decimal places, so 1000000 equals 1.00 USDC). |
| Recipient | select | Destination wallet address from your configured recipient addresses. |
| Scheme | select | How the amount is interpreted. Exact requires the caller to pay the specified amount exactly. Up To accepts any amount up to the specified value. |
| Transaction Timeout | select | How long the gateway waits for the transaction to appear on-chain. Options: 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes. |

### Payment triggers

Payment triggers define which operations require payment. The trigger editor shown depends on the surface protocol. See the relevant sub-section below.

#### MCP surfaces

The editor defaults to Charge tools matching regex with no patterns. You must either add at least one pattern or switch to Charge all tools before the surface can be saved.

| Field | Type | Description |
| MCP Payment Trigger Mode | select | Scope of tools/call requests that require payment. Options: Charge all tools: every tools/call requires payment. Charge tools matching regex: only calls where the tool name matches one of the patterns below. Charge all EXCEPT regex matches: all calls except those whose tool name matches a pattern. Free methods such as tools/list and initialize are never charged. |
| Patterns | string (regex) | One or more regex patterns used with Charge tools matching regex or Charge all EXCEPT regex matches modes. At least one non-empty pattern is required when either of those modes is selected. |

#### A2A surfaces

The A2A triggers editor is split into two groups.

Command Messages: configure payment for message/send and message/stream operations. For each, add optional regex patterns to match against message content. If no patterns are specified, all requests for that method require payment.

Control Messages: select individual control operations (for example tasks/get, tasks/cancel) that require payment. Control methods do not have message content to match against.

## Related

- [Managed Agent reference](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/managed-agent.md): where to add the element on the canvas.
