curl --request PUT \
--url https://v4pay-api.vercel.app/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_name": "Maria Silva",
"amount": 199.9,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "maria@email.com",
"customer_cpf": "123.456.789-00",
"description": "Plano mensal de consultoria",
"interval": "monthly",
"status": "active",
"next_billing_at": "2026-10-01T12:00:00Z"
}
'import requests
url = "https://v4pay-api.vercel.app/subscriptions/{id}"
payload = {
"customer_name": "Maria Silva",
"amount": 199.9,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "maria@email.com",
"customer_cpf": "123.456.789-00",
"description": "Plano mensal de consultoria",
"interval": "monthly",
"status": "active",
"next_billing_at": "2026-10-01T12:00:00Z"
}
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({
customer_name: 'Maria Silva',
amount: 199.9,
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customer_email: 'maria@email.com',
customer_cpf: '123.456.789-00',
description: 'Plano mensal de consultoria',
interval: 'monthly',
status: 'active',
next_billing_at: '2026-10-01T12:00:00Z'
})
};
fetch('https://v4pay-api.vercel.app/subscriptions/{id}', 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://v4pay-api.vercel.app/subscriptions/{id}",
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([
'customer_name' => 'Maria Silva',
'amount' => 199.9,
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customer_email' => 'maria@email.com',
'customer_cpf' => '123.456.789-00',
'description' => 'Plano mensal de consultoria',
'interval' => 'monthly',
'status' => 'active',
'next_billing_at' => '2026-10-01T12:00:00Z'
]),
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://v4pay-api.vercel.app/subscriptions/{id}"
payload := strings.NewReader("{\n \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\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://v4pay-api.vercel.app/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v4pay-api.vercel.app/subscriptions/{id}")
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 \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "Maria Silva",
"customer_email": "<string>",
"customer_cpf": "<string>",
"description": "<string>",
"amount": 199.9,
"method": "pix",
"interval": "monthly",
"status": "active",
"next_billing_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": "Token JWT ou chave de API ausente"
}{
"error": {
"message": "<string>"
}
}Atualizar assinatura
Atualiza apenas os campos enviados. Use o campo status para pausar (paused), reativar (active) ou cancelar (canceled) a assinatura.
curl --request PUT \
--url https://v4pay-api.vercel.app/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_name": "Maria Silva",
"amount": 199.9,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "maria@email.com",
"customer_cpf": "123.456.789-00",
"description": "Plano mensal de consultoria",
"interval": "monthly",
"status": "active",
"next_billing_at": "2026-10-01T12:00:00Z"
}
'import requests
url = "https://v4pay-api.vercel.app/subscriptions/{id}"
payload = {
"customer_name": "Maria Silva",
"amount": 199.9,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_email": "maria@email.com",
"customer_cpf": "123.456.789-00",
"description": "Plano mensal de consultoria",
"interval": "monthly",
"status": "active",
"next_billing_at": "2026-10-01T12:00:00Z"
}
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({
customer_name: 'Maria Silva',
amount: 199.9,
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customer_email: 'maria@email.com',
customer_cpf: '123.456.789-00',
description: 'Plano mensal de consultoria',
interval: 'monthly',
status: 'active',
next_billing_at: '2026-10-01T12:00:00Z'
})
};
fetch('https://v4pay-api.vercel.app/subscriptions/{id}', 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://v4pay-api.vercel.app/subscriptions/{id}",
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([
'customer_name' => 'Maria Silva',
'amount' => 199.9,
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customer_email' => 'maria@email.com',
'customer_cpf' => '123.456.789-00',
'description' => 'Plano mensal de consultoria',
'interval' => 'monthly',
'status' => 'active',
'next_billing_at' => '2026-10-01T12:00:00Z'
]),
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://v4pay-api.vercel.app/subscriptions/{id}"
payload := strings.NewReader("{\n \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\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://v4pay-api.vercel.app/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v4pay-api.vercel.app/subscriptions/{id}")
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 \"customer_name\": \"Maria Silva\",\n \"amount\": 199.9,\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customer_email\": \"maria@email.com\",\n \"customer_cpf\": \"123.456.789-00\",\n \"description\": \"Plano mensal de consultoria\",\n \"interval\": \"monthly\",\n \"status\": \"active\",\n \"next_billing_at\": \"2026-10-01T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "Maria Silva",
"customer_email": "<string>",
"customer_cpf": "<string>",
"description": "<string>",
"amount": 199.9,
"method": "pix",
"interval": "monthly",
"status": "active",
"next_billing_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": "Token JWT ou chave de API ausente"
}{
"error": {
"message": "<string>"
}
}Authorizations
Token JWT obtido em /auth/login, enviado no cabeçalho Authorization no formato Bearer <token>.
Path Parameters
Body
Dados para criação ou atualização de uma assinatura.
"Maria Silva"
Valor da recorrência em reais. Mínimo R$ 5,00: abaixo disso a API devolve 400 com codigo: VALOR_MINIMO.
x >= 5199.9
ID de um cliente já cadastrado (opcional).
"maria@email.com"
Documento do pagador, necessário para o motor gerar o Pix — CPF (11 dígitos) ou CNPJ (14), com dígitos verificadores validados; aceita formatado ou só números — a API guarda só os dígitos.
"123.456.789-00"
"Plano mensal de consultoria"
Frequência da cobrança (padrão monthly).
weekly, monthly, yearly "monthly"
Somente na atualização — pausa, reativa ou cancela.
active, paused, canceled "active"
Somente na atualização — reagenda a próxima cobrança. Deve ser uma STRING de data (ISO 8601): nula, vazia, inválida ou não-string é recusada (400), e data no passado também — para cobrar imediatamente, use POST /subscriptions/{id}/charge. Ao reativar uma assinatura que ficou sem data, a API recalcula sozinha a partir de agora pelo interval.
"2026-10-01T12:00:00Z"
Response
Assinatura atualizada com sucesso.
Objeto representando uma assinatura recorrente.
Show child attributes
Show child attributes