Skip to Content
Paycose Docs
Features

Products & prices

Your catalog — what you sell, and every way you can charge for it.

A Product is the thing you sell — "Pro Plan", "Consulting Hour", "Widget". A Price says how much it costs and how it's billed. One product can have many prices.

How it works

  • Create the Product first (name, description, metadata).
  • Attach one or more Prices to it by passing the Product's ID as product: one-time or recurring, flat, tiered (price changes with quantity), or usage-based (billed on reported usage via a Meter). Each Price also picks a currency, so the same Product can be priced separately per market.
  • A tiered Price sets tiers_mode, as Stripe does. graduated (the default) prices the units in each tier at that tier's unit_amount; volume prices every unit at the tier the whole quantity falls in. A tier's optional flat_amount is added once: for every tier the quantity reaches with graduated, and for the one matching tier with volume.
  • A Price's terms are fixed once it exists. To stop selling one, archive it with active: false: it stays readable and keeps billing on the invoices, quotes and subscriptions that already use it, but no new line can use it. active: true restores it, and GET /prices?active=true lists only the ones you sell.
  • tax_behavior says whether the amount includes tax, as on Stripe: inclusive (a ¥1,100 price at 10% JCT is ¥1,000 plus ¥100 of tax, whichever way the rate is set), exclusive (tax is added on top), or unspecified, the default, where each tax rate's own inclusive setting decides. It is set when the price is created.
  • Retrieve a single Product by ID, or list every Product in the catalog.

Products and Prices are never charged directly — they're referenced as line items on an Invoice or Subscription, which is what actually bills the customer.

Common use cases

  • A SaaS plan sold monthly in THB and annually in USD — one Product, four Prices.
  • A metered API product billed per 1,000 calls — a usage-based Price paired with a Meter that tracks reported usage.
  • Volume pricing that gets cheaper per unit above 100 units — a tiered Price.

Fractional unit prices

A usage-based Price can carry unit_amount_decimal: the price per unit, in the currency's smallest unit, as a string with up to 12 decimal places. For example, "0.04" means 0.04 satang per unit. Send it instead of amount (sending both returns 400). The response returns it as a string.

{
  "product": "prod_...",
  "currency": "thb",
  "unit_amount_decimal": "0.04",
  "recurring": { "interval": "month", "interval_count": 1 },
  "usage_based": { "event_name": "api_request" }
}

A fractional unit_amount_decimal only works if the provider accepts fractional unit prices. Stripe does. Other providers reject the Price with 400.

Works with

On this page