{"title":"MB Way for API only","category":"default","creationDate":1776961628,"content":"<p>You can add MB Way to your existing integration. The following instructions show only what you must add to your integration specifically for MB Way.<\/p>\n<p>If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.<\/p>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have an existing <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\">API-only integration<\/a>.<\/td>\n<td> <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Action handling<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your existing integration is set up to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#additional-action\">handle the additional action<\/a>. <br> <code>action.type<\/code>: <strong>await<\/strong>.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\"> Before you begin, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add MB Way in your Customer Area<\/a>. <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>The shopper selects MB Way as the payment method.<\/li>\n<li>The shopper enters their details in the <a href=\"#build-your-payment-form\">payment form that you build<\/a>.<\/li>\n<li>When you make the payment request, you <a href=\"#additional-parameters-payments\">include additional information about the items that the shopper intends to purchase<\/a>.<\/li>\n<li>Your existing integration setup will <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#additional-action\">handle the await action<\/a>, while you display the <a href=\"#show-waiting-screen\">waiting screen<\/a>.<\/li>\n<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include MB Way in the list of available payment methods. You do not need to collect any information from the shopper in your payment form.<\/p>\n<div class=\"notices green\">\n<p>You can <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%2Bonly&amp;version=71#downloading-logos\">download the logo for MB Way<\/a> to use in your form.<\/p>\n<\/div>\n<h2>Get MB Way as an available payment method<\/h2>\n<p>When you make the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#get-available-payment-methods\">get available payment methods<\/a>, specify the following so that MB Way is included in the response.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><strong>PT<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/td>\n<td><strong>EUR<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a><\/td>\n<td>The value of the payment, in <a href=\"\/pt\/development-resources\/currency-codes\/\">minor units<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for available payment methods'\" :id=\"'payment-methods-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/paymentMethods \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;countryCode\\&quot;: \\&quot;PT\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n\\t  \\&quot;value\\&quot;: 1000\\n   },\\n   \\&quot;shopperLocale\\&quot;: \\&quot;pt-PT\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with MB Way available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"MB Way\\\",\\n            \\\"type\\\": \\\"mbway\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"additional-parameters-payments\">Add additional parameters to your \/payments request<\/h2>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#make-a-payment\">make a payment<\/a>, add the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-MbwayDetails-type\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.type<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Set this value to <strong>mbway<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-MbwayDetails-telephoneNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.telephoneNumber<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The shopper's mobile phone number.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperStatement\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperStatement<\/a><\/td>\n<td><\/td>\n<td>The text to be shown on the shopper's bank statement.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for MB Way'\" :id=\"'payments-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-API-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;,\\n    \\&quot;value\\&quot;:1000\\n  },\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n        \\&quot;type\\&quot;: \\&quot;mbway\\&quot;,\\n        \\&quot;telephoneNumber\\&quot;: \\&quot;PHONE_NUMBER\\&quot;\\n    },\\n  \\&quot;shopperStatement\\&quot;: \\&quot;MB WAY shopper statement\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<dl>\n<dt><\/dd>\n<\/dl>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response contains:<\/p>\n<ul>\n<li><code>resultCode<\/code>: <strong>Pending<\/strong> (The shopper must complete the payment in their MB Way app.)<\/li>\n<li><code>action<\/code>: Use this object to display the waiting screen while the shopper completes the payment in their MB Way app.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment response for MB Way'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\": \\\"Pending\\\",\\n  \\\"action\\\": {\\n      \\\"paymentData\\\": \\\"Ab02b4c0!BQABAgCX79JLFTqePTGTb...\\\",\\n      \\\"paymentMethodType\\\": \\\"mbway\\\",\\n      \\\"type\\\": \\\"await\\\"\\n  },\\n  \\\"paymentData\\\": \\\"Ab02b4c0!BQABAgCX79JLFTqePTGTb...\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response contains:<\/p>\n<ul>\n<li><code>resultCode<\/code>: <strong>Pending<\/strong> (The shopper must complete the payment in their MB Way app.)<\/li>\n<li><code>action<\/code>: Use this object to display the waiting screen while the shopper completes the payment in their MB Way app.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment response for MB Way'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\": \\\"Pending\\\",\\n  \\\"action\\\": {\\n      \\\"paymentData\\\": \\\"Ab02b4c0!BQABAgCX79JLFTqePTGTb...\\\",\\n      \\\"paymentMethodType\\\": \\\"mbway\\\",\\n      \\\"type\\\": \\\"await\\\"\\n  },\\n  \\\"paymentData\\\": \\\"Ab02b4c0!BQABAgCX79JLFTqePTGTb...\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"show-waiting-screen\">Show the waiting screen<\/h2>\n<ol>\n<li>Show a waiting screen to the shopper, telling them you are waiting for them to complete the payment.<\/li>\n<li>Check your <a href=\"\/pt\/development-resources\/webhooks\">webhooks<\/a> to see the payment result. We send you a webhook after the shopper completes the payment in their MB Way app.<\/li>\n<li>Once the shopper finalizes the payment, redirect them to your website, and present the payment result.<\/li>\n<\/ol>\n<h2>Test and go live<\/h2>\n<p>To test your MB Way integration, you can use any telephone number; for example <strong>+351234567890<\/strong>.<\/p>\n<p>You can check the status of MB Way test payments in your <strong>Customer Area<\/strong> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p>Before you can accept live MB Way payments, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add MB Way<\/a> in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h3>Trigger a <code>resultCode<\/code><\/h3>\n<p>To trigger a specific <code>resultCode<\/code> value, append a code to the <code>shopperStatement<\/code> value in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\"><code>resultCode<\/code><\/th>\n<th style=\"text-align: left;\">Code to append to <code>shopperStatement<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Authorised<\/strong><br>(default test response)<\/td>\n<td style=\"text-align: left;\"><code>-c1<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Pending<\/strong><\/td>\n<td style=\"text-align: left;\"><code>-c3<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Refused<\/strong><\/td>\n<td style=\"text-align: left;\"><code>-c5<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For example, to receive <code>resultCode<\/code>: <strong>Refused<\/strong>, include the following in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request:<br \/>\n<code>\"shopperStatement\": \"MBWay shopper statement-c5\"<\/code><\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/mb-way\/api-only","articleFields":{"description":"Add MB Way to your API-only integration.","never_cache_twig":true,"parameters":{"flow":"Advanced","integration_guide_url":"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&integration=API%20only","payment_method":"MB Way","payment_method_type":"mbway","payment_method_type_capitalized":"Mbway","tx_variant":"mbway","tx_variant_capitalized":"Mbway","country_codes":"<strong>PT<\/strong>","currency_codes":"<strong>EUR<\/strong>","additional_api":"true","api_version":"none","action_type":"<strong>await<\/strong>","pm_directory":"mb-way","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/mb-way\/api-only","title":"MB Way for API only","content":"You can add MB Way to your existing integration. The following instructions show only what you must add to your integration specifically for MB Way.\nIf an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have an existing API-only integration.\n \n\n\nAction handling\nMake sure that your existing integration is set up to handle the additional action.  action.type: await.\n\n\n\nSetup steps\n Before you begin, add MB Way in your Customer Area. \n\n\n\nHow it works\n\nThe shopper selects MB Way as the payment method.\nThe shopper enters their details in the payment form that you build.\nWhen you make the payment request, you include additional information about the items that the shopper intends to purchase.\nYour existing integration setup will handle the await action, while you display the waiting screen.\n\nBuild your payment form\nInclude MB Way in the list of available payment methods. You do not need to collect any information from the shopper in your payment form.\n\nYou can download the logo for MB Way to use in your form.\n\nGet MB Way as an available payment method\nWhen you make the  \/paymentMethods to get available payment methods, specify the following so that MB Way is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nPT\n\n\n amount.currency\nEUR\n\n\n amount.value\nThe value of the payment, in minor units.\n\n\n\n\n    \n\n\n    \n\nAdd additional parameters to your \/payments request\nWhen you make a payment, add the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n paymentMethod.type\n\nSet this value to mbway.\n\n\n paymentMethod.telephoneNumber\n\nThe shopper's mobile phone number.\n\n\n shopperStatement\n\nThe text to be shown on the shopper's bank statement.\n\n\n\n\n    \n\n\n\n\nThe  \/payments response contains:\n\nresultCode: Pending (The shopper must complete the payment in their MB Way app.)\naction: Use this object to display the waiting screen while the shopper completes the payment in their MB Way app.\n\n\n    \n\nThe  \/payments response contains:\n\nresultCode: Pending (The shopper must complete the payment in their MB Way app.)\naction: Use this object to display the waiting screen while the shopper completes the payment in their MB Way app.\n\n\n    \n\nShow the waiting screen\n\nShow a waiting screen to the shopper, telling them you are waiting for them to complete the payment.\nCheck your webhooks to see the payment result. We send you a webhook after the shopper completes the payment in their MB Way app.\nOnce the shopper finalizes the payment, redirect them to your website, and present the payment result.\n\nTest and go live\nTo test your MB Way integration, you can use any telephone number; for example +351234567890.\nYou can check the status of MB Way test payments in your Customer Area &gt; Transactions &gt; Payments.\nBefore you can accept live MB Way payments, add MB Way in your live Customer Area.\nTrigger a resultCode\nTo trigger a specific resultCode value, append a code to the shopperStatement value in your  \/payments request:\n\n\n\nresultCode\nCode to append to shopperStatement\n\n\n\n\nAuthorised(default test response)\n-c1\n\n\nPending\n-c3\n\n\nRefused\n-c5\n\n\n\nFor example, to receive resultCode: Refused, include the following in your  \/payments request:\n\"shopperStatement\": \"MBWay shopper statement-c5\"\nSee also\n\n\n                    API-only integration guide\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"MB Way","lvl3":"MB Way for API only"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/mb-way","lvl3":"\/pt\/payment-methods\/mb-way\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":[]},"articleFiles":{"payment-methods-response.json":"<p alt=\"\">payment-methods-response.json<\/p>","payments-response.json":"<p alt=\"\">payments-response.json<\/p>"}}
