{"openapi":"3.1.0","info":{"title":"Gupay API","version":"1.0.0","description":"Read normalized incoming bank transactions and LINE connection health."},"servers":[{"url":"https://gupay.system-easy.xyz/api/v1","description":"Current Gupay server"}],"security":[{"bearerAuth":[]}],"paths":{"/transactions":{"get":{"operationId":"listTransactions","summary":"List incoming transactions","description":"Returns transactions from banks selected on the user's LINE connection. No bank parameter is required.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Transaction list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Invalid query"}}}},"/transactions/{id}":{"get":{"operationId":"getTransaction","summary":"Get an incoming transaction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Transaction"},"requestId":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Transaction not found"}}}},"/connections":{"get":{"operationId":"listConnections","summary":"List LINE bank connections","responses":{"200":{"description":"Single LINE connection and its selected banks"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Gupay API key"}},"responses":{"Unauthorized":{"description":"Missing, invalid, expired, revoked, or insufficient-scope API key"}},"schemas":{"Transaction":{"type":"object","required":["id","externalId","bankCode","amount","currency","status","receivedAt"],"properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string"},"bankCode":{"type":"string","enum":["KBANK","KRUNGTHAI"]},"amount":{"type":"string","pattern":"^\\d+\\.\\d{2}$","example":"1250.00"},"currency":{"type":"string","enum":["THB"]},"senderName":{"type":["string","null"]},"senderAccountMasked":{"type":["string","null"]},"description":{"type":["string","null"]},"status":{"type":"string","enum":["CONFIRMED","REVERSED"]},"receivedAt":{"type":"string","format":"date-time"}}},"TransactionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"meta":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"limit":{"type":"integer"},"enabledBanks":{"type":"array","items":{"type":"string","enum":["KBANK","KRUNGTHAI"]}}}},"requestId":{"type":"string"}}}}}}