GamerHub for WooCommerce
GamerHub for WooCommerce
Description
Connects a WooCommerce store to the GamerHub merchant API and turns it into a fully automated game top-up / voucher shop.
- Add games in one click – every game GamerHub sells becomes a WooCommerce product (one variation per top-up amount), priced at what you pay plus the profit % you set.
- Your prices, your way – set a default profit %, then fine-tune it for one game or one single top-up amount, with filters and a bulk edit. A price is never allowed to fall below what GamerHub charges you (see the currency note below).
- Sell in your own currency – if your shop sells in a different currency from the one GamerHub charges you in, the plugin converts every cost at an exchange rate, adds an optional safety buffer, then adds your profit. If it cannot get a trustworthy rate it refuses to write any price at all rather than guess.
- Player ID / Server fields on the product page, generated automatically from the game’s own schema, with an optional live account check before purchase. The fields use standard WooCommerce markup, so they inherit your theme’s styling.
- Automatic fulfilment – when a WooCommerce order is paid, each unit is submitted to GamerHub server-side over an HMAC-signed request. One supplier order per unit, so every supplier and every quantity works.
- Signed status webhook – the order flips to Completed once GamerHub confirms delivery; voucher codes are attached to the order and emailed to the customer.
- Works with your add-ons – already render Player ID / Server with PPOM or another product add-on? Turn off the built-in fields and the plugin rebuilds the fulfilment data from the order automatically. If it can’t be certain which field is which, it blocks the order instead of guessing – a top-up is never sent to the wrong account.
- Manual linking – hand-build any product (your own name / price / image) and link it to a GamerHub top-up amount, or sell a single amount as its own standalone product that keeps tracking cost and stock.
- Keep everything up to date (optional) – refresh prices and stock in the background every 1, 3, 6, 12 or 24 hours, with a per-product on/off switch. Products that go inactive or out of stock upstream are marked out of stock automatically and restock themselves when they return.
- HPOS compatible.
This plugin is an official client for the GamerHub merchant platform. A GamerHub merchant account is required.
External services
This plugin connects to the GamerHub merchant API (https://portal.gamerhubstore.shop) – the service it exists to integrate with. It communicates with that API in these situations:
- Loading the game list / checking prices – sends your API key (in signed request headers) and requests the game list and per-game prices. No customer data is sent.
- Order fulfilment – when a WooCommerce order is paid, the plugin sends the product code, SKU code, a unique order reference (
out_trade_no), the buyer-entered game fields (e.g. Player ID / Server), and your store’s webhook callback URL, so GamerHub can fulfil the order and notify you of the result. - Checking a game account (optional) – if you enable the account-check button, the game fields the buyer types are sent to GamerHub to confirm the account exists before purchase.
- Game artwork (optional) – when “Import product images” is on, the plugin downloads each game’s cover image from the address GamerHub gives it and saves it to your media library. This is a download from GamerHub’s own storage; no customer data is sent, and it happens only for games you add to your shop.
- Account status, balance and exchange rate – the plugin queries your GamerHub account balance and currency (connection test, and before writing prices) and polls an order’s status by reference. When your shop currency differs from your GamerHub account currency, this same request also asks GamerHub for the exchange rate between the two, so prices can be converted. These send only your API key, your store’s currency code, and the order reference (
out_trade_no); no customer data is sent.
The buyer-entered game fields (such as a Player ID) are personal data that leaves your site and is sent to GamerHub as a necessary part of delivering the ordered top-up.
- Terms of Service: https://portal.gamerhubstore.shop/terms
- Privacy Policy: https://portal.gamerhubstore.shop/privacy
No data is sent to any other third party. The plugin does not call any exchange-rate service or any other API – the rate comes from your own GamerHub account, or you type it yourself.
Requirements
- A public HTTPS site (the status webhook is delivered to
/wp-json/gamerhub/v1/callback). On a local or test site GamerHub cannot reach it and orders stay in Processing. - Server clock synced (NTP) – requests are signed with a +/-5-minute window.
- A GamerHub merchant account with sufficient balance.
Installation
- Install and activate the plugin. WooCommerce must already be active.
- In the WordPress menu on the left, click GamerHub. Paste your API Key, API Secret and Webhook Secret from portal.gamerhubstore.shop. The Webhook Secret must be exactly the same as the one in your GamerHub account – if it is not, GamerHub still delivers and still charges you, but your shop never marks the order Complete. Set your Default profit % – leave it at 0 and you sell at cost price and earn nothing. Press Save settings.
- Press Test connection. If it fails, the message shows this server’s address. Open the API Key page in your GamerHub account, add that address to the allowed list, then test again. When it succeeds it also tells you which currency GamerHub charges you in – you need that for the next step.
- Still on the GamerHub page, check Currency handling. If your shop sells in a different currency from the one GamerHub charges you in, nothing will be imported until you choose Convert. See the currency question below.
- Press Get the game list, then press Import on each game you want to sell.
- Put some money in your GamerHub wallet, then buy one cheap item on your own shop to check the code or top-up really arrives.
Faq
GamerHub charges you in one currency (often USD). Your shop sells in another. A cost of 2.50 USD is not a price of 2.50 in your currency, so the plugin will not guess – by default it stops and imports nothing. That is deliberate: it protects you.
On the GamerHub page, under Currency handling, pick one of three:
- Convert – what almost every shop wants. GamerHub’s cost is multiplied by an exchange rate, then your profit % is added. The rate comes from your GamerHub account and stays up to date on its own, or you can type your own. If the rate is missing or more than a day old, the plugin stops writing prices until it has a fresh one, so you are never priced from a stale rate.
- Pause – the default. Nothing is imported and no price changes while the two currencies are different.
- No conversion – the number is copied across with no maths at all, so a cost of 2.50 USD becomes a price of 2.50 in your currency. Only safe if you type every price by hand and turn “Keep price and stock up to date” off. In this mode the below-cost protection cannot work, because the two numbers are not in the same currency.
There is also a Rate buffer (a small % added on top of the rate, 2% is a sensible start). Your prices stay as they are until the next sync, but exchange rates move daily – the buffer covers that drift so it does not come out of your profit.
Not safely. WooCommerce stores a price as a plain number and puts your currency label on it. If you switch currency, every imported price keeps its old number and only the label changes – so 11.75 in the old currency becomes 11.75 in the new one, and most of your shop is suddenly priced wrong. The plugin shows a red warning if it detects this. Fix it by adding your games again before you take any orders.
Yes. This plugin is a client for the GamerHub merchant platform; you need a merchant account, API credentials, and enough wallet balance (orders draw the wholesale cost).
Only the game fields the product requires (e.g. Player ID, Server) – these come from GamerHub automatically. Vouchers require nothing; the buyer just pays and receives a code.
Yes. Set a Default profit % on the GamerHub page. Every game in the list then has its own Your profit box right in the table — you can fill it in even before you add the game to your shop, and it is applied the moment you do. Press Prices on a game’s row to see each top-up amount with what you pay and what the buyer pays side by side, and to give one single amount its own profit. Note the two profit types: % on top of cost multiplies, and + CUR on top of cost adds that many units of your currency on top of the cost – it does not set the price to that amount. A price is never allowed to fall below what GamerHub charges you, as long as your shop currency matches your GamerHub currency or you use Convert.
Turn on the interval on the GamerHub page – every 1, 3, 6, 12 or 24 hours. Each time it runs it rewrites the prices of the games already in your shop using your profit %, and also puts the GamerHub name back and puts the product back on sale – so a price or a name you typed by hand on one of those products will be replaced. To protect one game from this, untick Keep updated on its row. If a product goes inactive or out of stock upstream it is automatically marked out of stock so it can’t be sold while it can’t be fulfilled, and it restocks itself on the next successful sync.
Yes. On a product that uses an add-on, tick “Another plugin already asks for the Player ID” in its GamerHub box to turn ours off and let your add-on render the Player ID / Server. When an order is paid the plugin rebuilds the fulfilment data from the order automatically – matching each GamerHub field by your saved mapping, its label, or a synonym. If it can’t be certain which field is which, it blocks the order instead of guessing, so a top-up is never sent to the wrong account. Note that with this on, the plugin no longer checks that the buyer filled the fields in – so place one test order before you go live. Pressing Prices on a game’s row shows exactly which fields that game needs, and for dropdowns (such as a Genshin server) the exact values to use. You can also map fields explicitly, per product or per variation.
Yes. The built-in fields use standard WooCommerce form markup and inherit your theme’s checkout styling, so they look like the rest of your store.
When an order is paid, each unit is submitted to GamerHub over a signed request. The order stays in “processing” until GamerHub’s signed webhook confirms delivery, then it completes; failures are held for your review (never auto-refunded).
Yes.
Reviews
Changelog
1.3.2
- The player-ID boxes have a clearer outline. On a stock setup the border came out under a single pixel, which on a phone in daylight reads as no box at all – and these are the one place on the page a buyer has to type something correctly. Only the thickness is set; the colour and rounding still follow your theme, and your own checkout fields are untouched.
- Gift-card codes now appear in License Manager for WooCommerce, for shops that use it. The code lands in that plugin’s own licence block in the order email and under My account -> Licenses, so a buyer can look it up months later instead of digging through old email. Nothing is required and nothing needs setting up: a shop without License Manager sees exactly what it sees today, and a code is only ever shown once – by whichever of the two is holding it. Orders placed before you installed License Manager keep showing their codes the way they always have, and if you switch License Manager off, every order falls back automatically.
1.3.1
- Fixed: an order for several units of the same item could be marked Complete – and the completion email sent – while only some of those units had been delivered. If a later unit then failed, the order was already Complete and could never fall through to On Hold, so a part-delivered order looked finished. An order now waits until every unit has reported.
- New: “These products need shipping” (GamerHub -> Setup). GamerHub products are Virtual by default, so WooCommerce asks for no address and charges no shipping. Turn this on only if you have set up shipping zones – a shop with none will show “No shipping options were found” and cannot take orders.
1.3.0
- Verify a buyer’s game account before they pay. Games that support it now show a “Verify Account” button under the player fields. It confirms the account exists and shows its name and region, so a mistyped ID is caught before money moves. It never blocks a sale – if the check fails, or is unavailable, the buyer can carry on, and the order records which of the two it was.
- You choose how strict the check is (GamerHub -> Setup -> Account check). Optional lets the buyer verify or skip. Required means the account must actually be confirmed: a buyer cannot skip past an ID GamerHub says does not exist, they have to correct it. The one exception is GamerHub itself being unreachable – then skipping is allowed and the order records that the check was unavailable, so an outage can never stop you selling. Existing shops stay on Optional.
- Gift-card codes now appear in the order itself – on the order-received page, in My account, in the “order complete” email and on your own order screen, right under the item they belong to. Until now a code reached the buyer only through the separate “note added to your order” email, which many shops switch off – and when they did, the buyer got nothing at all. Codes already delivered show up straight away.
- A gift card re-checks its own stock the moment one sells. Gift-card stock runs out, and between hourly updates a shop could keep taking orders for a card GamerHub had already run out of – every one of those a sale you cannot fulfil. Selling one now schedules a fresh stock and price check for that card a few seconds later. Top-ups are unaffected, a burst of sales still causes only one check, and a card you have unticked “Keep updated” on is left alone.
- Game artwork is imported automatically. An image you set or delete yourself is left alone.
- The admin screen is now split into Games, Setup and Connection tabs, and works properly on a phone.
- Clearer buttons: “Import” adds a game to your shop, “Update my shop” rewrites its prices from GamerHub, and “Get latest” only refreshes the stored copy of the price list. Each explains itself on hover.
- Long explanations are folded away by default, so the price table is the first thing you see.
- Pressing Prices now shows the copy already stored on your site, so it opens instantly and costs nothing. A game’s prices are kept until you sync it again – press “Get latest” in that panel, or Import / Update my shop – and the panel tells you when it was last synced.
- Fixed: “Update prices now” could write a price up to ten minutes old. Pressing it now always fetches today’s figures before writing anything.
- Fixed: a manual exchange rate could lose the currency pair it was typed for, which would let a stale rate be applied after a currency change.
- Fixed: when GamerHub’s account check is switched off, the buyer was still shown a green “account found” message for an ID nobody had looked at.
- Fixed: on shops running WooCommerce Product Add-ons (PPOM), that plugin discarded this one’s add-to-cart checks, so an order with no Player ID could reach the cart. GamerHub now has the final say.
- Fixed: a Player ID of nothing but spaces passed the “required” check.
- Fixed: on a landing page built with the [product_page] shortcode (or a theme’s quick view), the player fields appeared but the script driving them did not load, so the account-check button did nothing.
1.2.0
- Sell in your own currency. If your shop’s currency is not the one GamerHub charges you in, costs are now converted at a rate taken from your GamerHub account (or one you type), with an optional safety buffer and optional rounding. If no trustworthy rate is available the plugin refuses to write a price rather than guess, and rounding is always upward so it can never push a price below cost.
- See what you pay and what the buyer pays for every top-up amount, side by side and each labelled with its own currency, without adding anything to your shop – press Prices on any game.
- Set the profit for a game straight from the game list, including games you have not added yet: the value is remembered and applied the moment you add them.
- Give a hand-built or single-amount product its own profit %, instead of only the global default – so you can set a different margin without losing the automatic sold-out protection.
- The denomination picker on the product editor now shows what each amount costs you, in GamerHub’s currency and in yours, so you can price against real numbers.
- Plain-language rewrite of every admin screen, aimed at shop owners rather than developers, and every admin string is now translatable.
- Fixed: with a rounding step set, a price could jump a whole step because of a floating-point rounding artefact (for example 50.00 plus 10% became 60 instead of 55).
- Fixed: choosing “no conversion” and then saving the settings page again silently reset it to “Pause”, which stopped all imports and repricing with no explanation.
- Fixed: the per-game price refresh silently returned cached data instead of fetching fresh figures.
- Fixed: a bulk edit reported games as changed even when their prices could not be rewritten.
- Fixed: “Sync from GamerHub” on a fixed-price product showed a red error for what is normal, expected behaviour.
- Faster: the admin pages no longer run an unbounded product query on every screen, and the game list no longer runs one query per product.
1.1.0
- Per-product and per-denomination markup, set inline in GamerHub -> Products, with filters and bulk edit.
- Per-product auto-sync on/off switch, and new auto-sync intervals: every 1, 3, 6, 12 or 24 hours.
- Closed-loop stock: products that are inactive or out of stock upstream are marked out of stock automatically and restock on the next successful sync. Transient API errors never change stock.
- Works with PPOM / product add-ons: turn off the built-in fields and the plugin rebuilds fulfilment data from the order, matching each field by mapping, label or synonym – and blocks rather than guessing when unsure. A reference in Products shows each game’s required fields and dropdown values; fields can also be mapped explicitly per product or per variation.
- Add a single denomination as a standalone product (“Import as product”) that keeps tracking cost & stock.
- See live prices before importing: a Price column in GamerHub -> Products shows each game’s retail range, refreshed per game with a single click (no product created).
- Sync one product on demand: a “Sync from GamerHub” action on the WooCommerce Products list and a button on the product editor refresh just that product’s price & stock, without re-syncing the whole catalog.
- Built-in player fields now inherit your theme’s styling.
1.0.0
- Initial release: settings + connection test, batched catalog sync (variable products), player-ID fields, Verify ID, per-unit order placement, signed webhook receiver with replay protection, auto-sync, manual product linking.