Payment Gateway Configuration (Web)
Starting with version 3.0.3, users can buy coins on the website with an online payment gateway. Elite Quiz supports three gateways:
| Gateway | Best for | Default currency |
|---|---|---|
| Stripe | Cards and mobile wallets worldwide | USD |
| Razorpay | UPI, cards, NetBanking and wallets in India | INR |
| Flutterwave | Cards, mobile money and bank transfers in Africa | NGN |
Payment gateways are used only by the website. The Android and iOS apps sell coins through Google Play and App Store In-App Purchases instead. To set those up, see In-App Purchase Configuration and Configure In-App Purchases.
- Your Admin Panel is live on a public HTTPS domain (the gateway must be able to reach it to send webhooks).
- Your website is deployed and you know its URL (see Deploy the Website).
- An account with the gateway you want to use: Stripe, Razorpay or Flutterwave.
How a Web Payment Works
┌──────────┐ 1. Buy coins ┌──────────────┐ 2. Create checkout ┌──── ──────────┐
│ Website │ ──────────────► │ Admin Panel │ ───────────────────► │ Gateway │
│ (user) │ │ (API) │ │ (Stripe / │
└──────────┘ └──────────────┘ │ Razorpay / │
▲ ▲ │ Flutterwave) │
│ │ 4. Webhook: payment result └──────────────┘
│ └────────────────────────────────────┤
│ 5. Redirect back to <Frontend URL>/profile/coins-store │
└───────────────────────────────────────────────────────────────────┘
3. User pays on the gateway's checkout page
- The user picks a coin package on the website.
- The Admin Panel creates a checkout with the active gateway.
- The user pays on the gateway's secure checkout page.
- The gateway sends a webhook to the Admin Panel. Coins are added to the user's account only after this webhook confirms the payment.
- The gateway redirects the user back to your website's coin store, using the Frontend URL.
Follow the steps below in order.
Step 1: Set the Frontend URL
The gateway needs to know where to send users after they pay or cancel. Elite Quiz builds that return address from the Frontend URL setting, so set it before you configure any gateway.
- Go to Admin Panel > General Management > Settings > System Configurations.
- Enter your website's address in Frontend URL, for example
https://your-website.com.- Use the full address with
https://. - Do not add a trailing slash (
/) or any path.
- Use the full address with
- Click Save Changes.

After payment, users are sent to:
- Success:
https://your-website.com/profile/coins-store?status=success&route=coin-purchase&package_id=… - Cancel:
https://your-website.com/profile/coins-store?status=cancel&route=coin-purchase&package_id=…
If Frontend URL is empty, users will not return to your website after paying. They land on a basic page on the Admin Panel domain instead. If you change your website's domain later, update this field too.
Step 2: Open Payment Gateway Settings
Go to Admin Panel > General Management > Settings > Payment Gateway Settings.

The page has one section for each gateway. Each section has:
| Field | What it does |
|---|---|
| Enable | Turns the gateway on for the website. |
| Sandbox / Test Mode | On: use the gateway's test environment (no real money). Off: live payments. Must match the keys you paste in. |
| Currency | The 3-letter ISO currency code charged to users (e.g. USD, INR, NGN). Must be supported by your account. |
| API keys | The keys from your gateway dashboard. They differ per gateway (see below). |
| Webhook URL | Read-only. Click the copy icon and paste it into the gateway dashboard. |
| Webhook Secret | The signing secret that proves a webhook really came from the gateway. |
Only one gateway can be active. Turning one on automatically turns the others off.
Now set up the gateway you want to use.
Step 3a: Stripe

