Storefront blocks & theme setup
How Rebatory's theme app extension blocks work, their settings, and the theme-integration API.
Store credit & rewards
One card showing a signed-in customer's store-credit balance, any cashback that is still pending, their VIP tier with a progress bar toward the next tier, and their personal referral link with a copy button. Add it wherever customers look for their account details — a customer account page, the cart, or a dedicated "My rewards" page.
- Logged-out visitors see a sign-in prompt instead (this can be turned off).
- The VIP tier area always shows for signed-in customers; if they have no tier yet it shows your "no tier" text and, when you have tiers configured, how much more they need to spend to reach the next one.
- The referral section appears only when referrals are enabled in Settings.
Settings: heading, the label for each section, the pending cashback / VIP progress / referral message templates, the copy-button text, the sign-in prompt, a full-width or contained card, and top / bottom spacing.
Message placeholders (type these into the matching setting and Rebatory fills them in):
| Placeholder | Becomes |
|---|---|
{amount} | a money amount (pending cashback, or credit to the next tier) |
{days} | days until pending cashback is released |
{tier} | the next VIP tier's name |
{referrer_reward} / {referee_reward} | the two referral reward amounts |
Cashback message
A short line for product pages showing how much store credit this product earns. It can only be added to product templates. The message setting accepts:
| Placeholder | Becomes |
|---|---|
{amount} | store credit earned on this product — the product price × the customer's cashback rate |
{percent} | the cashback rate itself, e.g. 5 |
The default message is "Earn {amount} in store credit when you buy this." The rate is the customer's VIP-tier rate when they are signed in, otherwise your store's default rate.
Keeping {amount} in sync with variant changes
{amount} is calculated from the price shown when the page loads. If
your theme changes the price when a customer picks a different variant, you can
keep the Rebatory line in step by calling this from your theme's variant-change
code, with the new price in cents:
window.Rebatory.setCashbackPrice(4200); // e.g. €42.00
It is safe to call at any time — if Rebatory's data has not loaded yet the call is simply ignored, and the line updates once it has. If you don't add this, the amount still shows correctly for the variant selected on page load.
Referral tracking (app embed)
Turn this on once under App embeds. It has no visible output —
it runs on every page so that when a customer arrives on a friend's referral
link (yourstore.com/?ref=CODE) it tags their cart, and Rebatory
credits both people once that order is placed. It must be a sitewide embed
because a referral link can land on any page. With it off, referral links still
display but no rewards are paid.
Referral attribution needs a normal cart checkout — Add to cart → Cart → Checkout. An order placed straight from a product page's express buttons (“Buy it now”, Shop Pay, Google Pay) creates a checkout for just that product and skips the cart, so there is nothing for Rebatory to read the referral from and no reward is paid. If referrals matter to you, consider turning off Show dynamic checkout buttons in your theme's product form.
Design & themes
The blocks inherit your theme's fonts, colours and links, and only add layout. They are built to read correctly on light and dark themes. If a block looks cramped in a narrow column it stacks its sections automatically.