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
- Log in to the Payrails portal.
- Go to Settings → Integrations.
- Select New integration.
Step 1: choose the provider
- Search for Moyasar and select it.
- Select Next step.

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.

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
Credentials
In Payrails
The key prefix sets the mode:
sk_test_ for test mode and sk_live_ for live mode.

Payment methods
In Payrails- Select Card, Apple Pay, Google Pay, or any combination.
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.
- In your Moyasar dashboard, go to Settings → Webhooks.
- Create a webhook with the notification URL from Payrails, a secret token of your choice, and the payment events.
- Select these events:
payment_paid,payment_authorized,payment_failed,payment_captured,payment_refundedandpayment_voided.
- Enter the same secret token in Webhook Secret Token.
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.
Next steps
- Run a test payment using a Moyasar test card.
- Verify that:
- The payment appears in the Moyasar dashboard.
- The payment status updates correctly in Payrails.
- Once verified in test mode, repeat the setup with your live key.