This version (v0.7) has not been published to npm yet.
Skip to content

Reference / @getenginex/sdk/extension / decimalPlaces

decimalPlaces() ​

decimalPlaces(): ZodMiniType<number>

Decimal places of the currency: an integer from 0 to 8. Strict even in 'warn' mode. For SDK packages (via @getenginex/sdk/extension), not for apps.

Returns ​

ZodMiniType<number>

Example ​

ts
wire({ currency_decimal_places: decimalPlaces() }) // 2 → cents

Throws ​

Nothing: the schema does not throw; the failure becomes VALIDATION_ERROR in the transport.