# izipay — crypto checkout for people and AI agents

> Invoices in USD, paid with popular coins on popular networks, credited to a USD balance; payouts any time in USDT/USDC
> or, via conversion, in BTC, ETH, LTC, TRX, BNB, AVAX. 1% fee per payment. No KYC, no forms, no approvals.
> API: https://izipay.cc/v1 · MCP: https://izipay.cc/mcp · OpenAPI: https://izipay.cc/openapi.json · Human-readable docs: https://izipay.cc/docs
> Русская версия: https://izipay.cc/llms.ru.txt

## Connect in 3 requests (no human needed)

1. POST https://izipay.cc/v1/signup/challenge → {"nonce","bits","expires_at"}. Find any string solution such that sha256(nonce + ":" + solution)
   starts with bits zero bits (currently 22 bits, ~1 s of CPU). A challenge is single-use and valid 10 min.
2. POST https://izipay.cc/v1/signup {"name":"my-shop","pow_nonce":nonce,"pow_solution":solution,"webhook_url":"https://…"(optional),
   "agent_pubkey":"<base64 ed25519 public key>"(optional, for key recovery), "email":"<human owner's email>"(optional)}
   → 201 {"merchant","api_key":"izk_…","webhook_secret":"whsec_…","claim_url":"…"}. Store api_key and webhook_secret (shown once).
   Give claim_url to the human owner (see "Handing the checkout to a human"). With email, the human gets a "merchant created for
   your email" message: they sign in via the link and choose "It's mine" — your key keeps working (on "Not mine" the agent's
   keys and settings are revoked). Tell the human to expect that email.
3. POST https://izipay.cc/v1/invoices (Authorization: Bearer izk_…) {"amount_usd":"25.00","order_id":"order-123","success_url":"https://…"}
   → 201 {"id","pay_url","status":"pending",…}. Send the buyer to pay_url: coin selection, QR and live status.

Even simpler via MCP: connect https://izipay.cc/mcp, call izipay_signup, then izipay_create_invoice (see "MCP").

## Invoices

POST /v1/invoices fields: amount_usd (string, required, 0.01–1000000, up to 6 decimals); order_id (≤ 200 chars, unique per merchant —
repeating it returns the EXISTING invoice unchanged; without order_id the Idempotency-Key header is used as order_id); description (≤ 1000);
methods (restrict payment methods; empty — all); method (issue payment details right away, payments[0]); success_url, cancel_url
(http(s)); callback_url (http(s), ≤ 2000); metadata (JSON ≤ 8 KB); ttl_minutes (10–10080, default 60).
At most 2000 open (pending, unexpired) invoices per merchant, and 100 until the first invoice is paid; else 429 too_many_open_invoices.

Invoice object: id, order_id, description, status, methods, success_url, cancel_url, callback_url, metadata, expires_at, paid_at,
created_at, payments[] (payment details per method), pay_url, amount_usd, paid_usd (received from the buyer at the locked rate),
costs_usd (collection and conversion costs), fee_usd (1%), credited_usd (credited to balance; net_usd is the same, kept for
compatibility), due_usd (max(0, amount − paid)), refunded_usd, paid_method (method of the largest credited transfer, null if unpaid).
GET /v1/invoices?status=&limit=(≤ 100, default 50)&before=<invoice id> → {items, next_before} (newest first); GET /v1/invoices/{id}.

Statuses:
- pending — waiting for payment. Partial payments keep it pending (event invoice.partially_paid).
- converting — the buyer paid (≥ amount − 0.5% tolerance, at most $5) in a coin that izipay converts to USDT; digital goods may be delivered now.
- paid — credited to the balance (for coins without conversion, straight from pending).
- underpaid — the invoice expired with paid_usd > 0 but below the threshold, or a short deposit arrived after expiry.
  It can be reopened: requesting payment details again (POST /v1/invoices/{id}/pay or on the payment page) sets it back to pending
  for the default 60 minutes.
- expired — no payment before expires_at (the job runs every 30 s with a 2-minute grace for late transfers).
- canceled — POST /v1/invoices/{id}/cancel, only for pending invoices with paid_usd = 0 (else 409 not_cancelable); no event is sent.
- overpaid is not a status: an extra transfer to a paid invoice emits invoice.overpaid and is credited.

## Payment methods and payment details

