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
PROPTYPEDESCRIPTION
amount
string
currencyCode
Example
const price: Money = { amount: '12.99', currencyCode: 'USD' };
const cents = money.parse(price);Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
MoneyCents
Integercents money representation used for all arithmetic inside the cart kernel. Avoids floatingpoint rounding by working in the currency's minor units. Conver
MutationEnvelope
Wraps a with an idempotency key for transport across the serveraction boundary. Used by implementations to carry the key alongside the mutation payload.