Desativar plano
curl --request POST \
--url https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate"
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'client-id': '<api-key>', 'client-secret': '<api-key>'}
};
fetch('https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate', 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.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"client-id: <api-key>",
"client-secret: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<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://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 123,
"pricing_type": "FIXED_PRICE",
"currency": "<string>",
"interval": "ONE_TIME",
"custom_interval": 123,
"allowed_payment_types": [
"credit_card"
],
"default_trial_unit": "DAY",
"default_trial_duration": 123,
"prevent_trial_abuse": true,
"plan_status": "ACTIVE",
"origin": "API",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Planos
Desativar plano
Desativa um plano de assinatura.
POST
/
v1
/
subscriptions
/
plan
/
{planId}
/
deactivate
Desativar plano
curl --request POST \
--url https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate"
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'client-id': '<api-key>', 'client-secret': '<api-key>'}
};
fetch('https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate', 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.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"client-id: <api-key>",
"client-secret: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<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://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 123,
"pricing_type": "FIXED_PRICE",
"currency": "<string>",
"interval": "ONE_TIME",
"custom_interval": 123,
"allowed_payment_types": [
"credit_card"
],
"default_trial_unit": "DAY",
"default_trial_duration": 123,
"prevent_trial_abuse": true,
"plan_status": "ACTIVE",
"origin": "API",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Desativa um plano. O
plan_status fica INACTIVE.
Nesse estado, o plano não aceita novas assinaturas.
Erros comuns: 401/403 (credenciais ou produto Recorrência), 404 (não encontrado).Headers
ID público da credencial do merchant
Secret da credencial do merchant
Path Parameters
Response
Plano desativado
Identificador do plano.
Nome do plano.
Descrição do plano.
Valor do plano em centavos.
Modelo de precificação.
Available options:
FIXED_PRICE, PAY_WHAT_YOU_WANT Moeda ISO 4217.
Cadência de cobrança.
Available options:
ONE_TIME, DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL, CUSTOM Intervalo customizado (quando interval = CUSTOM).
Métodos de pagamento aceitos.
Available options:
credit_card, pix Unidade do trial padrão do plano.
Available options:
DAY, WEEK, MONTH, YEAR Duração do trial padrão do plano.
Se o plano bloqueia reuso de trial pelo mesmo customer.
Situação do plano: ACTIVE ou INACTIVE.
Available options:
ACTIVE, INACTIVE Origem da criação: API ou PORTAL.
Available options:
API, PORTAL Data de criação do plano.
Data da última atualização do plano.

