Local Payment Methods
MB WAY
Overview
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.
- 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 type | Buyer countries | Seller countries | Currency codes | Customer transaction limits |
---|---|---|---|---|
`mbway` | Portugal | Global except Russia, Japan, Brazil | `EUR` | Min: 1 EUR |
Loading the SDK
You will need to load the Client SDK and Local Payments SDK. One way is to load these from external
sources:
- 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>
Capturing MB WAY Transactions
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 GraphQL
Note
MB WAY is currently available only through the Javascript Client SDK and various server-side SDKs.
Example Requests
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.
- Callback
- 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.
}
});
};
}