curl --request GET \
--url https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline', 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.hyperline.co/v1/subscriptions/{id}/preview-timeline",
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.hyperline.co/v1/subscriptions/{id}/preview-timeline"
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.hyperline.co/v1/subscriptions/{id}/preview-timeline")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline")
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{
"events": [
{
"type": "activation",
"date": "2024-12-20T16:04:11Z",
"invoices": [
{
"id": "inv_1eTaiytfA0i2Va",
"number": "INV-35",
"type": "invoice",
"document_name": null,
"status": "paid",
"reference": "V0KAHOU6J3",
"purchase_order": "PO-12345",
"currency": "EUR",
"source": "hyperline",
"total_amount": 24000,
"amount_due": 0,
"amount_paid": 24000,
"amount_fixed": 20000,
"amount_excluding_tax": 20000,
"tax_rate": 123,
"tax_amount": 4000,
"tax_scheme": "standard",
"discount_amount": 0,
"conversion_rate": 1,
"converted_amount": 24000,
"converted_at": "2024-10-13T02:00:00.000Z",
"payment_method_id": "pm_1ryTrMj4TTAT1N",
"bank_account_id": "bac_KJyPrMA1toAqRG",
"custom_note": "Thank you for your purchase!",
"additional_info": "This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied.",
"footer": "ACME (Acme SAS) is a company registered in France | SIREN N°123456",
"customer": {
"id": "cus_Typ0px2W0aiEtl",
"name": "Acme",
"email": "billing@acme.com",
"external_id": null,
"vat_number": "<string>",
"tax_id": "FR123456789",
"local_tax_number": "12/345/67890",
"address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
}
},
"seller": {
"id": "ive_47484fjdhy5",
"name": "Name of the invoicing entity",
"tax_id": "FR5878986578",
"address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
}
},
"subscription_id": "sub_amiaWZ3lzDIWaoT",
"period_starts_at": "2024-10-13T00:00:00.000Z",
"period_ends_at": "2024-11-13T00:00:00.000Z",
"emitted_at": "2024-10-13T00:00:00.000Z",
"due_at": "2024-11-12T00:00:00.000Z",
"refunded_at": null,
"grace_period_ended_at": null,
"settled_at": "2024-10-15T14:01:56.000Z",
"updated_at": "2024-10-15T14:01:56.000Z",
"properties": null,
"custom_properties": null,
"additional_display_fields": null,
"original_invoice_id": null,
"original_invoice_number": null,
"line_items": [
{
"id": "ili_0FACNpeoEFkGu3",
"name": "Platform access",
"entry_type": "debit",
"product_id": "itm_KbLcWt2qm5p1S2",
"product_type": "flat_fee",
"units_count": 1,
"unit_amount": 24000,
"amount": 24000,
"amount_excluding_tax": 20000,
"tax_rate": 20,
"tax_rate_id": null,
"tax_amount": 4000,
"discount_amount": 0,
"discount_percent": 123,
"period_starts_at": "2024-10-13T00:00:00.000Z",
"period_ends_at": "2024-11-13T00:00:00.000Z",
"revenue_type": "recurring",
"revenue_interval_count": 1,
"revenue_interval_period": "months",
"display_unit_amount": true,
"display_service_period": true,
"original_line_item_id": null
}
],
"coupons": [
{
"id": "cou_DKL4Xcb5VSa8CQ",
"name": "Partner discount",
"discount_amount": 2000,
"discount_percent": null,
"line_item_ids": [
"ili_0FACNpeoEFkGu3"
]
}
],
"transactions": [
{
"id": "tra_2QdJDDUej969ev",
"type": "subscription",
"amount": 31500,
"currency": "EUR",
"customer_id": "cus_QalW2vTAdkR6IY",
"provider_id": "<string>",
"process_at": "2024-11-12T07:38:39.222Z",
"settled_at": "2024-11-12T07:38:39.222Z",
"refunded_at": null,
"original_transaction_id": null,
"reversed_at": null,
"last_refreshed_at": null,
"provider_fee": null,
"chargeback": null,
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"payment_method_type": "card",
"payment_method": {
"id": "pm_1xMpj5bwRqN7LM",
"status": "active",
"type": "card",
"last_4_digits": 2718,
"expiration_date": "2027-11",
"brand": "visa"
},
"status": "settled"
}
],
"public_url": "<string>",
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"allocations": [
{
"invoice_id": "inv_2QdJDDUej969ev",
"amount": 780000
}
]
}
]
}
],
"stopped_because": {
"kind": "bounded"
}
}{
"message": "<string>"
}Preview subscription timeline
Preview a subscription’s upcoming billing timeline: its future lifecycle events — renewals and phase changes — in chronological order, each with the invoice document(s) it would issue, plus why the projection stopped. Amounts are best-effort estimates (metered usage is assumed to be 0). Pass starts_at to preview a subscription that is still pending an activation event (a manual activation, checkout, quote signature, or a manually-started contract); the projection assumes the subscription starts at that instant.
curl --request GET \
--url https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline', 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.hyperline.co/v1/subscriptions/{id}/preview-timeline",
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.hyperline.co/v1/subscriptions/{id}/preview-timeline"
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.hyperline.co/v1/subscriptions/{id}/preview-timeline")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/subscriptions/{id}/preview-timeline")
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{
"events": [
{
"type": "activation",
"date": "2024-12-20T16:04:11Z",
"invoices": [
{
"id": "inv_1eTaiytfA0i2Va",
"number": "INV-35",
"type": "invoice",
"document_name": null,
"status": "paid",
"reference": "V0KAHOU6J3",
"purchase_order": "PO-12345",
"currency": "EUR",
"source": "hyperline",
"total_amount": 24000,
"amount_due": 0,
"amount_paid": 24000,
"amount_fixed": 20000,
"amount_excluding_tax": 20000,
"tax_rate": 123,
"tax_amount": 4000,
"tax_scheme": "standard",
"discount_amount": 0,
"conversion_rate": 1,
"converted_amount": 24000,
"converted_at": "2024-10-13T02:00:00.000Z",
"payment_method_id": "pm_1ryTrMj4TTAT1N",
"bank_account_id": "bac_KJyPrMA1toAqRG",
"custom_note": "Thank you for your purchase!",
"additional_info": "This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied.",
"footer": "ACME (Acme SAS) is a company registered in France | SIREN N°123456",
"customer": {
"id": "cus_Typ0px2W0aiEtl",
"name": "Acme",
"email": "billing@acme.com",
"external_id": null,
"vat_number": "<string>",
"tax_id": "FR123456789",
"local_tax_number": "12/345/67890",
"address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
}
},
"seller": {
"id": "ive_47484fjdhy5",
"name": "Name of the invoicing entity",
"tax_id": "FR5878986578",
"address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
}
},
"subscription_id": "sub_amiaWZ3lzDIWaoT",
"period_starts_at": "2024-10-13T00:00:00.000Z",
"period_ends_at": "2024-11-13T00:00:00.000Z",
"emitted_at": "2024-10-13T00:00:00.000Z",
"due_at": "2024-11-12T00:00:00.000Z",
"refunded_at": null,
"grace_period_ended_at": null,
"settled_at": "2024-10-15T14:01:56.000Z",
"updated_at": "2024-10-15T14:01:56.000Z",
"properties": null,
"custom_properties": null,
"additional_display_fields": null,
"original_invoice_id": null,
"original_invoice_number": null,
"line_items": [
{
"id": "ili_0FACNpeoEFkGu3",
"name": "Platform access",
"entry_type": "debit",
"product_id": "itm_KbLcWt2qm5p1S2",
"product_type": "flat_fee",
"units_count": 1,
"unit_amount": 24000,
"amount": 24000,
"amount_excluding_tax": 20000,
"tax_rate": 20,
"tax_rate_id": null,
"tax_amount": 4000,
"discount_amount": 0,
"discount_percent": 123,
"period_starts_at": "2024-10-13T00:00:00.000Z",
"period_ends_at": "2024-11-13T00:00:00.000Z",
"revenue_type": "recurring",
"revenue_interval_count": 1,
"revenue_interval_period": "months",
"display_unit_amount": true,
"display_service_period": true,
"original_line_item_id": null
}
],
"coupons": [
{
"id": "cou_DKL4Xcb5VSa8CQ",
"name": "Partner discount",
"discount_amount": 2000,
"discount_percent": null,
"line_item_ids": [
"ili_0FACNpeoEFkGu3"
]
}
],
"transactions": [
{
"id": "tra_2QdJDDUej969ev",
"type": "subscription",
"amount": 31500,
"currency": "EUR",
"customer_id": "cus_QalW2vTAdkR6IY",
"provider_id": "<string>",
"process_at": "2024-11-12T07:38:39.222Z",
"settled_at": "2024-11-12T07:38:39.222Z",
"refunded_at": null,
"original_transaction_id": null,
"reversed_at": null,
"last_refreshed_at": null,
"provider_fee": null,
"chargeback": null,
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"payment_method_type": "card",
"payment_method": {
"id": "pm_1xMpj5bwRqN7LM",
"status": "active",
"type": "card",
"last_4_digits": 2718,
"expiration_date": "2027-11",
"brand": "visa"
},
"status": "settled"
}
],
"public_url": "<string>",
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"allocations": [
{
"invoice_id": "inv_2QdJDDUej969ev",
"amount": 780000
}
]
}
]
}
],
"stopped_because": {
"kind": "bounded"
}
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Maximum number of events to project (1–36, default 12); combined with until, whichever limit is reached first stops the projection.
x <= 36Only project events strictly before this instant; combined with max_events, whichever limit is reached first stops the projection.
"2024-12-20T16:04:11Z"
The instant to assume the subscription starts. Only applied when the subscription is still pending an activation event (a manual activation, checkout, quote signature, or a manually-started contract) and therefore has no start date yet; the projection then assumes it starts at this instant. Ignored for a subscription that already has a known start.
"2024-12-20T16:04:11Z"
Response
Projected subscription timeline
The subscription's projected future lifecycle events, in chronological order (by date).
Show child attributes
Show child attributes
Why the projection stopped — required reading, since the walk truncates rather than failing, so a short list of events is otherwise ambiguous.
Show child attributes
Show child attributes
Was this page helpful?

