Main API관리자 결제 API
POST /admin/payments/{intentKey}/cancel
결제 취소
결제 취소
intentKey로 결제를 취소합니다.
| 항목 | 값 |
|---|---|
| 메서드 | POST |
| 경로 | /admin/payments/{intentKey}/cancel |
| 인증 | 필요 (관리자 권한) |
| Content-Type | application/json |
요청
POST /admin/payments/{intentKey}/cancel
Authorization: Bearer {access_token}
Content-Type: application/jsonPath Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
intentKey | string | 예 | 결제 키 |
Request Body (선택)
{
"cancelReason": "관리자 취소"
}응답
성공 응답 (200 OK)
{
"status": 200,
"code": null,
"message": "결제 취소 성공",
"data": {
"intentKey": "intent_xxxxxxxxxxxxx",
"status": "canceled",
"message": "결제가 취소되었습니다.",
"httpStatusCode": 200
}
}이미 취소된 결제 (200 OK)
{
"status": 200,
"code": null,
"message": "이미 취소된 결제입니다.",
"data": {
"intentKey": "intent_xxxxxxxxxxxxx",
"status": "already_canceled"
}
}에러 응답
| 상태 코드 | 코드 | 메시지 |
|---|---|---|
| 404 | NOT_FOUND | 결제 정보를 찾을 수 없습니다. |
| 500 | CANCEL_FAILED | 결제 취소에 실패했습니다. |