Support i64 for price amounts instead of i32
Summary
Increase the underlying price field from i32 to i64 to support larger price values and remove integer limitations for high-value products.
Current behavior
The price field is currently represented as a 32-bit signed integer (i32). This imposes a hard upper limit on the maximum value that can be stored, causing product creation or price updates to fail once that limit is exceeded.
As a result, merchants with high-value products or annual/enterprise pricing can encounter integer overflow errors despite the pricing itself being valid.
Request
Change the underlying price representation from i32 to i64 across the pricing system and APIs.
This would significantly increase the supported price range while remaining backward compatible for existing integrations.
Why it matters
- Removes an implementation-imposed ceiling on product pricing.
- Supports high-value products and enterprise pricing across all supported currencies.
- Prevents integer overflow errors when creating products or localized prices.
- Future-proofs the pricing model as merchants expand into markets with larger nominal currency values or introduce higher-priced offerings.
- Avoids the need for currency-specific handling or workarounds.
Notes
- This is an implementation-level improvement and should not introduce breaking changes for existing API consumers.
- Existing integrations using
i32-compatible values would continue to function unchanged, while merchants requiring larger price values would no longer be constrained by the current integer limit.
0 Comments
Sign in to comment
No comments yet. Be the first to share your thoughts!
