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:
- Send payment notification to the MB WAY app (notification expires after 5–10 minutes);
 - The user confirms the payment in the app;
 - Query the payment status (optional if you have a webhook subscription).
 

1. Send MB WAY payment notification
- Request
 - Response
 
POST /payments
{
	"type": "payment",
	"amount": 100,
	"callbackUrl": "https://teste.pt", // Opcional se usar webhooks
	"paymentMethod": {
		"code": "MW",
		"details": {
			"phoneNumber": "351#123456789"
		}
	}
}
{
	"apiVersion": "1.0",
	"date": "2021-10-07T18:09:41+01:00",
	"success": true,
	"data": {
		"id": "42373",
		"referenceDetails": {
			"reference": "A0000A585"
		},
		"stateDetails": {
			"state": "pending_confirmation"
		},
		"paymentMethod": {
			"code": "MW",
			"type": "DEFAULT",
			"details": {
				"phoneNumber": "351#123456789",
				"countryCode": "351",
				"last3Digits": "263"
			}
		},
		"amount": 10,
		"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"
			}
		]
	}
}
2. The user validates the payment in the MB WAY app

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
		}
	}
}