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.
Requirements
Requirement | Description | |
---|---|---|
Integration type | Make sure that you have an existing API-only integration. | |
Action handling | Make sure that your existing integration is set up to handle the additional action. action.type : await. |
|
Setup steps | Before you begin, add MB Way in your Customer Area. |
How it works
- The shopper selects MB Way as the payment method.
- The shopper enters their details in the payment form that you build.
- When you make the payment request, you include additional information about the items that the shopper intends to purchase.
- Your existing integration setup will handle the await action, while you display the waiting screen.
Build your payment form
Include MB Way in the list of available payment methods. You do not need to collect any information from the shopper in your payment form.
You can download the logo for MB Way to use in your form.
Get MB Way as an available payment method
When you make the /paymentMethods to get available payment methods, specify the following so that MB Way is included in the response.
Parameter | Values |
---|---|
countryCode | PT |
amount.currency | EUR |
amount.value | The value of the payment, in minor units. |
Add additional parameters to your /payments request
When you make a payment, add the following parameters:
Parameter | Required | Description |
---|---|---|
paymentMethod.type | ![]() |
Set this value to mbway. |
paymentMethod.telephoneNumber | ![]() |
The shopper's mobile phone number. |
shopperStatement | The text to be shown on the shopper's bank statement. |
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.
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 are 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.
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"