computeAmount
This utility function can be used to compute the price of an amount for a region and retrieve the amount without formatting. For example, 20.
This function is used by formatAmount before applying the price formatting.
The main difference between this utility function and computeVariantPrice is that you don’t need to pass a complete variant object. This can be used with any number.
Example
src/MyComponent.ts
Parameters
The options to compute the amount.
Returns
numbernumberRequiredThe computed amount.
Was this section helpful?