ମୁଖ୍ୟ ବିଷୟବସ୍ତୁକୁ ଛାଡ଼ନ୍ତୁ
ଶିଖନ୍ତୁଗାଇଡ୍ଆପଣଙ୍କର AI ଏଜେଣ୍ଟକୁ ପେମେଣ୍ଟ ଯୋଡନ୍ତୁ
ଗାଇଡ୍

ଆପଣଙ୍କର AI ଏଜେଣ୍ଟକୁ ଅର୍ଥପ୍ରଦାନ କିପରି ଯୋଗ କରିବେ।

10 minutes
ସଂକ୍ଷିପ୍ତ ଉତ୍ତର

createClient କୁ @agentcredia/node (କିମ୍ବା Python client)ରୁ ଏକ ଏଜେଣ୍ଟ ସୃଷ୍ଟି କର, payments.create ସହିତ USDC ଦେୟ ପଠାଇ, ଏବଂ webhooks.verify ସହିତ ସାଇନ୍ କରାଯାଇଥିବା ଓବ୍‌ହେକ୍ କୁ ନିଶ୍ଚୟ କର। ବ୍ୟୟ ନିୟନ୍ତ୍ରଣଗୁଡିକ ଡ୍ୟାସ୍ବୋର୍ଡ୍ରେ ସେଟ୍ କରାଯାଇଛି ଏବଂ API ଉପରେ ପଢ଼ିବାକୁ ମାତ୍ର। ଏଜେଣ୍ଟ କେବଳ ଗୋପନ କୀଗୁଡିକୁ ସିଧାସଳକ ଚୁଇଁନାହିଁ। ସାଇନ୍-ଅପ୍ କରିବାରୁ ଦଶ ମିନିଟ୍ ମଧ୍ୟରେ Base ଉପରେ ତୁମର ପ୍ରଥମ USDC ଦେୟ, TypeScript କିମ୍ବା Python ରେ।

ପୂର୍ବାବଶ୍ୟକତା

ଆପଣ ଆରମ୍ଭ କରିବା ପୂର୍ବରୁ।

  • ଏକ AgentCredia account (free signup)।
  • ଡ୍ୟାଶବୋର୍ଡରୁ ଏକ API key (ଏହି ଗାଇଡ ପାଇଁ ଏକ sk_test_ key ବ୍ୟବହାର କରନ୍ତୁ; ପରେ ଆପଣ sk_live_ କୁ ସ୍ୱିଚ୍ କରିବେ)।
  • ଆପଣଙ୍କ agent runtime ରେ Node.js 20+ କିମ୍ବା Python 3.11+.
  • ଯେକୌଣସି framework - LangChain, CrewAI, AutoGen, LlamaIndex, OpenAI Agents SDK, MCP, କିମ୍ବା ସାଧାରଣ SDK code ଉପରେ ନିର୍ମିତ ଏକ agent। ନିର୍ଦ୍ଦେଶଗୁଡ଼ିକ framework-agnostic ଅଟେ।
  • webhook ଗ୍ରହଣ କରିବା ପାଇଁ ସାର୍ବଜନୀନ internet ରୁ ପହଞ୍ଚଯୋଗ୍ୟ ଏକ HTTPS endpoint (development ପାଇଁ ngrok କିମ୍ବା deploy preview ଠିକ୍ ଅଟେ)।
ପଦକ୍ଷେପ 1 ର 5

ଏଜେଣ୍ଟ ପ୍ରୋଫାଇଲ୍ ସୃଷ୍ଟି କରନ୍ତୁ।

agent profile ହେଉଛି ଆପଣଙ୍କ agent ଯେ ପ୍ରତ୍ୟେକ payment ପଠାଏ କିମ୍ବା ଗ୍ରହଣ କରେ, ସେହାର ପଛରେ ଥିବା addressable identity। ଏଥିରେ wallet address, public page, verification badges, ଏବଂ (ପରେ) spend policy ଅଛି। ପ୍ରତ୍ୟେକ logical agent ପାଇଁ ଗୋଟିଏ create କରନ୍ତୁ।

