← All Recipes
Bazantic // Recipe
Should my agent pay this x402 endpoint
should-my-agent-pay-this-x402-endpoint
Give it the URL of a paid x402 API your agent is about to pay. It checks the endpoint with Preflight (is it alive, is its payment quote well-formed), then, for a payee on Hedera testnet, looks up that account on the Hedera testnet mirror node (does it exist, can it receive, how old is it, has anyone paid it). Returns PAY, PAY_WITH_SMALL_CAP, DO_NOT_PAY or CANNOT_VERIFY_PAYEE with the reasons and a maximum payment. Neither service can answer this alone: a quote can be perfectly well-formed and pay an account that does not exist, and a ledger lookup cannot tell you which account an endpoint wants paid. Use before the first payment to any new seller.
Recipe inputs
Complete fields before a run.
Public http(s) URL of the x402-paid endpoint the agent is about to pay.
Output example
Representative published output.
{
"payee": {
"exists": false,
"account": "0.0.999999999",
"ageDays": null,
"deleted": null,
"network": "testnet",
"canReceiveToken": null,
"inboundPayments": null,
"historyTruncated": null,
"receiverSigRequired": null
},
"reasons": [
"payee 0.0.999999999 does not exist on Hedera testnet"
],
"decision": "DO_NOT_PAY",
"endpoint": "https://testbed-1l2m.onrender.com/bad-payee",
"toolCalls": [
"preflightCheckEndpoint",
"testnet getAccounts account.id=0.0.999999999"
],
"maxPayment": null,
"preflightVerdict": "UNKNOWN"
}