API reference
Search
K
Links

Prices

The price object and the allowed CRUD operations on the related resource endpoint
SKUs can have a price for each price list. When you create a line item, it gets the price associated with the order's price list.

Price amounts

Each price has an amount (the actual selling price) and an optional compare-at amount (the full price that you want to display to the customer — typically with a strikethrough — on your product and product listing pages). All amounts must be in cents (the other conversions — such as float, formatted, etc. — will be automatically calculated).
The compare_at_amount_cents value must be greater than or equal to (usually greater than) the amount_cent value. If you try to set for a price a compare-at amount lower than the actual amount the API will not return any error, but just set the compare_at_amount_cents value equal to the amount_cents value.
Some currencies have a zero exponent and cannot be expressed in cents (e.g. JPY and HUF). In such cases, you have to express the value as it is (e.g. 10000 JPY, not 1000000 JPY).

Price tiers

Prices can be tiered based on the quantity or the frequency (e.g. subscriptions) of the item purchased (a maximum of 5 tiers for each price is currently supported). See price volume tiers and price frequency tiers to learn more.

External prices

If you prefer not to manage prices within Commerce Layer but use an external service instead (e.g. to support more dynamic pricing or just rely on an existing service that you are already using) you can leverage our external prices feature.
How-to
Check the related guide to learn how to fetch and manage prices via external services.
Data model
Check the related ER diagram and explore the flowchart that illustrates how the price resource relates to the other API entities.