API Reference

Price

💡 To populate relational property, please use include query parameter in the API call.
NameTypeDescription
idstringPrice ID
productIdstringProduct ID
tokenIdstringToken ID
amountstringPrice amount
intervalstringTime between charge cycles (in seconds)
chargeWindowstringTime window for charging (in seconds)
endTimestringEnd time of the price (Timestamp)
statusstringCurrent status of the price. Possible values: active, closed.
createdAtnumberTimestamp when the price was created
updatedAtnumberTimestamp when the price was updated
productProductProduct object
tokenTokenToken object
type Price = {
  id: string
  productId: string
  tokenId: string
  amount: string
  interval: string
  chargeWindow: string
  endTime: string
  status: string
  createdAt: number
  updatedAt: number
  // product: Product
  // token: Token
}
{
  "id": "price_3lg3x2cf0n4mo",
  "productId": "prod_3kcjqanqh4ove",
  "tokenId": "tok_0jevzg89tqeew",
  "amount": "12000000",
  "interval": "2592000",
  "chargeWindow": "604800",
  "endTime": "1099511627775",
  "status": "active",
  "createdAt": 1684436582,
  "updatedAt": 1684436582
}