GET https://izipay.cc/v1/methods → {methods:[{code,title,network,network_name,asset,decimals,contract,stable,min_amount_usd,memo_required,
payout,payout_network_fee_usd}],fee_percent}. Method codes: native coin on its home network — the symbol (btc, eth, trx, sol, ton,
bnb, ltc, pol, avax); others — <symbol>_<network> (usdt_tron, usdc_base, eth_arbitrum …).
Confirmations: Tron 19, BNB Smart Chain 15, Ethereum 12, Polygon 32, Arbitrum/Base/Optimism 30, Avalanche 12, TON 1, Solana finalized,
Bitcoin 2 (≥ 0.05 BTC — 3, ≥ 1 BTC — 6), Litecoin 6 (≥ 10 LTC — 12).
Minimum amount = max(network minimum, a dynamic minimum recalculated every 2 minutes). Minimum amounts are set so that collection
and conversion costs don't exceed 5%. Network minimums: $1 on most networks, Ethereum $20, Bitcoin $10, Litecoin $2.
Transfers worth less than $0.50 are ignored (dust).

Payment details: POST /v1/invoices/{id}/pay {"method"} (or "method" when creating the invoice) → payment: id, method, network,
asset, address, memo, rate_usd, amount (exact coin amount), received, unconfirmed, expires_at, payment_uri, memo_required, exact_amount.
Invoice must be pending (else 409 invoice_closed); the method must be allowed and due ≥ its minimum (else 409 method_unavailable).
Rate: stablecoins 1:1, details valid until the invoice expires; other coins — rate locked for 30 minutes (expires_at = min(invoice
expiry, now + 30 min)); a stale price → 503 rate_unavailable. Requesting the same method again returns the same details.
A transfer seen before expires_at in the same coin and network is credited at the locked rate, otherwise at the current rate.
Addresses: EVM, Tron, Bitcoin, Litecoin — a new address per invoice. TON and Solana — a shared address plus a reference:
- TON: memo IZI… — the buyer MUST put it into the transfer comment, otherwise the payment is not matched automatically.
- Solana: a reference key included in the Solana Pay link (payment_uri).
- USDT TRC20 (usdt_tron) — one shared address with exact_amount=true: the payment is matched by the EXACT amount (invoice amount
  rounded up to 0.001 plus a tag of 0.001…0.999, up to ~2%; the tag is credited to the merchant). Send exactly that amount in ONE
  transfer before expires_at; if an exchange deducts its fee from the amount, the payment is not matched. 503 exact_amount_busy — retry.
- TRX: every merchant has a permanent address (GET /v1/me/addresses). A transfer of the exact amount of an open invoice pays it;
  any other amount tops up the balance instantly at the current rate minus 1% (event deposit.credited).
payment_uri: BIP21 for BTC/LTC, EIP-681 for EVM, ton://transfer for TON (with text=memo), Solana Pay for Solana, plain address for Tron.

## Money

- Balance: GET /v1/balance → {"available_usd"}. Kept in USD (double-entry ledger).
- After payment izipay collects the funds and converts them to USDT (everything except USDT arriving directly on shared wallets and
  except TRX). credited = USDT actually received − collection/conversion costs − 1%.
- Fee: 1% of each received payment. No monthly fee, nothing for unpaid invoices.

## Payouts (withdrawals)

1. Quote: POST /v1/withdrawals/quote {"amount_usd":"100" | "all","method":"usdt_tron","address":"T…"}
   → {quote_id, method, network, asset, address, route, amount_usd (debited), network_fee_usd, conversion_fee_usd,
   receive_amount (in coin), receive_usd (= amount − fees), expires_at}.
2. Withdraw: POST /v1/withdrawals {"quote_id"} + header Idempotency-Key (repeat → the same payout) → 201 payout.
   A quote is single-use; expired or used → 409 quote_expired. Short balance → 402 insufficient_balance.
   Without a quote: POST /v1/withdrawals {"amount_usd","method","address"} — priced internally.
Routes: direct — any USDT/USDC method, 1:1, fee = the network fee (payout_network_fee_usd), minimum = network fee + $1, quote valid
10 min. THORChain — BTC, LTC, ETH, BNB, AVAX, TRX, ETH on Base (SOL when THORChain opens the network): from the treasury (USDT on
BNB Smart Chain), conversion_fee_usd shown in the quote, quote valid 5 min; 503 quote_unavailable if THORChain's price deviates
> 3% or pools are halted; below THORChain's minimum → amount_too_small. Address checked per network (400 invalid_address).
Payout object: id, kind (payout | refund), invoice_id, method, network, asset, address, status, route, tx_hash, error, created_at,
updated_at, amount_usd, network_fee_usd, conversion_fee_usd, receive_amount, refund_usd.
Statuses: review (large payouts — by default above $1000 or a high 24-hour volume — wait for manual approval) → queued → sending →
sent (broadcast) → confirmed; failed — funds return to the balance. No merchant-side cancel.
GET /v1/withdrawals?status=&limit=(≤ 200) → {items}; GET /v1/withdrawals/{id}. Events withdrawal.created/sent/confirmed/failed.

