Consultar assinatura
curl --request GET \
--url https://api.uvvipay.com.br/v1/subscriptions/{subscriptionId} \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/{subscriptionId}"
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/{subscriptionId}', 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/{subscriptionId}",
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/{subscriptionId}"
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/{subscriptionId}")
.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/{subscriptionId}")
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",
"subscription_status": "ACTIVE",
"amount": 123,
"currency": "<string>",
"grace_period_days": 123,
"grace_ends_at": "2023-11-07T05:31:56Z",
"trial_unit": "DAY",
"trial_duration": 123,
"next_billing_date": "2023-11-07T05:31:56Z",
"period_start_date": "2023-11-07T05:31:56Z",
"period_end_date": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"interval": "<string>"
},
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_customer_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"payment_method": {
"type": "card",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_four": "1111",
"first_six": "411111"
}
}Assinaturas
Consultar assinatura
Retorna os detalhes de uma assinatura.
GET
/
v1
/
subscriptions
/
{subscriptionId}
Consultar assinatura
curl --request GET \
--url https://api.uvvipay.com.br/v1/subscriptions/{subscriptionId} \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>'import requests
url = "https://api.uvvipay.com.br/v1/subscriptions/{subscriptionId}"
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/{subscriptionId}', 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/{subscriptionId}",
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/{subscriptionId}"
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/{subscriptionId}")
.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/{subscriptionId}")
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",
"subscription_status": "ACTIVE",
"amount": 123,
"currency": "<string>",
"grace_period_days": 123,
"grace_ends_at": "2023-11-07T05:31:56Z",
"trial_unit": "DAY",
"trial_duration": 123,
"next_billing_date": "2023-11-07T05:31:56Z",
"period_start_date": "2023-11-07T05:31:56Z",
"period_end_date": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"interval": "<string>"
},
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_customer_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"payment_method": {
"type": "card",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_four": "1111",
"first_six": "411111"
}
}Mostra uma assinatura da sua conta: status, plano, cliente e método de pagamento.
Se o método for PIX,
pix_type vem em minúsculo: immediate ou automatic. O QR Code, quando houver, fica em payment_method.pix. Cartão não traz esses campos.
Erros comuns: 401/403 (credenciais ou produto Recorrência), 404 (não encontrada).Headers
ID público da credencial do merchant
Secret da credencial do merchant
Path Parameters
Response
Detalhe da assinatura
Identificador da assinatura.
Status atual da assinatura.
Available options:
ACTIVE, PENDING, TRIAL, PAST_DUE, CANCELLED Valor da assinatura em centavos (congelado do plano na criação).
Moeda ISO 4217 da assinatura.
Dias de tolerância após falha de cobrança.
Fim da janela de carência após falha de cobrança.
Unidade do trial da assinatura.
Available options:
DAY, WEEK, MONTH, YEAR Duração do trial da assinatura.
Data da próxima cobrança.
Início do período vigente.
Fim do período vigente.
Motivo do cancelamento: USER_ACTION ou PAYMENT_FAILED.
Data do cancelamento.
Resumo do plano da assinatura.
Show child attributes
Show child attributes
Resumo do cliente da assinatura.
Show child attributes
Show child attributes
Método de pagamento padrão da assinatura.
- Option 1
- Option 2
Show child attributes
Show child attributes

