# MB WAY

> Accept one-time MB WAY payments in Portugal, handle customer actions, and confirm the server-side result.

## Basic information

Customers confirm the payment request in the MB WAY app on their phone.

- Integration paths: [Checkout](/payments/versions/v2/online-payments/checkout), [Direct API](/payments/versions/v2/online-payments/api)
- Transaction type: One-time web payment
- `lpmsInfo.lpmsType`: `MB_WAY`

| Customer country/region | Transaction currency |
| --- | --- |
| 🇵🇹 PT — Portugal | EUR |

The customer country/region is the `billingInformation.country` value in the payment request.

## Before you begin

Complete [Setup](/payments/versions/v2/get-started/setup), confirm that MB WAY is enabled for your merchant application, and prepare a server endpoint to receive payment notifications. When building your own method list or restricting payment to one method, [query available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the order context.

The currency listed here is the transaction currency. Confirm your account's transaction limits, settlement currencies, and settlement arrangements with Onerway. See [Currency and amount validation](/payments/versions/v2/get-started/currency-and-amount) for amount formatting.

## Create a payment

For Checkout, call [Create Checkout Payment](/payments/versions/v2/api-reference/endpoints/create-checkout-payment) with `productType=ALL`, `subProductType=DIRECT`, `txnType=SALE`, and `orderCurrency=EUR`. To show only MB WAY, set `lpmsInfo.lpmsType` to `MB_WAY`, sending `lpmsInfo` as a JSON string. If you omit `lpmsInfo`, the customer chooses from the methods available for the order. Supply the customer's billing and shipping details according to the API conditions, including the MB WAY phone number described below when preselecting this method.

Select the request example **Unified Checkout with all available payment methods**, replace its order and customer details, add `lpmsInfo` when preselecting MB WAY, and remove `cardInfo` for this flow. Save the returned `paymentId` and `transactionId`, then redirect the customer's browser to `redirectUrl`. The response example **Unified Checkout session created** shows this structure; the initial `status=U` means the payment is unpaid. See [Checkout integration](/payments/versions/v2/online-payments/checkout) for request authentication and return handling.

For the Direct API, call [Create direct transaction](/payments/versions/v2/api-reference/endpoints/direct-create-transaction) with `productType=LPMS`, `subProductType=DIRECT`, `txnType=SALE`, `paymentMode=WEB`, `lpmsInfo.lpmsType=MB_WAY`, and `orderCurrency=EUR`. Follow the API reference for the complete required fields and authentication requirements.

For the Direct API, provide the customer's MB WAY `phoneCountryCode` and `phone` in `billingInformation`. Send the dialing code and local number separately: Portugal's dialing code is `351`, without `+`; `phone` excludes the dialing code. See [`billingInformation.phoneCountryCode`](/payments/versions/v2/api-reference/endpoints/direct-create-transaction#request-billingInformation-phoneCountryCode) and [`billingInformation.phone`](/payments/versions/v2/api-reference/endpoints/direct-create-transaction#request-billingInformation-phone).

When preselecting `lpmsType=MB_WAY` in Checkout, supply `phoneCountryCode` and `phone` in the JSON string `billingInformation` before creating the payment. If you do not preselect a method and let the customer choose MB WAY in Checkout, the customer can enter the phone details there. The customer must be registered with MB WAY and use the phone number associated with that service.

For the Direct API, select the request example **Redirect local payment request (illustrative)**. Replace `Bancontact` with `MB_WAY`, keep `orderCurrency=EUR`, and supply the customer's actual country, the MB WAY phone fields, and the other required order and billing details. Encode `lpmsInfo`, `billingInformation`, and `shippingInformation` as JSON strings. Include the merchant-collected end-user IP, browser, and device information in `txnOrderMsg`. Keep product and order currencies consistent, with amounts, discounts, and shipping fees adding up to `orderAmount`.

## Customer action and final result

Save the Direct API response’s `paymentId` and `transactionId`. When `status=R` and `actionType=RedirectURL`, send the customer to `data.redirectUrl`; select **Redirect local payment response (illustrative)** for the response structure. See [Local payment integration](/payments/versions/v2/online-payments/payment-methods/local-payment-methods) for response fields and other actions. Use the returned URL without constructing a payment page URL yourself.

On the hosted waiting page, the customer reviews and confirms the payment request in the MB WAY app on their phone. Update the order from the server-side result rather than treating the page countdown as a success or failure signal.

Creating a transaction or returning to the merchant page does not confirm payment success. Read the transaction `status` from a verified [payment result webhook](/payments/versions/v2/api-reference/webhooks/payment-result), or use [Query transactions](/payments/versions/v2/api-reference/endpoints/query-transactions) to reconcile the result. See [Webhooks](/payments/versions/v2/get-started/webhooks) for verification, acknowledgement, and duplicate handling.

Only `status=S` confirms payment success; `status=F` indicates failure. Handle other states according to the API reference.

## Refunds and disputes

Confirm refund availability, restrictions, and the applicable dispute process with Onerway for your account. When refunds are enabled, follow [Refunds](/payments/versions/v2/online-payments/scenarios/refunds).

## Testing and go-live

Confirm the test environment, method enablement, and available test steps with Onerway before following [Testing](/payments/versions/v2/get-started/testing).

MB WAY sandbox success simulation requires assistance from Onerway. Opening the waiting page alone does not complete a successful payment test.

1. Create an order in EUR using an enabled test configuration, and check the method code and returned page. For MB WAY, also check phone collection and the fields sent through the Direct API.
2. Follow the approved test steps for a successful payment. Confirm that the order becomes paid only after a verified notification or server query reports `status=S`.
3. Test abandonment, incomplete payment, and a missing notification. Confirm that returning to the merchant page does not mark the order paid and that queries can reconcile the state.
4. Before launch, confirm production enablement, currency, limits, and the notification endpoint. Test refunds if enabled.
