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>",
  "model": "standard",
  "properties": {
    "unitPrice": "<string>"
  }
}'
{
  "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"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The unique identifier of the price

Body

application/json
billableMetricId
string

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

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

  • Option 1
  • Option 2
  • Option 3
  • Option 4

Response

Price updated successfully

id
string

Unique identifier for a price

object
enum<string>
default:price
Available options:
price
billableMetricId
string

Unique identifier for a billable metric

createdAt
string<date-time>
invoiceDisplayName
string
model
enum<string>
Available options:
standard,
dynamic,
volume,
percentage
paymentTerm
enum<string>
Available options:
instant,
in_arrears
properties
object

Standard pricing model

  • Option 1
  • Option 2
  • Option 3
  • Option 4
updatedAt
string<date-time>