MB WAY for API only
Last updated: March 19, 2025
To accept MB WAY payments, you must:
- Request a payment.
- The customer performs authentication in the MB WAY app using their MB WAY PIN or Touch ID.
- Receive a
payment_capturedwebhook when the payment is completed successfully. Alternatively, you can confirm thestatusof the payment by retrieving the payment details via the API.
For the full API specification, see the API reference.
Information
Your base URL [prefix] is unique. To learn how to retrieve your unique base URLs for the sandbox and production environments, see API endpoints.
post
https://[prefix].api.checkout.com/payments
1{2"amount": 1000,3"currency": "EUR",4"source": {5"type": "mbway"6},7"reference": "ORD-5023-4E89",8"customer": {9"phone": {10"country_code": "372",11"number": "12345678"12}13}14}
If you receive a 202 Accepted response with a status field set to Pending, your request was successful.
1{2"id": "pay_7ehiotldrlvujfpiyeo42i2roe",3"status": "Pending",4"reference": "ORD-5023-4E89",5"customer": {6"id": "cus_urx7wggzcpzufjjynbn7t6l5mq",7"email": "fyi4s2facqzuhiu4fetjp2bbxe@auto.cko",8"phone": {9"country_code": "372",10"number": "12345678"11}12},13"_links": {14"self": {15"href": "https://[prefix].api.checkout.com/payments/pay_7ehiotldrlvujfpiyeo42i2roe"16}17}18}
You can retrieve details about an existing MB WAY payment with the following endpoint.
For the full API specification, see the API reference.
Information
Your base URL [prefix] is unique. To learn how to retrieve your unique base URLs for the sandbox and production environments, see API endpoints.
get
https://[prefix].api.checkout.com/payments/{id}
1{2"id": "pay_7ehiotldrlvujfpiyeo42i2roe",3"requested_on": "2023-08-17T07:58:32.0749106Z",4"source": {5"type": "mbway"6},7"amount": 1000,8"currency": "EUR",9"reference": "ORD-5023-4E89",10"status": "Pending",11"customer": {12"id": "cus_urx7wggzcpzufjjynbn7t6l5mq",13"email": "fyi4s2facqzuhiu4fetjp2bbxe@auto.cko",14"phone": {15"country_code": "372",16"number": "12345678"17}18},19"_links": {20"self": {21"href": "https://[prefix].api.checkout.com/payments/pay_7ehiotldrlvujfpiyeo42i2roe"22},23"actions": {24"href": "https://[prefix].api.checkout.com/payments/pay_7ehiotldrlvujfpiyeo42i2roe/actions"25}26}27}
MB WAY supports full, partial, and multiple partial refunds.
You can refund a payment through the Dashboard or using the Refund API.
Information
Your base URL [prefix] is unique. To learn how to retrieve your unique base URLs for the sandbox and production environments, see API endpoints.
post
https://[prefix].api.checkout.com/payments/{id}/refunds
1{2"amount": 1003}
1{2"action_id": "act_jf7fv3vgiu7ezjfgzvvsqobxru",3"_links": {4"payment": {5"href": "https://[prefix].api.checkout.com/payments/pay_fsud3hyoqkxencjvb5cfv6yqoe"6}7}8}
Note
To start testing, contact your account manager or request support to enable MB WAY payments in the sandbox environment.
To test MB WAY, request a payment using:
- The
customer.phone.country_codefield set to777 - The
customer.phone.numberfield set to a value from the following table, depending on which outcome you want to simulate
| Response Code | Description | Phone Number |
|---|---|---|
| Payment approved. |
|
| The request was declined, though subsequent attempts may be successful. |
|
| Customer cancellation. |
|
| Invalid merchant or service provider. |
|
| Invalid customer/user. |
|
| Transaction has expired. |
|
post
https://[prefix].api.sandbox.checkout.com/payments
1{2"amount": 100,3"currency": "EUR",4"source": {5"type": "mbway"6},7"reference": "ORD-5023-4E89",8"customer": {9"phone": {10"country_code": "777",11"number": "12345678"12}13}14}