<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Developers Forum for XinFin XDC Network: Abilash Senthilkumar</title>
    <description>The latest articles on Developers Forum for XinFin XDC Network by Abilash Senthilkumar (@abilashsenth).</description>
    <link>https://www.xdc.dev/abilashsenth</link>
    <image>
      <url>https://www.xdc.dev/images/E52iMAlbpW9Hhk6lcO0fV0QKMNdMC5WTXUky7uMQHhY/rs:fill:90:90/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL3VzZXIvcHJv/ZmlsZV9pbWFnZS81/MzQzLzk5OTYzY2E3/LTU1YTUtNDBjYi1h/NWRmLTA4M2VhM2Y5/ZTkzYS5qcGVn</url>
      <title>Developers Forum for XinFin XDC Network: Abilash Senthilkumar</title>
      <link>https://www.xdc.dev/abilashsenth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.xdc.dev/feed/abilashsenth"/>
    <language>en</language>
    <item>
      <title>XDCAI : Agents can now invoice each other on XDC &lt;&gt; stateless x402 invoices + chain-truth payment verification</title>
      <dc:creator>Abilash Senthilkumar</dc:creator>
      <pubDate>Tue, 07 Jul 2026 21:31:38 +0000</pubDate>
      <link>https://www.xdc.dev/abilashsenth/xdcai-agents-can-now-invoice-each-other-on-xdc-stateless-x402-invoices-chain-truth-payment-verification-3n44</link>
      <guid>https://www.xdc.dev/abilashsenth/xdcai-agents-can-now-invoice-each-other-on-xdc-stateless-x402-invoices-chain-truth-payment-verification-3n44</guid>
      <description>&lt;p&gt;This week the XDC AI beta group debugged two payment mysteries by hand. In one, an agent paid for a call and got a 404 back. In another (from my last post), a payment settled on-chain while the provider reported "charged: unknown" and the wallet history said "failed." Both times, resolving it took humans, screenshots, and someone manually checking the explorer — and in one memorable moment, the source of truth was literally &lt;em&gt;"the payment went through, as per Claude."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three layers, three answers. Only one layer never lies: the chain.&lt;/p&gt;

&lt;p&gt;So we shipped two tools that make the chain the first place agents ask — both live now on &lt;a href="https://xforty.xyz"&gt;xforty Chain Tools&lt;/a&gt; via the XDC AI marketplace.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;payment/verify&lt;/code&gt; — the answer to "charged: unknown"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx xdcai call "https://api.xforty.xyz/api/x402/payment/verify?tx=0x…"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give it any transaction hash, get back the chain-truth verdict: did USDC actually move, how much, from whom, to whom, in which block, at what time. $0.002 per call. This is the one-liner that would have resolved both of this week's debugging threads instantly — no screenshots, no "try calling it again," no trusting anyone's dashboard, including ours.&lt;/p&gt;

&lt;p&gt;Verified against a live settlement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"settled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"block"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;104652620&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-07-07T21:04:42Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"usdcTransfers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"amountUSDC"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.020246"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"from"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0x0094ce…254d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0xb0f9…033b"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Stateless invoices — agents billing each other
&lt;/h2&gt;

&lt;p&gt;The bigger piece: any agent can now &lt;strong&gt;mint an invoice that any other agent can pay&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx xdcai call "https://api.xforty.xyz/api/x402/invoice/create" \
  --method POST \
  --data '{"amountUSDC":"0.02","payTo":"0xYourAddress","memo":"design work"}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back comes a one-time x402-payable URL. The payer's agent calls it, gets a standard 402 challenge with the invoice's exact terms, pays through the normal flow — settlement goes &lt;strong&gt;directly to the invoice's payTo&lt;/strong&gt; (any address you choose, not ours), gasless as always on these rails. A free &lt;code&gt;status&lt;/code&gt; endpoint answers "has it been paid?" at any time.&lt;/p&gt;

&lt;p&gt;Two design decisions worth explaining:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is no database.&lt;/strong&gt; The invoice &lt;em&gt;is&lt;/em&gt; a signed token — amount, recipient, memo, and validity are HMAC-signed into the invoice ID itself. We can't lose your invoice, corrupt it, or edit it, because we don't store it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The chain is the ledger.&lt;/strong&gt; How do you match an on-chain USDC transfer to a specific invoice when EIP-3009 has no memo field? The invoice's amount carries a per-invoice fingerprint in its lowest digits — a $0.02 invoice becomes, say, 0.020246 USDC. The &lt;code&gt;status&lt;/code&gt; endpoint scans USDC transfer logs for that exact amount to that recipient within the validity window. Payment attribution from pure chain data — no bookkeeping to trust, ours included.&lt;/p&gt;

