{"title":"PayMe Drop-in integration","category":"default","creationDate":1776961628,"content":"<p>Our <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Drop-in\">Android Drop-in<\/a> renders PayMe in your payment form, and redirects the shopper to the PayMe app to complete the payment.<\/p>\n<div class=\"notices green\">\n<p>PayMe is supported from Android Drop-in version 4.0.0.<\/p>\n<\/div>\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 built an Advanced flow <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Android&amp;integration=Drop-in\">Android Drop-in integration<\/a>. <\/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 PayMe in your Customer Area<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>API reference<\/h2>\n<p>If you implemented an <a href=\"\/pt\/online-payments\/build-your-integration\">additional use case<\/a>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter name<\/th>\n<th>Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>channel<\/code><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">To determine whether the shopper is using a desktop, laptop or mobile.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems-quantity\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\n  <code>lineItems.quantity<\/code>\n<\/a><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">The number of items. Must be between 0 and 9999.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems-sku\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\n  <code>lineItems.sku<\/code>\n<\/a><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">The stock keeping unit. Maximum length 200 characters.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems-description\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\n  <code>lineItems.description<\/code>\n<\/a><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">The order description to display to the shopper. Maximum length 200 characters.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems-amountIncludingTax\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\n  <code>lineItems.amountIncludingTax<\/code>\n<\/a><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">Item amount including the tax, in minor units. Must be between 1 and 100000000.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems-itemCategory\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\n  <code>lineItems.itemCategory<\/code>\n<\/a><\/td>\n<td><\/td>\n<td style=\"text-align: left;\">The item category. Maximum length 200 characters.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments request'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;kotlin&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;\\\/\\\/ SET YOUR ADYEN_API_KEY with the API key from the Customer Area.\\nconst {Client, Config, CheckoutAPI} = require('@adyen\\\/api-library');\\nconst config = new Config();\\n\\\/\\\/ SET YOUR ADYEN_API_KEY with the API key from the Customer Area.\\nconfig.apiKey = '[API_KEY]';\\nconfig.merchantAccount = '[MERCHANT_ACCOUNT]';\\nconst client = new Client({ config });\\nclient.setEnvironment(\\&quot;TEST\\&quot;);\\nconst checkout = new CheckoutAPI(client);\\ncheckout.payments({\\n    \\&quot;paymentMethod\\&quot;: {\\n      \\&quot;type\\&quot;: \\&quot;payme\\&quot;\\n    },\\n    \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;HKD\\&quot;,\\n      \\&quot;value\\&quot;: 4200\\n    },\\n    \\&quot;countryCode\\&quot;: \\&quot;HK\\&quot;,\\n    \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n    \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/...\\&quot;,\\n    \\&quot;channel\\&quot;:\\&quot;Android\\&quot;,\\n    \\&quot;lineItems\\&quot;: [\\n      {\\n        \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n        \\&quot;sku\\&quot;: \\&quot;3232\\&quot;,\\n        \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n        \\&quot;amountIncludingTax\\&quot;: 4200,\\n        \\&quot;itemCategory\\&quot;: \\&quot;Fashion\\&quot;\\n      }\\n    ]\\n  })&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Show PayMe in your payment form<\/h2>\n<p>Drop-in uses 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\">countryCode<\/a> and the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a> from your  <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> request to show the available payment methods to your shopper. From your server, make a  <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> request specifying:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a>&#58; <span translate=\"no\"><strong>HK<\/strong><\/span><\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a>&#58; <span translate=\"no\"><strong>HKD<\/strong><\/span><\/li>\n<\/ul>\n<h2>Make a payment<\/h2>\n<p>When the shopper proceeds to pay, Drop-in returns the <code>paymentComponentData.paymentMethod<\/code>.<\/p>\n<ol>\n<li>Pass the <code>paymentComponentData.paymentMethod<\/code> to your server.<\/li>\n<li>\n<p>From your server, make a  <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, specifying:<\/p>\n<ul>\n<li><code>paymentMethod<\/code>: The <code>paymentComponentData.paymentMethod<\/code> from your client app.<\/li>\n<li><code>returnURL<\/code>: URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the <code>RedirectComponent.getReturnUrl(context)<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'payme-payments-redirect'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;paymentMethod\\&quot;: {\\n      \\&quot;type\\&quot;: \\&quot;payme\\&quot;\\n    },\\n    \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;HKD\\&quot;,\\n      \\&quot;value\\&quot;: 4200\\n    },\\n    \\&quot;countryCode\\&quot;: \\&quot;HK\\&quot;,\\n    \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n    \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/...\\&quot;,\\n    \\&quot;channel\\&quot;:\\&quot;Web\\&quot;,\\n    \\&quot;lineItems\\&quot;: [\\n      {\\n        \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n        \\&quot;sku\\&quot;: \\&quot;3232\\&quot;,\\n        \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n        \\&quot;amountIncludingTax\\&quot;: 4200,\\n        \\&quot;itemCategory\\&quot;: \\&quot;Fashion\\&quot;\\n      }\\n    ]\\n}'&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\nconst {Client, Config, CheckoutAPI} = require('@adyen\\\/api-library');\\nconst config = new Config();\\n\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\nconfig.apiKey = '[API_KEY]';\\nconfig.merchantAccount = '[MERCHANT_ACCOUNT]';\\nconst client = new Client({ config });\\nclient.setEnvironment(\\&quot;TEST\\&quot;);\\nconst checkout = new CheckoutAPI(client);\\ncheckout.payments({\\n    \\&quot;paymentMethod\\&quot;: {\\n      \\&quot;type\\&quot;: \\&quot;payme\\&quot;\\n    },\\n    \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;HKD\\&quot;,\\n      \\&quot;value\\&quot;: 4200\\n    },\\n    \\&quot;countryCode\\&quot;: \\&quot;HK\\&quot;,\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n    \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/...\\&quot;,\\n    \\&quot;channel\\&quot;:\\&quot;Web\\\/iOS\\\/Android\\&quot;,\\n    \\&quot;lineItems\\&quot;: [\\n      {\\n        \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n        \\&quot;sku\\&quot;: \\&quot;3232\\&quot;,\\n        \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n        \\&quot;amountIncludingTax\\&quot;: 4200,\\n        \\&quot;itemCategory\\&quot;: \\&quot;Fashion\\&quot;\\n      }\\n    ]\\n  })&quot;}]\" :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>\n<p><code>action<\/code>: Object containing information about the redirect.<\/p>\n<pre><code class=\"language-json\">{\n\"resultCode\": \"RedirectShopper\",\n\"action\": {\n    \"expiresAt\": \"2021-01-30T16:09:09Z\",\n    \"paymentMethodType\": \"payme\",\n    \"url\": \"https:\/\/qr.payme.hsbc.com.hk\/...\",\n    \"method\": \"GET\",\n    \"type\": \"redirect\"\n    }\n}<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>If your integration is <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Android&amp;integration=Drop-in#make-a-payment\">set up correctly<\/a>, the <code>action<\/code> object is passed from your server to the client.<\/p>\n<ol>\n<li>Pass the <code>action<\/code> object to your client app. Drop-in needs this to redirect the shopper to the PayMe app.<\/li>\n<\/ol>\n<p>See the <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Drop-in\">Android Drop-in integration guide<\/a> to get the payment outcome and show your shopper the result of the payment.<\/p>\n<h2 id=\"test-and-go-live\">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>\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\/sessions-flow\/?platform=Android&amp;integration=Drop-in\"\n                        target=\"_self\"\n                        >\n                    Android Drop-in integration guide\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/payme\/android-drop-in","articleFields":{"description":"Add PayMe to an existing Drop-in integration.","parameters":{"payment_method":"PayMe","integration_guide_url":"build-your-integration\/sessions-flow?platform=Android&integration=Drop-in","integration":"Drop-in","platform":"Android"},"id":"47481283","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/payme\/android-drop-in","title":"PayMe Drop-in integration","content":"Our Android Drop-in renders PayMe in your payment form, and redirects the shopper to the PayMe app to complete the payment.\n\nPayMe is supported from Android Drop-in version 4.0.0.\n\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built an Advanced flow Android Drop-in integration. \n\n\nSetup steps\nBefore you begin, add PayMe in your Customer Area.\n\n\n\nAPI reference\nIf you implemented an additional use case.\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\nchannel\n\nTo determine whether the shopper is using a desktop, laptop or mobile.\n\n\n\n  lineItems.quantity\n\n\nThe number of items. Must be between 0 and 9999.\n\n\n\n  lineItems.sku\n\n\nThe stock keeping unit. Maximum length 200 characters.\n\n\n\n  lineItems.description\n\n\nThe order description to display to the shopper. Maximum length 200 characters.\n\n\n\n  lineItems.amountIncludingTax\n\n\nItem amount including the tax, in minor units. Must be between 1 and 100000000.\n\n\n\n  lineItems.itemCategory\n\n\nThe item category. Maximum length 200 characters.\n\n\n\n\n    \n\nShow PayMe in your payment form\nDrop-in uses the  countryCode and the  amount.currency from your  \/paymentMethods request to show the available payment methods to your shopper. From your server, make a  \/paymentMethods request specifying:\n\n countryCode&#58; HK\n amount.currency&#58; HKD\n\nMake a payment\nWhen the shopper proceeds to pay, Drop-in returns the paymentComponentData.paymentMethod.\n\nPass the paymentComponentData.paymentMethod to your server.\n\nFrom your server, make a  \/payments request, specifying:\n\npaymentMethod: The paymentComponentData.paymentMethod from your client app.\nreturnURL: URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the RedirectComponent.getReturnUrl(context).\n\n\n\n\n    \n\nThe  \/payments response contains:\n\n\naction: Object containing information about the redirect.\n{\n\"resultCode\": \"RedirectShopper\",\n\"action\": {\n    \"expiresAt\": \"2021-01-30T16:09:09Z\",\n    \"paymentMethodType\": \"payme\",\n    \"url\": \"https:\/\/qr.payme.hsbc.com.hk\/...\",\n    \"method\": \"GET\",\n    \"type\": \"redirect\"\n    }\n}\n\n\nIf your integration is set up correctly, the action object is passed from your server to the client.\n\nPass the action object to your client app. Drop-in needs this to redirect the shopper to the PayMe app.\n\nSee the Android Drop-in integration guide to get the payment outcome and show your shopper the result of the payment.\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\nSee also\n\n\n                    Android Drop-in integration guide\n                \n                    Webhooks\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"PayMe","lvl3":"PayMe Drop-in integration"},"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\/android-drop-in"},"levels":4,"category":"Payment method","category_color":"green","tags":["PayMe","Drop-in","integration"]}}