## Refunds

POST /v1/invoices/{id}/refund {"amount_usd":"10.00" | "all_paid","method":"usdt_tron","address":"T…"} + Idempotency-Key →
201 payout with kind="refund". The buyer receives amount_usd in the method's coin; the network/conversion fee is paid by the
merchant on top (amount_usd in the response = total debited). Only for invoices with credited payments, not while converting
(409 not_refundable). Cannot exceed paid_usd minus already refunded (failed refunds do not count; 409 refund_exceeds_paid).
The buyer's address is required (saved payout addresses are not used). Invoice field refunded_usd; events withdrawal.created
(kind=refund) and invoice.refunded, then withdrawal.* (transfer status). GET /v1/invoices/{id}/refunds.
Preview without creating: POST /v1/invoices/{id}/refund/quote (same body) → {refund_usd, amount_usd (total debit), network_fee_usd,
conversion_fee_usd, receive_amount, method, asset, network, address, expires_at}. Scope payouts.

## Payment notifications (webhooks)

- Format: Standard Webhooks. POST with headers webhook-id, webhook-timestamp (unix s), webhook-signature, user-agent izipay-webhooks/1.
  Body {"id","type","created_at","data"}. webhook-signature = "v1," + base64(HMAC_SHA256(base64decode(secret without "whsec_"),
  id + "." + timestamp + "." + raw body)). Reject timestamps older than 5 minutes; compare in constant time.
- Reply 2xx quickly. Redirects are not followed (3xx = failure). Timeout 10 s.
- Retries per endpoint: 10 s, 30 s, 1 min, 5 min, 10 min, 30 min, 1 h, 2 h, 6 h, 12 h, 24 h — 12 attempts (~46 h), then failed.
- webhook-id = event id, identical across retries and endpoints: use it for idempotency.
- Endpoints: POST /v1/webhooks/endpoints {"url","events":["invoice.*"] (empty — all),"description"} → {"endpoint","secret"}
  (own secret, shown once); max 20 per merchant; ping always goes to every endpoint. webhook_url from PATCH /v1/me is the primary
  endpoint, signed with the merchant webhook_secret. GET/PATCH/DELETE /v1/webhooks/endpoints/{id}; event list: GET /v1/webhooks/event-types.
- Rotation: POST /v1/webhooks/endpoints/{id}/rotate-secret (or POST /v1/me/webhook-secret for the primary) — for 24 h
  webhook-signature carries two signatures separated by a space (old and new); accept either.
- An endpoint failing 10 times in a row for more than 24 h is disabled (event webhook.endpoint_disabled); re-enable with
  PATCH /v1/webhooks/endpoints/{id} {"enabled":true}.
- callback_url of an invoice (or a form): this invoice's invoice.* and payment.* events also go there, signed with the primary secret,
  not affected by endpoint filters.
- Delivery log (kept 30 days): GET /v1/webhooks/deliveries?endpoint_id=&event_id=&status=failed&before=&limit=; per-endpoint state:
  GET /v1/webhooks/events/{id}; resend: POST /v1/webhooks/events/{id}/resend {"endpoint_id"?}; test: POST /v1/webhooks/endpoints/{id}/test
  or POST /v1/webhooks/test (ping to all).
- Webhook URLs must be public: private, loopback and reserved networks are blocked.
- Polling instead: GET /v1/invoices/{id} or GET /v1/events?after=<last event id>&limit= (oldest first; ?order=desc&before= newest first).

## Events (data)

- invoice.converting, invoice.paid, invoice.overpaid, invoice.partially_paid, invoice.underpaid, invoice.expired, invoice.refunded —
  data = the full invoice object. Deliver digital goods on invoice.converting or invoice.paid; account using invoice.paid (credited_usd).
- payment.detected — {invoice_id, network, asset, tx_hash, amount, status:"confirming"}.
- payment.confirmed — {invoice_id, deposit_id, network, asset, tx_hash, amount, amount_usd, fee_usd, net_usd, explorer_url}; with
  conversion — {…, amount_usd, status:"converting", explorer_url}.
- payment.credited — {invoice_id, deposit_id, gross_usd, costs_usd, after_costs_usd, fee_usd, credited_usd, converted_to}.
- deposit.credited (TRX top-up) — {deposit_id, network, asset, tx_hash, address, amount, amount_usd, fee_usd, credited_usd, explorer_url}.
- withdrawal.created / sent / confirmed / failed — data = the payout object (kind payout | refund).
- webhook.endpoint_disabled — {endpoint_id, url, fail_streak, failing_since, reason}. ping — {message, endpoint_id?}.
- ticket.replied — {ticket_id, subject, status, message:{id, author:"support", body, created_at}} — support replied to a request.

