Pay for an API call with x402
Call an API that charges per request with x402: set the most it is worth, let the app plan and simulate the payment, pay inside the rules, and report the receipt with the answer.
In Lobstack: Skills › Library › Add
What your agent will do.
The job needs one answer from a service that charges per request over x402, and the agent has a wallet (wallet_status says so).
- 01
Read wallet_status first: the balance, today's spend, the rules. If the call would not fit, say so before trying it.
- 02
Decide what the answer is worth and call paid_fetch with that as max_usdc, and a why the person can read on an approval card. Never set max_usdc higher to get past a refusal.
- 03
The app reads the seller's price from its 402 answer, simulates the payment and checks the rules. Inside the allowance it pays; above it the person approves the plan they are shown.
- 04
Report the answer, then the receipt: the price paid, verified or not, and the transaction link. Only "verified" means it was paid as planned.
- 05
A refusal or a mismatch is reported as one, with the reason. Never retry a call the rules refused, and never invent a transaction hash.
One call per question: cache what came back rather than paying twice.
The whole SKILL.md: 30 lines of Markdown.
Add it in the app from Skills › Library, or copy it and paste it into Skills › Add a skill.
---name: x402-paid-calldescription: "Call an API that charges per request with x402: set the most it is worth, let the app plan and simulate the payment, pay inside the rules, and report the receipt with the answer."metadata: title: "Pay for an API call with x402" category: payments tags: [x402, payments]--- ## When to use this The job needs one answer from a service that charges per request over x402,and the agent has a wallet (wallet_status says so). ## How 1. Read wallet_status first: the balance, today's spend, the rules. If the call would not fit, say so before trying it.2. Decide what the answer is worth and call paid_fetch with that as max_usdc, and a why the person can read on an approval card. Never set max_usdc higher to get past a refusal.3. The app reads the seller's price from its 402 answer, simulates the payment and checks the rules. Inside the allowance it pays; above it the person approves the plan they are shown.4. Report the answer, then the receipt: the price paid, verified or not, and the transaction link. Only "verified" means it was paid as planned.5. A refusal or a mismatch is reported as one, with the reason. Never retry a call the rules refused, and never invent a transaction hash. One call per question: cache what came back rather than paying twice.
- Payments
Find a pay-per-call API
Find a pay-per-call API for a job in the x402 Bazaar: what it returns, what it costs per call, which network it settles on, and whether it is worth paying for. Pays nothing.
SKILL.md · App - Payments
Send a USDC payment (Plan, Act, Verify)
Send a USDC payment the safe way: plan it (simulated, with the rules checked), show the plan, act only on that plan, then verify the transfer on chain and report the link.
SKILL.md · App - Payments
Reconcile an agent's payments
Reconcile what an agent's wallet paid against what it got for it: every payment with its purpose, receipt and status, the day's spend against the rules, and anything that does not match.
SKILL.md · App - Payments
Suggest an agent's spending rules
Suggest spending rules for an agent's wallet from what its job costs: per payment, per day, the amount it may pay without asking, and what scheduled runs may spend. The person sets them.
SKILL.md · App - Engineering
Commit message from a diff
Write a commit message from a diff: a subject line that states what was found, then prose explaining why the change was made.
SKILL.md · App - Engineering
Triage a failing build
Triage a red CI run: find the first real failure, attribute it to a change, and say whether the code is wrong or the runner was.
SKILL.md · App