Agent Forge

x402 Payment

Call x402-protected endpoints from a workflow

The x402 Payment block calls endpoints protected by the x402 payment protocol. It can inspect endpoint pricing, authorize a payment session from a connected wallet, and execute a paid POST request during workflow runs.

x402 Payment can authorize paid requests. Review endpoint pricing and wallet configuration before using this block in production workflows.

Overview

Use the x402 Payment block when a workflow needs to access paid HTTP resources that challenge clients with x402 payment requirements.

The block supports:

  • Payment precheck - Inspect endpoint pricing and payment challenge metadata
  • Wallet authorization - Connect a wallet and authorize a payment session
  • Paid execution - Send the POST request with payment authorization
  • Deployment support - Reuse an authorized payment session during deployed workflow runs

Configuration Options

Payment Access

The payment access control handles wallet connection, endpoint precheck, and authorization state for the block.

Endpoint

The x402-protected endpoint URL to call.

Body

The JSON request body to send to the paid endpoint.

How It Works

Enter the x402-protected endpoint and request body.

Connect a wallet for the block.

Test the endpoint pricing challenge.

Authorize the payment session.

Run the workflow to execute the paid POST request.

Inputs and Outputs

Input

ParameterTypeDescription
endpointstringx402-protected endpoint URL
bodyjsonJSON request body to POST to the endpoint

Output

ParameterTypeDescription
dataanyResponse body returned by the paid endpoint
statusnumberFinal HTTP status code
headersjsonFinal response headers
paymentRequiredjsonDecoded payment challenge metadata
paymentResponsejsonDecoded settlement response metadata
costjsonNetwork, asset, amount, and pay-to details

Notes

  • Category: blocks
  • Type: x402_payment