Skip to main content
POST
/
v0
/
prices
Create
curl --request POST \
  --url https://api.paygentic.io/v0/prices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "invoiceDisplayName": "<string>",
  "paymentTerm": "instant",
  "properties": {
    "unitPrice": "<string>"
  },
  "billableMetricId": "<string>",
  "feeId": "<string>",
  "model": "standard",
  "billingCadence": "<string>",
  "feature": {
    "featureId": "<string>",
    "entitlementTemplate": {}
  }
}
'
{
  "id": "price_l5m6n7o8p9q0r1s2",
  "object": "price",
  "billableMetricId": "bm_t3u4v5w6x7y8z9a0",
  "createdAt": "2024-01-18T11:20:00Z",
  "currency": "USD",
  "description": "Per-token pricing for Claude API",
  "invoiceDisplayName": "Claude Token Consumption",
  "model": "standard",
  "paymentTerm": "instant",
  "properties": {
    "unitPrice": "0.00002"
  },
  "unitAmount": "20000000",
  "updatedAt": "2024-01-18T11:20:00Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
invoiceDisplayName
string
required

Line item label shown on customer invoices. Sample values: 'Claude Token Consumption', 'Storage Usage (GB)', 'Inference API Calls', 'Image Generation Count', 'Training Compute Hours', 'Data Transfer (TB)'

paymentTerm
enum<string>
required

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
properties
object
required

Standard pricing model

billableMetricId
string

The unique identifier for the billable metric referred to by this price. Either billableMetricId or feeId must be provided.

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

The unique identifier for the fee referred to by this price. Either billableMetricId or feeId must be provided.

Pattern: ^fee_[a-zA-Z0-9]+$
model
enum<string>

Pricing calculation model. Required for billable metrics, optional for fees (defaults to 'standard').

Available options:
standard,
dynamic,
volume,
percentage
billingCadence
string | null

ISO 8601 duration for recurring charges (e.g., 'P1M' for monthly, 'P1Y' for yearly) or 'P0D' for one-time charges. Required for fees, optional for billable metrics. Sample values: 'P0D' for one-time, 'P1M' for monthly recurring, 'P1Y' for yearly recurring

feature
object

Optional feature to associate with this price

Response

Price created 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
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