Skip to main content
Who should use this guideThis guide is for merchants who:
  • Use Payrails as a payment orchestrator
  • Use Moyasar for card and wallet processing in Saudi Arabia
  • Have an active Moyasar account

Create a Moyasar integration in Payrails

  1. Log in to the Payrails portal.
  2. Go to Settings → Integrations.
  3. Select New integration.

Step 1: choose the provider

  • Search for Moyasar and select it.
  • Select Next step.
A screenshot showing Moyasar selected as the provider.

Step 2: enter the basic information

The integration type is Payment.
An integration instance is a specific payment provider setup in Payrails. Create multiple instances for different regions, currencies, or business needs. Choose a clear, consistent name, because Payrails uses it in routing.
In Payrails
  • Enter an Integration name, for example merchant_moyasar.
  • Select the workspaces where this integration should be available.
  • Select Next step.
A screenshot showing the integration instance name field.
About workspacesWorkspaces determine where this integration is available. They let you isolate provider setups by region or business line, or share the same configuration across multiple workspaces.

Step 3: enter the account information

What you’ll need from MoyasarBefore you begin, collect these from your Moyasar dashboard:
  • Your secret API key, from Settings → API Keys. Refer to the Moyasar guide to get your API keys.
  • A secret token for the Payrails webhook. You choose it when you create the webhook in Webhooks or notifications.

Credentials

In Payrails The key prefix sets the mode: sk_test_ for test mode and sk_live_ for live mode. A screenshot showing the Moyasar credentials and payment method fields.

Payment methods

In Payrails
  • Select Card, Apple Pay, Google Pay, or any combination.
For Apple Pay, also complete the Apple Pay setup in Payrails.

Webhooks or notifications

Moyasar sends payment events to a webhook. Create one that points to Payrails. The Webhook card on this step shows the notification URL. Copy it before you enable the integration. A screenshot showing the Webhook card that holds the Moyasar notification URL. In Moyasar
  1. In your Moyasar dashboard, go to Settings → Webhooks.
  2. Create a webhook with the notification URL from Payrails, a secret token of your choice, and the payment events.
  3. Select these events: payment_paid, payment_authorized, payment_failed, payment_captured, payment_refunded and payment_voided.
In Payrails
  • Enter the same secret token in Webhook Secret Token.
Moyasar sends a webhook_verification event to confirm the URL, and Payrails verifies the webhook with your secret key straight away. If you select Verify on the webhook in the Moyasar dashboard and Moyasar asks for a one-time code, you don’t need to enter it. Refresh the page and the webhook shows as verified.

Request fields for Moyasar

Send these fields in the authorize request for card payments, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to Moyasar when you include them. For more about meta fields, refer to Meta fields.

Enable the integration

In Payrails
  • Select Enable integration.
  • Confirm the integration shows as Enabled.
  • Add the payment method as a payment option in your workflow. For the steps, refer to Set up payment methods.
Your Moyasar integration is now ready to process payments.

Next steps

  1. Run a test payment using a Moyasar test card.
  2. Verify that:
    • The payment appears in the Moyasar dashboard.
    • The payment status updates correctly in Payrails.
  3. Once verified in test mode, repeat the setup with your live key.
→ Continue to test a payment.
Last modified on November 17, 2026