&lt;p&gt;We ran the full loop with real money before writing this: &lt;a href="https://xdcscan.com/tx/0x7c83f2be1690e79052926b890506332d9e6ef8263c4af19b206c9766ec7f0e5a"&gt;mint&lt;/a&gt; → agent pays the invoice → &lt;a href="https://xdcscan.com/tx/0x6ea88ad1511b5c658593fb17566f00e28990ae44e7dad2bbbf14b20a8c545706"&gt;settlement on-chain&lt;/a&gt; → status flips to &lt;code&gt;paid&lt;/code&gt; from the chain scan alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern underneath
&lt;/h2&gt;

&lt;p&gt;Both tools follow the same principles from our first writeup, which this week's incidents keep validating: &lt;strong&gt;validate before settling&lt;/strong&gt; (bad input must be rejected before money moves — good to see LendWatch adopt the same fix), &lt;strong&gt;settle before responding&lt;/strong&gt; (the agent should never wonder whether it paid), and &lt;strong&gt;never charge for your own failures&lt;/strong&gt;. Agentic payments don't need more trust — they need less of it, replaced by verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;These endpoints are the retail edge of a bigger piece we're building: &lt;strong&gt;guard&lt;/strong&gt; — spend policies, human approvals, audit trails, and automatic settlement reconciliation for agent wallets, running on this same chain-truth engine. If your agent moves real money and you'd sleep better with limits and a kill switch, come talk.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;xforty · &lt;a href="https://xforty.xyz"&gt;xforty.xyz&lt;/a&gt; · api.xforty.xyz · &lt;code&gt;npx xforty&lt;/code&gt; · built on &lt;a href="https://xdcai.tech"&gt;XDC AI&lt;/a&gt;'s rails&lt;/em&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>x402</category>
      <category>ai</category>
      <category>agent</category>
    </item>
    <item>
      <title>I tested XDC AI's x402 marketplace as both payer and provider. Here's everything I found</title>
      <dc:creator>Abilash Senthilkumar</dc:creator>
      <pubDate>Mon, 06 Jul 2026 09:59:45 +0000</pubDate>
      <link>https://www.xdc.dev/abilashsenth/i-tested-xdc-ais-x402-marketplace-as-both-payer-and-provider-heres-everything-i-found-3n7g</link>
      <guid>https://www.xdc.dev/abilashsenth/i-tested-xdc-ais-x402-marketplace-as-both-payer-and-provider-heres-everything-i-found-3n7g</guid>
      <description>&lt;p&gt;Yesterday I put &lt;a href="https://xdcai.tech"&gt;XDC AI&lt;/a&gt;, the new x402 payments marketplace on XDC through a full test from both sides: as an agent paying for API calls, and as a provider building payable endpoints from scratch. This post is the complete log: what worked, what broke, and what we shipped because of it. Every claim links to a mainnet transaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; the rails genuinely work — email → wallet → first paid API call in under 10 minutes, gasless. We shipped &lt;a href="https://xforty.xyz"&gt;xforty Chain Tools&lt;/a&gt; as a live provider on those rails, found one serious settlement-reconciliation gap (with a double-charge repro), and are upstreaming XDC support to the official x402 SDKs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The consumer side: paying for data as an agent
&lt;/h2&gt;

&lt;p&gt;Onboarding is the smoothest I've seen in crypto: email OTP → a wallet exists → fund it with USDC → your agent can buy things. No seed phrase, no gas token (their relayer sponsors gas via EIP-3009).&lt;/p&gt;

&lt;p&gt;My agent's first purchase is to fetch live DeFi rates from DeFi Watch, $0.005:&lt;br&gt;
&lt;a href="https://xdcscan.com/tx/0x54451b1ca87cd23c0692752e43351e4c8c0b4c427448798a96ea4ccfa6d1144d"&gt;https://xdcscan.com/tx/0x54451b1ca87cd23c0692752e43351e4c8c0b4c427448798a96ea4ccfa6d1144d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also genuinely good: &lt;strong&gt;payees are allowlisted, and approving a new recipient requires a browser login&lt;/strong&gt;  an automated agent cannot expand its own spending surface. That's real security design, not an afterthought.&lt;/p&gt;

&lt;h2&gt;
  
  
  The provider side: getting paid as an API
&lt;/h2&gt;

