curl --request GET \
--url https://api.paygentic.io/v0/plans/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{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/plans/{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/plans/{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/plans/{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/plans/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{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": "plan_z1a2b3c4d5e6f7g8",
"object": "plan",
"billingCadence": "P1M",
"billingInterval": "monthly",
"createdAt": "2024-02-15T12:30:00Z",
"currency": "USD",
"defaultTaxCode": "eservice",
"defaultTaxRate": 10,
"description": "Unlimited cloud storage plus real-time analytics tools",
"invoiceDisplayName": "Data Warehouse Business",
"merchantId": "org_h9i0j1k2l3m4n5o6",
"name": "Business Package",
"prices": [
"price_x5y6z7a8b9c0d1e2"
],
"productId": "prod_p7q8r9s0t1u2v3w4",
"taxBehavior": "exclusive",
"updatedAt": "2024-02-20T10:15:00Z"
}{
"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
curl --request GET \
--url https://api.paygentic.io/v0/plans/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/plans/{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/plans/{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/plans/{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/plans/{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/plans/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/plans/{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": "plan_z1a2b3c4d5e6f7g8",
"object": "plan",
"billingCadence": "P1M",
"billingInterval": "monthly",
"createdAt": "2024-02-15T12:30:00Z",
"currency": "USD",
"defaultTaxCode": "eservice",
"defaultTaxRate": 10,
"description": "Unlimited cloud storage plus real-time analytics tools",
"invoiceDisplayName": "Data Warehouse Business",
"merchantId": "org_h9i0j1k2l3m4n5o6",
"name": "Business Package",
"prices": [
"price_x5y6z7a8b9c0d1e2"
],
"productId": "prod_p7q8r9s0t1u2v3w4",
"taxBehavior": "exclusive",
"updatedAt": "2024-02-20T10:15:00Z"
}{
"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
The unique identifier of the plan Unique identifier for a plan
^plan_[a-zA-Z0-9]+$Response
Plan details
Unique identifier for a plan
^plan_[a-zA-Z0-9]+$plan ISO 8601 duration for the billing period.
P1M, P3M, P1Y Deprecated. Human-readable billing period derived from billingCadence. Use billingCadence instead.
The merchant organization that owns this plan
^org_[a-zA-Z0-9]+$The product this plan belongs to
^prod_[a-zA-Z0-9]+$Default tax code for plan line items. Common values: 'eservice' (electronically supplied services), 'saas' (software as a service), 'consulting', 'ebook', 'standard', 'reduced', 'exempt'. Full list available via GET /tax/codes endpoint.
Fallback tax rate (as percentage) if automatic tax calculation is unavailable
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether tax is added on top of the price (exclusive) or included in the price (inclusive)
exclusive, inclusive Unique identifier for a wallet namespace
Whether renewal reminder emails are enabled for subscriptions using this plan
Number of days before renewal to send the reminder email
Billing engine version. Managed by Paygentic support.
ISO 8601 datetime reference point for billing period alignment. Must be in the past or present at the time of creation or update. When set, all subscriptions created under this plan align their first billing period to the next recurrence of this anchor. Null means each subscription uses its own start time (hour-rounded) as the anchor.
Credit-pool funding declarations for this plan. Each entry funds a distinct pricing unit's credit pool when a subscription to this plan activates: the allocated amount is minted as a credit grant on the customer's pool for that pricing unit, once at activation, or on a recurring basis only when that allocation explicitly sets recurrencePeriod. A plan may declare zero or more allocations; no two allocations on the same plan target the same pricingUnitId.
Show child attributes
Show child attributes
The plan version currently served as the plan's live definition. New subscriptions pin to this version. Absent for plans that have never been versioned.
^pver_[a-zA-Z0-9]+$Governs price identity when a price on this plan's default version is replaced. When true (default), replacing a price at make-default keeps the original price id live (its value changes) and the superseded value is preserved under a new id. When false, the replacement price's id goes live instead and the superseded value stays under the original id.
Was this page helpful?