Who should use this guideThis guide is intended for merchants who:
- Use Payrails as a payment orchestrator
- Use Mastercard Payment Gateway Services (MPGS) through your acquirer for card and Apple Pay processing
- Have an MPGS merchant account with API access
Create a Mastercard Payment Gateway Services integration in Payrails
- Log in to the Payrails portal.
- Go to Settings → Integrations.
- Select Add instance to create a new integration configuration.
- Select the workspaces where this integration should be available.
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 1: Choose the integration type
- Select Payment.
- Continue to the next step.
Step 2: Choose the provider
- Select Mastercard Payment Gateway Services.
- Continue to the next step.

Step 3: Configure your Mastercard Payment Gateway Services integration
Integration instance name
An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for different regions, currencies, or business needs. Choose a clear, consistent name, as it is used in routing.In Payrails
- Enter an Instance name for your integration, for example
merchant_mpgs.

Account details
In Payrails
Payment methods
In Payrails- Select Card, Apple Pay or both.

Credentials
In MPGS- In Merchant Administration, copy the API password for your integration and the notification secret.

Webhooks or notifications
Payrails sends its notification URL to MPGS with every payment, so you don’t need to set one up in the MPGS dashboard. Payrails verifies each notification with your notification secret.Request fields for Mastercard Payment Gateway Services
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 Mastercard Payment Gateway Services when you include them. For more about meta fields, refer to Meta fields.Enable the integration
In Payrails- Select Save account to enable the integration.
- Confirm the integration shows as Enabled.
Next steps
- Run a test payment using an MPGS test card on your test host.
- Verify that:
- The payment appears in MPGS Merchant Administration.
- The payment status updates correctly in Payrails.
- Once verified in test mode, repeat the setup with your live host.