Serialize Long ids as strings to stop org-id precision loss

FixBillingService
Shipped
July 3, 2026 at 9:58 PM UTC
Author
Kamo
Commit
e9dfd6a

Org ids are CockroachDB unique_rowid() values that exceed JS MAX_SAFE_INTEGER. BillingService was serializing them as raw JSON numbers, so kamo-internal's JSON.parse silently rounded e.g. 1188756624575266822 -> 1188756624575266800. The platform Organizations tab then POSTed extend-trial to a non-existent org id, and TrialAdminService.grant threw "No subscription to convert" -> HTTP 500. Register a ToStringSerializer for Long/long on the ObjectMapper (same pattern already used by KamoLOS and the MLOS services) so every id survives the round-trip. Fixes extend/apply-trial, platform-product toggle, and trial-status for orgs with large ids.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing