MB WAY
Learn how to accept MB WAY payements.
MB WAY is a popular mobile payment method in Portugal that allows customers to pay securely using their mobile phone number linked to a bank card through the MB WAY app. At checkout, users enter their phone number and confirm the payment in the app using a PIN or biometric authentication. MB WAY enables real-time payment authorization, offering merchants a fast, convenient, and widely adopted payment option for customers in Portugal.
| Payment type | Mobile |
| Market | Portugal |
| Customer currencies | EUR |
| Processing currencies | EUR |
| Refunds | Yes |
Step 1. Make a transaction request
From your server, make a POST
https://service-sandbox.apmgw-dev.payabl.tech/apm_gw/payment_preauthorizehttps://service.apmgw-prod.payabl.tech/apm_gw/payment_preauthorizeRequest Type: POST
Content-Type: application/x-www-form-urlencoded
Request example (URL-encoded):
mmerchantid=apm_test
amount=15.40
currency=EUR
payment_method=200
orderid=Payabl-Test
custom2=mbway
bankcountry=PRT
signature=b069a9945d47417bd996d8b2e510584d8fc204ad
notification_url=https://webhook.site/7bfb1611-ecad-4113-9546-044f8c8e1b2e
url_return=https://webhook.site/7bfb1611-ecad-4113-9546-044f8c8e1b2e
cURL example:
curl --location ‘https://<payment-endpoint>’ \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merchantid=apm_test' \
--data-urlencode 'amount=15.40' \
--data-urlencode 'currency=EUR' \
--data-urlencode 'payment_method=200' \
--data-urlencode 'orderid=Payabl-Test' \
--data-urlencode 'custom2=mbway' \
--data-urlencode 'bankcountry=PRT' \
--data-urlencode 'signature=b069a9945d47417bd996d8b2e510584d8fc204ad' \
--data-urlencode 'notification_url=https://webhook.site/7bfb1611-ecad-4113-9546-044f8c8e1b2e' \
--data-urlencode 'url_return=https://webhook.site/7bfb1611-ecad-4113-9546-044f8c8e1b2e'
Public Sandbox informationDo not use your personal email address, Order ID with sensitive information, real customer details and credit card data in the public Sandbox. For email field you may use [email protected].
To complete the payment, you need to redirect the customer to the correct URL in the response.
Raw Response:
transactionid=4882207594963699217
transid=4882207594963699217
status=2000
errormessage=pending
errmsg=pending
amount=15.40
price=15.40
currency=EUR
orderid=Payabl-Test
payment_method=200
redirect_url=https://mp8tn4c192.execute-api.eu-central-1.amazonaws.com/default/authenticator.html?payment-charge-id=charge_P2NtLkzcUTYQo0w8hzmPx
If status=2000, the payment has been successfully initialized. To complete the payment, redirect the customer to
redirect_url.
Raw Failed Response:
transactionid=4882207596581619218
transid=4882207596581619218
status=-6125
errormessage=invalid+custom2
errmsg=invalid+custom2
amount=15.40
price=15.40
currency=EUR
orderid=Payabl-Test
payment_method=200
Step 2. Handle the redirect
Redirection to
url_returndoes not confirm that the transaction is successful. Always check the transaction vianotification_urlor use the diagnose interface to get the final status of the transaction.After the customer completes the payment on the provider side, they will be redirected to your
url_successorurl_failed.
Successful Redirect Response:
transactionid=4882207594963699217
timestamp=1778676494
orderid=Payabl-Test
payment_method=200
errormessage=
errorcode=0
type=capture
amount=15.40
currency=EUR
payment_state=credited
security=363f8a63dbfcc08997991189c0e2b840ec07046e68e7d5a818ff6fb3885dc4be
Failed Redirect Response:
transactionid=4882207596835571219
timestamp=1778676788
orderid=Payabl-Test
payment_method=200
errormessage=Payment+Authorization+Failed
errorcode=201008
type=order
amount=15.40
currency=EUR
payment_state=not_credited
security=86e86e3c3970d44efa1965193fbc1cb330137bcebfc31d99214be724a9b2c75e
payment_state values:
| Value | Transaction Status |
|---|---|
not_credited_yet | Capture - Accepted |
credited | Capture - Successful |
not_credited | Capture - Failed |
Server-to-Server Notifications (Webhook)
Notification is sent to notification_url.
Successful Capture:
transactionid=4882207594963699217
timestamp=1778676495
orderid=Payabl-Test
payment_method=200
errormessage=
errorcode=0
type=capture
amount=15.40
currency=EUR
payment_state=credited
security=4b8d90c57ab0c41ca7c9224665f700cac2e3457896d550d3a9799d3f2034b374
Failed Capture:
transactionid=4882207596835571219
timestamp=1778676787
orderid=Payabl-Test
payment_method=200
errormessage=Payment+Authorization+Failed
errorcode=201008
type=order
amount=15.40
currency=EUR
payment_state=not_credited
security=975e14d59496f26d542265a50f600c25c4d8d89e89284d75e9cdf18aa6cce59d
Refunds
MB WAY supports refunds and can be initiated only on a successful captured transaction.
The request will send a credit note to the authorization system after the customer has already been charged. The refund amount will be credited to the customer and the merchant’s account will be charged.
The refund can be done in two ways:
- Through API integration
- Through payabl. dashboard
Endpoint: <sandbox URL>/payment_refund
Request Type: POST
Content-Type: application/x-www-form-urlencoded
Refund Request:
merchantid=apm_test
amount=15.40
currency=EUR
signature=fdb9818f44bec89deb8b3310a044394ff69b2a17
transactionid=4882207594963699217
cURL Request Example:
curl --location 'https://paysix.sandbox.payabl.work/pay/backoffice/payment_refund' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merchantid=apm_test' \
--data-urlencode 'amount=15.40' \
--data-urlencode 'currency=EUR' \
--data-urlencode 'signature=fdb9818f44bec89deb8b3310a044394ff69b2a17' \
--data-urlencode 'transactionid=4882207594963699217'Successful Refund Response:
transactionid=4882207594963699217
transid=4882207594963699217
status=0
errormessage=
errmsg=
amount=15.40
price=15.40
currency=EUR
orderid=Payabl-Test
Failed Refund Response:
transactionid=4882207594963699217
transid=4882207594963699217
status=-117
errormessage=refund+failed+%3A+wrong+currency
errmsg=refund+failed+%3A+wrong+currency
amount=
price=
currency=
orderid=Payabl-Test
Our Technical Support team is there to help you:
Email: [email protected]
Available Monday – Friday between 09:00 and 17:00 CET/CEST
Updated about 1 hour ago
