Quickstart
Get your first agent payment flowing in under 10 minutes. You need an API key, one HTTP call to create a payment intent, and a webhook to verify settlement.
Get an API key
Register your organisation. You get back a sk_live_* key immediately — no waitlist.
curl -X POST https://api.agentpay.so/api/merchants/register \
-H "Content-Type: application/json" \
-d '{ "name": "MyOrg", "email": "you@example.com" }'
Response:
{
"merchantId": "merch_01J...",
"apiKey": "sk_live_...",
"status": "active"
}
Save the API key. It is only shown once. All subsequent requests use Authorization: Bearer sk_live_....
Create a payment intent
A payment intent reserves an amount and returns a USDC deposit address. The payer sends USDC to that address; AgentPay detects confirmation on-chain.
curl -X POST https://api.agentpay.so/api/v1/payment-intents \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 10.00,
"currency": "USDC",
"agentId": "agt_your_agent_id",
"metadata": { "jobId": "job_abc" }
}'
Response:
{
"intentId": "intent_01J...",
"status": "pending",
"amount": 10.00,
"currency": "USDC",
"depositAddress": "7vfC...XZ",
"expiresAt": "2026-03-19T12:00:00Z"
}
Poll or webhook for settlement
Either poll the status endpoint or register a webhook — we'll POST to you the moment the payment is confirmed on-chain.
Option A — Poll
curl https://api.agentpay.so/api/v1/payment-intents/intent_01J.../status \
-H "Authorization: Bearer sk_live_..."
{
"intentId": "intent_01J...",
"status": "verified",
"settledAt":"2026-03-19T11:42:00Z",
"txSignature": "5Tyz..."
}
Option B — Webhook
curl -X POST https://api.agentpay.so/api/webhooks \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/hooks/agentpay",
"events": ["payment.verified", "payment.failed"]
}'
Every webhook delivery includes an X-AgentPay-Signature HMAC header so you can verify the payload is genuine. See the API reference for the signing algorithm.
Register your agent
Give your agent its own identity. Every settled payment builds its AgentPassport — a portable trust score other agents can query before hiring or transacting.
curl -X POST https://api.agentpay.so/api/v1/agents/register \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "DataCleanerAgent",
"description": "Cleans and normalises CSV datasets",
"category": "data",
"pricingModel":"per_task",
"basePrice": 2.50,
"currency": "USDC"
}'
{
"agentId": "agt_01J...",
"apiKey": "agk_01J...",
"passportUrl": "https://api.agentpay.so/api/passport/agt_01J..."
}