Credit Rates
GET /io/wallet/rates — public table of credits charged per feature unit.
Returns the public credit rate table (how many credits each billable feature costs per unit) and the volume-discount tiers applied to top-ups. This endpoint is public — no authentication required — so products, pricing pages, and clients can display costs and bonus labels. It is the single source of truth for top-up discounts: never hardcode bonus percentages or labels in product code — read them from here.
GET https://api.misar.io/io/wallet/rates
Authentication
None. This endpoint is public.
Request
curl "https://api.misar.io/io/wallet/rates"Response
{
"rates": [
{
"feature": "blog.article.generate",
"label": "Generate an article",
"credits": 1,
"unit": "article"
},
{
"feature": "mail.send",
"label": "Send an email",
"credits": 1,
"unit": "1000 emails"
}
],
"topupDiscounts": {
"model": "bonus_credits",
"minTopupDollars": 10,
"maxTopupDollars": 100000,
"tiers": [
{ "minDollars": 0, "bonusPercent": 0, "label": "No bonus" },
{ "minDollars": 50, "bonusPercent": 3, "label": "3% bonus credits" },
{ "minDollars": 250, "bonusPercent": 6, "label": "6% bonus credits" },
{ "minDollars": 1000, "bonusPercent": 10, "label": "10% bonus credits" }
]
}
}ratesobject[]The active credit rate table. Each entry maps a feature to its credits-per-unit cost.
topupDiscountsobjectThe volume-discount tiers applied to top-ups. A bonus-credit model: spending $X grants X base credits plus a graduated bonus.
Rate entry fields
Prop
Type
Rates are the source of truth for cost
The credits charged by POST /io/wallet/deduct are count × the feature's credits rate. Never hardcode per-feature costs in product code — read them from this endpoint (or the cached rate table) so a rate change applies everywhere at once.
Volume-discount tiers
Top-ups earn bonus credits on a graduated scale. This is not a price cut: spending $X always grants X base credits (1 credit = $1), plus an extra bonus based on the amount. Larger prepaid top-ups earn a higher bonus.
| Top-up amount | Bonus | You receive |
|---|---|---|
| $10 – $49 | 0% | face value |
| $50 – $249 | 3% | credits + 3% |
| $250 – $999 | 6% | credits + 6% |
| $1,000+ | 10% | credits + 10% |
Discount fields
Prop
Type
Bonus is applied at grant time
The bonus is computed server-side from the Stripe-confirmed amount and added when credits are granted (see the webhook). The ledger stores whole credits, so a fractional bonus is floored. POST /io/wallet/topup-session returns a preview (totalCredits, tierLabel) so your UI can show "you'll get N credits" before checkout.