Skip to main content
PATCH
/
v0
/
prices
/
{id}
Update
curl --request PATCH \
  --url https://api.paygentic.io/v0/prices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "billableMetricId": "<string>",
  "invoiceDisplayName": "<string>",
  "properties": {
    "unitPrice": "<string>"
  },
  "billingCadence": "<string>",
  "feature": {
    "featureId": "<string>",
    "entitlementTemplate": {}
  },
  "grantDiscountEnabled": true,
  "quantity": 2
}
'
{
  "id": "price_r7s8t9u0v1w2x3y4",
  "object": "price",
  "billableMetricId": "bm_z5a6b7c8d9e0f1g2",
  "createdAt": "2024-01-25T10:00:00Z",
  "currency": "USD",
  "description": "Per-call pricing for ML inference",
  "invoiceDisplayName": "Inference API Calls",
  "model": "standard",
  "paymentTerm": "instant",
  "properties": {
    "unitPrice": "0.05"
  },
  "unitAmount": "50000000",
  "updatedAt": "2024-03-05T14:20:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt

Use this file to discover all available pages before exploring further.

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]+$

Body

application/json
billableMetricId
string

The unique identifier for the billable metric referred to by this price.

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

Updated invoice line item label. Sample values: 'LLM Token Usage', 'Storage Charges', 'API Call Fees'

model
enum<string>

The pricing model to be used, which can be standard, dynamic, volume-based, or percentage-based.

Available options:
standard,
dynamic,
volume,
percentage
properties
object

Standard pricing model

paymentTerm
enum<string>

Billing timing preference. For billable metrics: 'instant' (charges immediately) or 'in_arrears' (charges at period end). For fees: 'in_advance' (charges upfront) or 'in_arrears' (charges at period end).

Available options:
instant,
in_arrears,
in_advance
billingCadence
string | null

ISO 8601 duration for recurring fees (e.g., 'P1M' for monthly, 'P1Y' for yearly, or 'P0D' for one-time)

feature
object

Feature to associate. Set to null to remove existing feature. Omit to leave unchanged.

grantDiscountEnabled
boolean

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

quantity
integer

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 >= 1

Response

Price updated successfully

id
string
required

Unique identifier for a price

Pattern: ^price_[a-zA-Z0-9]+$
object
enum<string>
default:price
required
Available options:
price
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 >= 1
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]+$
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>
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.