The NEAR counterpart of agent-pay-gate
402.com.tr/api/x402/near-agent-gate
The NEAR counterpart of agent-pay-gate. Composes the recipient's account posture (does it exist, is it a contract, control flags) with the NEP-141 transfer preflight into one GO/HOLD/STOP before an agent sends. On NEAR a mistyped account is unrecoverable and a token transfer silently fails unless the recipient has storage_deposit — this catches both ahead of time. Pass token (+amount) for a token
GET
https://402.com.tr/api/x402/near-agent-gateUptime0.0% 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
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://402.com.tr/api/x402/near-agent-gate?amount=100&near=50&to=tether.multisafe.near&token=usdt.tether-token.near");
console.log(await res.json());Example input
{
"amount": "100",
"near": "50",
"to": "tether.multisafe.near",
"token": "usdt.tether-token.near"
}