Call x402 Endpoint
Call an x402 pay-per-use API endpoint. Payment is handled automatically using your connected wallet — no manual steps needed.
Built-in action X402 wallet
Call an x402 pay-per-use API endpoint. Payment is handled automatically using your connected wallet — no manual steps needed.
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
| Field | Value |
|---|---|
| Action ID | call-x402-endpoint |
| Category | X402 |
| Connector | wallet |
| Requires gas | No |
| Funds movement | None declared |
| Tags | x402, payment, api, pay-per-call |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
endpointId | string | Yes | The ID of the x402 endpoint to call (from the endpoint registry) |
maxPrice | string | No | Optional override for maximum allowed price (in token's smallest unit). If not specified, uses the endpoint's default max price. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Whether the request succeeded or failed |
statusCode | number | No | HTTP status code from the response |
resource | object | No | The fetched resource data (parsed JSON response from the endpoint). Access nested fields with {{nodeId.result.resource.fieldName}} |
paymentDetails | object | No | Payment transaction details |
requestDetails | object | No | Details of the request that was made |
responseHeaders | object | No | Response headers from the resource server |
error | string | No | Error message if failed |
Examples
json{ "type": "call-x402-endpoint", "payload": { "endpointId": "x402_abc123" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/call-x402-endpoint/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "endpointId": "x402_abc123" }}'
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.