## Buyer redirect (success_url / cancel_url)

The hosted page sends the buyer back to success_url (cancel_url) with invoice_id, status, order_id and izi_sig, where
izi_sig = hex(HMAC_SHA256(base64decode(webhook_secret without "whsec_"), invoice_id + "." + status + "." + order_id)).
Existing query parameters of your URL are kept. Verify it (during rotation — with the previous secret too). IMPORTANT: izi_sig only
proves the parameters were issued by izipay; status in the link is a snapshot taken when the page was shown, and the link can be
reopened or forwarded. The redirect, even with status=paid, is NOT proof of payment. Fulfil orders only after you yourself see
status == "paid": the invoice.paid webhook (with webhook-signature verified) or GET /v1/invoices/{id}.

## Payment forms (no code)

POST /v1/forms {"title":"Donate","amount_mode":"preset","presets":["5","10","25"],
"fields":[{"key":"email","label":"Email","type":"email","required":true}],"success_url":"https://…"} → {"form_url":"https://izipay.cc/f/<slug>",…}.
amount_mode: fixed (amount_usd) | custom (buyer enters, min_usd/max_usd) | preset (1–12 presets). Fields (≤ 20): key a-z0-9_,
label/placeholder ≤ 100, type text, email, number, select (1–50 options), textarea; required. Also: slug (3–63 chars a-z0-9-, else
generated), title (≤ 200), description (≤ 1000), methods ([] — all methods; in PATCH null/absent — unchanged), success_url, cancel_url,
callback_url, ttl_minutes (10–30, default 30), metadata (JSON object ≤ 4 KB, template), max_uses (payment limit: counts invoices that
received funds — paid, converting, underpaid; 0 — unlimited), active. At most 500 forms per merchant.
A form invoice is created without payment details — the buyer picks the method on the payment page. At most 200 open unpaid
form invoices per merchant (beyond that — 429 form_busy for forms only; the merchant's API is unaffected).
Form invoices get description = title and metadata = template + form_id, form_slug, fields (buyer input). GET /v1/forms — list with
stats {paid_count, paid_usd, uses}; GET/PATCH/DELETE /v1/forms/{id}.
Errors about a buyer field carry its key: {"error":{"code":"field_required","message":"…","field":"email"}} (also invalid_field, unknown_field).
Public: GET /v1/public/forms/{slug}, POST /v1/public/forms/{slug}/invoice {"amount_usd","fields":{…},"method"?} → {"invoice_id","pay_url"}.

## Payment page branding

PATCH /v1/me/branding {"display_name"(≤ 100),"show_name","accent_color":"#rrggbb","theme":"light|dark|auto","header_note"(≤ 500),
"success_message"(≤ 500),"support_email","support_telegram"(username),"support_url"(https),"locale":"ru|en"} — only the fields sent
change, "" clears. Logo: PUT /v1/me/branding/logo (body: PNG/JPEG/WebP ≤ 256 KB, ≤ 4096×4096; SVG is not accepted), remove — DELETE.
Shown on the payment page and on forms.

## Embedding on a website

<script src="https://izipay.cc/widget.js?v=1" async></script> and a link <a href="https://izipay.cc/pay/<invoice_id>" data-izipay> (or /f/<slug>) —
the payment page opens in a modal over your site. Details: https://izipay.cc/docs/widget.

## Telegram bot

Checkout event notifications in Telegram plus the commands /balance, /invoice <amount> [description], /unlink. Linking: dashboard →
Telegram (https://izipay.cc/dashboard#telegram) or POST /v1/telegram/link (scope all) → {"code","url":"https://t.me/<bot>?start=<code>",
"start_command":"/start <code>","expires_at"} — single-use code, 15 minutes, at most 10 active; the human opens url in Telegram and
presses Start. Private chats only; up to 5 chats per checkout; a chat belongs to one checkout (linking again moves it).
GET /v1/telegram → {"enabled","bot_username","bot_url","max_chats","chats":[{"chat_id","username","first_name","lang","events",
"created_at"}],"event_types","default_events"}; enabled=false — the bot isn't enabled on this installation (POST link → 503
telegram_disabled). PATCH /v1/telegram/chats/{chat_id} {"events":[…]} — which events to send ([] — default: invoice.paid,
invoice.overpaid, invoice.underpaid, invoice.refunded, deposit.credited, withdrawal.sent, withdrawal.failed, balance.adjusted,
webhook.endpoint_disabled, ticket.replied; also available: invoice.partially_paid, invoice.expired, withdrawal.created, withdrawal.confirmed);
DELETE /v1/telegram/chats/{chat_id} — unlink (204). Errors: too_many_codes (429), unknown_event, not_found.
/invoice 25 Order 17 creates an invoice (metadata {"source":"telegram","telegram_chat_id"}, ≤ 30 per hour per chat) and replies
with pay_url. A chat can't withdraw money. If the bot is blocked, the link is removed automatically. Details: https://izipay.cc/docs/telegram.

