Cancel a Scheduled Pause
curl --request POST \
--url https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel \
--header 'X-API-KEY: <api-key>' \
--header 'X-Timestamp: <x-timestamp>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel")
.header("X-Timestamp", "<x-timestamp>")
.header("X-API-KEY", "<api-key>")
.asString();import requests
url = "https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel"
headers = {
"X-Timestamp": "<x-timestamp>",
"X-API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Timestamp': '<x-timestamp>', 'X-API-KEY': '<api-key>'}
};
fetch('https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "success",
"data": {
"subscriptionId": "sub_xxxxx",
"customerId": "cus_xxxxx",
"productId": "prd_xxxxx",
"priceId": "price_xxxxx",
"priceSnapshotId": "pricesns_xxxxx",
"createTime": 1793491200000,
"quantity": 1,
"paymentMethodType": "card",
"paymentInstrumentId": "pi_xxxxx",
"status": "active",
"billing": "charge_automatically",
"currency": "USD",
"currentPeriodStart": 1793491200000,
"currentPeriodEnd": 1796083200000,
"recurringInvoiceItem": {
"invoiceItemId": "ii_xxxxx",
"amount": "20.00",
"currency": "USD",
"periodStart": 1793491200000,
"periodEnd": 1796083200000,
"discountAmount": "2.00",
"paymentAmount": "18.00",
"description": "Monthly membership",
"price": {
"productId": "prd_xxxxx",
"productName": "Monthly Membership",
"productUrl": "https://merchant.example.com/membership",
"priceId": "price_xxxxx",
"priceSnapshotId": "pricesns_xxxxx",
"unitAmount": "20.00",
"quantity": 1,
"recurring": {
"interval": "month",
"intervalCount": 1,
"pricingModel": "flat_rate"
}
}
}
}
}Subscription
撤销预约暂停
Remove a pending pause. The subscription stays active. If the pause has already taken effect, use the resume operation.
POST
/
subscription
/
{id}
/
pause
/
cancel
Cancel a Scheduled Pause
curl --request POST \
--url https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel \
--header 'X-API-KEY: <api-key>' \
--header 'X-Timestamp: <x-timestamp>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel")
.header("X-Timestamp", "<x-timestamp>")
.header("X-API-KEY", "<api-key>")
.asString();import requests
url = "https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel"
headers = {
"X-Timestamp": "<x-timestamp>",
"X-API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Timestamp': '<x-timestamp>', 'X-API-KEY': '<api-key>'}
};
fetch('https://uat-api.clinkbill.com/api/subscription/{id}/pause/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "success",
"data": {
"subscriptionId": "sub_xxxxx",
"customerId": "cus_xxxxx",
"productId": "prd_xxxxx",
"priceId": "price_xxxxx",
"priceSnapshotId": "pricesns_xxxxx",
"createTime": 1793491200000,
"quantity": 1,
"paymentMethodType": "card",
"paymentInstrumentId": "pi_xxxxx",
"status": "active",
"billing": "charge_automatically",
"currency": "USD",
"currentPeriodStart": 1793491200000,
"currentPeriodEnd": 1796083200000,
"recurringInvoiceItem": {
"invoiceItemId": "ii_xxxxx",
"amount": "20.00",
"currency": "USD",
"periodStart": 1793491200000,
"periodEnd": 1796083200000,
"discountAmount": "2.00",
"paymentAmount": "18.00",
"description": "Monthly membership",
"price": {
"productId": "prd_xxxxx",
"productName": "Monthly Membership",
"productUrl": "https://merchant.example.com/membership",
"priceId": "price_xxxxx",
"priceSnapshotId": "pricesns_xxxxx",
"unitAmount": "20.00",
"quantity": 1,
"recurring": {
"interval": "month",
"intervalCount": 1,
"pricingModel": "flat_rate"
}
}
}
}
}对仍为
active 且存在 pause.pauseAt 的订阅调用此接口,无需请求体。撤销时会一并清除该计划中的自动恢复时间,客户权益和续费按原账期继续。
没有待执行的暂停计划时返回 90100260。如果订阅已变为 paused,请调用恢复订阅。请求头
响应
Updated subscription on success. Check the business code in the response.