Files
sam-docs/dev/dev_plans/flow-tests/payment-flow.json
권혁성 db63fcff85 refactor: [docs] 팀별 폴더 구조 재편 (공유/개발/프론트/기획)
- 개발팀 전용 폴더 dev/ 생성 (standards, guides, quickstart, changes, deploys, data, history, dev_plans 이동)
- 프론트엔드 전용 폴더 frontend/ 생성 (api/ → frontend/api-specs/)
- 기획팀 폴더 requests/ 생성
- plans/ → dev/dev_plans/ 이름 변경
- README.md 신규 (사람용 안내), INDEX.md 재작성 (Claude Code용)
- resources.md 신규 (노션 링크용, assets/brochure 이관 예정)
- CURRENT_WORKS.md 삭제, TODO.md → dev/ 이동
- 전체 참조 경로 업데이트

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:46:03 +09:00

261 lines
6.3 KiB
JSON

{
"name": "결제 관리 플로우",
"description": "결제 등록 → 완료 처리 → 명세서 조회 → 취소 → 환불 플로우 테스트",
"version": "1.0",
"config": {
"baseUrl": "",
"timeout": 30000,
"stopOnFailure": true
},
"variables": {
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}"
},
"steps": [
{
"id": "login",
"name": "로그인",
"method": "POST",
"endpoint": "/api/v1/login",
"body": {
"user_id": "{{user_id}}",
"user_pwd": "{{user_pwd}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
},
"extract": {
"token": "$.access_token"
}
},
{
"id": "list_payments",
"name": "결제 목록 조회",
"method": "GET",
"endpoint": "/api/v1/payments",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"queryParams": {
"page": 1,
"per_page": 10
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
}
},
{
"id": "create_payment",
"name": "결제 등록",
"method": "POST",
"endpoint": "/api/v1/payments",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"subscription_id": 1,
"amount": 99000,
"payment_method": "card",
"billing_name": "테스트 결제",
"billing_email": "test@example.com"
},
"expect": {
"status": [200, 201],
"jsonPath": {
"$.success": true
}
},
"extract": {
"payment_id": "$.data.id"
},
"continueOnFailure": true
},
{
"id": "get_payment_detail",
"name": "결제 상세 조회",
"method": "GET",
"endpoint": "/api/v1/payments/{{create_payment.payment_id}}",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.id": "@isNumber"
}
},
"continueOnFailure": true
},
{
"id": "complete_payment",
"name": "결제 완료 처리",
"method": "POST",
"endpoint": "/api/v1/payments/{{create_payment.payment_id}}/complete",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"transaction_id": "TXN_{{$timestamp}}",
"pg_response": {
"code": "0000",
"message": "성공"
}
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
},
"continueOnFailure": true
},
{
"id": "verify_completed",
"name": "완료 상태 확인",
"method": "GET",
"endpoint": "/api/v1/payments/{{create_payment.payment_id}}",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.status": "completed"
}
},
"continueOnFailure": true
},
{
"id": "get_statement",
"name": "결제 명세서 조회",
"method": "GET",
"endpoint": "/api/v1/payments/{{create_payment.payment_id}}/statement",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
},
"continueOnFailure": true
},
{
"id": "cancel_payment",
"name": "결제 취소 요청",
"method": "POST",
"endpoint": "/api/v1/payments/{{create_payment.payment_id}}/cancel",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"reason": "테스트 취소",
"cancel_type": "full"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
},
"continueOnFailure": true
},
{
"id": "create_payment_for_refund",
"name": "환불 테스트용 결제 등록",
"method": "POST",
"endpoint": "/api/v1/payments",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"subscription_id": 1,
"amount": 50000,
"payment_method": "card",
"billing_name": "환불 테스트",
"billing_email": "refund@example.com"
},
"expect": {
"status": [200, 201],
"jsonPath": {
"$.success": true
}
},
"extract": {
"refund_payment_id": "$.data.id"
},
"continueOnFailure": true
},
{
"id": "complete_refund_payment",
"name": "환불 테스트용 결제 완료",
"method": "POST",
"endpoint": "/api/v1/payments/{{create_payment_for_refund.refund_payment_id}}/complete",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"transaction_id": "TXN_REFUND_{{$timestamp}}",
"pg_response": {
"code": "0000",
"message": "성공"
}
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
},
"continueOnFailure": true
},
{
"id": "request_refund",
"name": "환불 요청",
"method": "POST",
"endpoint": "/api/v1/payments/{{create_payment_for_refund.refund_payment_id}}/refund",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"body": {
"refund_amount": 50000,
"reason": "테스트 환불",
"refund_method": "original"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
},
"continueOnFailure": true
},
{
"id": "verify_refunded",
"name": "환불 상태 확인",
"method": "GET",
"endpoint": "/api/v1/payments/{{create_payment_for_refund.refund_payment_id}}",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"expect": {
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.status": "refunded"
}
},
"continueOnFailure": true
}
]
}