Brazil's biggest MU Online portal — since 2003
Tutorial Intermediate Web

How to customize the cash shop checkout on your MU Online server

Customize your MU Online server's cash shop checkout flow: purchase steps, payment gateways, discount coupons, automatic item delivery, and fraud/chargeback prevention.

BR Bruno · Updated on Jul 31, 2026 · ⏱ 15 min read
Quick answer

The cash shop checkout is the point where a player's purchase intent actually turns into revenue for the server — and also the most technically sensitive point, since it involves real money, personal data, and automatic in-game item delivery. A confusing or slow checkout with too few payment methods

The cash shop checkout is the point where a player's purchase intent actually turns into revenue for the server — and also the most technically sensitive point, since it involves real money, personal data, and automatic in-game item delivery. A confusing or slow checkout with too few payment methods kills conversion; a poorly protected one opens the door to fraud and chargebacks. This tutorial walks through the complete checkout customization: purchase steps, gateway integration, coupons, automatic delivery, and the security layers every MU server admin should have.

Anatomy of a cash shop checkout flow

A well-structured checkout follows predictable steps: (1) the player picks the cash product/package, (2) confirms the destination account details (game login, not the site login), (3) chooses the payment method, (4) is redirected to or processes payment within the panel itself, (5) receives confirmation, and (6) the item/cash is automatically credited to the game account. Every step is a point where the player might give up — the less friction, the higher the conversion.

Prerequisites

  • A working WebEngine/shop connected to the game database (see the server setup tutorial).
  • An active account with at least one payment gateway (Mercado Pago, PagSeguro, Stripe, or similar) with API credentials.
  • A staging environment with the gateway's sandbox mode, to test without real transactions.
  • A clear refund and support policy for delivery error cases.

Step 1 — Simplify the product selection step

List the cash packages clearly: price in your local currency, amount of points/cash received, and any bonus for larger packages (e.g., "buy R$50 and get +10% bonus cash"). Avoid too many options — 4 to 6 well-scaled packages convert better than 15 options that confuse the buyer.

PackagePrice (R$)Cash receivedBonus
Starter101,000
Popular303,300+10%
Advantage606,900+15%
Premium12014,400+20%

The most critical step of the checkout is making sure cash gets credited to the right account. If the player is already logged into the panel with the same game account, default to using that account automatically (no free-text field, which is a common source of typos and support tickets). If the panel allows multiple linked characters/accounts, require an explicit confirmation (dropdown with the exact login) before proceeding.

Step 3 — Choose and integrate payment methods

For a Brazilian audience, the recommended priority order is:

MethodConfirmation speedConversion rateNote
PixNearly instantHighEnables almost immediate automatic delivery
Credit cardInstant to a few minutesHighHigher chargeback risk, requires antifraud
Bank slip (boleto)1 to 3 business daysMedium-lowGood as a secondary option, not primary

Integrate via the chosen gateway's official SDK/API, never processing card data directly on your own servers (always use the gateway's transparent checkout or redirect flow, which already meets PCI security requirements).

Step 4 — Implement controlled discount coupons

Coupons help conversion when used in moderation. Define clear rules before launching:

  • Expiration: always with an expiration date, never a permanent coupon.
  • Usage limit: per coupon (e.g., 500 uses) and per account (e.g., 1 use per player).
  • Scope: applicable to all packages or to a specific one only.
  • Stacking: explicitly decide whether coupons can be combined with large-package bonuses or not.
CREATE TABLE shop_coupons (
    code VARCHAR(30) PRIMARY KEY,
    discount_percentage INT NOT NULL,
    expiration DATETIME NOT NULL,
    max_uses INT NOT NULL,
    current_uses INT NOT NULL DEFAULT 0
);

Step 5 — Configure payment confirmation via webhook

Never credit cash based solely on the browser redirect after payment — that flow can be interrupted or manipulated. Correct crediting happens via webhook: the gateway calls a URL on your WebEngine confirming payment server-to-server, and only then is the cash credited.

public function paymentWebhook() {
    $payload = file_get_contents('php://input');
    $signature = $this->input->get_request_header('X-Signature');

    if (!$this->validateSignature($payload, $signature)) {
        http_response_code(401);
        return; // reject unauthenticated calls
    }

    $data = json_decode($payload, true);
    if ($data['status'] === 'approved') {
        $this->CashModel->credit($data['account_id'], $data['cash_amount']);
        $this->LogModel->record($data['transaction_id'], $data);
    }
}

