Use case
We run a credit-based referral program — partners earn platform credits, not USD. The embed currently shows $0.00, $4,350.00 etc. via currencyFormatter() throughout. We'd like to display rewards in our own unit (e.g. "22k credits" instead of "$220.00").
Proposal
Add a rewardDisplay option to the program or group config that lets programs customize how reward amounts are rendered in the embed:
// Option A: simple prefix/suffix
rewardDisplay: {
mode: "custom", // "currency" (default) | "custom"
prefix: "", // e.g. "" (no dollar sign)
suffix: " credits", // e.g. " credits"
divisor: 100, // how to convert cents → display units
compact: true, // use compact notation (22k vs 22000)
}
// Option B: format string
rewardDisplay: {
formatter: "credits", // predefined formatter name
}
This would replace currencyFormatter() calls in the embed with a configurable formatter. There are ~11 currencyFormatter calls across 5 embed files (activity.tsx, earnings-summary.tsx, earnings.tsx, leaderboard.tsx, links-list.tsx).
Context
Programs using payoutMode: "internal" often have their own reward currency (credits, points, tokens). The embed UI is excellent but the hardcoded $ formatting doesn't fit these use cases. A configurable display would make the embed work for any reward type.
Related: #3774 (hide payouts UI)
Use case
We run a credit-based referral program — partners earn platform credits, not USD. The embed currently shows
$0.00,$4,350.00etc. viacurrencyFormatter()throughout. We'd like to display rewards in our own unit (e.g. "22k credits" instead of "$220.00").Proposal
Add a
rewardDisplayoption to the program or group config that lets programs customize how reward amounts are rendered in the embed:This would replace
currencyFormatter()calls in the embed with a configurable formatter. There are ~11currencyFormattercalls across 5 embed files (activity.tsx,earnings-summary.tsx,earnings.tsx,leaderboard.tsx,links-list.tsx).Context
Programs using
payoutMode: "internal"often have their own reward currency (credits, points, tokens). The embed UI is excellent but the hardcoded$formatting doesn't fit these use cases. A configurable display would make the embed work for any reward type.Related: #3774 (hide payouts UI)