Skip to content
Fourohtwo

Use when an agent must confirm a transaction or payment landed

1gateway.dev/v1/onchain/tx/receipt

Use when an agent must confirm a transaction or payment landed: did it succeed, who paid whom, how much of which token. Input: hash; chain (base default, ethereum, arbitrum, monad). Output: JSON status (success/reverted), block+time, confirmations, from, to, native value, fee, decoded ERC-20 transfers with symbol and amount (first 25). Unknown or unmined hash: 404, not charged. Example: ?hash=0x28

BaseMonadPolygonArbitrumSolanaAnswering
GEThttps://1gateway.dev/v1/onchain/tx/receipt

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://1gateway.dev/v1/onchain/tx/receipt?chain=base&hash=0x284f8abed91b5631ee28bdb1ccfe78374e18c480cb2ab25f28e3bfac5210fe0b");
console.log(await res.json());

Example input

{
  "chain": "base",
  "hash": "0x284f8abed91b5631ee28bdb1ccfe78374e18c480cb2ab25f28e3bfac5210fe0b"
}

More from 1gateway