# NEAR Agent Pay Gate

> NEAR Agent Pay Gate is a paid API for AI agents from 402.com.tr, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-15).

Pre-flight check before sending NEAR or NEP-141 tokens: verifies recipient account existence, contract status, and storage_deposit readiness in one GO/HOLD/STOP decision.

## Facts

- Endpoint: GET https://402.com.tr/api/x402/near-agent-gate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/near-agent-pay-gate-f359311c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-rSwQyXOTO5rDr-jkWGFw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability near-agent-pay-gate-f359311c
```

Example prompt: Before I send 50 USDC.e to alice.near, run the NEAR pay gate to make sure the account exists, isn't blocked, and has storage deposit set up — give me a GO or STOP verdict.

## When to prefer this

Use this endpoint when an AI agent is about to programmatically send NEAR native tokens or NEP-141 tokens and needs a single authoritative pre-flight check. Prefer it over manual RPC calls when you need both account existence verification and storage_deposit readiness in one step, since on NEAR a mistyped account is unrecoverable and a NEP-141 transfer to an unprepared account silently fails. Especially valuable in automated payment workflows where human review is absent.

## Known failure modes

- Recipient account ID not found on NEAR (account does not exist — STOP)
- NEP-141 token contract address is invalid or not a fungible token
- Recipient lacks storage_deposit for the specified token (HOLD/STOP)
- Amount parameter missing or malformed — validation cannot size the transfer
- Network connectivity issue reaching NEAR RPC — indeterminate result
- Payment of $0.02 USDC not fulfilled — x402 payment required error

## How this service works

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 transfer, near= for native-amount sizing. Not financial advice.

## Output

Returns a GO, HOLD, or STOP verdict combining: whether the recipient NEAR account exists, whether it is a smart contract, any control/freeze flags, and whether the recipient has the required storage_deposit for the specified NEP-141 token — all in a single pre-send decision.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "NEAR account you are about to pay"
      },
      "near": {
       "type": "string",
       "description": "Native NEAR amount (optional, for sizing)"
      },
      "token": {
       "type": "string",
       "description": "NEP-141 token (optional)"
      },
      "amount": {
       "type": "string",
       "description": "Token amount (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/near-agent-pay-gate-f359311c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402.com.tr](https://www.zero.xyz/host/402.com.tr/llms.txt)
