Hacker News new | ask | show | jobs
Show HN: Credit-to-currency conversion controls for wallet-based billing ()
7 points by ShreyaChaurasia 127 days ago
If you sell credits or tokens, at some point someone asks: “What is one credit actually worth?”

We shipped explicit Wallet Conversion Rate controls in Flexprice to answer that cleanly.

Each wallet can now define: • conversion_rate — how credits map to currency when spending • topup_conversion_rate — optional rate used only when adding credits

This supports use cases like promotional top-ups, bonus credits, or discounted purchases while keeping invoice calculations consistent.

Wallets store credits.Invoices remain in a single base currency. Conversion defines the relationship between the two.

The goal is simple: make credit systems flexible for product teams and predictable for finance teams. Happy to answer questions about edge cases or implementation details.

2 comments

The split between conversion_rate and topup_conversion_rate is a smart call — it's exactly the kind of detail that looks minor until you're trying to run a promo without breaking your revenue reporting. Keeping invoices anchored to a single currency while letting the credit layer flex is the right abstraction.
Sounds niche, whats the use-case being solved here?