주문 상세
**주문번호(order_number)**로 단일 주문의 상세 정보를 조회합니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| order_number | String | Y | 주문번호 (URL 경로) |
| user_id | String | N | 구매자 조회에 사용할 회원 ID 또는 가맹점 회원 ID (쿼리) |
코드 예제
curl -X GET "https://api.bootapi.com/v1/orders/25071182085082524116" \
-H "Authorization: Basic {base64(client_key:secret_key)}"import { BootpayCommerce } from '@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('25071182085082524116')
console.log(response)from bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.order.detail('25071182085082524116')
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->order->detail('25071182085082524116');
print_r($response);import kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
import kr.co.bootpay.store.model.response.BootpayStoreResponse;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp).withToken();
BootpayStoreResponse response = commerce.order.detail("25071182085082524116");
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(client_key: 'your-commerce-client-key', secret_key: 'your-commerce-secret-key')
response = commerce.order_detail(
order_number: '25071182085082524116'
)
puts response.dataimport "github.com/bootpay/backend-go/v2"
commerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.Order.Detail("25071182085082524116")
fmt.Println(response, err)using Bootpay.Commerce;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.OrderDetail("25071182085082524116");
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
JSON
{
"order_name": "Professional 플랜",
"order_number": "25071182085082524116",
"request_id": "your-order-draft-id",
"price": 29900,
"tax_free_price": 0,
"status": "payment_completed",
"receipt_status": "receipt_success",
"receipt_id": "68707c598bbe23d076af189c",
"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_purchases": [
{
"order_purchase_id": "6870824fb0eacea5cd974f12",
"order_purchase_number": "P25071182085082524116",
"status": 4,
"delivery_company_code": "CJGLS",
"tracking_number": "620148310301",
"d_ts": 3,
"sent_at": "2025-07-12T09:10:00Z",
"tracking_histories": [
{
"trakler_status": "in_transit",
"delivery_tracking_status": 3,
"location": "옥천HUB",
"description": "간선상차 · CJ대한통운",
"occurred_at": "2025-07-12T21:40:00Z",
"source": "webhook"
}
]
}
],
"created_at": "2025-07-11T10:25:00Z"
}에러 응답
HTTP 상태 코드(404)는 헤더로 오고, 본문에는 코드 이름이 문자열로 옵니다.
JSON
{
"error_code": "ORDER_NOT_FOUND",
"message": "주문내역을 찾지 못했습니다."
}응답 필드 설명
| 필드 | 타입 | 설명 |
|---|---|---|
order_name | String | 주문명 |
order_number | String | 주문 번호 |
request_id | String | 주문서 요청 때 넘긴 가맹점 식별자 |
price | Integer | 결제 금액 |
status | String | 주문 상태 — 아래 표 참고 |
receipt_status | String | 결제(영수증) 상태 — 커머스 Enum 참고 |
receipt_id | String | 결제 영수증 ID |
purchased_at | String | 결제 완료 시각 |
user | Object | 구매자 정보 (user_id·name·email·phone 등) |
result_data | Object | 결제 결과 상세 (카드사, 카드번호 등) |
products | Array | 주문 상품 목록 |
order_purchases | Array | 발주(배송) 목록 — 아래 표 참고. 배송이 없는 주문이면 빈 배열 |
order_subscriptions | Array | 구독 계약 목록 (구독 주문인 경우만. 아니면 키가 없습니다) |
charge_key | String | 수시결제 재결제 키. 회원을 지정하지 않은 가맹점 서버 조회에서만 올 수 있습니다. 서버에만 보관합니다 |
발주(배송) 필드
한 주문이 여러 건으로 나뉘어 나가면 order_purchases도 그만큼 늘어납니다. 운송장은 발주 단위입니다.
결제(영수증) 상태 (receipt_status)
자주 쓰는 값만 추렸습니다. 전체 값은 결제(영수증) 상태에 있습니다. 응답의 상태 값은 영문 enum 문자열입니다.
| 키 | 값 | 설명 |
|---|---|---|
receipt_ready | 0 | 결제 준비 (미결제) |
receipt_success | 1 | 결제 성공 |
receipt_issued | 5 | 발행 완료 (가상계좌 등) |
receipt_cancelled | 20 | 결제 취소 |
receipt_fail | -1 | 결제 실패 |
주문 상태 코드 (status)
| 키 | 값 | 설명 |
|---|---|---|
order_pending | 0 | 주문 생성, 결제 대기 |
payment_pending | 1 | 결제 진행 중 |
payment_completed | 2 | 결제 완료 |
subscription_request_completed | 3 | 구독 요청 완료 |
subscription_pending | 4 | 구독 대기 |
payment_delayed | 5 | 결제 지연 |
payment_confirm_ready | 6 | 결제 승인 대기 |
purchase_confirmed | 8 | 구매 확정 |
cancellation_completed | 10 | 취소 완료 |
return_completed | 11 | 반품 완료 |
exchange_completed | 12 | 교환 완료 |
subscription_terminated | 13 | 구독 종료 |
order_expired | -1 | 주문 만료 |
payment_failed | -2 | 결제 실패 |
payment_authorization_failed | -3 | 결제 승인 실패 |
subscription_error | -4 | 구독 오류 |
subscription_server_error | -5 | 구독 서버 오류 |
order_abandoned | -100 | 주문 포기 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
ORDER_NOT_FOUND | 주문내역을 찾지 못했습니다. | order_number를 넣었는지 확인합니다 (order_id 아님) |
ORDER_DENIED | 주문 정보를 조회할 권한이 없습니다. | API 인증 권한을 확인합니다 |