TypeScript
import { createClient } from "@agentcredia/node";

const client = createClient({ apiKey: process.env.AGENTCREDIA_API_KEY! }); // sk_test_ / sk_live_

const agent = await client.agents.create({ name: "research-bot" });

console.log(agent.id); // "agt_..."
// Public page: https://app.agentcredia.com/a/{slug}
Python
from agentcredia import Client

client = Client()  # reads AGENTCREDIA_API_KEY from the environment

agent = client.agents.create(body={"name": "research-bot"})

print(agent["id"])  # "agt_..."
# Public page: https://app.agentcredia.com/a/{slug}

After this call, the agent has a public page at https://app.agentcredia.com/a/<slug> that any counterparty (human or agent) can hover for verification info. See the agent payment identity glossary entry for what that page exposes.

ପଦକ୍ଷେପ 2 ର 5

ଗୋଟିଏ payment ପଠାନ୍ତୁ।

payments.create sends USDC from the agent wallet. amountWei is base units (USDC has 6 decimals), so 0.01 USDC is the string "10000". The SDK auto-stamps an Idempotency-Key, and the call can return 503 until the chain adapter is wired for your network. To RECEIVE instead, settle an invoice you created in the dashboard with paymentRequests.settle - see the payment API page.

TypeScript
// Send a USDC payment from the agent wallet. amountWei is base units
// (USDC has 6 decimals): "10000" is 0.01 USDC. payments.create auto-stamps an
// Idempotency-Key and can return 503 until the chain adapter is wired.
const tx = await client.payments.create({
  agentId: agent.id,
  to: "0xRecipient",
  amountWei: "10000",
});

console.log(tx); // the submitted transfer
Python
# amountWei is USDC base units (6 decimals): "10000" is 0.01 USDC.
tx = client.payments.create(body={
    "agentId": agent["id"],
    "to": "0xRecipient",
    "amountWei": "10000",
})

print(tx)  # the submitted transfer
ପଦକ୍ଷେପ 3 ର 5

ୱେବହୁକ୍ କୁ ହ୍ୟାଣ୍ଡଲ୍ କରନ୍ତୁ।

ଓେଭୁକ୍‌ଗୁଡିକ ହେଉଛି କିପରି ଆପଣ ଜାଣିବେ ଯେ ଏକ ଦେୟ ସମାଧାନ ହୋଇଛି। Node ରେ, @agentcredia/node ରୁ webhooks.verify HMAC ଚେକ୍ କରେ ଏବଂ ଏକ ଭିନ୍ନ ଯୁଗ୍ମକୁ ଫେରାଇବା; ଅନ୍ୟ ଭାଷାରେ, କଚା ଦେହରେ ସେହି HMAC କୁ ଗଣନା କରନ୍ତୁ। ଘଟଣା ପ୍ରକାର (inbound ପାଇଁ payment.received) ଉପରେ ଶାଖା କରନ୍ତୁ, 2xx ଦ୍ରୁତ ଭାବେ ପ୍ରତିକ୍ରିୟା କରନ୍ତୁ, ଏବଂ 2xx ର ପଛରେ କିଛି ଭାରୀ କୁ କ୍ୟୁ କରନ୍ତୁ ଯାହା ଡିଲିଭରୀ ସମୟ ସମାପ୍ତ ହେବାକୁ ନାହିଁ।

TypeScript (Express)
import express from "express";
import { webhooks } from "@agentcredia/node";

const app = express();
// Capture the RAW body. The HMAC is over the exact bytes on the wire.
app.use(express.raw({ type: "application/json" }));

app.post("/webhooks/payment", (req, res) => {
  const result = webhooks.verify({
    headers: req.headers,
    rawBody: req.body, // Buffer, raw bytes
    secret: process.env.AGENTCREDIA_WEBHOOK_SECRET!,
  });
  if (!result.ok) return res.status(400).json({ code: result.code });

  if (result.eventType === "payment.received") {
    // USDC landed - deliver the work, fulfil the order, etc.
    void deliver(result.eventId);
  }
  res.status(200).send("ok");
});
Python (Flask)
import hmac, hashlib, os, time
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = os.environ["AGENTCREDIA_WEBHOOK_SECRET"].encode()

