Skip to main content
GET
/
v0
/
plans
/
{id}
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

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The unique identifier of the plan Unique identifier for a plan

Pattern: ^plan_[a-zA-Z0-9]+$

Response

Plan details

id
string
required

Unique identifier for a plan

Pattern: ^plan_[a-zA-Z0-9]+$
object
enum<string>
required
Available options:
plan
billingCadence
enum<string>
default:P1M
required

ISO 8601 duration for the billing period.

Available options:
P1M,
P3M,
P1Y
billingInterval
string
required
deprecated

Deprecated. Human-readable billing period derived from billingCadence. Use billingCadence instead.

createdAt
string<date-time>
required
currency
string
required
merchantId
string
required

The merchant organization that owns this plan

Pattern: ^org_[a-zA-Z0-9]+$
name
string
required
productId
string
required

The product this plan belongs to

Pattern: ^prod_[a-zA-Z0-9]+$
updatedAt
string<date-time>
required
defaultTaxCode
string

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.

defaultTaxRate
number

Fallback tax rate (as percentage) if automatic tax calculation is unavailable

deletedAt
string<date-time>
description
string
invoiceDisplayName
string
paymentTerm
object
prices
object[]
taxBehavior
enum<string>

Whether tax is added on top of the price (exclusive) or included in the price (inclusive)

Available options:
exclusive,
inclusive
walletNamespaceId
string

Unique identifier for a wallet namespace

renewalReminderEnabled
boolean

Whether renewal reminder emails are enabled for subscriptions using this plan

renewalReminderDays
integer

Number of days before renewal to send the reminder email

billingVersion
integer

Billing engine version. Managed by Paygentic support.

billingAnchor
string<date-time> | null

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.

creditAllocations
object[]

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.