Accept MB WAY payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Before you begin
This page assumes you have already:
Build your payment form for MB WAY
Include MB WAY in the list of available payment methods. You don't need to collect any information from the shopper in your payment form.
Adyen provides an MB WAY logo which you can use on your payment form. For more information, refer to Downloading logos.
amount.value: The amount of the transaction, in minor units.
The required fields are included in the object with
Make a payment
In your /payments request, specify the following parameters:
paymentMethod.telephoneNumber: The shopper's mobile phone number, which must be a Portuguese phone number; for example +351234567890.
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.
Show the waiting screen
- Show a waiting screen to the shopper, telling them you're waiting for them to complete the payment.
- Check your webhooks to see the payment result. We send you a webhook after the shopper completes the payment in their MB WAY app.
- Once the shopper finalizes the payment, redirect them to your website, and present the payment result.
Present the payment result
resultCode from the /payments response to show the payment outcome on your frontend.
resultCode values you can receive for MB WAY are:
||Description||Action to take|
|Error||There was an error when the payment was being processed.||Inform the shopper that there was an error processing their payment. The response contains a
|The shopper has completed the payment but the final result is not yet known. It may take minutes or hours for the payments network to confirm this.||Inform the shopper that you've received their order, and are waiting for the payment to be completed.
You will receive the final result of the payment in an AUTHORISATION webhook.
|Refused||The payment was refused by the shopper's bank.||Ask the shopper to try the payment again using a different payment method.|
You will receive the outcome of the payment asynchronously in a webhook:
||Description||Action to take|
|AUTHORISATION||true||The shopper successfully completed the payment.||Inform the shopper that the payment has been successful and proceed with the order.|
|AUTHORISATION||false||The transaction failed.||Cancel the order and inform the shopper that the payment failed.|
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.
To trigger a specific
resultCode value, append a code to the
shopperStatement value in your /payments request:
||Code to append to
(default test response)
For example, to receive
resultCode: Refused, include the following in your /payments request:
"shopperStatement": "MBWay shopper statement-c5"