@app.post("/webhooks/payment")
def webhook():
    raw = request.get_data()  # RAW bytes - do not parse first
    sig = request.headers.get("X-AgentCredia-Signature", "")
    ts = request.headers.get("X-AgentCredia-Timestamp", "")
    parts = dict(p.split("=", 1) for p in sig.split(",") if "=" in p)
    t, v1 = parts.get("t", ts), parts.get("v1", sig)
    want = hmac.new(SECRET, t.encode() + b"." + raw, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(want, v1) or abs(time.time() - int(t)) > 300:
        abort(401)
    if request.headers.get("X-AgentCredia-Event-Type") == "payment.received":
        deliver(request.get_json())  # USDC landed
    return ("ok", 200)
ପଦକ୍ଷେପ 4 ର 5

Dashboard ରେ spend controls ସେଟ୍ କରନ୍ତୁ।

If your agent only receives, you can skip this. If it also pays, set a spend permission - an allowance per period and a per-transaction cap - in the dashboard. It is enforced by the backend on every payment sent through the API, outside the agent's prompt, so prompt injection cannot rewrite it the way it can rewrite agent-side rules. There is no API or SDK call that mutates a permission (the agent's own key cannot widen its limit); the API is read-only, so your code can fetch the current values to display or plan around.

ପଢ଼ନ୍ତୁ (curl)
curl https://api.agentcredia.com/v1/agents/agt_123/spend-permissions \
  -H "Authorization: Bearer $AGENTCREDIA_API_KEY"
ପ୍ରତିକ୍ରିୟା
{
  "allowance_wei": "5000000",
  "per_tx_wei": "1000000",
  "period_seconds": 86400,
  "revoked_at": null
}
ପଦକ୍ଷେପ 5 ର 5

Base Sepolia ରେ ସମସ୍ତ ପ୍ରବାହକୁ ପରୀକ୍ଷା କରନ୍ତୁ।

sk_live_ keys କୁ flip କରିବା ପୂର୍ବରୁ, sk_test_ ସହିତ ସମ୍ପୂର୍ଣ୍ଣ path କୁ end-to-end ଚଳାନ୍ତୁ। test key ସବୁକିଛିକୁ Base Sepolia ରେ ରଖେ, ଯେଉଁଠାରେ ଆପଣ public faucet ରୁ wallet କୁ fund କରନ୍ତି ଏବଂ response shapes live ସହିତ ମେଳ ଖାଏ। key prefix network ଚୟନ କରେ, ସେଥିପାଇଁ test key କୌଣସି mainnet funds move କରିପାରେ ନାହିଁ।

ତିନୋଟି ପରିସ୍ଥିତିରେ ଅଭ୍ୟାସ କରନ୍ତୁ: ଏକ ସୁଖଦ-ପଥ ଭୁଗତାନ ଯାହା payment.received କୁ ଅନ୍ୟାନ୍ୟ କରେ, ଏକ ମିସ୍ ଡେଲିଭରୀ (ୱେବହୁକ୍କୁ ଏକ ମୃତ URL ଦିଆଯାଉ, ପରେ transactions.get ସହିତ ଲେନଦେନ ଆଣିବା ଦ୍ୱାରା ସମ୍ପର୍କ କରନ୍ତୁ), ଏବଂ ଏକ ୱେବହୁକ୍ ପୁନର୍ପ୍ରୟାସ (ପ୍ରଥମ ବେଳେ 500 ଫେରାଇବେ, ଦ୍ୱିତୀୟ ବେଳେ 200, ଏବଂ ଆପଣଙ୍କର ହ୍ୟାଣ୍ଡଲର୍ idempotent ହେବାକୁ ନିଶ୍ଚିତ କରନ୍ତୁ)। ଯେତେବେଳେ ତିନୋଟି ପରୀକ୍ଷାରେ ପାସ୍ ହୁଏ, କୀ ବଦଳାନ୍ତୁ ଏବଂ ଜାହାଜ କରନ୍ତୁ।

