curl --request GET \
--url https://api.paygentic.io/v0/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/subscriptions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/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.paygentic.io/v0/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: 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.paygentic.io/v0/subscriptions/{id}"
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.paygentic.io/v0/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/subscriptions/{id}")
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{
"id": "sub_j1k2l3m4n5o6p7q8",
"object": "subscription",
"versionPolicy": "floating",
"autoCharge": true,
"taxExempt": true,
"createdAt": "2024-02-01T14:45:30Z",
"customerId": "cus_r9s0t1u2v3w4x5y6",
"endingAt": "2024-12-31T23:59:59Z",
"estimatedTaxRate": 0,
"name": "Analytics Co - Data Platform Enterprise",
"payment": null,
"planId": "plan_z7a8b9c0d1e2f3g4",
"startedAt": "2024-02-01T14:45:30Z",
"billingAnchor": "2024-02-01T14:00:00Z",
"billingCadence": "P1M",
"status": "active",
"terminatedAt": null,
"terminatedBy": null,
"terminationReason": null,
"updatedAt": "2024-02-15T09:20:00Z",
"planVersionId": "pver_u2v3w4x5y6z7a8b9",
"versionNumber": 2
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Get
curl --request GET \
--url https://api.paygentic.io/v0/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/subscriptions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/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.paygentic.io/v0/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: 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.paygentic.io/v0/subscriptions/{id}"
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.paygentic.io/v0/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/subscriptions/{id}")
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{
"id": "sub_j1k2l3m4n5o6p7q8",
"object": "subscription",
"versionPolicy": "floating",
"autoCharge": true,
"taxExempt": true,
"createdAt": "2024-02-01T14:45:30Z",
"customerId": "cus_r9s0t1u2v3w4x5y6",
"endingAt": "2024-12-31T23:59:59Z",
"estimatedTaxRate": 0,
"name": "Analytics Co - Data Platform Enterprise",
"payment": null,
"planId": "plan_z7a8b9c0d1e2f3g4",
"startedAt": "2024-02-01T14:45:30Z",
"billingAnchor": "2024-02-01T14:00:00Z",
"billingCadence": "P1M",
"status": "active",
"terminatedAt": null,
"terminatedBy": null,
"terminationReason": null,
"updatedAt": "2024-02-15T09:20:00Z",
"planVersionId": "pver_u2v3w4x5y6z7a8b9",
"versionNumber": 2
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
Response
Subscription details
subscription The merchant organization that owns this subscription, equal to the customer's merchant.
^org_[a-zA-Z0-9]+$How the subscription follows new versions of its plan. floating follows the plan's default version: when the default changes, the subscription bills from the new default from its next billing period. pinned keeps the plan version that the subscription holds. A subscription created without a value is floating. A change to this value does not change a billing period that has already started.
floating, pinned The instant the subscription's billing periods are anchored on: its billing anchor, else its start. Every recurring period boundary is this instant plus a whole number of cadences.
The ISO-8601 duration the subscription's billing periods step by where no price sets its own: the subscription's cadence, else its plan's.
"P1M"
pending_payment, active, terminated Payment term in days ("Net X") snapshotted onto every invoice the subscription generates (invoice dueAt = invoice issue date + paymentTermDays). Defaults to 0 ("due on issue"); a non-zero value is only set on bankTransferOnly subscriptions.
0 <= x <= 365Whether automatic charging is enabled for this subscription. When true, invoices will be automatically paid using stored payment methods.
Projected tax percentage rate. Sample values: 8.875 indicates 8.875% tax rate, 10.0 indicates 10% tax rate, 0 indicates no tax applied
When true, tax rate is forced to 0%.
Payment session details when upfront payment is required, or confirmation of a zero-amount paid invoice
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
The plan version pinned to this subscription at creation.
The version number of the plan version referenced by planVersionId, as of subscription creation.
x >= 1Deprecated. Legacy-only, not populated for new subscriptions.
Deprecated. Legacy-only, not populated for new subscriptions.
ID of who terminated the subscription (customer ID or merchant ID)
Reason for termination
Why the subscription was terminated. Null while it is not terminated.
commercial, correction, migration, unspecified, null Test clock ID if this subscription is attached to a test clock. Only present in non-production environments.
Deprecated. Legacy-only, not populated for new subscriptions.
Whether renewal reminder emails are enabled for this subscription. Null means use plan default.
Number of days before renewal to send the reminder. Null means use plan default.
Subscription-level auto-approval override. Null means plan default is used.
Free-form merchant metadata to attach to the subscription. Values must be strings, numbers, or booleans.
Show child attributes
Show child attributes
Customer details with merchant and consumer information. Only included when include=customer is specified in the list query.
Show child attributes
Show child attributes
Was this page helpful?