Local Payment Methods

MB WAY

OverviewAnchorIcon

Availability
MB WAY is currently in limited release and is available to pilot merchants in selected countries. If you want to participate in the pilot, please contact us.
MB WAY is a local payment method that a customer can use to place an order and then complete the payment with their MB WAY mobile digital wallet app.
  • Create, verify, and link your PayPal business account in the Braintree Control Panel. In order to process Local Payment Methods, you need to have a valid PayPal business account.
  • Make sure you are using the latest version of the Client SDK.
Payment typeBuyer countriesSeller countriesCurrency codesCustomer transaction limits
`mbway`PortugalGlobal except Russia, Japan, Brazil`EUR`Min: 1 EUR

Loading the SDKAnchorIcon

You will need to load the Client SDK and Local Payments SDK. One way is to load these from external sources:
  1. HTML
<script src="https://js.braintreegateway.com/web/3.111.0/js/client.min.js"></script>
<script src="https://js.braintreegateway.com/web/3.111.0/js/local-payment.min.js"></script>
Other methods of loading SDKs are discussed in the documentation for the Client SDK.

Capturing MB WAY TransactionsAnchorIcon

MB WAY works by circumventing the normal tokenization process. For this reason, merchants must be signed up to receive and process the LPMs webhooks. The merchant will receive the nonce they will need to transact upon through the local_payment_completed webhook.

MB WAY with GraphQLAnchorIcon

Note
MB WAY is currently available only through the Javascript Client SDK and various server-side SDKs.

Example RequestsAnchorIcon

The client-side implementation of MB WAY is the same as described for other LPM types with these caveats: No pop-up will be launched, and the merchant will not receive a response with a single-use token. The merchant will receive a response with a payment ID they will need to keep track of in their system.
  1. Callback
  2. Promise
function createLocalPaymentClickListener(type) {
    return function (event) {
        event.preventDefault();
        localPaymentInstance.startPayment({
            paymentType: 'mbway',
            amount: '10.00',
            currencyCode: 'EUR',
            phone: '213432148',
            phoneCountryCode: '351',
            givenName: 'Joe',
            surname: 'Doe',
            address: {
                countryCode: 'PT'
            },
            onPaymentStart: function (data) {
                // NOTE: It is critical here to store data.paymentId on your server
                // so it can be mapped to a webhook sent by Braintree once the
                // buyer completes their payment. See Start the payment
                // section for details.
            }
        }, function (startPaymentError) {
            if (startPaymentError) {
                if (startPaymentError.code === 'LOCAL_PAYMENT_START_PAYMENT_FAILED') {
                    console.error('LocalPayment startPayment failed.');
                } else {
                    console.error('Error!', startPaymentError);
                }
            } else {
                // Success! Respond accordingly here.
            }
        });
    };
}
See the Local Payment Method guide for an overview of other implementation details.

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more