-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment-service.json
More file actions
1 lines (1 loc) · 2.97 KB
/
Copy pathpayment-service.json
File metadata and controls
1 lines (1 loc) · 2.97 KB
1
{"openapi":"3.1.0","info":{"title":"Payment Service API","description":"결제 서비스 API","version":"v1"},"servers":[{"url":"http://localhost:8000","description":"Gateway"}],"security":[{"X-User-Id":[],"X-User-Role":[]}],"paths":{"/api/v1/internal/payments":{"post":{"tags":["결제 관리 (내부)"],"summary":"결제 생성","operationId":"createPayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePaymentResponse"}}}}}}},"/api/v1/internal/payments/{paymentId}/refund":{"patch":{"tags":["결제 관리 (내부)"],"summary":"결제 환불","operationId":"refund","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePaymentResponse"}}}}}}},"/api/v1/internal/payments/{paymentId}/expire":{"patch":{"tags":["결제 관리 (내부)"],"summary":"결제 만료","operationId":"expire","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/v1/internal/payments/{reservationId}":{"get":{"tags":["결제 관리 (내부)"],"summary":"결제 조회","operationId":"getPayment","parameters":[{"name":"reservationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePaymentResponse"}}}}}}}},"components":{"schemas":{"CreatePaymentRequest":{"type":"object","properties":{"reservationId":{"type":"string","format":"uuid"},"amount":{"type":"integer","format":"int64","minimum":1},"paymentMethod":{"type":"string","minLength":1}},"required":["amount","paymentMethod","reservationId"]},"ApiResponsePaymentResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/PaymentResponse"}}},"PaymentResponse":{"type":"object","properties":{"paymentId":{"type":"string","format":"uuid"},"reservationId":{"type":"string","format":"uuid"},"amount":{"type":"integer","format":"int64"},"status":{"type":"string"},"refundAmount":{"type":"integer","format":"int64"}}},"RefundRequest":{"type":"object","properties":{"refundAmount":{"type":"integer","format":"int64","minimum":1}},"required":["refundAmount"]},"ApiResponseVoid":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{}}}},"securitySchemes":{"X-User-Id":{"type":"apiKey","name":"X-User-Id","in":"header"},"X-User-Role":{"type":"apiKey","name":"X-User-Role","in":"header"}}}}