{"components":{"schemas":{"AdminMerchant":{"properties":{"balance_usd":{"type":"string"},"claimed":{"type":"boolean"},"created_at":{"type":"string"},"email":{"type":"string"},"frozen_at":{"type":"string"},"frozen_reason":{"type":"string"},"id":{"type":"string"},"last_paid_at":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string"},"paid_invoices":{"type":"integer"},"status":{"type":"string"},"turnover_usd":{"type":"string"}},"type":"object"},"AuditEntry":{"properties":{"action":{"type":"string"},"created_at":{"type":"string"},"details":{"type":"object"},"id":{"type":"integer"},"ip":{"type":"string"},"merchant_id":{"type":"string"},"reason":{"type":"string"},"status":{"type":"integer"},"target_id":{"type":"string"}},"type":"object"},"Branding":{"properties":{"accent_color":{"example":"#3b82f6","type":"string"},"display_name":{"type":"string"},"header_note":{"type":"string"},"locale":{"enum":["ru","en"],"type":"string"},"logo_url":{"readOnly":true,"type":"string"},"show_name":{"type":"boolean"},"success_message":{"type":"string"},"support_email":{"type":"string"},"support_telegram":{"type":"string"},"support_url":{"type":"string"},"theme":{"enum":["light","dark","auto"],"type":"string"}},"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"},"Form":{"allOf":[{"$ref":"#/components/schemas/FormInput"},{"properties":{"form_url":{"type":"string"},"id":{"type":"string"},"stats":{"properties":{"paid_count":{"type":"string"},"paid_usd":{"type":"string"},"uses":{"type":"string"}},"type":"object"}},"type":"object"}]},"FormField":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"type":{"enum":["text","email","number","select","textarea"],"type":"string"}},"required":["key","type"],"type":"object"},"FormInput":{"properties":{"active":{"type":"boolean"},"amount_mode":{"enum":["fixed","custom","preset"],"type":"string"},"amount_usd":{"type":"string"},"callback_url":{"type":"string"},"cancel_url":{"type":"string"},"description":{"type":"string"},"fields":{"items":{"$ref":"#/components/schemas/FormField"},"type":"array"},"max_usd":{"type":"string"},"max_uses":{"description":"0 — без лимита","type":"integer"},"metadata":{"type":"object"},"methods":{"description":"PATCH: [] — все способы, null или отсутствие — не менять","items":{"type":"string"},"type":["array","null"]},"min_usd":{"type":"string"},"presets":{"items":{"type":"string"},"type":"array"},"slug":{"type":"string"},"success_url":{"type":"string"},"title":{"type":"string"},"ttl_minutes":{"type":"integer"}},"type":"object"},"Invoice":{"example":{"amount_usd":"25.00","credited_usd":"24.75","fee_usd":"0.25","id":"01a1f0c3-11aa-7e21-8a0b-6c2d9e5f4b33","order_id":"order-123","paid_usd":"25.00","pay_url":"https://izipay.cc/pay/01a1f0c3-11aa-7e21-8a0b-6c2d9e5f4b33","refunded_usd":"0.00","status":"paid"},"properties":{"amount_usd":{"type":"string"},"callback_url":{"type":"string"},"costs_usd":{"type":"string"},"credited_usd":{"type":"string"},"due_usd":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"fee_usd":{"type":"string"},"id":{"type":"string"},"net_usd":{"type":"string"},"order_id":{"type":"string"},"paid_method":{"description":"способ основной оплаты (крупнейший зачисленный перевод)","type":["string","null"]},"paid_usd":{"type":"string"},"pay_url":{"type":"string"},"payments":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"},"refunded_usd":{"description":"возвращено покупателю","type":"string"},"status":{"description":"converting — покупатель оплатил, касса собирает и меняет средства; paid — зачислено на баланс","enum":["pending","converting","paid","underpaid","expired","canceled"],"type":"string"}},"type":"object"},"InvoiceInput":{"properties":{"amount_usd":{"example":"25.00","type":"string"},"callback_url":{"description":"события счёта дублируются сюда (подпись основным webhook_secret)","type":"string"},"cancel_url":{"type":"string"},"description":{"type":"string"},"metadata":{"type":"object"},"method":{"example":"usdt_tron","type":"string"},"methods":{"items":{"type":"string"},"type":"array"},"order_id":{"type":"string"},"success_url":{"type":"string"},"ttl_minutes":{"type":"integer"}},"required":["amount_usd"],"type":"object"},"LoginResult":{"properties":{"email_confirmation":{"description":"почта кассы не проверена (signup/claim): сводка для решения (email, merchant_name, origin, created_at, balance_usd, api_keys, payout_addresses, webhooks, wallets, agent_login, open_claim_url); сессия — только POST /v1/auth/email/decision","type":"object"},"expires_at":{"format":"date-time","type":"string"},"merchant":{"type":"object"},"new_merchant":{"type":"boolean"},"session_token":{"type":"string"}},"type":"object"},"Payment":{"properties":{"address":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"expires_at":{"type":"string"},"memo":{"type":"string"},"method":{"type":"string"},"network":{"type":"string"},"payment_uri":{"type":"string"},"rate_usd":{"type":"string"},"received":{"type":"string"}},"type":"object"},"RefundInput":{"properties":{"address":{"description":"адрес покупателя","type":"string"},"amount_usd":{"description":"сумма покупателю в USD или \"all_paid\"","type":"string"},"method":{"type":"string"}},"required":["amount_usd","method","address"],"type":"object"},"Session":{"properties":{"created_at":{"type":"string"},"current":{"type":"boolean"},"expires_at":{"type":"string"},"id":{"type":"string"},"ip":{"type":"string"},"label":{"type":"string"},"last_used_at":{"type":"string"},"method":{"enum":["wallet","email"],"type":"string"},"user_agent":{"type":"string"}},"type":"object"},"TelegramChat":{"properties":{"chat_id":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"events":{"description":"какие события присылать (фактический набор)","items":{"type":"string"},"type":"array"},"first_name":{"type":"string"},"lang":{"description":"язык сообщений бота","enum":["ru","en"],"type":"string"},"username":{"type":"string"}},"type":"object"},"Ticket":{"properties":{"closed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"lang":{"type":"string"},"last_message":{"$ref":"#/components/schemas/TicketMessage"},"last_message_at":{"format":"date-time","type":"string"},"messages":{"description":"в GET /v1/support/tickets/{id} и ответах на изменения","items":{"$ref":"#/components/schemas/TicketMessage"},"type":"array"},"source":{"enum":["dashboard","api","mcp"],"type":"string"},"status":{"description":"open — ждёт поддержку, pending — поддержка ответила, closed — закрыто (сообщение открывает снова)","enum":["open","pending","closed"],"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"TicketMessage":{"properties":{"author":{"enum":["merchant","support"],"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"}},"type":"object"},"Wallet":{"properties":{"address":{"type":"string"},"chain":{"type":"string"},"created_at":{"type":"string"},"id":{"type":"string"},"last_login_at":{"type":"string"}},"type":"object"},"WalletChallenge":{"properties":{"address":{"type":"string"},"chain":{"type":"string"},"expires_at":{"type":"string"},"message":{"description":"подписать как есть: EVM — personal_sign (EIP-191), Tron — signMessageV2","type":"string"},"nonce":{"type":"string"}},"type":"object"},"WalletProof":{"properties":{"address":{"type":"string"},"chain":{"enum":["evm","tron"],"type":"string"},"nonce":{"description":"необязательно; по умолчанию — последний вызов адреса","type":"string"},"signature":{"description":"65 байт hex, v = 27/28 или 0/1","type":"string"}},"required":["address","signature"],"type":"object"},"WebhookAttempt":{"properties":{"attempt":{"type":"integer"},"duration_ms":{"type":"integer"},"endpoint_id":{"type":"string"},"error":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"id":{"type":"integer"},"request_headers":{"type":"object"},"response_body":{"type":"string"},"response_status":{"type":"integer"},"success":{"type":"boolean"},"url":{"type":"string"}},"type":"object"},"WebhookEndpoint":{"properties":{"description":{"type":"string"},"disabled_at":{"type":"string"},"disabled_reason":{"type":"string"},"enabled":{"type":"boolean"},"events":{"items":{"type":"string"},"type":"array"},"fail_streak":{"type":"integer"},"failing_since":{"type":"string"},"id":{"type":"string"},"primary":{"type":"boolean"},"status":{"enum":["active","failing","disabled"],"type":"string"},"url":{"type":"string"}},"type":"object"},"WebhookEndpointInput":{"properties":{"description":{"type":"string"},"enabled":{"type":"boolean"},"events":{"items":{"type":"string"},"type":"array"},"url":{"type":"string"}},"type":"object"},"Withdrawal":{"properties":{"address":{"type":"string"},"amount_usd":{"description":"всего списано с баланса","type":"string"},"asset":{"type":"string"},"conversion_fee_usd":{"type":"string"},"created_at":{"type":"string"},"error":{"type":"string"},"id":{"type":"string"},"invoice_id":{"type":"string"},"kind":{"enum":["payout","refund"],"type":"string"},"method":{"type":"string"},"network":{"type":"string"},"network_fee_usd":{"type":"string"},"receive_amount":{"type":"string"},"refund_usd":{"description":"возврат: сколько получает покупатель","type":"string"},"route":{"type":"string"},"status":{"enum":["queued","review","sending","sent","confirmed","failed"],"type":"string"},"tx_hash":{"type":"string"}},"type":"object"},"X402Payload":{"properties":{"accepted":{"$ref":"#/components/schemas/X402Requirements"},"network":{"description":"v1: сеть","type":"string"},"payload":{"properties":{"authorization":{"properties":{"from":{"description":"плательщик","type":"string"},"nonce":{"description":"bytes32 0x…, одноразовый","type":"string"},"to":{"description":"= payTo","type":"string"},"validAfter":{"description":"unix, ≤ сейчас","type":"string"},"validBefore":{"description":"unix, ≥ сейчас + 6 с","type":"string"},"value":{"description":"= сумма требований, ровно","type":"string"}},"required":["from","to","value","validAfter","validBefore","nonce"],"type":"object"},"signature":{"description":"EIP-712 подпись 65 байт 0x… (только EOA)","type":"string"}},"required":["signature","authorization"],"type":"object"},"resource":{"properties":{"description":{"description":"","type":"string"},"mimeType":{"description":"","type":"string"},"url":{"description":"","type":"string"}},"type":"object"},"scheme":{"description":"v1: exact","type":"string"},"x402Version":{"enum":[1,2],"type":"integer"}},"required":["payload"],"type":"object"},"X402Request":{"properties":{"paymentHeader":{"description":"вместо paymentPayload: base64 заголовка X-PAYMENT (ранние клиенты v1)","type":"string"},"paymentPayload":{"$ref":"#/components/schemas/X402Payload"},"paymentRequirements":{"$ref":"#/components/schemas/X402Requirements"},"x402Version":{"type":"integer"}},"required":["paymentRequirements"],"type":"object"},"X402Requirements":{"properties":{"amount":{"description":"v2: то же, что maxAmountRequired","type":"string"},"asset":{"description":"контракт USDC сети","type":"string"},"description":{"description":"","type":"string"},"extra":{"properties":{"assetTransferMethod":{"description":"eip3009 (по умолчанию)","type":"string"},"name":{"description":"домен EIP-712 токена: \"USD Coin\" (стенд — \"USDC\")","type":"string"},"version":{"description":"\"2\"","type":"string"}},"type":"object"},"maxAmountRequired":{"description":"v1: сумма в базовых единицах USDC (6 знаков: 50000 = $0.05)","type":"string"},"maxTimeoutSeconds":{"type":"integer"},"mimeType":{"description":"","type":"string"},"network":{"description":"v1: base, polygon, arbitrum, optimism, avalanche (стенд: base-sepolia, sepolia); v2: CAIP-2 eip155:8453","type":"string"},"payTo":{"description":"адрес x402 мерчанта izipay (GET /v1/x402/requirements)","type":"string"},"resource":{"description":"v1: URL ресурса","type":"string"},"scheme":{"description":"exact","type":"string"}},"required":["scheme","network","payTo","asset"],"type":"object"},"X402Settle":{"properties":{"amount":{"description":"зачисленная сумма, базовые единицы","type":"string"},"errorMessage":{"description":"","type":"string"},"errorReason":{"description":"код x402; settlement_pending — повторите settle","type":"string"},"izipay":{"properties":{"invoice_id":{"description":"счёт мерчанта, по которому пройдёт зачисление","type":"string"},"settlement_id":{"description":"","type":"string"},"status":{"description":"queued | signing | signed | sent | settled | failed","type":"string"}},"type":"object"},"network":{"description":"как в запросе","type":"string"},"payer":{"description":"","type":"string"},"success":{"type":"boolean"},"transaction":{"description":"хэш транзакции (пусто, если ничего не отправлено)","type":"string"}},"required":["success","transaction","network"],"type":"object"},"X402Verify":{"properties":{"invalidMessage":{"description":"пояснение","type":"string"},"invalidReason":{"description":"код x402","type":"string"},"isValid":{"type":"boolean"},"payer":{"description":"","type":"string"}},"required":["isValid"],"type":"object"}},"securitySchemes":{"admin":{"description":"IZI_ADMIN_TOKEN — только для админки /admin/v1","scheme":"bearer","type":"http"},"bearer":{"bearerFormat":"izk_…","description":"Ключ API izk_… (интеграции) или токен сессии кабинета izs_… (вход кошельком/по почте) — права одинаковые","scheme":"bearer","type":"http"}}},"info":{"description":"Криптокасса: счета в USD, приём монет, баланс в USD, вывод в USDT. Комиссия 1%. Руководство для агентов: https://izipay.cc/llms.txt","title":"izipay API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/admin/v1/audit":{"get":{"operationId":"adminAudit","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string"}},{"in":"query","name":"action","schema":{"type":"string"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditEntry"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Журнал действий админа (все изменяющие запросы /admin/v1)","tags":["Админка"]}},"/admin/v1/conversions":{"get":{"operationId":"adminConversions","parameters":[{"in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Конвертации","tags":["Админка"]}},"/admin/v1/conversions/{id}/retry":{"post":{"operationId":"adminRetryConversion","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Повторить конвертацию","tags":["Админка"]}},"/admin/v1/deposits":{"get":{"operationId":"adminDeposits","parameters":[{"in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Входящие переводы","tags":["Админка"]}},"/admin/v1/deposits/{id}/assign":{"post":{"operationId":"adminAssign","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"invoice_id":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Привязать осиротевший перевод к счёту","tags":["Админка"]}},"/admin/v1/health":{"get":{"operationId":"adminHealth","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Проблемы для оповещений","tags":["Админка"]}},"/admin/v1/invoices":{"get":{"operationId":"adminInvoices","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"q","schema":{"type":"string"}},{"in":"query","name":"from","schema":{"type":"string"}},{"in":"query","name":"to","schema":{"type":"string"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Счета всех мерчантов","tags":["Админка"]}},"/admin/v1/merchants":{"get":{"operationId":"adminMerchants","parameters":[{"in":"query","name":"q","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminMerchant"},"type":"array"},"total":{"type":"integer"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Мерчанты: поиск (имя, почта, id, кошелёк), сортировка, баланс, оборот","tags":["Админка"]}},"/admin/v1/merchants/{id}":{"get":{"operationId":"adminMerchant","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Карточка: кошельки, счета, выводы, события, действия админа","tags":["Админка"]}},"/admin/v1/merchants/{id}/adjust":{"post":{"operationId":"adminAdjust","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"amount_usd":"-2.50","reason":"возврат комиссии"},"schema":{"properties":{"amount_usd":{"type":"string"},"reason":{"type":"string"}},"required":["amount_usd","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount_usd":{"type":"string"},"balance_usd":{"type":"string"},"ref":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Ручная проводка ± (контрсчёт adjustments), в минус нельзя","tags":["Админка"]}},"/admin/v1/merchants/{id}/freeze":{"post":{"operationId":"adminFreeze","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"reason":"жалоба на мошенничество"},"schema":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Заморозить (новые счета, реквизиты, выводы, возвраты — запрещены)","tags":["Админка"]}},"/admin/v1/merchants/{id}/unfreeze":{"post":{"operationId":"adminUnfreeze","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"reason":"проверка пройдена"},"schema":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Разморозить","tags":["Админка"]}},"/admin/v1/stats":{"get":{"operationId":"adminStats","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Сводка кассы","tags":["Админка"]}},"/admin/v1/withdrawals":{"get":{"operationId":"adminWithdrawals","parameters":[{"in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Withdrawal"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Выводы","tags":["Админка"]}},"/admin/v1/withdrawals/{id}/approve":{"post":{"operationId":"adminApprove","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Одобрить вывод из review","tags":["Админка"]}},"/admin/v1/withdrawals/{id}/reject":{"post":{"operationId":"adminReject","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"admin":[]}],"summary":"Отклонить вывод (review/queued) с возвратом на баланс","tags":["Админка"]}},"/mcp":{"post":{"operationId":"mcp","responses":{"200":{"description":"ответ JSON-RPC"}},"security":[],"summary":"Удалённый MCP (JSON-RPC 2.0, streamable HTTP)","tags":["MCP"]}},"/v1/agent/login":{"post":{"operationId":"agentLogin","requestBody":{"content":{"application/json":{"schema":{"properties":{"merchant_id":{"type":"string"},"signature":{"type":"string"},"timestamp":{"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_key":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Новый ключ по подписи ed25519 агента","tags":["Регистрация"]}},"/v1/auth/email":{"post":{"operationId":"emailLogin","requestBody":{"content":{"application/json":{"example":{"email":"owner@shop.example","lang":"ru"},"schema":{"properties":{"email":{"type":"string"},"lang":{"enum":["ru","en"],"type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"status":"sent"},"schema":{"properties":{"status":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Письмо со ссылкой входа (15 минут, один раз); 503 email_login_unavailable без SMTP","tags":["Вход и сессии"]}},"/v1/auth/email/decision":{"post":{"operationId":"emailDecision","requestBody":{"content":{"application/json":{"example":{"decision":"mine"},"schema":{"properties":{"decision":{"enum":["mine","not_mine"],"type":"string"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"access_reset":false,"decision":"mine"},"schema":{"properties":{"access_reset":{"type":"boolean"},"decision":{"type":"string"},"merchant":{"type":"object"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Касса на непроверенную почту: mine — подтвердить (всё остаётся), not_mine — сбросить ключи, сессии, кошельки, вход агента, адреса выплат, автовывод и вебхуки создателя","tags":["Вход и сессии"]}},"/v1/auth/email/verify":{"get":{"operationId":"emailVerifyGet","parameters":[{"in":"query","name":"token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"expires_at":"2026-10-18T12:00:00Z","merchant":{"claimed":true,"id":"01a1f0c2-7b3e-7d4a-9c55-2f1e8b6a0d11","name":"Моя лавка","status":"active"},"new_merchant":false,"session_token":"izs_3f9a0c1d2e_kQ…"},"schema":{"$ref":"#/components/schemas/LoginResult"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"То же, токен в ?token=","tags":["Вход и сессии"]},"post":{"operationId":"emailVerify","requestBody":{"content":{"application/json":{"example":{"token":"Qm9…"},"schema":{"properties":{"token":{"type":"string"}},"required":["token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"expires_at":"2026-10-18T12:00:00Z","merchant":{"claimed":true,"id":"01a1f0c2-7b3e-7d4a-9c55-2f1e8b6a0d11","name":"Моя лавка","status":"active"},"new_merchant":false,"session_token":"izs_3f9a0c1d2e_kQ…"},"schema":{"$ref":"#/components/schemas/LoginResult"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Вход по токену из письма (ссылка: /dashboard#email_token=…)","tags":["Вход и сессии"]}},"/v1/auth/logout":{"post":{"operationId":"logout","responses":{"204":{"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Выйти (отозвать текущую сессию izs_…)","tags":["Вход и сессии"]}},"/v1/auth/logout-all":{"post":{"operationId":"logoutAll","responses":{"200":{"content":{"application/json":{"example":{"revoked":3},"schema":{"properties":{"revoked":{"type":"integer"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Выйти везде","tags":["Вход и сессии"]}},"/v1/auth/methods":{"get":{"operationId":"authMethods","responses":{"200":{"content":{"application/json":{"example":{"email":true,"wallet":{"chains":["evm","tron"]}},"schema":{"properties":{"email":{"type":"boolean"},"wallet":{"type":"object"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Доступные способы входа (кнопку почты скрыть при email=false)","tags":["Вход и сессии"]}},"/v1/auth/sessions":{"get":{"operationId":"listSessions","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Session"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Активные сессии кабинета","tags":["Вход и сессии"]}},"/v1/auth/sessions/{id}":{"delete":{"operationId":"revokeSession","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Завершить сессию","tags":["Вход и сессии"]}},"/v1/auth/wallet/challenge":{"post":{"operationId":"walletChallenge","requestBody":{"content":{"application/json":{"example":{"address":"0x52908400098527886E0F7030069857D2E4169EE7","chain":"evm"},"schema":{"properties":{"address":{"type":"string"},"chain":{"enum":["evm","tron"],"type":"string"}},"required":["chain","address"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"address":"0x52908400098527886E0F7030069857D2E4169EE7","chain":"evm","expires_at":"2026-10-17T12:05:00Z","message":"izipay.cc wants you to sign in with your Ethereum account:\n0x52908400098527886E0F7030069857D2E4169EE7\n\nSign in to izipay. …\n\nURI: https://izipay.cc\nNonce: 5f2c9a0e7b1d4c38\nIssued At: …\nExpiration Time: …","nonce":"5f2c9a0e7b1d4c38"},"schema":{"$ref":"#/components/schemas/WalletChallenge"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Сообщение для подписи кошельком (срок 5 минут)","tags":["Вход и сессии"]}},"/v1/auth/wallet/verify":{"post":{"operationId":"walletVerify","requestBody":{"content":{"application/json":{"example":{"address":"0x52908400098527886E0F7030069857D2E4169EE7","signature":"0x9f…1b"},"schema":{"$ref":"#/components/schemas/WalletProof"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"expires_at":"2026-10-18T12:00:00Z","merchant":{"claimed":true,"id":"01a1f0c2-7b3e-7d4a-9c55-2f1e8b6a0d11","name":"Моя лавка","status":"active"},"new_merchant":false,"session_token":"izs_3f9a0c1d2e_kQ…"},"schema":{"$ref":"#/components/schemas/LoginResult"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Вход по подписи; новый кошелёк — новая касса (≤ 10 в час с IP)","tags":["Вход и сессии"]}},"/v1/balance":{"get":{"operationId":"getBalance","responses":{"200":{"content":{"application/json":{"example":{"available_usd":"124.75","currency":"USD"},"schema":{"properties":{"available_usd":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Баланс в USD","tags":["Мерчант и ключи"]}},"/v1/checkout/{id}":{"get":{"operationId":"checkout","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Публичный вид счёта для страницы оплаты (branding, success_redirect: подписанная izi_sig ссылка возврата — НЕ подтверждение оплаты; проверяйте status == paid через GET /v1/invoices/{id} или вебхук)","tags":["Оплата (публично)"]}},"/v1/checkout/{id}/pay":{"post":{"operationId":"checkoutPay","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"method":"usdt_tron"},"schema":{"properties":{"method":{"type":"string"}},"required":["method"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Покупатель выбрал способ — реквизиты","tags":["Оплата (публично)"]}},"/v1/claim":{"post":{"operationId":"claim","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string"},"merchant_id":{"type":"string"},"token":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_key":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Присвоить агентскую кассу человеку (claim_url)","tags":["Регистрация"]}},"/v1/events":{"get":{"operationId":"listEvents","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Лента событий","tags":["Вебхуки и события"]}},"/v1/forms":{"get":{"operationId":"listForms","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Form"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Платёжные формы со статистикой","tags":["Формы"]},"post":{"operationId":"createForm","requestBody":{"content":{"application/json":{"example":{"amount_mode":"preset","fields":[{"key":"email","label":"Почта","required":true,"type":"email"}],"presets":["5","10"],"title":"Донат"},"schema":{"$ref":"#/components/schemas/FormInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Создать платёжную форму","tags":["Формы"]}},"/v1/forms/{id}":{"delete":{"operationId":"deleteForm","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"нет содержимого"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Удалить форму","tags":["Формы"]},"get":{"operationId":"getForm","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Форма","tags":["Формы"]},"patch":{"operationId":"updateForm","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Изменить форму (только переданные поля)","tags":["Формы"]}},"/v1/invoices":{"get":{"operationId":"listInvoices","parameters":[{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Список счетов","tags":["Счета"]},"post":{"operationId":"createInvoice","requestBody":{"content":{"application/json":{"example":{"amount_usd":"25.00","callback_url":"https://shop.example/izipay/hook","order_id":"order-123","success_url":"https://shop.example/thanks"},"schema":{"$ref":"#/components/schemas/InvoiceInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"amount_usd":"25.00","id":"01a1f0c3-11aa-7e21-8a0b-6c2d9e5f4b33","pay_url":"https://izipay.cc/pay/01a1f0c3-11aa-7e21-8a0b-6c2d9e5f4b33","status":"pending"},"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Создать счёт","tags":["Счета"],"x-idempotent":"order_id или Idempotency-Key"}},"/v1/invoices/{id}":{"get":{"operationId":"getInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Счёт","tags":["Счета"]}},"/v1/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Отменить неоплаченный счёт","tags":["Счета"]}},"/v1/invoices/{id}/pay":{"post":{"operationId":"payInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"method":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Реквизиты для оплаты способом method","tags":["Счета"]}},"/v1/invoices/{id}/refund":{"post":{"operationId":"refundInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"all_paid","method":"usdt_tron"},"schema":{"$ref":"#/components/schemas/RefundInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"26.50","conversion_fee_usd":"0.00","id":"01a1f0d0-…","invoice_id":"01a1f0c3-11aa-7e21-8a0b-6c2d9e5f4b33","kind":"refund","method":"usdt_tron","network_fee_usd":"1.50","receive_amount":"25","refund_usd":"25.00","status":"queued"},"schema":{"$ref":"#/components/schemas/Withdrawal"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Возврат покупателю: получает amount_usd в монете method; сетевую комиссию мерчант платит сверху; не больше оплаченного. Idempotency-Key","tags":["Возвраты"]}},"/v1/invoices/{id}/refund/quote":{"post":{"operationId":"quoteRefund","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"25.00","method":"usdt_tron"},"schema":{"$ref":"#/components/schemas/RefundInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"26.50","asset":"USDT","conversion_fee_usd":"0.00","expires_at":"2026-10-17T12:10:00Z","method":"usdt_tron","network":"tron","network_fee_usd":"1.50","receive_amount":"25","refund_usd":"25.00"},"schema":{"properties":{"address":{"type":"string"},"amount_usd":{"description":"всего спишется с баланса","type":"string"},"asset":{"type":"string"},"conversion_fee_usd":{"type":"string"},"expires_at":{"type":"string"},"method":{"type":"string"},"network":{"type":"string"},"network_fee_usd":{"type":"string"},"receive_amount":{"type":"string"},"refund_usd":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Расчёт возврата без создания: что получит покупатель и сколько спишется","tags":["Возвраты"]}},"/v1/invoices/{id}/refunds":{"get":{"operationId":"listRefunds","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Withdrawal"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Возвраты по счёту","tags":["Возвраты"]}},"/v1/keys":{"get":{"operationId":"listKeys","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Ключи API","tags":["Мерчант и ключи"]},"post":{"operationId":"createKey","requestBody":{"content":{"application/json":{"example":{"name":"shop-backend","scopes":["invoices:write","webhooks"]},"schema":{"properties":{"name":{"type":"string"},"scopes":{"items":{"enum":["all","invoices:write","invoices:read","payouts","settings","webhooks"],"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"api_key":"izk_3f9a0c1d2e_…","key":{"id":"01a1…","name":"shop-backend","prefix":"izk_3f9a0c1d2e","scopes":["invoices:write","webhooks"]}},"schema":{"properties":{"api_key":{"type":"string"},"key":{"type":"object"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Новый ключ API (показывается один раз); scopes пусто — all","tags":["Мерчант и ключи"]}},"/v1/keys/{id}":{"delete":{"operationId":"revokeKey","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Отозвать ключ API","tags":["Мерчант и ключи"]}},"/v1/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance_usd":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Мерчант и баланс","tags":["Мерчант и ключи"]},"patch":{"operationId":"updateMe","requestBody":{"content":{"application/json":{"example":{"name":"Моя лавка","payout_addresses":{"usdt_tron":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn"},"webhook_url":"https://shop.example/hook"},"schema":{"properties":{"name":{"type":"string"},"payout_addresses":{"description":"{\"usdt_tron\": \"T…\"}; пустая строка — удалить","type":"object"},"webhook_url":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"merchant":{"type":"object"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Настройки: name, webhook_url, payout_addresses (адреса — только с правом payouts)","tags":["Мерчант и ключи"]}},"/v1/me/addresses":{"get":{"operationId":"merchantAddresses","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Постоянные адреса приёма мерчанта (TRX)","tags":["Мерчант и ключи"]}},"/v1/me/branding":{"get":{"operationId":"getBranding","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Оформление страницы оплаты","tags":["Оформление"]},"patch":{"operationId":"updateBranding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Изменить оформление (только переданные поля)","tags":["Оформление"]}},"/v1/me/branding/logo":{"delete":{"operationId":"deleteLogo","responses":{"204":{"description":"нет содержимого"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Удалить логотип","tags":["Оформление"]},"post":{"operationId":"uploadLogoPost","requestBody":{"content":{"image/jpeg":{},"image/png":{},"image/webp":{},"multipart/form-data":{}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"То же, что PUT (для FormData/<form>)","tags":["Оформление"]},"put":{"operationId":"uploadLogo","requestBody":{"content":{"image/jpeg":{},"image/png":{},"image/webp":{},"multipart/form-data":{}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Логотип: тело — PNG/JPEG/WebP до 256 КБ (или multipart поле file)","tags":["Оформление"]}},"/v1/me/wallets":{"get":{"operationId":"listWallets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Wallet"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Кошельки для входа","tags":["Вход и сессии"]},"post":{"operationId":"linkWallet","requestBody":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","chain":"tron","signature":"0x…1c"},"schema":{"$ref":"#/components/schemas/WalletProof"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Привязать кошелёк (после /v1/auth/wallet/challenge)","tags":["Вход и сессии"]}},"/v1/me/wallets/{id}":{"delete":{"operationId":"deleteWallet","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Отвязать кошелёк (последний способ входа — нельзя)","tags":["Вход и сессии"]}},"/v1/me/webhook-secret":{"post":{"operationId":"rotateWebhookSecret","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"webhook_secret":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Новый основной секрет вебхуков (старый действует сутки)","tags":["Вебхуки и события"]}},"/v1/methods":{"get":{"operationId":"listMethods","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Способы оплаты и вывода","tags":["Счета"]}},"/v1/public/branding/{merchant_id}":{"get":{"operationId":"publicBranding","parameters":[{"in":"path","name":"merchant_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Оформление мерчанта (публично)","tags":["Оформление"]}},"/v1/public/branding/{merchant_id}/logo":{"get":{"operationId":"publicLogo","parameters":[{"in":"path","name":"merchant_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"картинка"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Логотип мерчанта (PNG/JPEG/WebP)","tags":["Оформление"]}},"/v1/public/forms/{slug}":{"get":{"operationId":"publicForm","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Форма для покупателя (без секретов)","tags":["Формы"]}},"/v1/public/forms/{slug}/invoice":{"post":{"operationId":"submitForm","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"amount_usd":{"type":"string"},"fields":{"type":"object"},"method":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount_usd":{"type":"string"},"invoice_id":{"type":"string"},"pay_url":{"type":"string"},"status":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Покупатель отправил форму → счёт","tags":["Формы"]}},"/v1/signup":{"post":{"operationId":"signup","requestBody":{"content":{"application/json":{"example":{"name":"my-shop","pow_nonce":"n…","pow_solution":"48213","webhook_url":"https://shop.example/hook"},"schema":{"properties":{"agent_pubkey":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"pow_nonce":{"type":"string"},"pow_solution":{"type":"string"},"webhook_url":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"api_key":"izk_…","claim_url":"https://izipay.cc/claim#…","webhook_secret":"whsec_…"},"schema":{"properties":{"api_key":{"type":"string"},"claim_url":{"type":"string"},"webhook_secret":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Регистрация мерчанта (агент или человек)","tags":["Регистрация"]}},"/v1/signup/challenge":{"post":{"operationId":"signupChallenge","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bits":{"type":"string"},"expires_at":{"type":"string"},"nonce":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"Задача proof-of-work для регистрации","tags":["Регистрация"]}},"/v1/support/tickets":{"get":{"operationId":"listTickets","parameters":[{"in":"query","name":"status","schema":{"enum":["open","pending","closed"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Ticket"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Обращения кассы, новые сверху","tags":["Поддержка"]},"post":{"operationId":"createTicket","requestBody":{"content":{"application/json":{"example":{"lang":"ru","message":"Счёт 01a14a6f-…, tx 0x9f3c…","subject":"Не зачислен платёж"},"schema":{"properties":{"lang":{"description":"язык письма об ответе; по умолчанию — Accept-Language","enum":["ru","en"],"type":"string"},"message":{"maxLength":10000,"type":"string"},"subject":{"maxLength":200,"type":"string"}},"required":["subject","message"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"closed_at":null,"created_at":"2026-10-21T10:00:00Z","id":"01a15f00-3c2b-7d10-8e4f-5a6b7c8d9e0f","lang":"ru","last_message_at":"2026-10-21T10:00:00Z","messages":[{"author":"merchant","body":"Счёт 01a14a6f-…, tx 0x9f3c…","created_at":"2026-10-21T10:00:00Z","id":1}],"source":"api","status":"open","subject":"Не зачислен платёж"},"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Новое обращение в поддержку (любой ключ); 429 too_many_tickets / too_many_messages","tags":["Поддержка"]}},"/v1/support/tickets/{id}":{"get":{"operationId":"getTicket","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"closed_at":null,"created_at":"2026-10-21T10:00:00Z","id":"01a15f00-3c2b-7d10-8e4f-5a6b7c8d9e0f","lang":"ru","last_message_at":"2026-10-21T10:00:00Z","messages":[{"author":"merchant","body":"Счёт 01a14a6f-…, tx 0x9f3c…","created_at":"2026-10-21T10:00:00Z","id":1}],"source":"api","status":"open","subject":"Не зачислен платёж"},"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Обращение с перепиской","tags":["Поддержка"]}},"/v1/support/tickets/{id}/close":{"post":{"operationId":"closeTicket","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Закрыть обращение","tags":["Поддержка"]}},"/v1/support/tickets/{id}/messages":{"post":{"operationId":"replyTicket","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"message":"Спасибо!"},"schema":{"properties":{"message":{"type":"string"}},"required":["message"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{"bearer":[]}],"summary":"Сообщение в обращении (статус → open, закрытое открывается)","tags":["Поддержка"]}},"/v1/telegram":{"get":{"operationId":"telegramState","responses":{"200":{"content":{"application/json":{"example":{"bot_url":"https://t.me/izipay_bot","bot_username":"izipay_bot","chats":[{"chat_id":123456789,"created_at":"2026-10-20T12:00:00Z","events":["invoice.paid","invoice.overpaid","invoice.underpaid","invoice.refunded","deposit.credited","withdrawal.sent","withdrawal.failed","balance.adjusted","webhook.endpoint_disabled","ticket.replied"],"first_name":"Анна","lang":"ru","username":"shop_owner"}],"default_events":["invoice.paid","invoice.overpaid","invoice.underpaid","invoice.refunded","deposit.credited","withdrawal.sent","withdrawal.failed","balance.adjusted","webhook.endpoint_disabled","ticket.replied"],"enabled":true,"event_types":["invoice.paid","invoice.overpaid","invoice.partially_paid","invoice.underpaid","invoice.expired","invoice.refunded","deposit.credited","withdrawal.created","withdrawal.sent","withdrawal.confirmed","withdrawal.failed","balance.adjusted","webhook.endpoint_disabled","ticket.replied"],"max_chats":5},"schema":{"properties":{"bot_url":{"type":["string","null"]},"bot_username":{"description":"null — бот ещё не запускался","type":["string","null"]},"chats":{"items":{"$ref":"#/components/schemas/TelegramChat"},"type":"array"},"default_events":{"items":{"type":"string"},"type":"array"},"enabled":{"description":"false — бот на этой установке не включён","type":"boolean"},"event_types":{"items":{"type":"string"},"type":"array"},"max_chats":{"type":"integer"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Telegram-бот: включён ли, имя бота, привязанные чаты, доступные события (право all)","tags":["Telegram"]}},"/v1/telegram/chats/{chat_id}":{"delete":{"operationId":"telegramUnlink","parameters":[{"in":"path","name":"chat_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"нет содержимого"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Отвязать чат (404 — чат не привязан к этой кассе)","tags":["Telegram"]},"patch":{"operationId":"telegramChatEvents","parameters":[{"in":"path","name":"chat_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"events":["invoice.paid","withdrawal.failed"]},"schema":{"properties":{"events":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"chat_id":123456789,"created_at":"2026-10-20T12:00:00Z","events":["invoice.paid","invoice.overpaid","invoice.underpaid","invoice.refunded","deposit.credited","withdrawal.sent","withdrawal.failed","balance.adjusted","webhook.endpoint_disabled","ticket.replied"],"first_name":"Анна","lang":"ru","username":"shop_owner"},"schema":{"$ref":"#/components/schemas/TelegramChat"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Какие события присылать в чат; [] — набор по умолчанию (400 unknown_event)","tags":["Telegram"]}},"/v1/telegram/link":{"post":{"operationId":"telegramLink","responses":{"201":{"content":{"application/json":{"example":{"code":"8dS-CdbazuZ95v8w","expires_at":"2026-10-20T12:15:00Z","start_command":"/start 8dS-CdbazuZ95v8w","url":"https://t.me/izipay_bot?start=8dS-CdbazuZ95v8w"},"schema":{"properties":{"code":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"start_command":{"type":"string"},"url":{"description":"https://t.me/<бот>?start=<код>; null — имя бота ещё неизвестно","type":["string","null"]}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Одноразовый код привязки чата (15 минут): человек открывает url в Telegram и жмёт «Старт» (право all; 503 telegram_disabled, 429 too_many_codes)","tags":["Telegram"]}},"/v1/webhooks/deliveries":{"get":{"operationId":"listWebhookAttempts","parameters":[{"in":"query","name":"endpoint_id","schema":{"type":"string"}},{"in":"query","name":"event_id","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookAttempt"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Журнал попыток доставки (новые первыми)","tags":["Вебхуки и события"]}},"/v1/webhooks/endpoints":{"get":{"operationId":"listWebhookEndpoints","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Адреса вебхуков","tags":["Вебхуки и события"]},"post":{"operationId":"createWebhookEndpoint","requestBody":{"content":{"application/json":{"example":{"events":["invoice.*"],"url":"https://shop.example/hook"},"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Добавить адрес; secret показывается один раз","tags":["Вебхуки и события"]}},"/v1/webhooks/endpoints/{id}":{"delete":{"operationId":"deleteWebhookEndpoint","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"нет содержимого"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Удалить адрес","tags":["Вебхуки и события"]},"get":{"operationId":"getWebhookEndpoint","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Адрес","tags":["Вебхуки и события"]},"patch":{"operationId":"updateWebhookEndpoint","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Изменить; enabled=true снимает авто-отключение","tags":["Вебхуки и события"]}},"/v1/webhooks/endpoints/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookEndpointSecret","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"secret":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Новый секрет; старый действует ещё сутки","tags":["Вебхуки и события"]}},"/v1/webhooks/endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"event_id":{"type":"string"},"status":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Событие ping только на этот адрес","tags":["Вебхуки и события"]}},"/v1/webhooks/event-types":{"get":{"operationId":"listEventTypes","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"События для фильтра адресов","tags":["Вебхуки и события"]}},"/v1/webhooks/events/{id}":{"get":{"operationId":"getWebhookEvent","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Событие и его доставки по адресатам","tags":["Вебхуки и события"]}},"/v1/webhooks/events/{id}/resend":{"post":{"operationId":"resendWebhookEvent","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"endpoint_id":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Повторить отправку (всем или endpoint_id)","tags":["Вебхуки и события"]}},"/v1/webhooks/test":{"post":{"operationId":"testWebhook","responses":{"202":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Отправить событие ping на все адреса","tags":["Вебхуки и события"]}},"/v1/withdrawals":{"get":{"operationId":"listWithdrawals","responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Список выводов","tags":["Выводы"]},"post":{"operationId":"createWithdrawal","requestBody":{"content":{"application/json":{"example":{"quote_id":"01a1…"},"schema":{"properties":{"address":{"description":"пусто — сохранённый адрес вывода","type":"string"},"amount_usd":{"description":"сумма или \"all\" (без quote_id)","type":"string"},"method":{"type":"string"},"quote_id":{"format":"uuid","type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"100.00","conversion_fee_usd":"0.00","id":"01a1f0d6-…","kind":"payout","method":"usdt_tron","network_fee_usd":"1.50","receive_amount":"98.5","route":"direct","status":"queued"},"schema":{"$ref":"#/components/schemas/Withdrawal"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Вывод: по котировке (quote_id из /v1/withdrawals/quote) или сразу amount_usd+method+address. Idempotency-Key","tags":["Выводы"]}},"/v1/withdrawals/quote":{"post":{"operationId":"quoteWithdrawal","requestBody":{"content":{"application/json":{"example":{"address":"TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn","amount_usd":"100","method":"usdt_tron"},"schema":{"properties":{"address":{"type":"string"},"amount_usd":{"type":"string"},"method":{"type":"string"}},"required":["amount_usd","method"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"amount_usd":"100.00","conversion_fee_usd":"0.00","expires_at":"2026-10-17T12:10:00Z","method":"usdt_tron","network_fee_usd":"1.50","quote_id":"01a1…","receive_amount":"98.5","receive_usd":"98.50","route":"direct"},"schema":{"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Котировка вывода: что получит мерчант, комиссии, срок","tags":["Выводы"]}},"/v1/withdrawals/{id}":{"get":{"operationId":"getWithdrawal","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":"ok"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"Вывод","tags":["Выводы"]}},"/v1/x402/requirements":{"get":{"operationId":"x402Requirements","parameters":[{"example":"0.05","in":"query","name":"amount_usd","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"accepts":[{"amount":"50000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chain_id":8453,"decimals":6,"extra":{"name":"USD Coin","version":"2"},"min_amount_usd":"0.01","network":"base","payTo":"0x52908400098527886E0F7030069857D2E4169EE7","symbol":"USDC","x402_v1":"base","x402_v2":"eip155:8453"}],"facilitator_url":"https://izipay.cc/x402","max_amount_usd":"1000.00","min_amount_usd":"0.01","pay_to":"0x52908400098527886E0F7030069857D2E4169EE7"},"schema":{"properties":{"accepts":{"items":{"properties":{"amount":{"description":"базовые единицы","type":"string"},"asset":{"description":"","type":"string"},"chain_id":{"type":"integer"},"decimals":{"type":"integer"},"extra":{"type":"object"},"facilitator":{"description":"","type":"string"},"min_amount_usd":{"description":"минимум платежа в сети","type":"string"},"network":{"description":"id сети izipay","type":"string"},"payTo":{"description":"","type":"string"},"symbol":{"description":"","type":"string"},"x402_v1":{"description":"","type":"string"},"x402_v2":{"description":"","type":"string"}},"type":"object"},"type":"array"},"facilitator_url":{"description":"","type":"string"},"max_amount_usd":{"description":"","type":"string"},"min_amount_usd":{"description":"","type":"string"},"pay_to":{"description":"","type":"string"}},"type":"object"}}},"description":"ok (всегда 200 — итог в теле)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"x402: ваш payTo (постоянный, один на все EVM-сети) и параметры сетей для ответа 402; amount_usd — цена ресурса (от минимума сети до $1000; сети с минимумом выше цены не попадают в accepts, ни одной — 400 amount_too_small)"}},"/x402/settle":{"post":{"operationId":"x402Settle","requestBody":{"content":{"application/json":{"example":{"paymentPayload":{"network":"base","payload":{"authorization":{"from":"0x857b06519E91e3A54538791bDbb0E22373e36b66","nonce":"0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480","to":"0x52908400098527886E0F7030069857D2E4169EE7","validAfter":"1760961000","validBefore":"1760961300","value":"50000"},"signature":"0x2d6a7588d6acca505cbf0d9a4a227e0c52c6c34008c8e8986a1283259764173608a2ce6496642e377d6da8dbbf5836e9bd15092f9ecab05ded3d6293af148b571c"},"scheme":"exact","x402Version":1},"paymentRequirements":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Отчёт","extra":{"name":"USD Coin","version":"2"},"maxAmountRequired":"50000","maxTimeoutSeconds":120,"mimeType":"application/json","network":"base","payTo":"0x52908400098527886E0F7030069857D2E4169EE7","resource":"https://shop.example/api/report","scheme":"exact"},"x402Version":1},"schema":{"$ref":"#/components/schemas/X402Request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"amount":"50000","izipay":{"invoice_id":"01a1f0e1-…","settlement_id":"01a1f0e0-…","status":"settled"},"network":"base","payer":"0x857b06519E91e3A54538791bDbb0E22373e36b66","success":true,"transaction":"0x8f0d3b0c3d8c5e1f2a4b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b"},"schema":{"$ref":"#/components/schemas/X402Settle"}}},"description":"ok (всегда 200 — итог в теле)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"summary":"x402: провести платёж — izipay отправляет transferWithAuthorization (газ — izipay), ждёт квитанцию до ~40 с; мерчанту зачисляется сумма минус газ расчёта (costs_usd) и минус 1% с остатка (счёт invoice_id, событие invoice.paid). Повтор того же платежа идемпотентен. Ключ — владельца payTo, право invoices:write. Коды: 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, invalid_payload, invalid_payment_requirements, unsupported_scheme, invalid_x402_version, invalid_transaction_state, unexpected_verify_error, unexpected_settle_error, settlement_pending."}},"/x402/supported":{"get":{"operationId":"x402Supported","responses":{"200":{"content":{"application/json":{"example":{"extensions":[],"kinds":[{"extra":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","min_amount":"10000","min_amount_usd":"0.01"},"network":"base","scheme":"exact","x402Version":1},{"extra":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","min_amount":"10000","min_amount_usd":"0.01"},"network":"eip155:8453","scheme":"exact","x402Version":2}],"signers":{"eip155:*":["0x9858EfFD232B4033E47d90003D41EC34EcaEda94"]}},"schema":{"properties":{"extensions":{"items":{"description":"","type":"string"},"type":"array"},"kinds":{"items":{"properties":{"extra":{"properties":{"asset":{"description":"контракт USDC","type":"string"},"min_amount":{"description":"то же в базовых единицах USDC","type":"string"},"min_amount_usd":{"description":"минимум платежа в сети, USD","type":"string"}},"type":"object"},"network":{"description":"","type":"string"},"scheme":{"description":"","type":"string"},"x402Version":{"type":"integer"}},"type":"object"},"type":"array"},"signers":{"type":"object"}},"type":"object"}}},"description":"ok (всегда 200 — итог в теле)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[],"summary":"x402: поддерживаемые схема и сети (v1 и v2), минимум платежа сети в extra (газ расчёта ≤ 5%, не меньше $0.01), адрес, который платит газ"}},"/x402/verify":{"post":{"operationId":"x402Verify","requestBody":{"content":{"application/json":{"example":{"paymentPayload":{"network":"base","payload":{"authorization":{"from":"0x857b06519E91e3A54538791bDbb0E22373e36b66","nonce":"0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480","to":"0x52908400098527886E0F7030069857D2E4169EE7","validAfter":"1760961000","validBefore":"1760961300","value":"50000"},"signature":"0x2d6a7588d6acca505cbf0d9a4a227e0c52c6c34008c8e8986a1283259764173608a2ce6496642e377d6da8dbbf5836e9bd15092f9ecab05ded3d6293af148b571c"},"scheme":"exact","x402Version":1},"paymentRequirements":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Отчёт","extra":{"name":"USD Coin","version":"2"},"maxAmountRequired":"50000","maxTimeoutSeconds":120,"mimeType":"application/json","network":"base","payTo":"0x52908400098527886E0F7030069857D2E4169EE7","resource":"https://shop.example/api/report","scheme":"exact"},"x402Version":1},"schema":{"$ref":"#/components/schemas/X402Request"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"isValid":true,"payer":"0x857b06519E91e3A54538791bDbb0E22373e36b66"},"schema":{"$ref":"#/components/schemas/X402Verify"}}},"description":"ok (всегда 200 — итог в теле)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"ошибка"}},"security":[{},{"bearer":[]}],"summary":"x402: проверить платёж без записи и транзакции (ключ необязателен; с ключом payTo должен быть вашим). Коды: 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, invalid_payload, invalid_payment_requirements, unsupported_scheme, invalid_x402_version, invalid_transaction_state, unexpected_verify_error, unexpected_settle_error, settlement_pending."}}},"security":[{"bearer":[]}],"servers":[{"url":"https://izipay.cc"}],"tags":[{"description":"Касса за секунды: proof-of-work (агент) или почта; claim_url — присвоить кассу человеку","name":"Регистрация"},{"description":"Вход людей в кабинет без паролей: кошелёк (EVM/Tron) или ссылка из письма; сессии izs_…","name":"Вход и сессии"},{"description":"Профиль, баланс, ключи API и их права (scopes)","name":"Мерчант и ключи"},{"description":"Счета в USD и реквизиты для оплаты","name":"Счета"},{"description":"Страница оплаты: вид счёта и выбор способа","name":"Оплата (публично)"},{"description":"Котировка и вывод баланса","name":"Выводы"},{"description":"Возврат покупателю по оплаченному счёту","name":"Возвраты"},{"description":"Адреса вебхуков, журнал доставок, лента событий","name":"Вебхуки и события"},{"description":"Платёжные формы (ссылки) без кода","name":"Формы"},{"description":"Логотип, цвета и тексты страницы оплаты","name":"Оформление"},{"description":"Удалённый MCP для ИИ-агентов","name":"MCP"},{"description":"Только с IZI_ADMIN_TOKEN","name":"Админка"},{"description":"Бот мерчанта: уведомления о событиях, /balance, /invoice, /unlink; привязка чата по одноразовой ссылке","name":"Telegram"},{"description":"Обращения к людям из izipay; ответ — событие ticket.replied, письмо и кабинет","name":"Поддержка"}]}