## Plugins

- WooCommerce: https://izipay.cc/downloads/izipay-for-woocommerce.zip — "Cryptocurrency" payment method, the checkout is created from the plugin
  settings, webhook ?wc-api=izipay; the order is paid on invoice.converting/paid. Details: https://izipay.cc/docs/plugins.
- WHMCS: https://izipay.cc/downloads/izipay-for-whmcs.zip — copy the modules folder into the WHMCS root, gateway "izipay (crypto)": API key
  (invoices:write is enough) and the main webhook secret. The izipay invoice is created on Pay Now with order_id
  whmcs-<invoice>-<cents> (a repeated click reuses it; an expired one → whmcs-…-1) and callback_url=<WHMCS>/modules/gateways/callback/izipay.php —
  no webhook setup needed. On invoice.converting/paid/overpaid the module re-checks GET /v1/invoices/{id} and calls addInvoicePayment
  once (transaction id = izipay invoice id, amount = metadata.whmcs_amount in the WHMCS invoice currency). Non-USD currency —
  set "Convert To For Processing" = USD. Refunds are manual. Details: https://izipay.cc/docs/whmcs.

## Support (tickets)

Questions for the izipay team (payment not credited, wrong coin, payout): POST /v1/support/tickets {"subject"(≤ 200),
"message"(≤ 10000),"lang":"ru|en"} → 201 {"id","subject","status":"open","source":"api|dashboard|mcp","created_at","last_message_at",
"closed_at","messages":[{"id","author":"merchant|support","body","created_at"}]}. Any valid key (even narrowly scoped) or a session.
GET /v1/support/tickets?status=open|pending|closed → {"items":[… + "last_message"]}; GET /v1/support/tickets/{id};
POST /v1/support/tickets/{id}/messages {"message"} (status → open, a closed one reopens); POST /v1/support/tickets/{id}/close.
Statuses: open — waiting for support, pending — support replied, closed. The reply arrives as the ticket.replied event (webhook,
GET /v1/events, Telegram bot), by email to the verified address and in the dashboard (https://izipay.cc/dashboard#support). MCP: izipay_support_*.
Limits: 20 open tickets (429 too_many_tickets), 30 messages per hour (429 too_many_messages); invalid_subject, invalid_message.
Details: https://izipay.cc/docs/support.

## API key scopes

POST /v1/keys {"name","scopes":[…]} → {"api_key","key"} — scopes: all (default), invoices:write (includes invoices:read), invoices:read,
payouts, settings, webhooks. Withdrawals, refunds and payout addresses need payouts; keys, sessions and wallets need all; GET /v1/balance,
GET /v1/me and GET /v1/me/addresses work with any key. The signup key (including izipay_signup) and dashboard sessions are all.
Missing scope — 403 insufficient_scope; unknown scope — 400 invalid_scope. GET /v1/keys, DELETE /v1/keys/{id}. Keys are stored as
sha256; revocation takes effect within 10 s.

## Dashboard sign-in for people (no passwords)

GET /v1/auth/methods → {"wallet":{"chains":["evm","tron"]},"email":bool}.
Wallet: POST /v1/auth/wallet/challenge {"chain":"evm"|"tron","address"} → {"message","nonce","expires_at"} (valid 5 min); sign the
message as is (EVM: personal_sign / EIP-191, Tron: tronWeb.trx.signMessageV2) → POST /v1/auth/wallet/verify {"address","signature","nonce"?}
→ {"session_token":"izs_…","expires_at","merchant","new_merchant"}. A new wallet creates a new merchant (≤ 10 per IP per hour).
Link more wallets: POST /v1/me/wallets (same proof), up to 10; GET /v1/me/wallets, DELETE /v1/me/wallets/{id} (not the last sign-in method).
Email: POST /v1/auth/email {"email","lang"?} → link valid 15 min (≤ 5 emails per address per hour) → POST /v1/auth/email/verify {"token"};
an unknown email creates a new merchant. An email from signup/claim is unverified: it gets a "merchant created for your
email" message (link valid 72 h), and signing in with it returns "email_confirmation" (who created it and when, keys, payout
addresses, auto-payout, webhooks, wallets) plus a session that can only decide — everything else is 403
email_confirmation_required. POST /v1/auth/email/decision {"decision":"mine"} confirms the email and keeps everything (the
agent's key keeps working); {"decision":"not_mine"} revokes the creator's API keys, sessions, sign-in wallets, agent sign-in,
payout addresses, auto-payout and webhooks ("access_reset": true); the merchant and its balance stay with the email owner. Sessions work as Bearer like API keys (scope all), expire after 24 h without activity and
30 days at most: GET /v1/auth/sessions, DELETE /v1/auth/sessions/{id}, POST /v1/auth/logout, POST /v1/auth/logout-all.
API keys stay for integrations.

## Handing the checkout to a human and lost keys

- claim_url = https://izipay.cc/claim#<merchant_id>.<token>: the human opens it and gets their own key (POST /v1/claim {merchant_id, token, email?}
  → {"api_key"}). The link is single-use; on claim ALL existing API keys (including the agent's) are revoked and agent_pubkey is removed.
- Lost key: pass agent_pubkey (base64 ed25519) at signup. New key: POST /v1/agent/login
  {"merchant_id","timestamp":unix,"signature":base64(ed25519_sign("izipay-login:<merchant_id>:<timestamp>"))} — within ±5 min,
  each signature once (400 stale_signature / signature_reused).

## x402 — let AI agents pay for your API (HTTP 402)

Put any HTTP resource behind an x402 paywall (coinbase/x402, scheme exact, versions 1 and 2): the agent gets 402 with requirements,
signs a USDC transfer (EIP-3009 transferWithAuthorization — the agent pays no gas) and retries with the X-PAYMENT header
(v2: PAYMENT-SIGNATURE). izipay is the facilitator: it verifies the signature and submits the transfer from its hot wallet (izipay sends the gas and deducts it from the credit — see below).
USDC lands on your x402 address; crediting works like conversions, by actual result: the amount minus the gas of the settlement
transaction (costs_usd, at the network's native coin rate) and minus 1% of the rest. Every payment creates an invoice (events
payment.confirmed {amount_usd, costs_usd, fee_usd, net_usd} and invoice.paid, metadata.x402 = {resource, payer, settlement_id, network}).
Networks: base, polygon, arbitrum, optimism, avalanche (USDC, 6 decimals; staging: base-sepolia and sepolia); the live list is
GET https://izipay.cc/x402/supported. The minimum payment is per network: settlement gas ≤ 5% of the amount, but at least $0.01 (recomputed every
2 minutes; kinds[].extra.min_amount_usd in /x402/supported and accepts[].min_amount_usd in /v1/x402/requirements); maximum $1000.
When a network's gas exceeds $0.25 per settlement, the network temporarily disappears from the list. izipay collects USDC from x402
addresses itself, in batches above a threshold — nothing to do on the merchant side.

