재개
일시정지된 구독을 재개합니다. 재개 후 다음 결제 주기부터 자동 결제가 다시 시작됩니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| order_subscription_id | String | Y | 구독 계약 고유 번호 |
| user_id | String | N | 로그인한 회원 ID 또는 이 몰의 외부 회원 ID. 보내면 구독 소유자와 대조합니다. Bootpay-User-JWT 헤더로 보내도 됩니다 |
| reason | String | N | 재개 요청 사유 |
코드 예제
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.orderSubscription.requestIng.resume({
order_subscription_id: '687a1b2c3d4e5f6789012345',
reason: '일시정지 사유 해소로 재개 요청'
})
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_subscription.request_ing.resume({
'order_subscription_id': '687a1b2c3d4e5f6789012345',
'reason': '일시정지 사유 해소로 재개 요청'
})
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->orderSubscription->requestIng->resume([
'order_subscription_id' => '687a1b2c3d4e5f6789012345',
'reason' => '일시정지 사유 해소로 재개 요청'
]);
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;
import kr.co.bootpay.store.model.request.orderSubscription.request.ing.OrderSubscriptionResumeParams;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp).withToken();
OrderSubscriptionResumeParams params = new OrderSubscriptionResumeParams();
params.orderSubscriptionId = "687a1b2c3d4e5f6789012345";
params.reason = "일시정지 사유 해소로 재개 요청";
BootpayStoreResponse response = commerce.orderSubscription.requestIng.resume(params);
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_requests_ing_resume(
order_subscription_id: '687a1b2c3d4e5f6789012345',
reason: '일시정지 사유 해소로 재개 요청'
)
puts response.datacommerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.OrderSubscription.RequestIng.Resume(bootpay.OrderSubscriptionResumeParams{
OrderSubscriptionId: "687a1b2c3d4e5f6789012345",
Reason: "일시정지 사유 해소로 재개 요청",
})
fmt.Println(response, err)using Bootpay.Commerce;
using Bootpay.Commerce.Models;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.OrderSubscriptionResume(new OrderSubscriptionResumeParams {
OrderSubscriptionId = "687a1b2c3d4e5f6789012345"
}); // .NET SDK 의 재개 파라미터에는 reason 이 없습니다
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
고객 재개는 관리자 승인 없이 즉시 처리되고, 재개가 반영된 구독 계약 상세 전체를 돌려줍니다. 아래는 일부만 정리한 예시입니다.
JSON
{
"order_subscription_id": "687a1b2c3d4e5f6789012345",
"status": "subscribing",
"pause_resumed_at": "2025-08-15T10:00:00+09:00",
"request_histories": [
{ "request_type": "request_resume", "request_status": "request_approved_auto" }
]
}응답 필드 설명
| 필드 | 타입 | 설명 |
|---|---|---|
order_subscription_id | String | 구독 계약 고유 ID |
status | String | 변경된 구독 상태 (subscribing: 구독 중) |
pause_resumed_at | String | 재개 시각 |
request_histories | Array | 이 구독의 요청 이력. 재개 요청은 request_type 이 request_resume (내부값 12). 요청 유형 전체 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
ORDER_SUBSCRIPTION_NOT_FOUND | 구독결제 건을 찾을 수 없습니다. | order_subscription_id를 확인합니다 |
ORDER_SUBSCRIPTION_RESUME_UNABLE | 현재 일시정지 상태가 아니므로 재개할 수 없습니다 | 구독 상태를 확인합니다 |
ORDER_SUBSCRIPTION_RESUME_REQUEST_DUPLICATE | 이미 대기 중인 재개 요청이 있습니다. | 기존 요청 처리를 기다립니다 |