Reactivate a past due or canceled subscription
curl --request POST \
--url https://commet.co/api/v1/subscriptions/{id}/reactivate \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/subscriptions/{id}/reactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/subscriptions/{id}/reactivate"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/subscriptions/{id}/reactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://commet.co/api/v1/subscriptions/{id}/reactivate")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/subscriptions/{id}/reactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "<string>",
"retryInitiated": true,
"object": "subscription",
"livemode": true
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}Subscriptions
Reactivate a past due or canceled subscription
Reactivates a subscription. A past_due subscription retries its outstanding renewal charge (recovering to active on success). A canceled subscription generates a fresh invoice, charges the saved card, and resets the billing period. On a successful charge the subscription becomes active; a declined charge returns an error with a recoveryUrl in the error details that can be sent to the customer to update their card.
POST
/
subscriptions
/
{id}
/
reactivate
Reactivate a past due or canceled subscription
curl --request POST \
--url https://commet.co/api/v1/subscriptions/{id}/reactivate \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/subscriptions/{id}/reactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/subscriptions/{id}/reactivate"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/subscriptions/{id}/reactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://commet.co/api/v1/subscriptions/{id}/reactivate")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/subscriptions/{id}/reactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "<string>",
"retryInitiated": true,
"object": "subscription",
"livemode": true
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"details": "<unknown>"
}
}This reference describes API version
2026-06-07. Send Commet-Version: 2026-06-07 with your request.¿Esta página le ayudó?