1. GET /v1/x402/requirements?amount_usd=0.05 (key with invoices:read; MCP: izipay_x402_requirements) →
   {"pay_to","facilitator_url","accepts":[{"network":"base","x402_v1":"base","x402_v2":"eip155:8453","asset":"<USDC>","payTo",
   "extra":{"name":"USD Coin","version":"2"},"amount":"50000","min_amount_usd":"0.01","decimals":6,"chain_id":8453}]}. pay_to is permanent
   (one for all EVM networks) — cache it. Networks where amount_usd is below the minimum are left out of accepts; none left — 400 amount_too_small.
2. Request without payment → respond 402 with body {"x402Version":1,"error":"X-PAYMENT header is required","accepts":[{"scheme":"exact",
   "network":"base","maxAmountRequired":"50000","resource":"<resource URL>","description","mimeType":"application/json","payTo":"<pay_to>",
   "maxTimeoutSeconds":120,"asset":"<USDC>","extra":{"name":"USD Coin","version":"2"}}]} and header PAYMENT-REQUIRED =
   base64({"x402Version":2,"error","resource":{"url","description","mimeType"},"accepts":[{"scheme":"exact","network":"eip155:8453",
   "amount":"50000","payTo","maxTimeoutSeconds","asset","extra"}]}).
3. Request with X-PAYMENT / PAYMENT-SIGNATURE (base64 JSON PaymentPayload) → POST https://izipay.cc/x402/settle with Authorization: Bearer izk_…
   (invoices:write; payTo must be yours): {"x402Version":1|2,"paymentPayload":<decoded header>,"paymentRequirements":<the requirements
   of the same network from step 2>}. Always HTTP 200: {"success":true,"transaction":"0x…","network","payer","amount",
   "izipay":{"settlement_id","invoice_id","status"}} → serve the resource with header X-PAYMENT-RESPONSE (v2: PAYMENT-RESPONSE) =
   base64(settle response). success=false → 402 again with error = errorReason. Serve the resource only after success=true.
   settle waits for the block up to ~40 s; settlement_pending (non-empty transaction) means the tx is on chain: repeat the same settle to get
   the outcome. Repeating the same payment is idempotent (same tx); the same nonce with different data — invalid_transaction_state.
