Customer Wallet & Store Credit for PrestaShop 8 & 9
Install, configure and use the customer wallet: credits, top-up, payment, expiry and exports.
Overview
DataFirefly Customer Wallet adds a balance per customer to PrestaShop 8 and 9. You credit refunds, credit slips and goodwill gestures to it; the customer spends it at the payment step of later orders and can top it up. The balance is handled as a payment method: an order partly paid with the wallet keeps its total, its invoice and its VAT base, and the wallet part shows as a payment line.
Installation
- In Modules > Module Manager, click Upload a module and drop
dfwallet-1.1.1.zip. - On install, the module creates its tables, a Customers > Wallets tab, a hidden virtual product
DFWALLET-TOPUPused for top-ups, and places itself first among payment methods. - In Payment > Preferences, check that the module is allowed for your currencies, countries and customer groups.
To update, upload the new ZIP: balances, history and settings are kept, and the upgrade scripts add the new columns.
Configuration
Payment
- Allow partial use at checkout: when the balance does not cover the whole order, the customer can apply it and pay the rest with another payment method.
- Order status when the wallet pays the whole order: Payment accepted by default.
Customer top-up
- Suggested amounts: comma separated, in the default currency. Example:
20,50,100. - Free amount, with minimum and maximum top-up.
- Top-up bonus: tiers written as
amount:bonus. With50:5,100:15, a 100 top-up credits 115. The bonus is credited when the top-up is paid and taken back if the order is cancelled or refunded.
The top-up is sold without VAT, since it is a prepayment. The balance is only credited once the top-up order reaches a paid status.
Refunds and cancellations
- Return the wallet part when an order is cancelled and when it is set to Refunded.
- Automatically credit each new credit slip to the wallet: off by default. Leave it off if you also refund by bank transfer or native voucher; credit slips are then credited one by one from the order page.
Credits linked to an order (returns and refunds) are capped at its amount: switching on automatic return and crediting the credit slip of the same order never credits twice.
Expiry of goodwill credits
- Validity in months, 0 for no expiry. It applies to goodwill gestures, credit adjustments and top-up bonuses. Refunds, returned payments and top-ups never expire.
- Reminder email before expiry: number of days before the date, 0 for no reminder.
A payment always spends the amounts that expire first.
Cron task
The URL shown at the top of the configuration page, protected by a token, expires due credits and sends reminders. Call it once a day:
0 6 * * * curl -s "https://your-store.com/module/dfwallet/cron?token=YOUR_TOKEN" > /dev/null
Without cron, the same work runs at most once an hour when the wallets list is opened, and the expired credits of a customer are processed as soon as the wallet is displayed.
Crediting a wallet
From the order page
The Customer wallet panel shows the balance, the movements linked to the order, a Credit to the wallet button for each credit slip and a credit form (goodwill gesture, refund, adjustment). If the order was partly paid with the wallet, a button returns that payment.
From the customer page and the list
The customer page shows the balance and a credit or debit form. Customers > Wallets lists every wallet, with a quick credit by email and a detailed page per customer.
For each movement you can enter a message shown to the customer, an internal note, a valid until date for goodwill gestures, and choose to email the customer.
Bulk credits by CSV
The Bulk goodwill credits block takes a CSV file, one customer per line:
email;amount;message;valid_until
jane@example.com;10;Sorry for the late delivery;2027-06-30
Message and date are optional; dates can be YYYY-MM-DD or DD/MM/YYYY, and amounts can use a comma or a dot. A default message and validity apply to lines without them. Each line has its own duplicate protection key: sending the same file twice credits nobody twice. A report lists credited lines, already imported lines and errors.
Customer side
- My account > My wallet: balance, amounts expiring soon, top-up and paginated history with links to orders.
- Cart page: reminder of the available balance.
- Payment step: if the balance covers the order, Pay with my wallet is offered first. Otherwise the Use my balance button shows the amount deducted and what is left to pay, then the customer picks another payment method.
- Order confirmation: reminder of the part paid with the wallet and the amount still due.
The balance applied to the cart shows in the summary as a Wallet line. If the customer removes it with the delete icon, the balance is no longer used for that cart.
Accounting
At validation, the balance used is recorded as a payment of the order. Product total, VAT and invoice do not change. For bank wire or cheque payments, the instructions sent to the customer show the amount actually due.
The wallets list shows the total outstanding per currency: it is a debt towards your customers until it is spent. The Export movements block produces a CSV (UTF-8, semicolon separated) with one line per movement: date, customer, operation, amount, currency, balance, order, credit slip, validity, employee, message and note.
Emails
Two templates are provided in 8 languages in modules/dfwallet/mails/: dfwallet_credit (wallet credited) and dfwallet_expiry (reminder before expiry). They are written in the customer language, amounts and dates included. You can customise them in International > Translations > Email translations or override them in your theme.
Uninstall and GDPR
Balances and history are kept on uninstall, since they are a debt towards your customers. Switch on Delete balances and history on uninstall only if you want to erase everything. A customer’s movements are included in the data export of the official GDPR module.
FAQ
The customer does not see the wallet payment option
The option only shows when the balance covers the whole order. Otherwise the Use my balance button shows above the payment methods, provided partial use is on. Also check that the module is allowed for the customer’s currency, country and group.
The wallet cannot be used with a top-up
This is intended: a cart containing a top-up cannot be paid with the wallet.
The panel does not show on the order page for an employee
PrestaShop only runs a module’s hooks if the employee profile has the View permission on that module. Add it in Advanced Parameters > Team > Permissions.