Consultar plano
curl --request GET \
--url https://api.uvvipay.com.br/v1/subscriptions/plan/{planId} \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}"
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'client-id': '<api-key>', 'client-secret': '<api-key>'}
};
fetch('https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}")
.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}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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
Consultar plano
Retorna os detalhes de um plano de assinatura.
GET
/
v1
/
subscriptions
/
plan
/
{planId}
Consultar plano
curl --request GET \
--url https://api.uvvipay.com.br/v1/subscriptions/plan/{planId} \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}"
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'client-id': '<api-key>', 'client-secret': '<api-key>'}
};
fetch('https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://api.uvvipay.com.br/v1/subscriptions/plan/{planId}")
.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}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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"
}Mostra um plano da sua conta. Confira valor, frequência e
plan_status antes de criar a assinatura.
plan_status é ACTIVE ou INACTIVE. Só um plano ACTIVE aceita nova assinatura.
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
Detalhe do plano
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.

