curl --request GET \
--url https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}"
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/plans/{id}/versions/{versionNumber}', 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/plans/{id}/versions/{versionNumber}",
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/plans/{id}/versions/{versionNumber}"
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/plans/{id}/versions/{versionNumber}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}")
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": "<string>",
"object": "plan_version",
"versionNumber": 2,
"status": "published",
"isDefault": true,
"subscriptionCount": 1,
"updatedAt": "2023-11-07T05:31:56Z",
"prices": [
{
"id": "<string>",
"object": "price",
"merchantId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"invoiceDisplayName": "<string>",
"model": "standard",
"paymentTerm": "in_arrears",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z",
"quantity": 1,
"priceDeleted": true,
"billableMetricId": "<string>",
"feeId": "<string>",
"billingCadence": "<string>",
"currency": "<string>",
"description": "<string>",
"unitAmount": "<string>",
"features": [
{
"id": "<string>",
"featureId": "<string>",
"entitlementTemplate": {},
"feature": {
"key": "<string>",
"name": "<string>",
"type": "metered"
}
}
],
"grantDiscountEnabled": false,
"isObligation": false
}
],
"publishedAt": "2023-11-07T05:31:56Z",
"basedOnVersionId": "<string>"
}{
"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"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Get a version
Get a single plan version, including its price slots. Only accounts that can manage this plan may read its versions; versions can expose in-progress pricing, so read-only access is not sufficient.
curl --request GET \
--url https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}"
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/plans/{id}/versions/{versionNumber}', 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/plans/{id}/versions/{versionNumber}",
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/plans/{id}/versions/{versionNumber}"
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/plans/{id}/versions/{versionNumber}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{id}/versions/{versionNumber}")
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": "<string>",
"object": "plan_version",
"versionNumber": 2,
"status": "published",
"isDefault": true,
"subscriptionCount": 1,
"updatedAt": "2023-11-07T05:31:56Z",
"prices": [
{
"id": "<string>",
"object": "price",
"merchantId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"invoiceDisplayName": "<string>",
"model": "standard",
"paymentTerm": "in_arrears",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z",
"quantity": 1,
"priceDeleted": true,
"billableMetricId": "<string>",
"feeId": "<string>",
"billingCadence": "<string>",
"currency": "<string>",
"description": "<string>",
"unitAmount": "<string>",
"features": [
{
"id": "<string>",
"featureId": "<string>",
"entitlementTemplate": {},
"feature": {
"key": "<string>",
"name": "<string>",
"type": "metered"
}
}
],
"grantDiscountEnabled": false,
"isObligation": false
}
],
"publishedAt": "2023-11-07T05:31:56Z",
"basedOnVersionId": "<string>"
}{
"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"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
Unique identifier for a plan
^plan_[a-zA-Z0-9]+$The version number within the plan (1-based).
x >= 1Response
The requested plan version
A single plan version, including its price slots. Extends the list summary with the version's prices.
Unique identifier for a plan version
^pver_[a-zA-Z0-9]+$plan_version Monotonic version number within the plan, starting at 1.
x >= 1Lifecycle status of the version.
published, archived Whether this version is the plan's current default (live) version.
Number of committed-status subscriptions pinned to this version at creation time. Not a live-billing cohort.
x >= 0When this version was last modified.
The price slots that make up this version.
Show child attributes
Show child attributes
When this version was published.
The version this one follows on from — the version that was live when this one was created, and whose prices it was built from. Absent for versions created before this field existed.
^pver_[a-zA-Z0-9]+$Was this page helpful?