curl --request GET \
--url https://api.fintoc.com/v2/subscriptions/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/subscriptions/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/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.fintoc.com/v2/subscriptions/{id}",
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: <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.fintoc.com/v2/subscriptions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.fintoc.com/v2/subscriptions/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "sub_2c4mDcMaVxDx7nT3o5GbPMQbS2v",
"object": "subscription",
"billing_cycle_anchor": "2026-06-01T15:00:00Z",
"cancel_at": null,
"collection_method": "charge_automatically",
"created_at": "2026-06-01T15:00:00Z",
"customer": "cus_2c4mDe9NJyGmMzvCqLkXqAtjnRu",
"items": [
{
"id": "si_2c4mDfkPLLrLTCJ3wPCEHGYpkVf",
"object": "subscription_item",
"price": {
"currency": "CLP",
"product": {
"id": "prod_2c4mDgwQqkNwMHnXSc4DBjkbcWz",
"object": "product",
"created_at": "2026-06-01T15:00:00Z",
"description": "Access to every premium feature.",
"image_url": "https://example.com/image.png",
"metadata": {},
"mode": "live",
"name": "Premium plan"
},
"recurring": {
"interval": "month",
"interval_count": 1
},
"unit_amount": 10000
},
"quantity": 1
}
],
"metadata": {
"order_id": "12345"
},
"mode": "live",
"payment_method": "pm_2c4mDhAbCdEfGhIjKlMnOpQrStu",
"split": [
{
"entity_id": "ent_xK9mPq2RkV3WnDQG",
"type": "percentage",
"amount": 8500,
"charge_processing_fee": true,
"metadata": {}
},
{
"entity_id": "ent_7Lw2NvQc4RsM9pKa",
"type": "percentage",
"amount": 1500,
"charge_processing_fee": false,
"metadata": {}
}
],
"reason": null,
"status": "active",
"trial_end": null
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such invoicing/subscription: sub_2c4mDcMaVxDx7nT3o5GbPMQbS2v",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Get a subscription
Retrieves a subscription by its id, with its subscription items included. Only subscriptions of your organization matching the live or test mode of the API key used are visible.
curl --request GET \
--url https://api.fintoc.com/v2/subscriptions/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v2/subscriptions/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v2/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.fintoc.com/v2/subscriptions/{id}",
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: <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.fintoc.com/v2/subscriptions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.fintoc.com/v2/subscriptions/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "sub_2c4mDcMaVxDx7nT3o5GbPMQbS2v",
"object": "subscription",
"billing_cycle_anchor": "2026-06-01T15:00:00Z",
"cancel_at": null,
"collection_method": "charge_automatically",
"created_at": "2026-06-01T15:00:00Z",
"customer": "cus_2c4mDe9NJyGmMzvCqLkXqAtjnRu",
"items": [
{
"id": "si_2c4mDfkPLLrLTCJ3wPCEHGYpkVf",
"object": "subscription_item",
"price": {
"currency": "CLP",
"product": {
"id": "prod_2c4mDgwQqkNwMHnXSc4DBjkbcWz",
"object": "product",
"created_at": "2026-06-01T15:00:00Z",
"description": "Access to every premium feature.",
"image_url": "https://example.com/image.png",
"metadata": {},
"mode": "live",
"name": "Premium plan"
},
"recurring": {
"interval": "month",
"interval_count": 1
},
"unit_amount": 10000
},
"quantity": 1
}
],
"metadata": {
"order_id": "12345"
},
"mode": "live",
"payment_method": "pm_2c4mDhAbCdEfGhIjKlMnOpQrStu",
"split": [
{
"entity_id": "ent_xK9mPq2RkV3WnDQG",
"type": "percentage",
"amount": 8500,
"charge_processing_fee": true,
"metadata": {}
},
{
"entity_id": "ent_7Lw2NvQc4RsM9pKa",
"type": "percentage",
"amount": 1500,
"charge_processing_fee": false,
"metadata": {}
}
],
"reason": null,
"status": "active",
"trial_end": null
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such invoicing/subscription: sub_2c4mDcMaVxDx7nT3o5GbPMQbS2v",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Respuesta
The subscription, with its items included.
ISO 8601 timestamp that anchors the billing cycle. Fintoc measures every billing period from this anchor. Unless you set the anchor when creating the subscription, Fintoc uses the creation time, or trial_end when a trial applies. Fintoc issues no invoice before the anchor.
"2026-06-01T15:00:00Z"
ISO 8601 timestamp in UTC of the scheduled cancellation, or null if the subscription renews until you cancel it. Fintoc cancels the subscription at this timestamp and issues no invoice for a billing period that starts at or after it.
"2027-06-01T15:00:00Z"
Method Fintoc uses to collect the invoices the subscription generates. One of charge_automatically (Fintoc charges the saved payment method) or send_invoice (Fintoc leaves each invoice open for you to collect).
charge_automatically, send_invoice "charge_automatically"
Reason the subscription reports inconsistent. split_amount_mismatch means the flat split amounts do not add up to the total of the items, or a percentage split leaves an entity with no amount. Fintoc skips this check when an item is priced in a currency other than the subscription's. The invoice amount depends on the exchange rate of each billing cycle. null for every other status.
split_amount_mismatch, null null
Current status of the subscription. One of active, incomplete, trialing, paused, inconsistent, or canceled. incomplete means the first invoice payment has not yet succeeded. trialing means the trial period has not ended. paused means Fintoc stops generating invoices while the organization cannot access subscriptions, but still charges invoices that are already open. inconsistent means the split can no longer be applied to the total of the items. Update the split or the items before the next invoice. Fintoc cannot finalize the invoice until the totals match, and reason explains the mismatch. canceled means the subscription stopped generating invoices.
active, canceled, incomplete, paused, trialing, inconsistent "active"
¿Esta página le ayudó?