&lt;p&gt;Here's where it got interesting. The official x402 npm packages (&lt;code&gt;x402@1.2.0&lt;/code&gt;, &lt;code&gt;@x402/core@2.17.0&lt;/code&gt;) &lt;strong&gt;don't include the xdc network in their registries yet&lt;/strong&gt;, so there's no SDK path. I implemented the 402 flow from scratch against the live facilitator: challenge → &lt;code&gt;X-PAYMENT&lt;/code&gt; (EIP-3009 authorization) → &lt;code&gt;/verify&lt;/code&gt; → serve → &lt;code&gt;/settle&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It interoperated with XDC AI's production CLI on the first try. The proof is my agent wallet paying my own endpoint, settled on-chain:&lt;br&gt;
&lt;a href="https://xdcscan.com/tx/0x381f791d13a2d094c506df20fca9d952b1f3aef8a46aa9fd319898cb14b42051"&gt;https://xdcscan.com/tx/0x381f791d13a2d094c506df20fca9d952b1f3aef8a46aa9fd319898cb14b42051&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two design choices I'd recommend to every provider:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Settle before responding&lt;/strong&gt;  the agent should never be in doubt about whether it paid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never charge for stale data.&lt;/strong&gt; Public XDC RPCs load-balance across replicas, and I caught one serving blocks ~5 days old. Our endpoints validate the chain head's own timestamp per request and refuse to charge if freshness can't be proven.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The finding that matters: a three-way settlement disagreement
&lt;/h2&gt;

&lt;p&gt;One $0.10 screening call produced the most instructive failure I've seen on agentic rails:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The service completed, but settlement timed out → the provider returned &lt;code&gt;502&lt;/code&gt; with &lt;code&gt;charged: "unknown"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;My wallet history recorded the payment as &lt;strong&gt;"failed."&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;On-chain, it had actually &lt;strong&gt;settled&lt;/strong&gt;: &lt;a href="https://xdcscan.com/tx/0xf5413a271ec6626cd719a7d9d41cda20321e4c7fe53e90fdca9f7fb369e89232"&gt;https://xdcscan.com/tx/0xf5413a271ec6626cd719a7d9d41cda20321e4c7fe53e90fdca9f7fb369e89232&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Following the documented recovery ("retry — stored result, no recharge"), the retry carried a fresh authorization and &lt;strong&gt;charged again&lt;/strong&gt;: &lt;a href="https://xdcscan.com/tx/0xb272b13e641893985ed5874b420188fa1a6b9fbe6c115573be93ad7c97bae58d"&gt;https://xdcscan.com/tx/0xb272b13e641893985ed5874b420188fa1a6b9fbe6c115573be93ad7c97bae58d&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One call. $0.20 paid. Three layers, three different answers — and the chain was the only honest one. To be clear: the provider's idempotent-retry instinct is right (dedupe just needs to key on the request, not the authorization), and the root cause looks like relayer/settle-window timing. Easy platform wins: history entries carrying the tx hash + chain-confirmed status.&lt;/p&gt;

&lt;p&gt;But the general lesson is bigger than the bug: &lt;strong&gt;agentic payments need a reconciliation layer&lt;/strong&gt; — something that answers "did money actually move?" from chain truth, not from whichever service timed out first. When agents spend autonomously at machine speed, "charged: unknown" is not an acceptable state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Smaller notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;@xdctaskman/x402-server&lt;/code&gt; package referenced on the providers page 404s on npm (hence the hand-rolling).&lt;/li&gt;
&lt;li&gt;404s on paid routes return HTML error pages; agents would prefer JSON.&lt;/li&gt;
&lt;li&gt;Catalog entries don't carry input schemas yet, so agents call-and-fail to learn parameters.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we're building because of all this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;xforty Chain Tools&lt;/strong&gt; (live now): network stats + a contract inspector — pre-flight safety checks agents can buy for cents. Free taste: &lt;code&gt;npx xdcai call https://api.xforty.xyz/api/x402/gas-price&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The provider kit&lt;/strong&gt; (&lt;code&gt;npx xforty&lt;/code&gt;): everything I hand-rolled, packaged, so the next provider ships in minutes — plus an upstream PR adding &lt;code&gt;xdc&lt;/code&gt; to the official x402 SDKs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The trust layer&lt;/strong&gt;: spend policies, human approvals, audit trails, and settlement reconciliation for agent wallets — the piece this testing convinced me the whole ecosystem needs before real money rides these rails.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The payment rails are XDC AI's, and they work — that's the headline. We're building what gets paid, and what keeps agent spending safe.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;xforty · &lt;a href="https://xforty.xyz"&gt;xforty.xyz&lt;/a&gt; · api.xforty.xyz · &lt;code&gt;npx xforty&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>x402</category>
      <category>usdt</category>
      <category>agent</category>
    </item>
  </channel>
</rss>
