When a customer returns something and chooses store credit over a refund, they trust you to remember that balance. Most small stores handle this with a spreadsheet and an email reply. The customer emails asking how much credit they have left. You dig through records. You reply two days later. They feel like they are begging for their own money.
A store credit page fixes this. The customer logs in, sees their balance, sees when it expires, and can apply it at checkout without asking anyone. This guide walks through building one without a plugin.
What a Store Credit Page Actually Does
The page shows three things:
- Current balance with a clear number, not buried in order details
- Transaction history showing every credit issued and every credit spent
- Expiry date if your store credit expires, displayed prominently so there are no surprises
That is it. No rewards points, no loyalty tiers, no gamification. Just a balance the customer can see and use.
Step 1: Set Up Store Credit as a Customer Meta Field
Every customer needs a credit balance stored on their account. If you use Shopify, this is a customer metafield. If you use WooCommerce, it is user meta. If you run a custom store, it is a column on the customer table.
Create a field called store_credit_balance with a numeric value starting at 0. Every time you issue store credit (for a return, a goodwill gesture, a referral reward), you add to this field. Every time the customer spends credit at checkout, you subtract from it.
Also create a field called store_credit_expiry with a date value. If you do not set an expiry, leave it null. If you do, set it 12 months from the issue date.
Step 2: Build the Transaction Log
A balance without a history creates distrust. The customer wants to know where the credit came from and where it went.
Create a simple log table that records every credit transaction:
- Date and time
- Amount (positive for credit issued, negative for credit spent)
- Reason (return, goodwill, referral, purchase)
- Order reference if applicable
Store this as a JSON array in another customer metafield called store_credit_log. Each entry is one line. You do not need a separate database table for this.
Step 3: Create the Page Template
Build a new page template called store-credit.php (or a custom section in your theme). The page should contain:
- A header section with the current balance displayed large and centred. Use a contrasting colour so it stands out from the rest of the page.
- An expiry alert box that appears only if the credit expires within 60 days. Use a warm accent colour, not red. You want to inform, not alarm.
- A transaction history table below the balance, sorted newest first. Each row shows date, amount, and reason. Positive amounts in green, negative amounts in grey.
- A call-to-action button linking to your shop with a URL parameter that auto-applies the credit at checkout.
Step 4: Add the Checkout Integration
The page is useless if the customer cannot actually spend the credit. At checkout, add a toggle that says Apply store credit (balance: $X). When toggled on, the cart total reduces by the credit amount.
If the cart total is less than the credit balance, only the cart total is deducted. The remaining balance stays. If the cart total is more than the credit, the credit is applied in full and the customer pays the difference.
After the order completes, update the store_credit_balance field and append the transaction to the log.
Step 5: Link It From the Account Menu
Customers will not find this page on their own. Add a link in the customer account sidebar called Store Credit, right below Order History. Use a small wallet icon if your theme supports icons.
Also add a balance preview on the account dashboard. A simple line that says You have $45.00 in store credit with a link to the full page. This reminds customers their credit exists every time they log in.
Step 6: Send a Credit Issued Email
Whenever you issue store credit, send an automated email to the customer. The email should include:
- The amount issued
- The reason (return processed, apology, referral bonus)
- The expiry date if applicable
- A direct link to the store credit page
This email is the moment the customer learns they have credit. If you skip it, they will forget it exists. The link to the credit page is how they check it next time without emailing you.
Step 7: Handle Expiry Gracefully
If your store credit expires, send a reminder email 30 days before the expiry date. The email should say: Your $45.00 in store credit expires on November 15. Use it before it is gone.
Include a link to a filtered shop view that shows products in their credit range. Make it easy to spend the credit before it disappears.
When credit expires, do not silently zero it out. Add a transaction log entry that says Expired so the customer can see what happened if they check later.
What Not to Do
- Do not require customers to enter a promo code to use their credit. It should be a toggle at checkout, not a code they have to remember.
- Do not hide the expiry date. If credit expires, show it on the page from day one.
- Do not let the balance go negative. Always validate at checkout that the credit applied does not exceed the available balance.
- Do not combine store credit with loyalty points on the same page. They are different things. Store credit is money. Loyalty points are rewards. Mixing them confuses customers.
How Long This Takes
If you are comfortable editing your theme files, this is a 2 to 3 hour build. The metafield setup takes 20 minutes. The page template takes an hour. The checkout integration takes another hour. The email automation takes 30 minutes.
If you are not comfortable with code, you can approximate this with a page builder and a custom app. The core principle is the same: the customer should be able to see and spend their credit without contacting you.
Want more like this? Join MOKU Club for free. Weekly resources, early access to new guides, and occasional templates you can actually use. Join below.



