API
Skip to main content

Payment with MB WAY using mobile phone number

To start a payment via MB WAY, you only need the mobile phone number associated with the MB WAY account.

The process works as follows:

  1. Send payment notification to the MB WAY app (notification expires after 5–10 minutes);
  2. The user confirms the payment in the app;
  3. Query the payment status (optional if you have a webhook subscription).
The following flow illustrates how MB WAY payments work:

MB WAY flow

1. Send MB WAY payment notification

POST /payments
{
"type": "payment",
"amount": 100,
"callbackUrl": "https://teste.pt", // Opcional se usar webhooks
"paymentMethod": {
"code": "MW",
"details": {
"phoneNumber": "351#123456789"
}
}
}

2. The user validates the payment in the MB WAY app

MB WAY confirmed

3. Query payment status

GET/payments/{id}
{
"apiVersion": "1.0",
"date": "2021-10-18T11:45:12+01:00",
"success": true,
"data": {
"id": "42373",
"referenceDetails": {
"reference": "A0000A585"
},
"stateDetails": {
"state": "confirmed",
"createdAt": "2021-10-07T18:07:46+01:00"
},
"paymentMethod": {
"code": "MW",
"type": "DEFAULT",
"details": {
"countryCode": "351",
"last3Digits": "263"
}
},
"amount": 100,
"createdAt": "2021-10-07T18:06:46+01:00",
"updatedAt": "2021-10-07T18:06:46+01:00",
"validDate": {
"start": "2021-10-07T18:06:46+01:00",
"end": "2021-10-07T18:36:46+01:00"
},
"availableMethods": [
{
"code": "MW",
"type": "DEFAULT",
"name": "MB WAY"
}
],
"paymentFee": {
"netAmount": "0.27750000",
"taxAmount": "0.04995000",
"invoiceDetails": null
}
}
}