계약 상세
구독 계약 ID로 단일 계약의 상세 정보를 조회합니다. 계약 목록에서 얻은 order_subscription_id를 넣습니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| order_subscription_id | String | Y | 구독 계약 ID 또는 가맹점이 지정한 외부 ID (URL 경로) |
코드 예제
curl -X GET "https://api.bootapi.com/v1/order_subscriptions/687a1b2c3d4e5f6789012345" \
-H "Authorization: Basic {base64(client_key:secret_key)}"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.orderSubscription.detail("687a1b2c3d4e5f6789012345");
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_subscription_detail(order_subscription_id: '687a1b2c3d4e5f6789012345')
puts response.data응답
JSON
{
"order_subscription_id": "687a1b2c3d4e5f6789012345",
"order_name": "Professional 플랜 구독",
"status": "subscribing",
"quantity": 2,
"total_subscription_duration": 12,
"service_start_at": "2025-08-01T00:00:00Z"
}응답 파라미터
| 파라미터 | 타입 | 설명 |
|---|---|---|
| order_subscription_id | String | 구독 계약 ID |
| order_name | String | 구독 상품명 |
| status | String | 구독 상태 — 아래 표 참고 |
| quantity | Integer | 수량 |
| total_subscription_duration | Integer | 총 회차 |
| service_start_at | String | 서비스 시작일 |
구독 상태 코드 (status)
| 키 | 값 | 설명 |
|---|---|---|
contract_requested_completed | 0 | 구독 신청 완료, 승인 대기 |
subscribing | 1 | 구독 중 |
auto_terminated | 15 | 자동 해지 |
manual_terminated | 20 | 직접 해지 |
mid_term_transfer_approved | 25 | 중도 인수 승인 |
mid_term_transfer_requested | 26 | 중도 인수 요청 |
free_trial | -1 | 무료 체험 |
temporarily_paused | -2 | 일시정지 |
paused_due_to_issue | -3 | 이슈로 인한 일시정지 |
first_payment_error | -10 | 첫 결제 오류 |
admin_terminated | -11 | 관리자 해지 |
rejected | -12 | 구독 거절 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
ORDER_SUBSCRIPTION_NOT_FOUND | 구독결제 건을 찾을 수 없습니다. | order_subscription_id를 확인합니다 |