curl
curl -X PUT 'https://api.velan.app/v1/developer/subscriptions/c2890e30-073a-41eb-855d-3895cc18e30d/billing-day' \
-H 'Authorization: Bearer $VELAN_KEY' \
-H 'Content-Type: application/json' \
-d '{"day": 10, "description": "Dia do salário"}'import requests
url = "https://api.velan.app/v1/developer/subscriptions/{code}/billing-day"
payload = {
"day": 10,
"description": "Dia do salário"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({day: 10, description: 'Dia do salário'})
};
fetch('https://api.velan.app/v1/developer/subscriptions/{code}/billing-day', 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}/billing-day",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'day' => 10,
'description' => 'Dia do salário'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velan.app/v1/developer/subscriptions/{code}/billing-day"
payload := strings.NewReader("{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.velan.app/v1/developer/subscriptions/{code}/billing-day")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/subscriptions/{code}/billing-day")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"billing_day": 10,
"event": {
"cancelled_orders": [],
"created_at": "2026-11-22T03:14:41.936754+00:00",
"description": "Dia do salário",
"id": 2,
"kind": "billing_day"
},
"subscription": {
"amount": "49.90",
"billing_cycle": "monthly",
"cancelled_at": null,
"charges_count": 1,
"code": "c2890e30-073a-41eb-855d-3895cc18e30d",
"current_period_end": "2026-12-10T12:00:00+00:00",
"customer": {
"email": "joao@exemplo.com",
"name": "João Silva",
"phone": "5511900000001"
},
"gateway": "mercadopago",
"next_charge_amount": null,
"next_charge_at": "2026-12-10T12:00:00+00:00",
"payment_method": "pix",
"plan": {
"code": "pyt1tqaz",
"name": "Mensal"
},
"status": "active"
},
"updated": true
}
}{
"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": "conflict",
"message": "Idempotency-Key já usada com outra requisição. Gere uma chave nova para uma operação nova."
}
}{
"error": {
"type": "unprocessable",
"message": "Descreva o motivo com pelo menos 5 caracteres."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}Assinaturas
Mudar o dia de cobrança
Fixa o dia do mês (1 a 28) de todas as próximas cobranças de uma assinatura mensal. A próxima cobrança vai para a próxima ocorrência desse dia. PIX ou boleto em aberto do ciclo é cancelado. description é obrigatória. Para mudar uma única cobrança use POST /subscriptions/{code}/reschedule.
Permissão: write:billing ou write. Idempotency-Key: opcional, recomendado. Prévia: não tem; a chamada executa.
PUT
/
subscriptions
/
{code}
/
billing-day
curl
curl -X PUT 'https://api.velan.app/v1/developer/subscriptions/c2890e30-073a-41eb-855d-3895cc18e30d/billing-day' \
-H 'Authorization: Bearer $VELAN_KEY' \
-H 'Content-Type: application/json' \
-d '{"day": 10, "description": "Dia do salário"}'import requests
url = "https://api.velan.app/v1/developer/subscriptions/{code}/billing-day"
payload = {
"day": 10,
"description": "Dia do salário"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({day: 10, description: 'Dia do salário'})
};
fetch('https://api.velan.app/v1/developer/subscriptions/{code}/billing-day', 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}/billing-day",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'day' => 10,
'description' => 'Dia do salário'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velan.app/v1/developer/subscriptions/{code}/billing-day"
payload := strings.NewReader("{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.velan.app/v1/developer/subscriptions/{code}/billing-day")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/subscriptions/{code}/billing-day")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"day\": 10,\n \"description\": \"Dia do salário\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"billing_day": 10,
"event": {
"cancelled_orders": [],
"created_at": "2026-11-22T03:14:41.936754+00:00",
"description": "Dia do salário",
"id": 2,
"kind": "billing_day"
},
"subscription": {
"amount": "49.90",
"billing_cycle": "monthly",
"cancelled_at": null,
"charges_count": 1,
"code": "c2890e30-073a-41eb-855d-3895cc18e30d",
"current_period_end": "2026-12-10T12:00:00+00:00",
"customer": {
"email": "joao@exemplo.com",
"name": "João Silva",
"phone": "5511900000001"
},
"gateway": "mercadopago",
"next_charge_amount": null,
"next_charge_at": "2026-12-10T12:00:00+00:00",
"payment_method": "pix",
"plan": {
"code": "pyt1tqaz",
"name": "Mensal"
},
"status": "active"
},
"updated": true
}
}{
"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": "conflict",
"message": "Idempotency-Key já usada com outra requisição. Gere uma chave nova para uma operação nova."
}
}{
"error": {
"type": "unprocessable",
"message": "Descreva o motivo com pelo menos 5 caracteres."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}Authorizations
Headers
Path Parameters
Body
application/json
