Price & Cents Convention Concept Open in shop →
Prices are held as decimals and formatted for display; payment services receive the amount in the smallest currency unit.
Path: Home › Price & Cents Convention
Price & Cents Convention
Panterzone holds every price internally as a decimal amount (for example 15.95). For display, the value is formatted according to the configured currency. Payment services receive the amount in the smallest currency unit, that is the amount times 100.
Display
| Stored value | Display (standard) | Display (European) |
|---|---|---|
0 or empty | 0 | 0 |
15.95 | 15.95 | 15,95 |
100 | 100 | 100 |
100.00 | 100 | 100 |
Whole amounts are shown without decimals: 100 is clearer than 100.00. Whether a comma or a dot separates the decimals depends on the format of the configured currency.
Input written with a comma and input written with a dot are normalised to the same internal format before display. It therefore makes no difference whether a price is entered as 15,95 or as 15.95.
Amounts sent to payment services
Most payment services work in whole subunits. A price of 15.95 is therefore submitted as 1595. Rounding happens before the conversion to a whole number, so that an amount is never off by one cent because of decimal arithmetic.
Which format applies where
| Context | Format | Example |
|---|---|---|
| Internally stored price | decimal amount | 15.95 |
| Display in the shop | formatted per currency | 15,95 |
| Submission to a payment service | whole subunit | 1595 |
| Price fields in forms | formatted per currency | 15,95 |
Common mistakes
- Submitting a stored amount to a payment service unchanged. It has to be converted into the smallest currency unit first.
- Displaying an amount returned by a payment service unchanged. It has to be converted back first, otherwise the price appears a hundred times too high.
Price display in the shop
An internally stored amount of 49.90 appears in the shop as 49,90 EUR. The same amount is submitted to a payment service as 4990.
This page did not answer your question? The Help Center has more articles, or open a support ticket directly.