4. POST https://izipay.cc/x402/verify (same body, key optional) → {"isValid","invalidReason","invalidMessage","payer"} — check only, nothing is
   stored or sent.
GET https://izipay.cc/x402/supported → {"kinds":[{"x402Version":1,"scheme":"exact","network":"base","extra":{"min_amount_usd":"0.01",
"min_amount":"10000","asset":"<USDC>"}},{"x402Version":2,"scheme":"exact","network":"eip155:8453","extra":{…}},…],"extensions":[],
"signers":{"eip155:*":["<gas-paying address>"]}}.

Checks: EIP-712 TransferWithAuthorization signature (domain — extra.name/version, chainId, USDC contract; EOA only, 65 bytes),
validAfter ≤ now, validBefore ≥ now + 6 s, nonce unused (at izipay and in the contract), authorization.to = payTo,
value = exactly the required amount, asset = the network's USDC, payer balance, transferWithAuthorization simulation.
Codes (invalidReason / errorReason): insufficient_funds, invalid_exact_evm_payload_authorization_valid_after,
invalid_exact_evm_payload_authorization_valid_before, invalid_exact_evm_payload_authorization_value_mismatch,
invalid_exact_evm_payload_signature, invalid_exact_evm_payload_recipient_mismatch, invalid_network (incl. network temporarily closed: gas above the cap), invalid_payload,
invalid_payment_requirements (payTo not yours / not izipay, asset, amount below the network minimum or above $1000), unsupported_scheme, invalid_x402_version,
invalid_transaction_state (nonce used, simulation failed), unexpected_verify_error / unexpected_settle_error (retry), settlement_pending.
Ready middleware (no dependencies): JS — sdk/js/dist/x402.js (x402Express, withX402 for fetch handlers, X402Paywall);
Python — izipay.x402 (flask_x402, X402ASGIMiddleware for FastAPI/Starlette, X402Paywall). Standard x402 clients (x402-fetch, x402-axios,
x402 for Python) work as is; for x402 server libraries set facilitator url = https://izipay.cc/x402 and the Authorization: Bearer izk_… header
for verify/settle. Human docs: https://izipay.cc/docs/x402.

## MCP

Endpoint https://izipay.cc/mcp — Streamable HTTP (stateless JSON-RPC, protocol 2025-06-18); manifest https://izipay.cc/.well-known/mcp.json.
Auth: Authorization: Bearer izk_… or an api_key argument in every tool (if your client cannot set headers). Without a key only
izipay_signup and izipay_methods work. Tools need the same scopes as the HTTP API. Tools:
izipay_signup {name, webhook_url} (no PoW, 5 per IP per hour) · izipay_methods · izipay_create_invoice {amount_usd, order_id,
description, method, success_url, callback_url, metadata} · izipay_get_invoice {id} · izipay_list_invoices {status, limit} ·
izipay_balance · izipay_withdraw {amount_usd, method, address, idempotency_key} · izipay_refund {invoice_id, amount_usd | "all_paid",
method, address, idempotency_key} · izipay_update_settings {name, webhook_url, payout_addresses} · izipay_create_form {title, …form fields} ·
izipay_list_forms · izipay_set_webhook {url, description, events} · izipay_resend_event {event_id, endpoint_id} · izipay_events {after} ·
izipay_x402_requirements {amount_usd} · izipay_support_create {subject, message, lang} · izipay_support_list {status} ·
izipay_support_get {id} · izipay_support_reply {id, message}.

## Limits

Public endpoints are limited per IP per minute: signup/challenge 30, signup 10, agent/login 20, claim 10, checkout GET 120,
checkout pay 60, public form GET 120, form submit 10, wallet challenge 30, wallet verify 20, email login 5, email verify 30, POST /mcp 300.
Over the limit — 429 rate_limited with Retry-After: 60. Request bodies ≤ 64 KB, unknown fields are rejected (400 invalid_json).

## Payment methods (GET /v1/methods)