Get the API keys
- Sign in to the Stripe Dashboard.
- Use the Test mode switch to choose test or live keys. It must match the Sandbox / Test Mode toggle in the Admin Panel.
- Go to Developers > API keys.
- Copy the Publishable key (
pk_test_…/pk_live_…) into Publishable Key. - Reveal and copy the Secret key (
sk_test_…/sk_live_…) into Secret Key.
Add the webhook
- In the Admin Panel, copy the Webhook URL (
https://your-admin-domain.com/api/webhook/stripe). - In Stripe, go to Developers > Webhooks and click Add endpoint (or Add destination).
- Paste the Webhook URL as the Endpoint URL.
- Select these events:
checkout.session.completedcheckout.session.async_payment_succeededcheckout.session.async_payment_failedcheckout.session.expiredpayment_intent.succeeded
- Save the endpoint, then click Reveal under Signing secret and copy it (
whsec_…). - Paste it into Webhook Secret in the Admin Panel.
Finish
Set the Currency (e.g. USD), turn on Enable Stripe, and click Save Changes.
Step 3b: Razorpay

Get the API keys
- Sign in to the Razorpay Dashboard.
- Pick Test Mode or Live Mode from the mode switch. It must match the Sandbox / Test Mode toggle in the Admin Panel.
- Go to Account & Settings > API Keys and click Generate Key.
- Copy the Key ID (
rzp_test_…/rzp_live_…) into Key ID. - Copy the Key Secret into Key Secret. Razorpay shows it only once, so keep a copy somewhere safe.
Add the webhook
- In the Admin Panel, copy the Webhook URL (
https://your-admin-domain.com/api/webhook/razorpay). - In Razorpay, go to Account & Settings > Webhooks and click Add New Webhook.
- Paste the Webhook URL.
- Enter a Secret of your choice (a long random string) and note it down.
- Select these active events:
payment.capturedpayment.failedorder.paidpayment_link.paidpayment_link.cancelledpayment_link.expired
- Click Create Webhook.
- Paste the same secret into Webhook Secret in the Admin Panel.
Finish
Set the Currency (e.g. INR), turn on Enable Razorpay, and click Save Changes.
Step 3c: Flutterwave

Get the API keys
- Sign in to the Flutterwave Dashboard.
- Switch between Test mode and Live mode. It must match the Sandbox / Test Mode toggle in the Admin Panel.
- Go to Settings > API Keys.
- Copy the Public Key (
FLWPUBK…) into Public Key. - Copy the Secret Key (
FLWSECK…) into Secret Key. - Copy the Encryption Key into Encryption Key.
Add the webhook
- In the Admin Panel, copy the Webhook URL (
https://your-admin-domain.com/api/webhook/flutterwave). - In Flutterwave, go to Settings > Webhooks.
- Paste the Webhook URL into URL.
- Enter a Secret hash of your choice (a long random string).
- Enable the option to receive webhooks for successful and failed charges, then click Save.
- Paste the same secret hash into Webhook Secret in the Admin Panel.
Finish
Set the Currency (e.g. NGN), turn on Enable Flutterwave, and click Save Changes.
Step 4: Create Web Coin Packages
Only packages marked for the web, with a price, can be bought through a payment gateway.
- Go to Admin Panel > General Management > Settings > Coin Package Settings.
- Create or edit a package and set Package Type to:
- Web: sold on the website only.
- Both: sold on the website and in the apps.
- In-App packages are sold only in the apps and cannot be bought through a gateway.
- Enter the Price. It is charged in the Currency of the active gateway, so set prices that make sense for that currency.
- Save the package.
If you switch to a gateway with a different currency, review your web package prices. The numbers are not converted automatically.
Step 5: Test a Payment
- Keep Sandbox / Test Mode on and use your gateway's test keys.
- Open your website, sign in, and go to the coin store.
- Buy a web coin package using a test card from your gateway:
- Check that you are sent back to your website's coin store and that the coins appear in your balance.
- In the gateway dashboard, open the webhook delivery log and confirm the event was delivered with a
200response.
When everything works, switch to live mode:
- Activate your account for live payments in the gateway dashboard.
- Replace the test keys with live keys.
- Add the webhook again in live mode (test and live webhooks are separate in Stripe and Razorpay) and update Webhook Secret.
- Turn Sandbox / Test Mode off and click Save Changes.
Troubleshooting
The user paid, but no coins were added
Coins are added only when the webhook arrives and passes verification.
- Check that the webhook URL in the gateway dashboard exactly matches the Webhook URL shown in the Admin Panel.
- Check that Webhook Secret matches the secret in the gateway dashboard. Stripe's signing secret changes when you create a new endpoint.
- Make sure the required events are selected (see each gateway's section above).
- Make sure your Admin Panel is reachable over public HTTPS and not blocked by a firewall or maintenance mode.
- Check the webhook delivery log in the gateway dashboard for errors.
After paying, the user lands on the wrong page
Check Frontend URL in System Configurations. It must be your website's address with https:// and no trailing slash. See Step 1.
A coin package cannot be bought on the website
Make sure one gateway is enabled and that the package has Package Type set to Web or Both with a Price above zero. See Step 4.
Checkout fails with a currency or authentication error
- The Currency must be supported by your gateway account.
- The keys must match the mode: test keys with Sandbox / Test Mode on, live keys with it off.
- Copy keys again without leading or trailing spaces.