Update subscription
curl --request PATCH \
--url https://api.quentli.com/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"data": {
"description": "<string>",
"lastCollectionDate": "<string>",
"numberOfPayments": 123,
"nextCollectionDate": "<string>",
"onlyAutomaticCollection": true,
"isActive": true,
"beneficiaryId": "<string>",
"taxProfileId": "<string>",
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"invoices": [
{
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"dueDate": "<string>",
"id": "<string>"
}
],
"modifiers": [
{
"modifierId": "<string>"
}
],
"discounts": [
{
"discountId": "<string>",
"maxInvoices": 2
}
]
}
}
}
'import requests
url = "https://api.quentli.com/v1/subscriptions/{id}"
payload = { "input": { "data": {
"description": "<string>",
"lastCollectionDate": "<string>",
"numberOfPayments": 123,
"nextCollectionDate": "<string>",
"onlyAutomaticCollection": True,
"isActive": True,
"beneficiaryId": "<string>",
"taxProfileId": "<string>",
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"invoices": [
{
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"dueDate": "<string>",
"id": "<string>"
}
],
"modifiers": [{ "modifierId": "<string>" }],
"discounts": [
{
"discountId": "<string>",
"maxInvoices": 2
}
]
} } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
data: {
description: '<string>',
lastCollectionDate: '<string>',
numberOfPayments: 123,
nextCollectionDate: '<string>',
onlyAutomaticCollection: true,
isActive: true,
beneficiaryId: '<string>',
taxProfileId: '<string>',
items: [
{
conceptId: '<string>',
quantity: 2,
amount: 49999999999.5,
currency: '<string>',
description: '<string>'
}
],
invoices: [
{
items: [
{
conceptId: '<string>',
quantity: 2,
amount: 49999999999.5,
currency: '<string>',
description: '<string>'
}
],
dueDate: '<string>',
id: '<string>'
}
],
modifiers: [{modifierId: '<string>'}],
discounts: [{discountId: '<string>', maxInvoices: 2}]
}
}
})
};
fetch('https://api.quentli.com/v1/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://api.quentli.com/v1/subscriptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'input' => [
'data' => [
'description' => '<string>',
'lastCollectionDate' => '<string>',
'numberOfPayments' => 123,
'nextCollectionDate' => '<string>',
'onlyAutomaticCollection' => true,
'isActive' => true,
'beneficiaryId' => '<string>',
'taxProfileId' => '<string>',
'items' => [
[
'conceptId' => '<string>',
'quantity' => 2,
'amount' => 49999999999.5,
'currency' => '<string>',
'description' => '<string>'
]
],
'invoices' => [
[
'items' => [
[
'conceptId' => '<string>',
'quantity' => 2,
'amount' => 49999999999.5,
'currency' => '<string>',
'description' => '<string>'
]
],
'dueDate' => '<string>',
'id' => '<string>'
]
],
'modifiers' => [
[
'modifierId' => '<string>'
]
],
'discounts' => [
[
'discountId' => '<string>',
'maxInvoices' => 2
]
]
]
]
]),
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.quentli.com/v1/subscriptions/{id}"
payload := strings.NewReader("{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.quentli.com/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "sub_1234567890abcdefghij",
"createdAt": "2025-01-01T06:00:00.000Z",
"updatedAt": "2025-01-01T06:00:00.000Z",
"description": "Colegiatura mensual",
"customerId": "cus_1234567890abcdefghij",
"collectionMethod": "AUTOMATIC",
"paymentMethodId": "pm_1234567890abcdefghij",
"taxProfileId": null,
"nextCollectionDate": "2025-02-01T06:00:00.000Z",
"firstCollectionDate": "2025-01-01T06:00:00.000Z",
"lastCollectionDate": "2025-12-01T06:00:00.000Z",
"generationMode": "AUTO",
"onlyAutomaticCollection": false,
"customCancelReason": null,
"canceledAt": null,
"canceledById": null,
"isActive": true,
"isCompleted": false,
"status": "ACTIVE",
"metadata": {
"Nivel": "Preparatoria"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Subscriptions
Update subscription
Updates editable fields of an existing subscription by id.
PATCH
/
v1
/
subscriptions
/
{id}
Update subscription
curl --request PATCH \
--url https://api.quentli.com/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"data": {
"description": "<string>",
"lastCollectionDate": "<string>",
"numberOfPayments": 123,
"nextCollectionDate": "<string>",
"onlyAutomaticCollection": true,
"isActive": true,
"beneficiaryId": "<string>",
"taxProfileId": "<string>",
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"invoices": [
{
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"dueDate": "<string>",
"id": "<string>"
}
],
"modifiers": [
{
"modifierId": "<string>"
}
],
"discounts": [
{
"discountId": "<string>",
"maxInvoices": 2
}
]
}
}
}
'import requests
url = "https://api.quentli.com/v1/subscriptions/{id}"
payload = { "input": { "data": {
"description": "<string>",
"lastCollectionDate": "<string>",
"numberOfPayments": 123,
"nextCollectionDate": "<string>",
"onlyAutomaticCollection": True,
"isActive": True,
"beneficiaryId": "<string>",
"taxProfileId": "<string>",
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"invoices": [
{
"items": [
{
"conceptId": "<string>",
"quantity": 2,
"amount": 49999999999.5,
"currency": "<string>",
"description": "<string>"
}
],
"dueDate": "<string>",
"id": "<string>"
}
],
"modifiers": [{ "modifierId": "<string>" }],
"discounts": [
{
"discountId": "<string>",
"maxInvoices": 2
}
]
} } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {
data: {
description: '<string>',
lastCollectionDate: '<string>',
numberOfPayments: 123,
nextCollectionDate: '<string>',
onlyAutomaticCollection: true,
isActive: true,
beneficiaryId: '<string>',
taxProfileId: '<string>',
items: [
{
conceptId: '<string>',
quantity: 2,
amount: 49999999999.5,
currency: '<string>',
description: '<string>'
}
],
invoices: [
{
items: [
{
conceptId: '<string>',
quantity: 2,
amount: 49999999999.5,
currency: '<string>',
description: '<string>'
}
],
dueDate: '<string>',
id: '<string>'
}
],
modifiers: [{modifierId: '<string>'}],
discounts: [{discountId: '<string>', maxInvoices: 2}]
}
}
})
};
fetch('https://api.quentli.com/v1/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://api.quentli.com/v1/subscriptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'input' => [
'data' => [
'description' => '<string>',
'lastCollectionDate' => '<string>',
'numberOfPayments' => 123,
'nextCollectionDate' => '<string>',
'onlyAutomaticCollection' => true,
'isActive' => true,
'beneficiaryId' => '<string>',
'taxProfileId' => '<string>',
'items' => [
[
'conceptId' => '<string>',
'quantity' => 2,
'amount' => 49999999999.5,
'currency' => '<string>',
'description' => '<string>'
]
],
'invoices' => [
[
'items' => [
[
'conceptId' => '<string>',
'quantity' => 2,
'amount' => 49999999999.5,
'currency' => '<string>',
'description' => '<string>'
]
],
'dueDate' => '<string>',
'id' => '<string>'
]
],
'modifiers' => [
[
'modifierId' => '<string>'
]
],
'discounts' => [
[
'discountId' => '<string>',
'maxInvoices' => 2
]
]
]
]
]),
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.quentli.com/v1/subscriptions/{id}"
payload := strings.NewReader("{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.quentli.com/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"data\": {\n \"description\": \"<string>\",\n \"lastCollectionDate\": \"<string>\",\n \"numberOfPayments\": 123,\n \"nextCollectionDate\": \"<string>\",\n \"onlyAutomaticCollection\": true,\n \"isActive\": true,\n \"beneficiaryId\": \"<string>\",\n \"taxProfileId\": \"<string>\",\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"invoices\": [\n {\n \"items\": [\n {\n \"conceptId\": \"<string>\",\n \"quantity\": 2,\n \"amount\": 49999999999.5,\n \"currency\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"dueDate\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"discountId\": \"<string>\",\n \"maxInvoices\": 2\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "sub_1234567890abcdefghij",
"createdAt": "2025-01-01T06:00:00.000Z",
"updatedAt": "2025-01-01T06:00:00.000Z",
"description": "Colegiatura mensual",
"customerId": "cus_1234567890abcdefghij",
"collectionMethod": "AUTOMATIC",
"paymentMethodId": "pm_1234567890abcdefghij",
"taxProfileId": null,
"nextCollectionDate": "2025-02-01T06:00:00.000Z",
"firstCollectionDate": "2025-01-01T06:00:00.000Z",
"lastCollectionDate": "2025-12-01T06:00:00.000Z",
"generationMode": "AUTO",
"onlyAutomaticCollection": false,
"customCancelReason": null,
"canceledAt": null,
"canceledById": null,
"isActive": true,
"isCompleted": false,
"status": "ACTIVE",
"metadata": {
"Nivel": "Preparatoria"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Authorizations
Organization API key using Authorization: Bearer sk_....
Path Parameters
Identifier of the subscription.
Body
application/json
Request body for updating a subscription (id is provided in the URL path).
Show child attributes
Show child attributes
Response
Subscription updated
Successful subscription update response.
Recurring billing subscription tied to a customer.
Show child attributes
Show child attributes
Was this page helpful?
⌘I