Pause Subscription
curl --request POST \
--url https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause', 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.atlas.co/functions/v1/subscriptions/{subscription_id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.atlas.co/functions/v1/subscriptions/{subscription_id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "subscription",
"customer": "<string>",
"current_period_start": 123,
"current_period_end": 123,
"trial_start": 123,
"trial_end": 123,
"cancel_at_period_end": true,
"canceled_at": 123,
"ended_at": 123,
"collection_method": "<string>",
"days_until_due": 123,
"default_payment_method": "<string>",
"items": {
"object": "list",
"data": [
{
"id": "<string>",
"object": "subscription_item",
"price": {
"id": "<string>",
"product": "<string>",
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "<string>",
"interval_count": 123
}
},
"quantity": 123,
"created": 123
}
]
},
"latest_invoice": "<string>",
"metadata": {},
"created": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Subscriptions
Pause Subscription
POST
/
subscriptions
/
{subscription_id}
/
pause
Pause Subscription
curl --request POST \
--url https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause', 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.atlas.co/functions/v1/subscriptions/{subscription_id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.atlas.co/functions/v1/subscriptions/{subscription_id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.co/functions/v1/subscriptions/{subscription_id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "subscription",
"customer": "<string>",
"current_period_start": 123,
"current_period_end": 123,
"trial_start": 123,
"trial_end": 123,
"cancel_at_period_end": true,
"canceled_at": 123,
"ended_at": 123,
"collection_method": "<string>",
"days_until_due": 123,
"default_payment_method": "<string>",
"items": {
"object": "list",
"data": [
{
"id": "<string>",
"object": "subscription_item",
"price": {
"id": "<string>",
"product": "<string>",
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "<string>",
"interval_count": 123
}
},
"quantity": 123,
"created": 123
}
]
},
"latest_invoice": "<string>",
"metadata": {},
"created": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Authorizations
API key (sk_test_* or sk_live_*)
Path Parameters
Response
Subscription paused
Available options:
subscription Available options:
trialing, active, past_due, paused, canceled, unpaid Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I