Money

cart · /core·type

Decimal-string money amount paired with its currency code, matching the shape returned by most provider APIs. Pass to to convert to integer cents before doing arithmetic.

Properties

amount
string
currencyCode

Example

const price: Money = { amount: '12.99', currencyCode: 'USD' };
const cents = money.parse(price);

RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter

Sourcemoney.ts:25Edit the JSDoc directly

On this page