Skip to main content
GET
/
v0
/
prices
/
{id}
Get
curl --request GET \
  --url https://api.paygentic.io/v0/prices/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.paygentic.io/v0/prices/{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/prices/{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/prices/{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/prices/{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/prices/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.paygentic.io/v0/prices/{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": "price_b1c2d3e4f5g6h7i8",
  "object": "price",
  "billableMetricId": "bm_j9k0l1m2n3o4p5q6",
  "createdAt": "2024-02-10T13:45:00Z",
  "currency": "USD",
  "description": "Tiered pricing for storage capacity",
  "invoiceDisplayName": "Storage Usage (GB)",
  "model": "volume",
  "paymentTerm": "in_arrears",
  "properties": {
    "maxPrice": "0.25",
    "minPrice": "0.05"
  },
  "unitAmount": "50000000000",
  "updatedAt": "2024-02-25T09:30: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 price Unique identifier for a price

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

Response

Price details

id
string
required

Unique identifier for a price

Pattern: ^price_[a-zA-Z0-9]+$
object
enum<string>
default:price
required
Available options:
price
merchantId
string
required

The merchant organization that owns this price, derived from the associated fee or billable metric. Present on single-price reads.

Pattern: ^org_[a-zA-Z0-9]+$
createdAt
string<date-time>
required
invoiceDisplayName
string
required
paymentTerm
enum<string>
required
Available options:
instant,
in_arrears,
in_advance
properties
object
required

Standard pricing model

updatedAt
string<date-time>
required
quantity
integer
required

Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.

Required range: x >= 0
billableMetricId
string

Unique identifier for a billable metric

Pattern: ^bm_[a-zA-Z0-9]+$
feeId
string

The unique identifier for the fee referred to by this price. Present when price is linked to a fee.

Pattern: ^fee_[a-zA-Z0-9]+$
pricingUnitId
string

The pricing unit this price is denominated in (credits). Present when the price draws down a credit pool instead of charging real currency.

Pattern: ^pu_[a-zA-Z0-9]+$
billingCadence
string | null

ISO 8601 duration. 'P0D' for one-time, 'P1M' for monthly, 'P1Y' for yearly. Required for fees, optional for billable metrics. Defaults to plan's billingCadence if not specified.

model
enum<string>

Pricing model of a price as returned by the API. Includes legacy models ('dynamic', 'volume', 'percentage') retained for existing prices; only 'standard' can be created (see PriceModelInput).

Available options:
standard,
dynamic,
volume,
percentage
features
object[]

Features associated with this price

grantDiscountEnabled
boolean
default:false

When true, grants applied to a subscription will discount usage charged by this price. Only supported for standard metered prices.