Skip to main content
You can add MB Way to your existing integration. The following instructions show only what you must add to your integration specifically for MB Way. If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide. The additions you must make depends on the server-side flow that your integration uses:

Sessions flow Component

Before-You-Begin

Requirements

Add-Parameters-Sessions-Request

Add additional parameters to your /sessions request

When you create a payment session, add the following parameters: Example /sessions request

Import

Import MB Way

When you import Adyen Web, include MBWay. Import

Add-Configuration

Add additional configuration for MB Way

You do not need to add any configuration parameters for MB Way.

Initialize

Initialize the Component for MB Way

To initialize MB Way, use the MBWay class. Initialize the Component

Test and go live

To test your MB Way integration, you can use any telephone number; for example +351234567890. You can check the status of MB Way test payments in your Customer Area > Transactions > Payments. Before you can accept live MB Way payments, add MB Way in your live Customer Area.

Trigger a resultCode

To trigger a specific resultCode value, append a code to the shopperStatement value in your /payments request: For example, to receive resultCode: Refused, include the following in your /payments request:
"shopperStatement": "MBWay shopper statement-c5"

Advanced flow Component

Requirements

Import

Import MB Way

When you import Adyen Web, include MBWay. Import

Initialize

Initialize the Component for MB Way

To initialize MB Way, use the MBWay class. Initialize the Component

Add-Parameters-Payments-Request

Add additional parameters to your /payments request

When you make a payment, add the following parameters to the /payments request: Example payment request for MB Way
The /payments response contains:
  • resultCode: Pending (The shopper must complete the payment in their MB Way app.)
  • action: Use this object to display the waiting screen while the shopper completes the payment in their MB Way app.
Example payment response for MB Way

App2app

Enable App2App switch

To provide shoppers with a seamless experience on mobile devices, you can implement the App2App flow. This removes the need for the shopper to manually enter their phone number and links them directly to the MB WAY app.

Step 1: Send a payment request

When making a /payments request, include:
  • channel - the shopper’s platform, either iOS or Android. If the channel parameter is missing or set to Web, the standard flow (requiring a phone number) will apply.
  • returnUrl - the URL to where the shopper will be redirected after authorizing the payment in the MB WAY app.
/payments request

Step 2: Handle the response

If the request is successful, you will receive an action object in the response.
  • The action.url will contain the MB WAY deep link (mbway://…).
  • The returnUrl you provided in the request is automatically appended to this deep link.
/payments response

Step 3: Redirect the shopper

Use the URL provided in the action object to redirect the shopper.
  • When the user authorizes the transaction in the MB WAY app, they are automatically redirected back to your application via the returnUrl.

Test and go live

To test your MB Way integration, you can use any telephone number; for example +351234567890. You can check the status of MB Way test payments in your Customer Area > Transactions > Payments. Before you can accept live MB Way payments, add MB Way in your live Customer Area.

Trigger a resultCode

To trigger a specific resultCode value, append a code to the shopperStatement value in your /payments request: For example, to receive resultCode: Refused, include the following in your /payments request:
"shopperStatement": "MBWay shopper statement-c5"