Directory / plugin
Playmint – Reward Games for WooCommerce
v1.4.1 · by playmint
Spin the wheel, scratch card and slot machine games that collect emails and give each winner their own single-use WooCommerce coupon, made for them au …
About this plugin
Playmint adds a reward game to your shop: a spin-the-wheel, a scratch card or a slot machine. A visitor plays, wins one of your prizes, and gets their own single-use coupon code on the spot.
What it does for your shop
- Collects emails. Visitors leave their email to play, with a separate, unticked box for your newsletter. Export the list as CSV for Mailchimp, Klaviyo, MailerLite, Brevo, Omnisend or any other tool.
- Brings customers back. Run the game for signed-in customers only, and let them play again every day.
- Gives real, unshareable prizes. Every winner gets a code of their own, and the plugin turns it into a single-use WooCommerce coupon that works only with the winner’s email. Nothing to make or paste, and a code used at checkout is marked as used in Playmint.
- Shows the prize everywhere. Logged-in customers see their unspent prize on the cart, checkout and My account pages, on any device, with an Apply button.
How it works
- A “Win a prize” button sits in the corner of your shop (or the game opens once by itself).
- The visitor plays. The outcome is decided on Playmint’s server from the odds you set, so it can’t be cheated from the browser.
- The winner sees their code straight away, and it stays in the corner, with Copy and Apply to cart, until they use it. Signed-in customers see it on any device.
The games
- Spin the wheel, in three looks: Classic, Summer and Winter
- Scratch card
- Slot machine
Everything the shopper sees is translated into English, Slovenian, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech and Croatian.
What you need
A Playmint account. Every account starts on the Free plan (100 plays a month, no card); for more plays, see Billing in the dashboard. You set up campaigns, prizes and odds in the Playmint dashboard, and this plugin puts the game on your site. The game works on any WordPress site; the coupon maker, the used-code reporting and the prize on the cart page need WooCommerce.
External services
This plugin connects your site to Playmint (https://play-mint.com), the service that runs the games. Nothing is sent until you enter your Playmint keys on the plugin’s settings page.
Once your keys are saved:
- Every page of your shop runs the plugin’s small loader script (included in the plugin), which asks api.play-mint.com for your campaign from the visitor’s browser. The game itself is part of the Playmint service: it downloads from cdn.play-mint.com, over HTTPS, only when the visitor opens it.
- When a visitor plays, their browser sends Playmint the play and, depending on your campaign, the email they type in or your customer account ID, with a signature your server made from it with your secret key, so nobody can play as a customer they aren’t. Playmint stores the result and the email (with marketing consent only if they ticked the box) for you to see and export.
- When an order is placed with coupons, your server sends the order’s coupon codes to api.play-mint.com, so a won code is marked as used.
- When a Playmint code is applied for the first time (a code starting with PM that isn’t a coupon yet), your server sends the code to api.play-mint.com and gets back the prize, its end date and the winner’s email or customer ID, to make the matching coupon.
- When you save the settings, once a day, and when you deactivate the plugin, your server sends your site’s address and WooCommerce currency to api.play-mint.com, so Playmint knows this shop turns its codes into coupons.
- When a logged-in customer opens a page, your server asks api.play-mint.com whether they have an unspent prize, sending their customer ID (sign-in campaigns) or their account email (email campaigns), so the prize shows on any device. A prize is remembered for 5 minutes, “no prize” for one, and signing in asks again.
- When you save the settings or press “Check connection”, your server asks api.play-mint.com for your campaign, to check the keys and your site’s address.
Playmint processes this data on your behalf, as your data processor. It is stored in the EU, on netcup GmbH’s servers in Nuremberg, Germany.
- Terms of service: https://play-mint.com/terms.html
- Privacy policy: https://play-mint.com/privacy.html
- Data processing agreement: https://play-mint.com/dpa.html
Source code
Every file in this plugin is readable as shipped, except one built file: assets/playmint-loader.js, the small script that loads the game. Its TypeScript source and build setup are in source/loader/. To rebuild it, run npm install and then npm run build in that folder (Node.js 18 or newer); it writes assets/playmint-loader.js.
The games themselves are part of the Playmint service and aren’t in the plugin (see External services above).