bootpaycommerce
관리자

취소 요청 승인

고객이나 시스템이 낸 결제 취소 요청을 관리자가 승인합니다. 승인하면 실제 결제가 취소됩니다.

API 엔드포인트

PUT/v1/order/cancel/:id/approve
Base URLhttps://api.bootapi.com

요청 파라미터

요청 파라미터

파라미터타입필수설명
:id (경로)StringY취소 요청 ID (order_cancellation_request_id). URL 경로에 넣습니다
messageStringN관리자 승인 메시지 (본문). 내부 관리용입니다

코드 예제

curl -X PUT "https://api.bootapi.com/v1/order/cancel/687a1b2c3d4e5f6789012345/approve" \
  -H "Authorization: Basic {base64(client_key:secret_key)}" \
  -H "Bootpay-Role: supervisor" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "취소 요청이 승인되었습니다."
  }'

응답

성공 응답

주문 취소 응답과 같은 모양입니다 — 취소가 반영된 주문 필드에 order_cancellation_request_history 가 붙어 옵니다. 승인 메시지와 시각은 action_message·action_at 입니다.

JSON
{
  "order_number": "25071182085082524116",
  "status": "cancellation_completed",
  "receipt_status": "receipt_cancelled",
  "cancelled_price": 29900,
  "order_cancellation_request_history": {
    "order_cancellation_request_history_id": "687a1b2c3d4e5f6789012345",
    "order_cancellation_request_id": "687a1b2c3d4e5f6789012345",
    "cancel_price": 29900,
    "status": "cancel_approved",
    "action_at": "2025-07-11T03:30:00Z",
    "action_message": "취소 요청이 승인되었습니다.",
    "created_at": "2025-07-11T02:52:09Z"
  }
}

부분 취소면 주문 status 는 payment_completed 로 남고 cancelled_price 만 늘어납니다.

취소 요청 상태 (status)

키값설명
cancel_calculated0취소 예상 금액만 계산된 상태
cancel_requested1취소 요청이 접수되어 승인 대기 중
cancel_approved2관리자가 취소 요청을 승인함
cancel_rejected-10관리자가 취소 요청을 거절함
cancel_withdrawn-11사용자가 취소 요청을 철회함

전체 값은 커머스 Enum에 있습니다.

에러 코드

오류 코드

코드메시지대처 방법
ORDER_CANCEL_NOT_REQUESTED취소 요청 상태가 아닙니다.경로의 :id 가 맞는지, 요청이 아직 cancel_requested 인지 확인합니다 (요청이 없을 때도 이 코드입니다)
ORDER_STATUS_NOT_CANCELABLE취소가 불가능한 주문정보입니다.주문 상태를 확인합니다
ORDER_CANCEL_PRICE_OVER취소 가능한 금액보다 취소 요청 금액이 더 큽니다.남은 취소 가능 금액을 확인합니다