ସାଧାରଣ ବିପଦ

ଦଳଗୁଡିକୁ ଏକ ସପ୍ତାହ ଖର୍ଚ୍ଚ କରାଉଥିବା ପାଞ୍ଚ ଭୁଲ।

ହୁଇବୋକ୍ ସିଗ୍ନେଚର୍ ଭେରିଫିକେସନ୍ ଛାଡ଼ିବା

ଯଦି ଆପଣ /webhooks/payment କୁ କୌଣସି POST କୁ ପ୍ରାଧିକାରୀ ଭାବରେ ଗ୍ରହଣ କରନ୍ତି, ଏକ ଆକ୍ରମଣକାରୀ ମିଥ୍ୟା ଭୁଗତାନ ଘଟଣା ତିଆରି କରିପାରିବ ଏବଂ ଆପଣଙ୍କର ଏଜେଣ୍ଟକୁ ମାଗଣାରେ କାମ ଦେବାକୁ ଚାଲାଇପାରିବ। ସଦା HMAC-ସଂସ୍ଥାପନ କରନ୍ତୁ ୱେବହୁକ୍ ସିକ୍ରେଟ୍ ସହିତ, ଏକ ସ୍ଥାୟୀ-ସମୟ ତୁଳନା ବ୍ୟବହାର କରି। ପ୍ରଥମ ବିପରୀତ ସାଧାରଣତଃ ହାରାଇଥିବା ଯାଞ୍ଚ ହୁଏ।

ପୃଥକ confirmation event ଧରି

shipped event ଗୁଡ଼ିକ ହେଉଛି payment.received, payment.sent, wallet.deployed, ଏବଂ webhook.test - ଅଲଗା confirmation event ନାହିଁ। transfer ଏକ block ରେ ଥିବାବେଳେ payment.received fire ହୁଏ। ଅଧିକାଂଶ କାମ ପାଇଁ, ଏହାହିଁ deliver କରିବାର signal। ମହଙ୍ଗା କିମ୍ବା irreversibe କିଛି ପାଇଁ, କାର୍ଯ୍ୟ କରିବା ପୂର୍ବରୁ transactions.get ସହିତ transaction poll କରନ୍ତୁ ଏବଂ ନିଜ confirmation threshold ଲାଗୁ କରନ୍ତୁ; ଅସ୍ତିତ୍ୱହୀନ event ର ପ୍ରତୀକ୍ଷା କରନ୍ତୁ ନାହିଁ।

Webhook ହ୍ୟାଣ୍ଡଲରେ କୌଣସି idempotency ନାହିଁ

Webhook ଗୁଡିକ non-2xx ପ୍ରତିକ୍ରିୟାରେ ପୁନରାବୃତ୍ତି କରେ, ଏବଂ ସେହି ଘଟଣା ଭାର ତଳେ ଅନେକ ଥର ଆସିବ। ଆପଣଙ୍କର ହ୍ୟାଣ୍ଡଲର୍ ଇଡେମ୍ପୋଟେଣ୍ଟ ହେବା ଆବଶ୍ୟକ: ଆପଣଙ୍କର ଆଗରୁ ପ୍ରକ୍ରିୟା କରାଯାଇଥିବା ଘଟଣା ID ଗୁଡିକର ଏକ ଛୋଟ ତାଲିକା ରଖନ୍ତୁ ଏବଂ ଡୁପ୍ଲିକେଟ୍‌ଗୁଡିକୁ ଛାଡ଼ିଦିଅ। ନହେଲେ ଏକ ଅସ୍ଥାୟୀ ବ୍ଲିପ୍ ସେହି କାମକୁ ଦୁଇଥର ଦେଇଦେବ ଏବଂ ଆପଣ ଦୁଇଥର ପୂରଣ କରିବାକୁ ଘଣ୍ଟା ଖର୍ଚ୍ଚ କରିବେ।

