x402_payment

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.

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

1

Enter the x402-protected endpoint and request body.

2

Connect a wallet for the block.

3

Test the endpoint pricing challenge.

4

Authorize the payment session.

5

Run the workflow to execute the paid POST request.

Inputs and Outputs

Input

Parameter
Type
Description

endpoint

string

x402-protected endpoint URL

body

json

JSON request body to POST to the endpoint

Output

Parameter
Type
Description

data

any

Response body returned by the paid endpoint

status

number

Final HTTP status code

headers

json

Final response headers

paymentRequired

json

Decoded payment challenge metadata

paymentResponse

json

Decoded settlement response metadata

cost

json

Network, asset, amount, and pay-to details

Notes

  • Category: blocks

  • Type: x402_payment

Was this helpful?