- `usdt_tron` — USDT · Tron (TRC20), minimum $1.00, payouts: yes (network fee $3.859805)
- `usdt_bsc` — USDT · BNB Smart Chain (BEP20), minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_ton` — USDT · TON, minimum $1.00, payouts: yes (network fee $0.20)
- `usdt_solana` — USDT · Solana, minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_base` — USDC · Base, minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_polygon` — USDT · Polygon, minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_arbitrum` — USDT · Arbitrum One, minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_solana` — USDC · Solana, minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_ethereum` — USDT · Ethereum (ERC20), minimum $20.00, payouts: yes (network fee $3.00)
- `usdc_ethereum` — USDC · Ethereum (ERC20), minimum $20.00, payouts: yes (network fee $3.00)
- `btc` — BTC · Bitcoin, minimum $12.167957, payouts: via conversion (fees in the quote)
- `eth` — ETH · Ethereum (ERC20), minimum $20.00, payouts: via conversion (fees in the quote)
- `sol` — SOL · Solana, minimum $1.00, payouts: via conversion (fees in the quote)
- `ton` — TON · TON, minimum $1.00
- `trx` — TRX · Tron (TRC20), minimum $1.00, payouts: via conversion (fees in the quote)
- `bnb` — BNB · BNB Smart Chain (BEP20), minimum $1.00, payouts: via conversion (fees in the quote)
- `ltc` — LTC · Litecoin, minimum $6.413317, payouts: via conversion (fees in the quote)
- `usdc_bsc` — USDC · BNB Smart Chain (BEP20), minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_polygon` — USDC · Polygon, minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_arbitrum` — USDC · Arbitrum One, minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_optimism` — USDT · Optimism, minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_optimism` — USDC · Optimism, minimum $1.00, payouts: yes (network fee $0.10)
- `usdt_avalanche` — USDT · Avalanche C-Chain, minimum $1.00, payouts: yes (network fee $0.10)
- `usdc_avalanche` — USDC · Avalanche C-Chain, minimum $1.00, payouts: yes (network fee $0.10)
- `pol` — POL · Polygon, minimum $1.00
- `eth_arbitrum` — ETH · Arbitrum One, minimum $1.00
- `eth_base` — ETH · Base, minimum $1.28422, payouts: via conversion (fees in the quote)
- `eth_optimism` — ETH · Optimism, minimum $1.00
- `avax` — AVAX · Avalanche C-Chain, minimum $1.00, payouts: via conversion (fees in the quote)

## Errors

{"error":{"code":"…","message":"…","field"?}} — English by default, Russian with Accept-Language: ru or ?lang=ru.
- Auth and access: unauthorized (401), insufficient_scope (403), invalid_scope, merchant_frozen (403), rate_limited (429).
- Requests: invalid_json, invalid_amount, too_large, invalid_redirect_url, invalid_callback_url, invalid_webhook_url, invalid_url,
  invalid_email, not_found (404).
- Signup and recovery: pow_required, pow_invalid, email_taken, invalid_name (merchant/key name — up to 100 chars, one line), invalid_agent_pubkey, claim_invalid, stale_signature, signature_reused.
- Invoices and payment: unknown_method, method_unavailable, invoice_closed, rate_unavailable (retry in a minute), exact_amount_busy,
  not_cancelable, too_many_open_invoices.
- Payouts and refunds: address_required, invalid_address, amount_too_small, insufficient_balance (402), quote_expired,
  quote_unavailable, not_refundable, refund_exceeds_paid, withdrawal_state_changed.
- Webhooks: unknown_event, too_many_endpoints, endpoint_disabled, invalid_endpoint_id, invalid_event_id, invalid_status, invalid_description.
- Forms: invalid_slug, slug_taken, invalid_title, invalid_amount_mode, invalid_fields, invalid_success_url, invalid_cancel_url, invalid_ttl,
  invalid_metadata, invalid_max_uses, too_many_forms, form_unavailable, form_busy, field_required, invalid_field, unknown_field, method_not_allowed.
- Branding: invalid_display_name, invalid_header_note, invalid_success_message, invalid_accent_color, invalid_theme, invalid_locale,
  invalid_support_email, invalid_support_telegram, invalid_support_url, invalid_logo, logo_too_large (413).
- Dashboard sign-in: invalid_chain, invalid_signature, challenge_expired, wallet_taken, too_many_wallets, last_login_method,
  email_login_unavailable, email_send_failed, token_invalid, not_a_session, email_confirmation_required (403, decide first:
  POST /v1/auth/email/decision), invalid_decision, no_email_confirmation (409).
- Support: invalid_subject, invalid_message, too_many_tickets (429), too_many_messages (429).
- MCP: invalid_arguments, unknown_tool. Server: internal (500, retry).
