Most people searching for a raffle script are about two weeks from buying one. They have a prize in mind, a rough idea of their market, and a hosting account. What they don't have is a list of what to check before they pay. This guide is that list. We build RaffKing, so we'll use it for concrete examples, and we'll say plainly where it stops.
Running raffles or lotteries for money is regulated almost everywhere. You, the operator, are responsible for the licence or permission your country requires. Nothing in this article is legal advice: check with a local lawyer before you launch, and never market a paid-entry draw to anyone under 18.
What a raffle script actually has to do
Strip away the landing page and a raffle platform does five jobs. If a script is weak at any one of them, you'll be patching it by hand every week.
- Take money in. Customers need a way to pay in their own currency with a method they trust.
- Sell tickets against a fixed pool. A ticket count, a price, a sale window, and no way to oversell when two people buy the last ticket at the same moment.
- Draw winners. At a set time, in a way you can explain to a customer who asks.
- Pay out. Credit cash-style prizes and get physical prizes to an address.
- Leave a record. Every ticket, every draw and every admin change, so you can answer a complaint or a regulator.
Here's how RaffKing handles each, so you have something concrete to compare other scripts against.
Money in. Customers top up a wallet and buy tickets with that balance. You set what one wallet unit is worth and what it's called ("coins", "credits", "points"). The wallet is topped up through any of the 11 payment gateways built into every edition (Stripe, PayPal, Razorpay, PayU, 2Checkout, Authorize.net, Checkout.com, Mollie, GoCardless, Cashfree and Instamojo). There's also a manual gateway builder for bank transfer or local QR payments that you approve by hand.
Tickets. Under Lottery › All Lotteries → New lottery you choose Pick numbers (customers choose 1 to 10 numbers from 1 to 49) or Raffle. You then set the ticket price, how many tickets are on sale, and the start and draw times. Purchases run inside a database transaction against a unique ticket index, so two buyers can't end up holding the same ticket.
Draws. Draws are automatic, and on a new store they're verified draws (see draw integrity below). If you switch Verified draws off, you can also choose a manual draw. Automatic draws are run by a scheduled job every minute once the draw time passes, so cron has to be set up on your server. Prizes are attached to ranges of matched numbers, and ranges can't overlap, so every ticket maps to at most one prize.
Payouts. A coin prize lands in the winner's wallet automatically. An item prize waits in the winner's My winnings until they claim it with a delivery address. RaffKing doesn't include cash withdrawals: if your model needs winners to cash coins out, that's the separate Withdrawals add-on, available from Add-ons in your admin panel.
Records. Every ticket sold is listed under Lottery › Tickets, winners under Lottery › Winners, and both export to CSV. Every coin movement is in Transactions, including your own manual adjustments, which also go into the admin log.
Self-hosted script, WordPress plugin or SaaS?
There are three ways to get a raffle site live, and they suit different people.
| Self-hosted script | WordPress raffle plugin | SaaS raffle platform | |
|---|---|---|---|
| What you pay | One-time licence plus hosting | Plugin licence plus your WordPress hosting | Monthly fee, often plus a cut per ticket |
| Who holds the data | You, on your server | You, on your server | The vendor |
| Draw logic you can read | Yes, it's PHP on your server | Yes | Usually not |
| Server work | You (or your host) run PHP, MySQL and cron | Same, plus WordPress updates | None |
| Compliance tooling | What the script ships; the rest is yours | Varies widely | Often the strongest, for the markets they serve |
If you already run a WooCommerce store and want a raffle as a side promotion, a plugin is the shortest path. If you want a raffle business with its own brand and you're comfortable with a basic Linux host, a self-hosted script costs far less over time. If you'd rather never touch a server and your market is one a SaaS vendor already supports, pay for SaaS. We compare the costs in more detail in self-hosted vs SaaS; the reasoning carries straight over to raffles.
Draw integrity: how winners are picked, and how you'd prove it
This is the question customers ask after they lose, so get the answer straight before you buy anything. Ask any vendor exactly how a draw produces its result. "It's random" is not an answer.
In RaffKing, Verified draws are on for a new store (Plugins › Lottery). When a draw is made, a secret seed is generated and only its fingerprint is shown. After the draw closes, the result comes from three things fixed by then: the seed, the list of tickets that could win, and the first round of public randomness from drand (the League of Entropy) published after the close. Nobody, the store included, can choose or foresee it. The seed is shown after the draw, and each draw's Verify page recalculates the result in the customer's own browser. If drand can't be reached, the draw waits; it's never drawn another way, and after the hours you set you can only void it and refund every ticket.
With Verified draws on, manual draws and editing winning numbers are off. If you switch Verified draws off, automatic draws use PHP's random_int() at the draw time, and a manual draw becomes available: you enter the winning numbers yourself under Lottery › Winners. Until the draw time you can change them, and customers don't see them. Every change goes into the admin log with the old and new values. After the draw time, with numbers saved, they're final. Manual mode exists so you can take the result from an outside source: a live draw on camera, an independent adjudicator, or a certified random number service, if your regulator asks for one.
Whichever script you choose, make three things a habit:
- Publish the winning numbers and the number of tickets sold for every draw.
- Keep the admin log; never share admin accounts.
- Write your draw method into your terms, in plain language, before the first ticket is sold.
Payments: which gateways you need for your market
Gateways are where raffle sites most often stall. The gateway exists, but the payment company won't approve your business. Many processors restrict lotteries and games of chance in their terms. Read your chosen processor's acceptable-use policy before you build around it, and expect to explain your licence.
Practically:
- Check the processor first, the script second. A script listing 40 gateways is no use if none of them will onboard you. Find the one or two processors that accept your business model in your country, then confirm the script supports them.
- Have a manual fallback. Bank transfer or a local QR method you approve by hand keeps you trading while a gateway application is pending. In RaffKing that's the manual gateway builder.
- Separate top-ups from tickets. Because tickets are paid from the wallet, a declined card never leaves a half-sold ticket behind, and refunds are wallet adjustments rather than gateway disputes.
Beyond the 11 bundled gateways, more are sold as add-ons from Add-ons in your admin panel (Flutterwave, Paystack, Mercado Pago, M-Pesa and others), so check the regional one you need is on the list before you buy.
Admin work after launch
The day-to-day is what decides whether you keep running the site. Before buying, ask to see the admin for these jobs, or open the demo and try them yourself:
- Slow sales. What happens when a draw time arrives and only a third of tickets are sold? RaffKing can move the draw back by itself: if too few tickets have sold, it adds N hours, up to M times, then either draws with the tickets sold or waits for you to draw by hand. Verified draws, the default on a new store, never move: they close on time. Without something like this you'll be editing draw times at midnight.
- Locked settings. Once tickets are sold, RaffKing locks the type and ticket settings. Once winners are declared, it locks the times, draw method and prizes. That's what you want: nobody, including you, can quietly change the terms of a draw people have paid into.
- Cancelling a draw. An open draw's edit page has Cancel draw with full refunds. Every ticket is refunded to its buyer's wallet, once, and the draw ends cancelled with no winner. It asks first and is logged. Once a draw has closed, it can't be cancelled this way.
- Problem accounts. Fraud prevention is included: VPN and proxy blocking, device and multi-account limits, and a fraud-events log. Banned accounts are left out of draws.
- Age. When the lottery feature is on, the minimum age at sign-up is 18, and you can raise it (to 21, say) but not lower it. Identity checks (KYC) aren't built in.
The legal part is yours
No script makes a raffle legal. Whether you need a licence, whether a free entry route is required, which prizes are allowed, and whether you can take payment online at all depend on where you and your customers are. The rules change. A few official starting points:
- United Kingdom: Gambling Commission
- United Arab Emirates: General Commercial Gaming Regulatory Authority (GCGRA)
- Philippines: PAGCOR
In India, the Promotion and Regulation of Online Gaming Act, 2025 bans online money games, so a paid online raffle there is a non-starter without specific legal advice. For anywhere else, check with a local lawyer. Our longer online lottery business guide covers what to ask them.
Checklist before you buy a raffle script
- You've confirmed with a lawyer what you need to operate where your customers are.
- At least one payment processor has agreed, in principle, to work with your business.
- The script supports that processor, or a manual payment method you can approve.
- The vendor can tell you exactly how a draw produces its result.
- Ticket and draw settings lock once money is taken.
- There's a record of every ticket, draw and admin change, exportable to CSV.
- You've seen how it handles slow sales and cancelled draws.
- You can read the source. Know what the script talks to outside your server: RaffKing, for example, contacts our licence and update server, and that's documented.
- Your host runs PHP 8.2+ with MySQL or MariaDB, and you can set up cron.
Common questions
Can I run a free raffle with no payment?
Yes. Set the ticket price to 0 and it's a free draw. RaffKing doesn't run free and paid entries side by side in the same draw, though, so if your market requires a free entry route alongside paid tickets, you'd need to handle those entries outside the software.
How many tickets can one draw have?
You set the number on sale per draw. The purchase code is built to stay correct when sales run into the hundreds of thousands. In practice your hosting and your payment processor's limits matter more than the script.
Is RaffKing provably fair?
Its draws can be checked by anyone. With Verified draws on, the default for a new store, each draw is committed to a secret seed when it's made, and its result comes from that seed and public randomness published after it closes. Each draw's Verify page recalculates the result. See the draw integrity section above.
Do I need a developer to install it?
Not usually. The browser installer checks your server, sets up the database and creates your admin account. You need a domain or subdomain (it doesn't install into a subfolder), PHP 8.2+, and cron access. Our raffle launch guide walks through the setup in order.