{"openapi":"3.1.0","info":{"title":"QUQU API","version":"1.2.1","description":"Payment API. API key determines project and environment."},"servers":[{"url":"https://kappa.ququgate.com/v1"}],"security":[{"ProjectKey":[]}],"paths":{"/methods":{"get":{"summary":"Available payment methods","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Method"}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/banks":{"get":{"summary":"Available banks","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bank"}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string"}}]}},"/payments":{"post":{"summary":"Create a payment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"202":{"description":"Durably accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}}},"get":{"summary":"Compatible recent payment list","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","required":false,"schema":{"type":"number"}}]}},"/payments/{payment_id}":{"get":{"summary":"Payment state","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/payments/{payment_id}/events":{"get":{"summary":"Accepted status history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/history/payments":{"get":{"summary":"Complete cursor-paged payment history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentHistory"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","awaiting_customer","pending","settlement_pending","succeeded","cancelled","failed","unknown"]}},{"name":"since","in":"query","required":false,"schema":{"type":"number"}},{"name":"until","in":"query","required":false,"schema":{"type":"number"}}]}},"/wallets":{"get":{"summary":"Project wallets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/balance":{"get":{"summary":"Project ledger balance","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wallets/{wallet_id}":{"get":{"summary":"Project wallet state","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/wallets/{wallet_id}/entries":{"get":{"summary":"Append-only wallet statement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletStatement"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}]}},"/settlement/balance":{"get":{"summary":"Project USDT accounting balance and reserves","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementBalance"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settlement/entries":{"get":{"summary":"Append-only USDT journal","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementHistory"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Project disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}]}}},"components":{"securitySchemes":{"ProjectKey":{"type":"http","scheme":"bearer"}},"schemas":{"Payment":{"type":"object","properties":{"id":{"type":"string"},"merchant_order_id":{"type":"string"},"status":{"type":"string","enum":["queued","awaiting_customer","pending","settlement_pending","succeeded","cancelled","failed","unknown"]},"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"currency":{"const":"EUR"},"settled":{"type":"boolean"},"payment_url":{"type":"string","format":"uri"},"environment":{"enum":["test","live"]},"created_at":{"type":"number","description":"Unix seconds UTC"},"updated_at":{"type":"number","description":"Unix seconds UTC"},"simulated":{"type":"boolean"}},"required":["id","merchant_order_id","status","amount","currency","settled","payment_url","environment","created_at","updated_at"]},"PaymentRequest":{"type":"object","additionalProperties":false,"required":["merchant_order_id","method","amount","currency","return_url"],"properties":{"merchant_order_id":{"type":"string","minLength":1,"maxLength":256},"method":{"const":"open_banking"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"currency":{"const":"EUR"},"return_url":{"type":"string","format":"uri"},"bank_id":{"type":"string"},"customer":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email"},"full_name":{"type":"string"},"ip":{"type":"string"}}},"payer":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"bic":{"type":"string"},"iban":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_code":{"type":"string"},"building_number":{"type":"string"},"street_name":{"type":"string"},"personal_id":{"type":"string"},"corporate_id":{"type":"string"},"address_lines":{"type":"array","items":{"type":"string"}}},"not":{"required":["personal_id","corporate_id"]}}}},"Wallet":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"environment":{"enum":["test","live"]},"currency":{"const":"EUR"},"confirmed":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"pending":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"available_for_withdrawal":{"type":"null"},"withdrawals_enabled":{"const":false},"source":{"const":"project_ledger"},"updated_at":{"type":["number","null"]}},"required":["id","project_id","environment","currency","confirmed","pending","available_for_withdrawal","withdrawals_enabled","source","updated_at"]},"WalletEntry":{"type":"object","properties":{"id":{"type":"string"},"payment_id":{"type":"string"},"merchant_order_id":{"type":"string"},"kind":{"enum":["pending","pending_release","settled"]},"currency":{"const":"EUR"},"confirmed_delta":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"pending_delta":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"confirmed_after":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"pending_after":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"occurred_at":{"type":"number","description":"Unix seconds UTC"},"recorded_at":{"type":"number","description":"Unix seconds UTC"}}},"PaymentHistory":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]},"WalletStatement":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WalletEntry"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"request_id":{"type":"string"}},"required":["code","request_id"]}},"required":["error"]},"Bank":{"type":"object","properties":{"bank_id":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"},"required_fields":{"type":"array","items":{"type":"string"}},"additional_fields_at_checkout":{"type":"boolean"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","awaiting_customer","pending","settlement_pending","succeeded","cancelled","failed","unknown"]},"created_at":{"type":"number","description":"Unix seconds UTC"}}},"Method":{"type":"object","properties":{"code":{"const":"open_banking"},"name":{"type":"string"},"currency":{"const":"EUR"},"minimum":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"maximum":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"const":"payin"}}}},"SettlementBalance":{"type":"object","properties":{"project_id":{"type":"string"},"environment":{"enum":["test","live"]},"currency":{"const":"USDT"},"precision":{"const":6},"source":{"const":"project_settlement_ledger"},"available":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"},"rolling_reserve":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"},"reserve":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"},"fees":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"},"awaiting_conversion_count":{"type":"integer"},"awaiting_conversion_eur":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"withdrawals_enabled":{"const":false},"on_chain_balance":{"type":"null"},"terms":{"type":"object"}}},"SettlementEntry":{"type":"object","properties":{"id":{"type":"string"},"payment_id":{"type":"string"},"kind":{"enum":["conversion","rolling_release","reserve_release"]},"reason":{"type":"string"},"created_at":{"type":"number","description":"Unix seconds UTC"},"currency":{"const":"USDT"},"deltas":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"}},"rolling_release_at":{"type":"number","description":"Unix seconds UTC"},"eur_amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact EUR decimal string"},"gross_usdt":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Exact micro-USDT decimal string"},"quote":{"type":"object"}}},"SettlementHistory":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SettlementEntry"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}}