curl
curl 'https://api.velan.app/v1/developer/subscriptions/c2890e30-073a-41eb-855d-3895cc18e30d' \
-H 'Authorization: Bearer $VELAN_KEY'import requests
url = "https://api.velan.app/v1/developer/subscriptions/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.velan.app/v1/developer/subscriptions/{code}', 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.velan.app/v1/developer/subscriptions/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.velan.app/v1/developer/subscriptions/{code}"
req, _ := http.NewRequest("GET", 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.get("https://api.velan.app/v1/developer/subscriptions/{code}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/subscriptions/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"amount": "49.90",
"billing_cycle": "monthly",
"cancelled_at": null,
"charges": [],
"charges_count": 1,
"code": "c2890e30-073a-41eb-855d-3895cc18e30d",
"created_at": "2026-11-22T03:14:41.515729+00:00",
"current_period_end": "2026-12-02T03:14:41.515551+00:00",
"customer": {
"document": "12345678901",
"email": "joao@exemplo.com",
"name": "João Silva",
"phone": "5511900000001"
},
"gateway": "mercadopago",
"next_charge_at": "2026-12-02T03:14:41.515551+00:00",
"payment_method": "pix",
"plan": {
"code": "pyt1tqaz",
"name": "Mensal"
},
"status": "active"
}
}{
"error": {
"type": "validation_error",
"message": "Campos não aceitos nesta rota.",
"fields": {
"confirmm": "Campo desconhecido."
}
}
}{
"error": {
"type": "authentication_error",
"message": "Envie Authorization: Bearer <chave de API>."
}
}{
"error": {
"type": "permission_error",
"message": "Esta chave não tem permissão de escrita em 'webhooks'. Crie uma chave com essa permissão."
}
}{
"error": {
"type": "not_found",
"message": "Assinatura não encontrada."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}Assinaturas
Assinatura com cobranças
Uma assinatura com o histórico de cobranças: cada ciclo é um pedido (até 24, mais recentes primeiro) com status, valor e data de pagamento. Para o detalhe de um ciclo use GET /orders/{code} com o código desse pedido.
Permissão: leitura (qualquer chave).
GET
/
subscriptions
/
{code}
curl
curl 'https://api.velan.app/v1/developer/subscriptions/c2890e30-073a-41eb-855d-3895cc18e30d' \
-H 'Authorization: Bearer $VELAN_KEY'import requests
url = "https://api.velan.app/v1/developer/subscriptions/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.velan.app/v1/developer/subscriptions/{code}', 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.velan.app/v1/developer/subscriptions/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.velan.app/v1/developer/subscriptions/{code}"
req, _ := http.NewRequest("GET", 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.get("https://api.velan.app/v1/developer/subscriptions/{code}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/subscriptions/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"amount": "49.90",
"billing_cycle": "monthly",
"cancelled_at": null,
"charges": [],
"charges_count": 1,
"code": "c2890e30-073a-41eb-855d-3895cc18e30d",
"created_at": "2026-11-22T03:14:41.515729+00:00",
"current_period_end": "2026-12-02T03:14:41.515551+00:00",
"customer": {
"document": "12345678901",
"email": "joao@exemplo.com",
"name": "João Silva",
"phone": "5511900000001"
},
"gateway": "mercadopago",
"next_charge_at": "2026-12-02T03:14:41.515551+00:00",
"payment_method": "pix",
"plan": {
"code": "pyt1tqaz",
"name": "Mensal"
},
"status": "active"
}
}{
"error": {
"type": "validation_error",
"message": "Campos não aceitos nesta rota.",
"fields": {
"confirmm": "Campo desconhecido."
}
}
}{
"error": {
"type": "authentication_error",
"message": "Envie Authorization: Bearer <chave de API>."
}
}{
"error": {
"type": "permission_error",
"message": "Esta chave não tem permissão de escrita em 'webhooks'. Crie uma chave com essa permissão."
}
}{
"error": {
"type": "not_found",
"message": "Assinatura não encontrada."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}