ଟେଷ୍ଟ ଏବଂ ଲାଇଭ୍ API କୀ ମିଶାଇବା

ପରୀକ୍ଷା କୀସ୍ (sk_test_) ସ୍ୟାଣ୍ଡବକ୍ସକୁ ମାରିବା ଏବଂ Base Sepolia ବ୍ୟବହାର କରନ୍ତୁ; ଜୀବନ୍ତ କୀସ୍ (sk_live_) ପ୍ରୋଡକ୍ସନ୍‌କୁ ମାରିବା ଏବଂ Base mainnet ବ୍ୟବହାର କରନ୍ତୁ। ପରିବେଶ କନଫିଗରେ ସେଗୁଡିକୁ ମିଶାଇବା 'ଡେଭ୍‌ରେ କାମ କରେ, ପ୍ରୋଡ୍‌ରେ ବିଫଳ' ଟିକେଟ୍‌ଗୁଡିକର କାରଣ। ଯଦି ଆପଣଙ୍କର ରନ୍ଟାଇମ୍ ପରିବେଶ ଏବଂ କୀ ପ୍ରେଫିକ୍ସ ମେଳ ନାହିଁ, ଷ୍ଟାର୍ଟଅପ୍‌ରେ ହାର୍ଡ-ଫେଲ୍ କରନ୍ତୁ।

Missing webhook କୁ failed payment ଭାବେ ଧାରଣ କରିବା

failure event ନାହିଁ, ଏବଂ ଏକ webhook miss ହୋଇପାରେ (ଆପଣଙ୍କ endpoint down ଥିଲା, delivery drop ହୋଇଥିଲା)। ଆପଣଙ୍କ agent କୁ 'waiting for funds' loop ଭିତରେ ଅଟକି ରଖନ୍ତୁ ନାହିଁ। Reconcile କରନ୍ତୁ: real state ଜାଣିବା ପାଇଁ transactions.get ସହିତ transaction fetch କରନ୍ତୁ, ଏବଂ କୌଣସି waiting flow ଉପରେ timeout ରଖନ୍ତୁ, ଯାହାଦ୍ୱାରା abandoned payment held resources release କରିଦେବ, forever hang କରିବ ନାହିଁ।

ପରବର୍ତ୍ତୀ ପଦକ୍ଷେପଗୁଡିକ

ଯେତେବେଳେ ତୁମର ପ୍ରଥମ ପେମେଣ୍ଟ ହେବ।

ମୌଳିକ payments କାମ କରୁଥିବାବେଳେ, ସବୁଠୁ ଅଧିକ ଲାଭଦାୟକ follow-up ଗୁଡ଼ିକ ହେଲା spend controls (ଯାହାଦ୍ୱାରା agent budget ସହିତ ପଳାଇ ନପାରେ), webhook robustness (ଯାହାଦ୍ୱାରା load ତଳେ payments ଚୁପଚାପ ହରାଇ ନଯାଏ), ଏବଂ identity verification (ଯାହାଦ୍ୱାରା counterparties agent ର public page ଉପରେ trust କରନ୍ତି)।

docs.agentcredia.com ରେ ପୂର୍ଣ୍ଣ API ସନ୍ଦର୍ଭ ଅଛି। ସେହି APIs ପାଇଁ ଉତ୍ପାଦ ସତହ: Payment API.

ଶେଷ ସମୀକ୍ଷା: 2026-05-15। CC BY 4.0 ଅନୁସାରେ ପ୍ରକାଶିତ।

ଏକ POST ଏବଂ ତୁମର ଏଜେଣ୍ଟ ପେମେଣ୍ଟ ପାଉଛି।

ଆରମ୍ଭ କରିବାକୁ ମାଗଣା। ପରୀକ୍ଷା କୀ ସମ୍ମିଳିତ। ପ୍ରଥମ ଦେୟ ଦଶ ମିନିଟ୍‌ରେ ନିଶ୍ଚିତ।