cURL
curl --request POST \
--url https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend', 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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend",
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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend"
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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend")
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{
"data": {
"id": "b84f592c-7db6-44fa-b783-4a327156880b",
"status": "SUSPENDED"
},
"message": "Assinatura suspensa com sucesso"
}Assinaturas de Recorrência
Suspender assinatura
Suspende uma assinatura existente, interrompendo temporariamente as cobranças recorrentes. Esta operação é útil quando o cliente precisa de uma pausa temporária no serviço, mas deseja manter a assinatura para reativação futura.
Impacto da suspensão:
- As cobranças recorrentes são interrompidas imediatamente
- O cliente não será mais cobrado enquanto a assinatura estiver suspensa
- A assinatura mantém seu histórico e configurações originais
- Pode ser reativada a qualquer momento através da rota de reativação
Observações importantes:
- A suspensão é diferente do cancelamento, pois permite reativação posterior
- O período de suspensão não conta para a duração total da assinatura
- O cliente mantém acesso aos benefícios até o final do período já pago
- A reativação pode ser feita a qualquer momento, retomando as cobranças no próximo ciclo
POST
/
subscriptions
/
{subscriptionId}
/
suspend
cURL
curl --request POST \
--url https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend', 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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend",
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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend"
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://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.superpagamentos.com/subscriptions/{subscriptionId}/suspend")
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{
"data": {
"id": "b84f592c-7db6-44fa-b783-4a327156880b",
"status": "SUSPENDED"
},
"message": "Assinatura suspensa com sucesso"
}Authorizations
Token JWT gerado na rota de autenticação (/auth). Deve ser enviado no formato: Bearer
Path Parameters
ID da assinatura que será suspensa