Get paidper request
Providers publish a price per unit on chain. Agents pay from a task budget, straight to your payout address, and you serve the call once you have checked the receipt. No accounts, no cards, no fee to Gentpay.
01
Register
registerProvider(payout, maxUnitsPerCall, termsHash) from your wallet. You become the provider's controller.
02
Price
setPrice(providerId, token, pricePerUnit) for each stablecoin you accept. Raising it never charges an agent more than the maximum it accepted.
03
Answer 402
Requests without a receipt get HTTP 402 with your provider id, the token, the price and how the request hash is built.
04
Verify, then serve
On retry, read receiptFor(task, requestHash) on chain: your provider id, your token, enough units, at most 15 minutes old, redeemed once.
GET /api/provider/sample?topic=chain (no receipt)
Live answerAsking…
The sample provider on this site
Prototype/api/provider/sample?topic=chain sells a live Robinhood Chain snapshot (block, gas, ETH/USD) and ?topic=stablecoins the proven stablecoins' supply and Chainlink prices. The data is real; the provider exists to show the payment flow end to end, and the example agent in the repository uses it.
# 1. ask: 402 with the price
curl -i https://gentpay.xyz/api/provider/sample?topic=chain
# 2. pay from your task (agent key), then retry
TASK_ID=1 AGENT_KEY=0x… node examples/agent.mjs https://gentpay.xyz/api/provider/sample?topic=chain
# the agent sends: x-gentpay-receipt: <taskId>:<nonce>
# requestHash = keccak256("gentpay-req-v1|<providerId>|GET|/api/provider/sample?topic=chain|<nonce>")We call it x402-style: HTTP 402 then a retry with proof. The proof is a Gentpay receipt on chain, not the x402 payment header; no x402 client was tested.
Register as a provider
Opens once GentpayTaskBudgets is deployed on Robinhood Chain. Registration costs gas only; the contract takes no fee.