Skip to content

๐Ÿ’ณ Payment Settings

Payment settings allow you to configure the payment gateways that your application supports. Users use these gateways to purchase coins and diamonds within the app, which they then use to send gifts, access premium features, and more.

How to Access

Settings โ† Payment

โš™๏ธ Open Payment Settings


Supported Payment Gateways

The system supports the following payment gateways. Each gateway can be independently activated or deactivated:

1. Stripe

Stripe is a global payment platform that supports credit/debit cards and various payment methods across most countries.

Field Description Required
Secret Test Key Your Stripe secret key (starts with sk_test_ for testing or sk_live_ for production) โœ… Yes
Success URL The URL users are redirected to after a successful payment โœ… Yes
Cancel URL The URL users are redirected to if they cancel the payment โœ… Yes
Currency The currency for transactions (e.g., usd, eur, sar) โœ… Yes
Webhook Secret Key The webhook signing secret from Stripe (starts with whsec_) for verifying webhook events โœ… Yes
Webhook URL Your server endpoint that receives Stripe payment events: BASE_URL/api/stripe-callback โœ… Yes

How to Get Stripe Credentials

  1. Go to https://dashboard.stripe.com and create an account or log in.
  2. Navigate to Developers โ†’ API Keys to find your Secret Key.
  3. Navigate to Developers โ†’ Webhooks to set up your webhook endpoint and get the Webhook Secret Key.
  4. Use test keys (sk_test_...) during development and switch to live keys (sk_live_...) for production.

2. Fawry

Fawry is a popular payment gateway in Egypt and the Middle East, supporting various local payment methods including Fawry reference numbers, credit cards, and mobile wallets.

Field Description Required
Server Secret Your Fawry server secret key for authenticating API requests โœ… Yes
Merchant Code Your unique merchant identifier provided by Fawry โœ… Yes
URL The Fawry API endpoint for initiating payments (e.g., https://atfawry.fawrypay.com/fawrypay-api/api/payments/init) โœ… Yes
Return URL The URL users are redirected to after payment completion: BASE_URL/api/utd-fawry-callback โœ… Yes
Webhook URL Your server endpoint for Fawry payment notifications: BASE_URL/api/fawry-callback โœ… Yes

How to Get Fawry Credentials

  1. Sign up for a Fawry merchant account at https://atfawry.fawrypay.com.
  2. Once approved, you will receive your Merchant Code and Server Secret.
  3. Use the staging URL for testing and the production URL for live payments.

Activating a Payment Gateway

  1. Go to the Payment tab in Settings.
  2. Find the payment gateway you want to activate.
  3. Toggle the switch to ON (green) to activate it.
  4. Fill in all the required credentials and URLs for the gateway.
  5. Click "Save" to apply the configuration.

Payment Settings


Deactivating a Payment Gateway

  1. Toggle the switch to OFF for the gateway you want to disable.
  2. Click "Save".

Warning

Deactivating a payment gateway will immediately prevent users from making payments through that gateway. Make sure at least one gateway remains active.


Testing After Configuration

After configuring a payment gateway, it is recommended to:

  1. Make a small test payment through the app to verify the gateway works correctly.
  2. Check that the payment appears in your gateway's dashboard (Stripe Dashboard or Fawry Dashboard).
  3. Verify that coins/diamonds are correctly credited to the test user's account.
  4. Check the webhook endpoint is receiving payment confirmations.

Tips

  • Always use test/staging credentials during initial setup, then switch to production credentials when ready to go live.
  • Keep your secret keys and webhook secrets confidential โ€” never share them publicly.
  • Ensure your webhook URLs are accessible from the internet (not behind a firewall or VPN).
  • Monitor your payment gateway dashboards regularly to track transactions and detect any issues.

Next Step

๐Ÿ”” Configure Pusher Settings