Validating the webhook's signature/token is mandatory — without it, any forged request could credit cash with no real payment behind it.

Step 6 — Automatic delivery and confirmation to the player

After crediting, show a clear confirmation in the panel ("Cash credited successfully: 3,300 points") and, if possible, also send in-game mail or a notification. This reduces support tickets from players unsure whether the purchase "actually worked."

Step 7 — Fraud and chargeback prevention

Recommended layers, from simplest to most robust:

LayerWhat it doesImplementation cost
Gateway's built-in antifraudAutomatic risk score per transactionLow (already included in most gateways)
Purchase cap for new accountsReduces exposure to fraud on recently created accountsLow
Minimal data requirement (CPF, etc.)Increases traceability in disputesLow-medium
Detailed per-transaction logEvidence to contest chargebacksLow
Manual review for high amountsHuman intervention before releasing large purchasesMedium (requires a team)

Step 8 — Error page and payment support

Explicitly handle failure cases: declined payment, gateway timeout, webhook not received. Offer a visible support channel right on the error screen ("Payment not confirmed? Reach us on Discord/ticket") instead of leaving the player without knowing what to do.

Step 9 — Test the full flow in sandbox mode

  1. Set up the chosen gateway's sandbox/test mode.
  2. Simulate a complete purchase: package selection, coupon application, sandbox payment, webhook receipt, and crediting in the test database.
  3. Simulate a failed payment and confirm no cash is credited.
  4. Simulate a duplicate webhook (resend) and confirm the system doesn't credit cash twice (idempotency).
  5. Only then migrate credentials to the gateway's production environment.

Common errors and fixes

SymptomLikely causeFix
Cash credited to the wrong accountManually typed login field with a typoAuto-link to the logged-in account, avoid free-text entry
Cash credited twiceWebhook resent without an idempotency checkRecord the transaction ID and reject reprocessing of the same ID
Payment approved but cash never arrivesWebhook not configured or URL unreachableVerify the public webhook URL and test with the gateway's simulator
Coupon used beyond its configured limitMissing lock on current_uses in the databaseImplement an atomic check-and-increment on the usage counter
Chargeback with no evidence to contestMissing detailed per-transaction logRecord all relevant data (IP, account, amount, gateway response) per purchase

Checkout launch checklist

  • Cash packages defined clearly, without excessive options.
  • Purchase automatically linked to the correct game account.
  • At least Pix and credit card integrated via the gateway's official SDK/API.
  • Coupons with expiration, usage limit, and scope defined.
  • Cash crediting done exclusively via a validated webhook (never just the browser redirect).
  • Antifraud layers and detailed per-transaction logging implemented.
  • Tested in sandbox mode, including payment failure and duplicate webhook.
  • Visible support channel for payment error cases.

With the checkout customized, tested, and protected against fraud, the natural next step is connecting the shop to bigger retention strategies — like seasonal coupons tied to in-game events — as part of the overall vision described in the MU Online server setup tutorial.

Frequently asked questions

Which payment gateways are most used in MU server shops in Brazil?

Pix (for its speed and adoption in Brazil), credit card via gateways like Mercado Pago, PagSeguro, or Stripe, and to a lesser extent bank slip (boleto). Pix has become the preferred method because it confirms almost instantly, enabling automatic item delivery with no wait.

How do I automatically deliver the item after payment is confirmed?

Via the payment gateway's webhook: when the gateway confirms payment, it calls a URL on your WebEngine that credits the item/cash directly to the player's account in the database. Validating the webhook's signature/token is essential to make sure the call really came from the gateway and not from a malicious third party.

Is it worth accepting bank slip (boleto) in the cash shop?

It depends on your audience. Boleto has a lower conversion rate (the buyer can give up between generating and paying it) and slower confirmation (1-3 business days), but it still serves people without a card or who don't use Pix. Many servers offer it as a secondary option, prioritizing Pix and card.

How do I prevent fraud and chargebacks in the cash shop?

Use a gateway with built-in antifraud, require minimal identification data (name, email, CPF where applicable), cap purchase amounts for very new accounts, and keep a detailed log of every transaction linked to the game account for dispute investigation.

Do discount coupons reduce revenue or help sell more?

Used in moderation, they help: first-purchase coupons or coupons for specific dates (server anniversary, events) boost conversion among undecided buyers. Coupons used without control (no usage cap, no expiration) erode margin and devalue the shop's perceived pricing.

BR
Events, maps & items editor

Bruno specializes in MU Online events, maps, bosses and item economy. He documents every detail based on real gameplay.

Keep reading

Related articles