curl --request POST \
--url https://api.cope.com/v1/commerce/subscriptions/{id}/resume \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"reason": "Buyer asked to start again"
}
'import requests
url = "https://api.cope.com/v1/commerce/subscriptions/{id}/resume"
payload = { "reason": "Buyer asked to start again" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({reason: 'Buyer asked to start again'})
};
fetch('https://api.cope.com/v1/commerce/subscriptions/{id}/resume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cope.com/v1/commerce/subscriptions/{id}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Buyer asked to start again'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cope.com/v1/commerce/subscriptions/{id}/resume"
payload := strings.NewReader("{\n \"reason\": \"Buyer asked to start again\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cope.com/v1/commerce/subscriptions/{id}/resume")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Buyer asked to start again\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/subscriptions/{id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Buyer asked to start again\"\n}"
response = http.request(request)
puts response.read_bodyResume a paused subscription
Starts collecting renewals again on a paused subscription and returns the subscription.
Nothing is charged now. Collection restarts at the cycle boundary the payment provider
still holds, which the pause did not move, and next_billing_at carries it again once the
provider has answered. The subscription leaves paused for what its own terms make it —
active, trial while a trial is still running, or overdue if a payment was already
outstanding — and paused_at is null again.
There is no renewal cutoff on a resume, and a refund or a chargeback does not block one.
Refused with 422 subscription_not_eligible when the subscription is not paused
(not_paused — one whose collection stopped after a failed payment reads overdue, not
paused, and restarts on its own when the buyer pays), has no subscription at the payment
provider (missing_processor_subscription), or has another change still processing
(change_in_flight).
The body is optional and carries one member: reason, your own note, recorded on the attempt. Text longer than 500 characters is truncated.
curl --request POST \
--url https://api.cope.com/v1/commerce/subscriptions/{id}/resume \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"reason": "Buyer asked to start again"
}
'import requests
url = "https://api.cope.com/v1/commerce/subscriptions/{id}/resume"
payload = { "reason": "Buyer asked to start again" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({reason: 'Buyer asked to start again'})
};
fetch('https://api.cope.com/v1/commerce/subscriptions/{id}/resume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cope.com/v1/commerce/subscriptions/{id}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Buyer asked to start again'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cope.com/v1/commerce/subscriptions/{id}/resume"
payload := strings.NewReader("{\n \"reason\": \"Buyer asked to start again\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cope.com/v1/commerce/subscriptions/{id}/resume")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Buyer asked to start again\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/subscriptions/{id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Buyer asked to start again\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer credential for the public API: a live COPE API key (ck_live_*; keys issued earlier as cope_sk_live_* keep working). Dashboard sign-in tokens are not accepted.
Headers
Required. At most 255 characters of valid UTF-8 with no NUL byte. The change attempt is recorded against this key for this subscription, and a retry that carries the same key and the same body does not change the subscription twice: it returns the subscription as it stands now. The exception is an attempt that failed at the payment provider or stopped responding: it is re-checked and then re-attempted. COPE also re-attempts, on its own, an attempt the payment provider did not confirm or that stopped responding, under the same re-check: usually within minutes, for up to 24 hours after it was recorded. The re-check asks whether subscription changes through the API are still enabled for the business and whether another change is still processing (change_in_flight: repeat under the same key once it settles); a price or plan change is also refused as not_active (final) once the subscription has ended and as superseded (final) when another price or plan change has been applied since it was recorded, and a pause, resume or cancel when the subscription has left the status it needs. A refusal of the first request under a key, change_in_flight included, is recorded against that key: once it settles, send the request again under a new key. The same key with a different body is refused with 409 idempotency_conflict.
255Path Parameters
id public identifier.
^ps_[A-Za-z0-9]{8,32}$"ps_A1b2C3d4E5f6"
Body
Optional. Recorded on the attempt and returned as reason; longer text is truncated to 500 characters.
500Response
Successful response
Show child attributes
Show child attributes
Was this page helpful?