Call x402 Resource logo

Catalog action Integrations wallet

Access an x402 pay-per-use API with automatic crypto payment. Signs payment off-chain using your wallet — no manual approval needed. Supports USDC and other permit-enabled tokens.

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

At a Glance

FieldValue
Action IDcall-x402-protected-resource
CategoryIntegrations
Connectorwallet
Requires gasNo
Funds movementNone declared
Tagsx402, payment, http, api, blockchain, integration

Payload Schema

FieldTypeRequiredDescription
resourceUrlstringYesThe URL of the x402-protected resource to access
methodstringNoHTTP method to use (default: "GET")
bodyobjectNoRequest body for POST/PUT/PATCH requests (will be JSON stringified)
headersobjectNoCustom HTTP headers to include in the request (string key-value pairs)
queryParamsobjectNoURL query parameters to append to the resourceUrl (string key-value pairs)
timeoutnumberNoRequest timeout in milliseconds (default: 30000)
facilitatorUrlstringNoFacilitator URL (optional, defaults to B3OS facilitator)
preferredTokenstringNoPreferred payment token address (e.g., B3 token address)
preferredNetworkstringNoPreferred network for payment (e.g., "base", "ethereum")
maxAmountPerRequeststringYesMaximum amount willing to pay per request (in wei/smallest token unit)

Result Schema

FieldTypeRequiredDescription
statusstringYes-
statusCodenumberNoHTTP status code from the response
resourceobject | stringNoThe fetched resource data (parsed JSON or raw text)
responseHeadersobjectNoResponse headers from the resource server
paymentDetailsobjectNoPayment details (always present when hadPayment is true). Contains information about the payment that was made by the facilitator.
requestDetailsobjectNoDetails of the request that was made
errorstringNoError message if failed

Examples

json
{ "type": "call-x402-protected-resource", "payload": { "resourceUrl": "https://example.com/webhook", "maxAmountPerRequest": "1000000" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I