주문

주문 상세

주문 한 건의 상태와 결제 결과를 운영 기준으로 바로 봐요.

주문 ID로 단일 주문의 상세 정보를 조회해요.

API 엔드포인트

GEThttps://api.bootapi.com/v1/orders/:order_idBasic Auth

요청 파라미터

파라미터 타입 필수 설명
order_id String 필수 주문 고유 ID (URL 경로)

코드 예제

const { BootpayCommerce } = require('@bootpay/backend-js')

const commerce = new BootpayCommerce({
    client_key: 'your-commerce-client-key',
    secret_key: 'your-commerce-secret-key',
    mode: 'production'
})

const response = await commerce.order.detail('68707c59b0eacea5cd974efd')
console.log(response)javascript

응답

성공 응답

{
  "order_id": "68707c59b0eacea5cd974efd",
  "order_name": "Professional 플랜",
  "order_number": "ORDER_12345",
  "price": 29900,
  "tax_free_price": 0,
  "status": 1,
  "receipt_status": 1,
  "purchased_at": "2025-07-11T10:30:00Z",
  "user": {
    "user_id": "67e4b4425ec892162491d0ec",
    "name": "홍길동",
    "email": "user@example.com",
    "phone": "01012345678"
  },
  "result_data": {
    "receipt_id": "receipt_abc123",
    "method_name": "카드결제",
    "card_name": "삼성카드",
    "card_no": "9430-****-****-1234"
  },
  "products": [
    {
      "product_id": "67c95e64d01640bb9859c629",
      "name": "Professional 플랜",
      "quantity": 1,
      "price": 29900
    }
  ],
  "order_subscriptions": null,
  "created_at": "2025-07-11T10:25:00Z"
}json

에러 응답

{
  "status": 404,
  "code": 3700,
  "message": "주문내역을 찾지 못했습니다.",
  "data": null
}json

응답 필드 설명

필드 타입 설명
order_id String 주문 고유 ID
order_name String 주문명
order_number String 주문 번호
price Integer 결제 금액
status Integer 주문 상태
receipt_status Integer 결제 상태
purchased_at String 결제 완료 시각
user Object 구매자 정보
result_data Object 결제 결과 상세 (카드사, 카드번호 등)
products Array 주문 상품 목록
order_subscriptions Object 구독 정보 (구독 주문인 경우)

에러 코드

공통 에러

인증·권한 관련 에러는 에러 코드표를 참고해요.

코드 메시지 대처 방법
ORDER_NOT_FOUND 주문내역을 찾지 못했어요. order_id를 확인해요
ORDER_DENIED 주문 정보를 조회할 권한이 없어요. API 인증 권한을 확인해요