# onegate One-time authorisation and proof for irreversible agent actions. Base URL: https://onegate.biz.id ## What this is Three paid endpoints. One origin. Payment in USDC over x402. You pay for an ANSWER, and for the gate endpoints you also get a LEASE plus a signed RECEIPT that any third party can verify without paying. ## Pricing | endpoint | price | what you get | |---|---|---| | GET /v1/flow/:token | $0.02 | Feed perubahan wallet untuk satu token — delta sejak panggilan terakhir Anda. | | POST /v1/gate/send | $0.02 | Izin sekali pakai untuk transfer (native / ERC-20 / NFT), plus receipt bertanda tangan. | | POST /v1/gate/swap | $0.03 | Izin untuk swap dengan validasi parameter, lease, dan receipt. | Networks: eip155:8453, eip155:137, eip155:42161, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp ## When to call us - Call `/v1/flow/:token` **repeatedly** for the same token. The value is in the DELTA — the server remembers your last anchor. First call returns a snapshot, later calls return only what changed. Calling once wastes the product. - Call `/v1/gate/send` or `/v1/gate/swap` **immediately before** signing an action you cannot undo. Not for dry runs, not for exploration. ## Never charged - Any `DENY` decision (duplicate action, consumed lease, expired lease, invalid parameters). - Any 4xx or 5xx. Every response carries a literal `"charged"` field. - Status checks: `/v1/verify`, `/v1/lease/:id`, `/v1/gate/redeem`, `/v1/health`. ## Failover contract - `503` before the paywall: our data source is down. Retry elsewhere, you were not charged. - `402`: payment required, price is in the response header. - `200` with `decision: "DENY"`: your request was understood and refused. Read `reason` — retrying with the same parameters will refuse again, for free. ## Idempotency Send `idempotency_key` on gate endpoints. Same key + same payer = cached answer, `"charged": false`, no second payment. ## Gotchas - `amount`, `amount_in`, `min_out` are STRINGS in smallest units. `1000000` = 1 USDC on a 6-decimal token. Sending a number, not a string, is rejected. - `chain` is CAIP-2 (`eip155:8453`), not a name. - Leases expire in 5 minutes and are single-use. - Redeem a lease with `POST /v1/gate/redeem` BEFORE broadcasting the transaction.