Pause Subscription
curl --request POST \
--url https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cycles": 2
}'import requests
url = "https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses"
payload = { "cycles": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cycles: 2})
};
fetch('https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses', 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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses",
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([
'cycles' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses"
payload := strings.NewReader("{\n \"cycles\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cycles\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cycles\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config_id": "test_config_id",
"provider_account_id": "test_account_id",
"payment_provider": "stripe",
"subscription": {
"provider_customer_id": "test_customer_id",
"provider_subscription_id": "test_subscription_id",
"status": "paused",
"description": null,
"items": [
{
"provider_item_id": "test_subscription_item_id",
"quantity": 1,
"metadata": null,
"price": {
"provider_price_id": "test_price_id",
"provider_product_id": "test_product_id",
"currency": "usd",
"amount_cents": 4999,
"active": true,
"billing_scheme": "per_unit",
"created": 1000,
"recurring": {
"interval": "month",
"interval_count": 1
}
},
"product": {
"name": "Care plan",
"description": null,
"metadata": {}
},
"current_period_end": 1700,
"current_period_start": 1300,
"created": 1300,
"discounts": []
}
],
"cancellation_details": null,
"discounts": [],
"cancel_at_period_end": false,
"cancel_at": null,
"canceled_at": null,
"ended_at": null,
"paused": false,
"resumes_at": null,
"metadata": {},
"start_date": 1300,
"trial_start": null,
"trial_end": null,
"collection_method": "charge_automatically",
"created": 1300,
"last_invoice": {
"provider_invoice_id": "test_invoice_id",
"created": 1300
},
"provider_payment_method_id": "test_payment_method_id",
"billing_cycle_anchor": 1300
}
}
}Subscriptions
Pause Subscription
Pauses a subscription so it stops generating invoices and will not advance to new billing periods (resumable later via a separate resume endpoint). This does not change the subscription’s status — check paused and resumes_at in the response instead. A subscription that has an attached schedule cannot be paused.
POST
/
subscriptions
/
{provider_subscription_id}
/
pauses
Pause Subscription
curl --request POST \
--url https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cycles": 2
}'import requests
url = "https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses"
payload = { "cycles": 2 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cycles: 2})
};
fetch('https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses', 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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses",
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([
'cycles' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses"
payload := strings.NewReader("{\n \"cycles\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
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.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cycles\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/subscriptions/{provider_subscription_id}/pauses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cycles\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config_id": "test_config_id",
"provider_account_id": "test_account_id",
"payment_provider": "stripe",
"subscription": {
"provider_customer_id": "test_customer_id",
"provider_subscription_id": "test_subscription_id",
"status": "paused",
"description": null,
"items": [
{
"provider_item_id": "test_subscription_item_id",
"quantity": 1,
"metadata": null,
"price": {
"provider_price_id": "test_price_id",
"provider_product_id": "test_product_id",
"currency": "usd",
"amount_cents": 4999,
"active": true,
"billing_scheme": "per_unit",
"created": 1000,
"recurring": {
"interval": "month",
"interval_count": 1
}
},
"product": {
"name": "Care plan",
"description": null,
"metadata": {}
},
"current_period_end": 1700,
"current_period_start": 1300,
"created": 1300,
"discounts": []
}
],
"cancellation_details": null,
"discounts": [],
"cancel_at_period_end": false,
"cancel_at": null,
"canceled_at": null,
"ended_at": null,
"paused": false,
"resumes_at": null,
"metadata": {},
"start_date": 1300,
"trial_start": null,
"trial_end": null,
"collection_method": "charge_automatically",
"created": 1300,
"last_invoice": {
"provider_invoice_id": "test_invoice_id",
"created": 1300
},
"provider_payment_method_id": "test_payment_method_id",
"billing_cycle_anchor": 1300
}
}
}Authorizations
serviceTokenuserToken
Path Parameters
Body
application/json

