{"title":"DuitNow Drop-in integration","category":"default","creationDate":1776961628,"content":"<p>Our <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=iOS&amp;integration=Drop-in\">iOS Drop-in<\/a> renders DuitNow in your payment form, and generates a QR code that the shopper uses to pay with their choice of app from DuitNow participating banks.<\/p>\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=\"tabIo5GT\">\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=%7B%7BgetParameter%28%27platform%27%29%7D%7D&amp;amp;integration=%7B%7BgetParameter%28%27integration%27%29%7D%7D\\&quot;&gt;  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, contact our &lt;a href=\\&quot;https:\\\/\\\/ca-test.adyen.com\\\/ca\\\/ca\\\/contactUs\\\/support.shtml?form=other\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Support Team&lt;\\\/a&gt; to add  in your Customer Area.&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=%7B%7BgetParameter%28%27platform%27%29%7D%7D&amp;amp;integration=%7B%7BgetParameter%28%27integration%27%29%7D%7D\\&quot;&gt;  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, contact our &lt;a href=\\&quot;https:\\\/\\\/ca-test.adyen.com\\\/ca\\\/ca\\\/contactUs\\\/support.shtml?form=other\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Support Team&lt;\\\/a&gt; to add  in your Customer Area.&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>Show DuitNow in your payment form<\/h2>\n<p>Drop-in uses the <code>countryCode<\/code> and the <code>amount.currency<\/code> 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.<\/p>\n<p>To show DuitNow in your payment form, you need to specify in 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:<\/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>MY<\/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>MYR<\/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.value<\/a>&#58; The value of the payment.<\/li>\n<\/ul>\n<p>After the shopper selects a payment method and provides payment details, Drop-in invokes the <code>didSubmit<\/code> method which contains <code>data.paymentMethod<\/code>. Pass <code>data.paymentMethod<\/code> to your server and make a payment request.<\/p>\n<h2>Make a payment<\/h2>\n<p>When the shopper proceeds to pay, Drop-in invokes the <code>didSubmit<\/code> method which contains <code>data.paymentMethod<\/code>. <\/p>\n<ol>\n<li>Pass <code>data.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>data.paymentMethod<\/code> from the <code>didSubmit<\/code> event from your client app.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'duitnow-payments'\" :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;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;currency\\&quot;: \\&quot;MYR\\&quot;,\\n        \\&quot;value\\&quot;: 10000\\n    },\\n    \\&quot;paymentMethod\\&quot;: {\\n        \\&quot;type\\&quot;: \\&quot;duitnow\\&quot;\\n    },\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v39.3.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v28.2.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v32.1.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v29.0.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  amount: {\\n    currency: \\&quot;MYR\\&quot;,\\n    value: 10000\\n  },\\n  paymentMethod: {\\n    type: \\&quot;duitnow\\&quot;\\n  },\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.0.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.6.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;MYR\\&quot;,\\n    \\&quot;value\\&quot;: 10000\\n  },\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;duitnow\\&quot;\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.4.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :amount =&gt; {\\n    :currency =&gt; 'MYR',\\n    :value =&gt; 10000\\n  },\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'duitnow'\\n  },\\n  :reference =&gt; 'YOUR_ORDER_NUMBER'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v29.0.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>Drop-in generates the QR code that the shopper uses to pay.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"check-payment-result\">Check the payment result<\/h2>\n<p>To check the payment result, use the <code>state.data<\/code> object from the corresponding event handler:<\/p>\n<ul>\n<li><code>onAdditionalDetails<\/code>for successful payments.<\/li>\n<li><code>onError<\/code> for unsuccessful or timed out payments.<\/li>\n<\/ul>\n<p>From your server, make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request with:<\/p>\n<ul>\n<li><code>details<\/code>: the <code>state.data.details<\/code> from the <code>onAdditionalDetails<\/code> or <code>onError<\/code> event.<\/li>\n<li><code>paymentData<\/code>: the <code>state.data.paymentData<\/code> from the <code>onAdditionalDetails<\/code> or <code>onError<\/code> event.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments\/details request'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"{hint:state.data.details from onAdditionalDetails or onError}details{\\\/hint}\\\": {\\n    \\\"redirectResult\\\": \\\"X6XtfGC3!Y...\\\"\\n  },\\n  \\\"{hint:state.data.paymentData from onAdditionalDetails or on Error}paymentData{\\\/hint}\\\": \\\"Ab02b4c0!BQABAgCX79JLFTqePTGTb...\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You receive a response containing:<\/p>\n<ul>\n<li><code>additionalData<\/code>: Object containing the value and currency for the payment.<\/li>\n<li><code>pspReference<\/code>: Our unique identifier for the transaction.<\/li>\n<li><code>resultCode<\/code>: <strong>Authorised<\/strong> for successful payments or <strong>Refused<\/strong> for unsuccessful or timed-out payments. Use this to present the payment result to your shopper.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"additionalData\\\":\\n  {\\n    \\\"authorisedAmountCurrency\\\": \\\"THB\\\",\\n    \\\"authorisedAmountValue\\\": \\\"1000\\\"\\n  },\\n  \\\"pspReference\\\": \\\"88154795347618C\\\",\\n  \\\"resultCode\\\": \\\"Authorised\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Show the payment result<\/h2>\n<p>Use the <code>resultCode<\/code> from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response to show the payment outcome on your frontend.<\/p>\n<p>You will also receive the outcome of the payment asynchronously in a <a href=\"\/pt\/development-resources\/webhooks\">webhook<\/a>.<\/p>\n<p>The <code>resultCode<\/code> values you can receive for DuitNow are:<\/p>\n<table>\n<thead>\n<tr>\n<th>eventCode<\/th>\n<th>success field<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>false<\/strong><\/td>\n<td>The transaction failed.<\/td>\n<td>Cancel the order and inform the shopper that the payment failed.<\/td>\n<\/tr>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>true<\/strong><\/td>\n<td>The shopper successfully completed the payment.<\/td>\n<td>Inform the shopper that the payment has been successful and proceed with the order.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If you are implementing an additional use case, you can <a href=\"\/pt\/online-payments\/build-your-integration\">make a \/payments\/details call to receive an immediate response<\/a>.<\/p>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Test DuitNow payments with real payment details and small amounts.<\/p>\n<p>Check the status of your test DuitNow payments in your <strong>Customer Area<\/strong> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p>To accept live DuitNow payments, you must contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to add DuitNow in your live Customer Area.<\/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\/sessions-flow?platform=iOS&amp;integration=Drop-in\"\n                        target=\"_self\"\n                        >\n                    iOS 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\/duitnow\/ios-drop-in","articleFields":{"description":"Add DuitNow to your existing iOS Drop-in integration.","robots":"noindex,nofollow","parameters":{"payment_method_type":"duitnow"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/duitnow\/ios-drop-in","title":"DuitNow Drop-in integration","content":"Our iOS Drop-in renders DuitNow in your payment form, and generates a QR code that the shopper uses to pay with their choice of app from DuitNow participating banks.\nRequirements\nSelect the server-side flow that your integration uses:\n\n\n    \n        \n        \n    \n\n\nShow DuitNow 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.\nTo show DuitNow in your payment form, you need to specify in your  \/paymentMethods request:\n\n countryCode&#58; MY\n amount.currency&#58; MYR\n amount.value&#58; The value of the payment.\n\nAfter the shopper selects a payment method and provides payment details, Drop-in invokes the didSubmit method which contains data.paymentMethod. Pass data.paymentMethod to your server and make a payment request.\nMake a payment\nWhen the shopper proceeds to pay, Drop-in invokes the didSubmit method which contains data.paymentMethod. \n\nPass data.paymentMethod to your server.\n\nFrom your server, make a  \/payments request, specifying:\n\npaymentMethod: The data.paymentMethod from the didSubmit event from your client app.\n\n\n\n\nDrop-in generates the QR code that the shopper uses to pay.\n\n\nCheck the payment result\nTo check the payment result, use the state.data object from the corresponding event handler:\n\nonAdditionalDetailsfor successful payments.\nonError for unsuccessful or timed out payments.\n\nFrom your server, make a POST  \/payments\/details request with:\n\ndetails: the state.data.details from the onAdditionalDetails or onError event.\npaymentData: the state.data.paymentData from the onAdditionalDetails or onError event.\n\n\n    \n\nYou receive a response containing:\n\nadditionalData: Object containing the value and currency for the payment.\npspReference: Our unique identifier for the transaction.\nresultCode: Authorised for successful payments or Refused for unsuccessful or timed-out payments. Use this to present the payment result to your shopper.\n\n\n    \n\nShow the payment result\nUse the resultCode from the  \/payments\/details response to show the payment outcome on your frontend.\nYou will also receive the outcome of the payment asynchronously in a webhook.\nThe resultCode values you can receive for DuitNow are:\n\n\n\neventCode\nsuccess field\nDescription\nAction to take\n\n\n\n\nAUTHORISATION\nfalse\nThe transaction failed.\nCancel the order and inform the shopper that the payment failed.\n\n\nAUTHORISATION\ntrue\nThe shopper successfully completed the payment.\nInform the shopper that the payment has been successful and proceed with the order.\n\n\n\nIf you are implementing an additional use case, you can make a \/payments\/details call to receive an immediate response.\nTest and go live\nTest DuitNow payments with real payment details and small amounts.\nCheck the status of your test DuitNow payments in your Customer Area &gt; Transactions &gt; Payments.\nTo accept live DuitNow payments, you must contact our Support Team to add DuitNow in your live Customer Area.\nSee also\n\n\n                    iOS 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":"DuitNow","lvl3":"DuitNow 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\/duitnow","lvl3":"\/pt\/payment-methods\/duitnow\/ios-drop-in"},"levels":4,"category":"Payment method","category_color":"green","tags":["DuitNow","Drop-in","integration"]}}
