{"openapi":"3.1.0","info":{"title":"XAOC Pay API","version":"1.4.0","description":"Merchant-scoped live payments with HMAC authentication. Full signing instructions: /docs/llms.txt"},"servers":[{"url":"https://xaocpay.store"}],"security":[{"apiKey":[],"timestamp":[],"nonce":[],"signature":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"timestamp":{"type":"apiKey","in":"header","name":"X-Timestamp"},"nonce":{"type":"apiKey","in":"header","name":"X-Nonce"},"signature":{"type":"apiKey","in":"header","name":"X-Signature"}},"schemas":{"PaymentInput":{"type":"object","required":["amount","order_id"],"properties":{"amount":{"type":"string","pattern":"^[0-9]+([.][0-9]{1,2})?$","examples":["1490.00"]},"order_id":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":500},"customer_id":{"type":"string","maxLength":100},"method":{"type":"string","enum":["auto","general","sbp","crypto"],"default":"auto"},"buyer_share":{"type":"integer","minimum":0,"maximum":100},"metadata":{"type":"object","additionalProperties":true}}}}},"paths":{"/api/v1/payments":{"get":{"summary":"Список платежей по всей истории","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"method","in":"query","schema":{"type":"string","enum":["auto","sbp","card","crypto"]}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"min","in":"query","schema":{"type":"string"}},{"name":"max","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["newest","oldest","amount_desc","amount_asc"]}}],"responses":{"200":{"description":"items, total, page, limit, pages, hasMore"}}},"post":{"summary":"Создать платёж","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInput"}}}},"responses":{"201":{"description":"Платёж создан, ответ содержит checkout_url"},"401":{"description":"Неверная подпись"},"409":{"description":"Конфликт order_id или nonce"}}}},"/api/v1/payments/{id}":{"get":{"summary":"Получить платёж","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Текущий платёж"},"404":{"description":"Платёж не найден"}}}},"/api/v1/balance":{"get":{"summary":"Доступный и зарезервированный баланс USDT","responses":{"200":{"description":"Баланс"}}}}}}