{"title":"PayMe Component","category":"default","creationDate":1567783140,"content":"<p>This page explains how to add PayMe to your existing Web Components integration.<\/p>\n<p>Depending on whether your shopper is using a desktop or laptop, or the browser on their mobile device, the <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Components\">Component<\/a>:<\/p>\n<ul>\n<li>Shows the shopper a QR code which they can scan to pay using their PayMe app.<\/li>\n<li>Redirects the shopper to the PayMe app on their mobile device.<\/li>\n<\/ul>\n<p>Implement both flows to make sure that your shoppers can pay on different devices.<\/p>\n<div class=\"notices green\">\n<p>PayMe is supported from Web Components version 5.56.0.<\/p>\n<\/div>\n<h2>Requirements<\/h2>\n<p>Select the <a href=\"\/pt\/online-payments\/build-your-integration\">server-side flow<\/a> that your integration uses:<\/p>\n\n<div id=\"tabl8pwn\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Sessions flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built a Sessions flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=Web&amp;amp;integration=Components\\&quot;&gt;Web Components integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add PayMe in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-requirements_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;Advanced flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built an Advanced flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow?platform=Web&amp;amp;integration=Components\\&quot;&gt;Web Components integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add PayMe in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-requirements_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Import resources for v6<\/h2>\n<p>If you are using Web Components v6, <a href=\"\/pt\/online-payments\/build-your-integration\/?platform=Web&amp;integration=Drop-in&amp;version=6.0.0\">import the Component<\/a> that you need for PayMe:<\/p>\n<pre><code class=\"language-js\">import { AdyenCheckout, PayMe } from '@adyen\/adyen-web'<\/code><\/pre>\n<h2>API reference<\/h2>\n<p>Select which endpoint you are using:<\/p>\n\n<div id=\"tabB9f0r\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;&lt;code&gt;\\\/sessions&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;This is the default with &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=Web&amp;amp;integration=Components\\&quot;&gt;Components v5.0.0&lt;\\\/a&gt; or later.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Parameter name&lt;\\\/th&gt;\\n&lt;th&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/71\\\/post\\\/sessions#request-channel\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;channel&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;To determine whether the shopper is using a desktop, laptop or mobile.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems-quantity\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.quantity&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The number of items. Must be between 0 and 9999.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems-sku\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.sku&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The stock keeping unit. Maximum length 200 characters. Available if you use Checkout API v70 and later.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems-description\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.description&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The order description to display to the shopper. Maximum length 200 characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems-amountIncludingTax\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.amountIncludingTax&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Item amount including the tax, in minor units. Must be between 1 and 100000000.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems-itemCategory\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.itemCategory&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The item category. Maximum length 200 characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-api_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;&lt;code&gt;\\\/payments&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;If you implemented an &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\&quot;&gt;additional use case&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Parameter name&lt;\\\/th&gt;\\n&lt;th&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-channel\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;channel&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;To determine whether the shopper is using a desktop, laptop or mobile.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems-quantity\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.quantity&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The number of items. Must be between 0 and 9999.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems-sku\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.sku&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The stock keeping unit. Maximum length 200 characters. Available if you use Checkout API v70 and later.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems-description\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.description&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The order description to display to the shopper. Maximum length 200 characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems-amountIncludingTax\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.amountIncludingTax&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Item amount including the tax, in minor units. Must be between 1 and 100000000.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems-itemCategory\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\n  &lt;code&gt;lineItems.itemCategory&lt;\\\/code&gt;\\n&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The item category. Maximum length 200 characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-api_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n\n<div id=\"tabB2yeM\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Desktop flow&quot;,&quot;content&quot;:&quot;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;payme-payments-qr&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v72\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n    \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;payme\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;HKD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;: 4200\\\\n    },\\\\n    \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;HK\\\\&amp;quot;,\\\\n    \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n    \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n    \\\\&amp;quot;channel\\\\&amp;quot;:\\\\&amp;quot;Web\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n      {\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;3232\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: 4200,\\\\n        \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;Fashion\\\\&amp;quot;\\\\n      }\\\\n    ]\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\nconst {Client, Config, CheckoutAPI} = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\nconst config = new Config();\\\\n\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\nconfig.apiKey = &#039;[API_KEY]&#039;;\\\\nconfig.merchantAccount = &#039;[MERCHANT_ACCOUNT]&#039;;\\\\nconst client = new Client({ config });\\\\nclient.setEnvironment(\\\\&amp;quot;TEST\\\\&amp;quot;);\\\\nconst checkout = new CheckoutAPI(client);\\\\ncheckout.payments({\\\\n    \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;payme\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;HKD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;: 4200\\\\n    },\\\\n    \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;HK\\\\&amp;quot;,\\\\n    \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n    \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n    \\\\&amp;quot;channel\\\\&amp;quot;:\\\\&amp;quot;Web\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n      {\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;3232\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: 4200,\\\\n        \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;Fashion\\\\&amp;quot;\\\\n      }\\\\n    ]\\\\n  })&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;desktop_flow_0_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Mobile flow&quot;,&quot;content&quot;:&quot;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;payme-payments-redirect&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v72\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n    \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;payme\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;HKD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;: 4200\\\\n    },\\\\n    \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;HK\\\\&amp;quot;,\\\\n    \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n    \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n    \\\\&amp;quot;channel\\\\&amp;quot;:\\\\&amp;quot;Web\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n      {\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;3232\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: 4200,\\\\n        \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;Fashion\\\\&amp;quot;\\\\n      }\\\\n    ]\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\nconst {Client, Config, CheckoutAPI} = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\nconst config = new Config();\\\\n\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\nconfig.apiKey = &#039;[API_KEY]&#039;;\\\\nconfig.merchantAccount = &#039;[MERCHANT_ACCOUNT]&#039;;\\\\nconst client = new Client({ config });\\\\nclient.setEnvironment(\\\\&amp;quot;TEST\\\\&amp;quot;);\\\\nconst checkout = new CheckoutAPI(client);\\\\ncheckout.payments({\\\\n    \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;payme\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;HKD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;: 4200\\\\n    },\\\\n    \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;HK\\\\&amp;quot;,\\\\n    \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n    \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n    \\\\&amp;quot;channel\\\\&amp;quot;:\\\\&amp;quot;Web\\\\\\\/iOS\\\\\\\/Android\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n      {\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;3232\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: 4200,\\\\n        \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;Fashion\\\\&amp;quot;\\\\n      }\\\\n    ]\\\\n  })&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;mobile_flow_1_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<p>See the <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Components\">Web Components integration guide<\/a> to get the payment outcome and show your shopper the result of the payment.<\/p>\n<h2>Component configuration<\/h2>\n<h3>Step 1: Create a DOM element<\/h3>\n<p>Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:<\/p>\n<pre><code class=\"language-html\"> &lt;div id=\"payme-container\"&gt;&lt;\/div&gt;<\/code><\/pre>\n<h3>Step 2: Create an instance of the Component<\/h3>\n<h4>v6.0.0 or later<\/h4>\n<p>Create an instance of the Component, passing:<\/p>\n<ul>\n<li>Your instance of <code>AdyenCheckout<\/code>.<\/li>\n<\/ul>\n<pre><code class=\"language-js\">const payMe = new PayMe(checkout).mount('#payme-container');<\/code><\/pre>\n<div class=\"accordion-shortcode adl-accordion adl-accordion--max-height-transition\" data-expand=\"true\" data-ignore=\"anchorjs-link\">\n    \n    <div class=\"adl-accordion__item\" style=\"\">\n        <div tabindex=\"0\" role=\"item\" aria-expanded=\"false\" class=\"adl-accordion__header\">\n            <i class=\"adl-accordion__toggle adl-icon-chevron-down\"><\/i>\n            <div class=\"adl-accordion__title-wrapper\" data-accordion=\"#v5-x-x-or-earlier\">\n                                    <h4 class=\"adl-accordion__title\">v5.x.x or earlier<\/h4>\n                            <\/div>\n        <\/div>\n        <div role=\"region\" class=\"adl-accordion__content\">\n            \n<p>Use the <code>create<\/code> method of your <code>AdyenCheckout<\/code> instance, in this case <code>checkout<\/code>, to create the Component:<\/p>\n<pre><code class=\"language-js\">const payMeComponent = checkout.create('payme').mount('#payme-container');<\/code><\/pre>\n\n        <\/div>\n    <\/div>\n<\/div>\n\n<h2>Test and go live<\/h2>\n<p>Use the PayMe sandbox to test your integration. You do not need to use the PayMe app to test using the sandbox.<\/p>\n<p>Use the amounts specified below to simulate different payment outcomes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Amount ending in<\/th>\n<th>Result<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">30 or 81<\/td>\n<td>Authorised<\/td>\n<td style=\"text-align: left;\">Successful payment.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">77 or 90<\/td>\n<td>OfferCancelled<\/td>\n<td style=\"text-align: left;\">The payment request expired after PayMe's default expiry time of ten minutes.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">40 or 44<\/td>\n<td>Error<\/td>\n<td style=\"text-align: left;\">There was an error when creating the payment request.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/payme\/web-component","articleFields":{"description":"Add PayMe QR to an existing Components integration.","parameters":{"integration":"Components","platform":"Web","integration_guide_url":"build-your-integration\/sessions-flow?platform=Web&integration=Components","component_name":"the Component","component_name_capitalized":"The Component","payment_method":"PayMe","component_class":"PayMe","payment_method_type":"payme","component_js_const":"payMe"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/payme\/web-component","title":"PayMe Component","content":"This page explains how to add PayMe to your existing Web Components integration.\nDepending on whether your shopper is using a desktop or laptop, or the browser on their mobile device, the Component:\n\nShows the shopper a QR code which they can scan to pay using their PayMe app.\nRedirects the shopper to the PayMe app on their mobile device.\n\nImplement both flows to make sure that your shoppers can pay on different devices.\n\nPayMe is supported from Web Components version 5.56.0.\n\nRequirements\nSelect the server-side flow that your integration uses:\n\n\n    \n        \n        \n    \n\n\nImport resources for v6\nIf you are using Web Components v6, import the Component that you need for PayMe:\nimport { AdyenCheckout, PayMe } from '@adyen\/adyen-web'\nAPI reference\nSelect which endpoint you are using:\n\n\n    \n        \n        \n    \n\n\n\n\n    \n        \n        \n    \n\n\nSee the Web Components integration guide to get the payment outcome and show your shopper the result of the payment.\nComponent configuration\nStep 1: Create a DOM element\nCreate a DOM element on your checkout page, placing it where you want the payment method form to be rendered:\n &lt;div id=\"payme-container\"&gt;&lt;\/div&gt;\nStep 2: Create an instance of the Component\nv6.0.0 or later\nCreate an instance of the Component, passing:\n\nYour instance of AdyenCheckout.\n\nconst payMe = new PayMe(checkout).mount('#payme-container');\n\n    \n    \n        \n            \n            \n                                    v5.x.x or earlier\n                            \n        \n        \n            \nUse the create method of your AdyenCheckout instance, in this case checkout, to create the Component:\nconst payMeComponent = checkout.create('payme').mount('#payme-container');\n\n        \n    \n\n\nTest and go live\nUse the PayMe sandbox to test your integration. You do not need to use the PayMe app to test using the sandbox.\nUse the amounts specified below to simulate different payment outcomes.\n\n\n\nAmount ending in\nResult\nDescription\n\n\n\n\n30 or 81\nAuthorised\nSuccessful payment.\n\n\n77 or 90\nOfferCancelled\nThe payment request expired after PayMe's default expiry time of ten minutes.\n\n\n40 or 44\nError\nThere was an error when creating the payment request.\n\n\n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"PayMe","lvl3":"PayMe Component"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/payme","lvl3":"\/pt\/payment-methods\/payme\/web-component"},"levels":4,"category":"Payment method","category_color":"green","tags":["PayMe","Component"]}}
