MB WAY
POST /checkouts
Creation of the checkout with the following data:
- Language: Portuguese
- Page Layout: web
- Amount: 5 euros
- Payment method: MBWay (MW)
- Product code: REFPRODUCT_1
- Description of product: Computer
- Request
- Response
{
"payment": {
"amount": 500,
"code": "REFPRODUTO_1",
"summary": "Computador",
"paymentMethod": {
"code": "MW" // <== Método de pagamento
}
},
"page": {
"language": "PT",
"layout": "web"
},
"redirects": [
{
"type": "success",
"url": "https://www.url-apos-sucesso.dominio"
},
{
"type": "cancel",
"url": "https://www.url-apos-cancelamento.dominio"
},
{
"type": "back",
"url": "https://www.url-voltar.dominio"
}
]
}
{
"apiVersion": "1.0",
"date": "2022-01-03T14:16:17+00:00",
"success": true,
"data": {
"id": "nD5IxuqS40xZgPDRra5RqGelWmbVY5hOFnI3QfJc",
"createdAt": "2022-01-03 14:16:17",
"checkoutUrl": "https://paypay.pt/paypay/referencia/referencia_c/pay/a04120574e15134a6352f9619ea6cfbf051c18e9/paypay/nD5IxuqS40xZgPDRra5RqGelWmbVY5hOFnI3QfJc",
"paymentId": "42697",
"stateDetails": {
"state": "PaymentReady",
"timestamp": "2022-01-03T14:16:17+00:00"
}
}
}
The response returns the id
which identifies the checkout to the API.
The checkoutUrl
is the link to access the page and make the payment.
The paymentId
is the id that identifies the payment.
Accessing the checkoutUrl
displays the following page: