Payment-method icon

MB WAY Component

Add MB WAY to an existing Components integration

This page explains how to add MB WAY to your existing Component integration.

Requirements

Select the server-side flow that your integration uses:

Requirement Description
Integration type Make sure that you have built a Sessions flow Component integration.
Setup steps Before you begin, add MB WAY in your Customer Area.

Import resources for v6

If you are using Web Components v6, import the Component that you need for MB WAY:

Copy code
import { AdyenCheckout, MBWay } from '@adyen/adyen-web'

MB WAY is supported as of Component version 3.7.0. For more information, refer to Release notes.

API reference

Include fields for the endpoint you integrated:

For a full list of optional fields that you can send for all payment methods, see /sessions.

/sessions request
Expand view
Copy link to code block
Copy code
Copy code
curl https://checkout-test.adyen.com/v70/sessions \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_ORDER_REFERENCE",
"amount": {
"currency": "EUR",
"value": 1000
},
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
"shopperStatement": "MB WAY shopper statement"
}'

Component configuration

Step 1: Create a DOM element

Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:

Copy code
 <div id="mbway-container"></div>

Step 2: Create an instance of the Component

v6.0.0 or later

Create an instance of the Component, passing:

  • Your instance of AdyenCheckout.
Copy code
const  = new MBWay(checkout).mount('#mbway-container');

Use the create method of your AdyenCheckout instance, in this case checkout, to create the Component:

Copy code
const Component = checkout.create('mbway').mount('#mbway-container');

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:

resultCode Code to append to shopperStatement
Authorised
(default test response)
-c1
Pending -c3
Refused -c5

For example, to receive resultCode: Refused, include the following in your /payments request: "shopperStatement": "MBWay shopper statement-c5"

See also