RedeemWise has four moving parts: a discount function, two storefront blocks, three Flow actions, and a reconciliation job that runs on order webhooks. This page covers how they fit together.
Your earning rules stay yours. A typical workflow ends with our action instead of an Update customer metafield step:
Order paid
└─ Run code (your rules: XP, rates, tiers, whatever)
└─ [RedeemWise] Credit Points
customer → the order's customer
points → the number your code returnedCredit Points adds to the balance. Debit Points removes from it, clamping at zero — use it for support corrections and clawbacks, not for redemption spending, which the app deducts itself. Set Points Balance writes an absolute value; it is the right tool for reconciling against an external system and the wrong tool for routine earning, because it will clobber a concurrent credit.
A discount function's input query fixes its metafield namespace at build time, so RedeemWise cannot read an arbitrary per-shop namespace at runtime. It owns its own balance metafield instead, and Settings offers a one-time bulk import from whatever namespace and key you use today.
After the import, RedeemWise's metafield is authoritative. Switch your Flow to the Credit Points action in the same maintenance window, or the two will drift.
On every cart calculation the function applies a discount only if all of these hold, and silently applies nothing otherwise:
The function is the source of truth. The storefront blocks mirror these rules for good UX, but a bad value getting through the UI results in no discount, not a wrong one.
If you are building your own cart UI instead of using our blocks, this is the entire interface:
_redeemwise_redeemPOST /cart/update.js and { attributes: { _redeemwise_redeem: "500" } }, then re-render your cart totals.$app.storefront_config and the balance from the customer metafield $app.balance.Nothing is deducted when the discount is applied — a cart is not a sale. On orders/paid, RedeemWise re-reads the order, confirms its own discount is actually on it, and deducts exactly the points that discount was worth. If the function declined, or capped the amount to a smaller eligible subtotal, the customer is charged only for what was actually applied.
Each order can be deducted once. The audit record is keyed on the order ID with a uniqueness constraint, so repeated webhook deliveries — which are normal — cannot double-charge.
dev@mal-vi.com — include your shop domain and, if it is about a specific redemption, the order number.