{"title":"Gift card Drop-in integration","category":"default","creationDate":1678454580,"content":"<div class=\"additional-info-block output-inline\">\n<div class=\"additional-info-block__body\"><p><img style=\"width: 25px;\" alt=\"\" src=\"\/user\/pages\/reuse\/development-resources\/additional-info-resources\/postman-logo-vertical-orange-2021.svg?decoding=auto&amp;fetchpriority=auto\" \/>&nbsp;&nbsp;<a href=\"https:\/\/www.postman.com\/adyendev\/workspace\/adyen-apis\/collection\/25716737-46ad970e-dc9e-4246-bac2-769c6083e7b5\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Postman collection<\/a><\/p><p><strong>Implementation examples<\/strong><br \/><img style=\"width: 25px;\" alt=\"\" src=\"\/user\/pages\/reuse\/development-resources\/additional-info-resources\/java-original.svg?decoding=auto&amp;fetchpriority=auto\" \/>&nbsp;&nbsp;<a href=\"https:\/\/github.com\/adyen-examples\/adyen-java-spring-online-payments\/tree\/main\/giftcard-example\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Java Spring<\/a><br \/><img style=\"width: 25px;\" alt=\"\" src=\"\/user\/pages\/reuse\/development-resources\/additional-info-resources\/dot-net-original.svg?decoding=auto&amp;fetchpriority=auto\" \/>&nbsp;&nbsp;<a href=\"https:\/\/github.com\/adyen-examples\/adyen-dotnet-online-payments\/tree\/main\/giftcard-example\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">.NET<\/a><br \/><img style=\"width: 25px;\" alt=\"\" src=\"\/user\/pages\/reuse\/development-resources\/additional-info-resources\/nodejs-original.svg?decoding=auto&amp;fetchpriority=auto\" \/>&nbsp;&nbsp;<a href=\"https:\/\/github.com\/adyen-examples\/adyen-node-online-payments\/tree\/main\/giftcard-example\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Node.js<\/a><\/p><\/div><\/div>\n\n<p>This page explains how to add gift cards to your existing Web Drop-in integration.<\/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 built your <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Drop-in%2F%3Ftarget%3D_blank\">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, in <a href=\"\/pt\/payment-methods\/add-payment-methods\">your Customer Area<\/a> add each gift card variant that you want to test.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Import resources for v6<\/h2>\n<p>If you are using Web Drop-in v6, import the resources you need for gift cards:<\/p>\n<pre><code class=\"language-js\">import { AdyenCheckout, Giftcard} from '@adyen\/adyen-web'<\/code><\/pre>\n<h2>API reference<\/h2>\n<p>You do not need to send additional fields for gift cards. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/sessions<\/a>&#58; This is the default with <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Drop-in\">Drop-in v5.0.0<\/a> or later.<\/li>\n<li> <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>&#58; If you implemented an <a href=\"\/pt\/online-payments\/build-your-integration\">additional use case<\/a>.<\/li>\n<\/ul>\n<h2 id=\"configuration\">Drop-in configuration<\/h2>\n<p>Select which endpoint you are integrating:<\/p>\n\n<div id=\"tabExY2l\">\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=Drop-in\\&quot;&gt;Drop-in v5.0.0&lt;\\\/a&gt; or later.&lt;\\\/p&gt;\\n&lt;p&gt;Drop-in handles partial payments automatically.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;config-sessions_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;h3&gt;Required configuration&lt;\\\/h3&gt;\\n&lt;p&gt;Add configuration to let the shopper make a &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/partial-payments\\&quot;&gt;partial payment&lt;\\\/a&gt; with a gift card and pay the rest with another payment method.&lt;\\\/p&gt;\\n&lt;p&gt;Add the following events to your gift cards configuration object:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Event name&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;onBalanceCheck(resolve, reject, data)&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Called when the shopper pays with gift card. Make a  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/paymentMethods\\\/balance\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/paymentMethods\\\/balance&lt;\\\/a&gt; request.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;onOrderRequest(resolve, reject, data)&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Called when the gift card balance is less than the transaction amount. Make an  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/orders\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/orders&lt;\\\/a&gt; request including: &lt;br&gt; - &lt;code&gt;amount&lt;\\\/code&gt; &lt;br&gt; - &lt;code&gt;merchantAccount&lt;\\\/code&gt; &lt;br&gt; - &lt;code&gt;reference&lt;\\\/code&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;onOrderCancel(order)&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Called when the shopper cancels the gift card transaction. Make an  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/orders\\\/cancel\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/orders\\\/cancel&lt;\\\/a&gt; request.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;The following example shows how to configure Drop-in:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Gift card configuration&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;\\\\nconst configuration = {\\\\n   \\\\\\\/\\\\\\\/ ... Other configuration.\\\\n   onOrderCancel: function(Order) {\\\\n       \\\\\\\/\\\\\\\/ Remove the remaining amount value and currency from the order\\\\n       \\\\\\\/\\\\\\\/ Make a POST \\\\\\\/orders\\\\\\\/cancel request\\\\n       \\\\\\\/\\\\\\\/ Call the update function and pass the order\\\\n       checkout.update(order);\\\\n   }\\\\n   const giftcardConfiguration = {\\\\n       onBalanceCheck: function (resolve, reject, data) {\\\\n           \\\\\\\/\\\\\\\/ Make a POST \\\\\\\/paymentMethods\\\\\\\/balance request\\\\n           resolve(BalanceResponse);\\\\n           \\\\\\\/\\\\\\\/ The balance is used to trigger the onOrderRequest function.\\\\n       }\\\\n       onOrderRequest: function (resolve, reject, data) {\\\\n           \\\\\\\/\\\\\\\/ Make a POST \\\\\\\/orders request\\\\n           \\\\\\\/\\\\\\\/ Create an order for the total transaction amount\\\\n           resolve(OrderResponse);\\\\n       }\\\\n};\\&quot;}]&#039; :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&lt;p&gt;Include the &lt;code&gt;giftcardConfiguration&lt;\\\/code&gt; object  when &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=Web&amp;amp;integration=Drop-in#configure\\&quot;&gt;creating a configuration object&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;AdyenCheckout configuration&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const configuration = {\\\\n  \\\\\\\/\\\\\\\/ ...  other required configuration\\\\n  paymentMethodsConfiguration: {\\\\n    giftcard: giftcardConfiguration\\\\n  }\\\\n};\\&quot;}]&#039; :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&lt;p&gt;Pass the Drop-in configuration object when creating your instance of &lt;code&gt;AdyenCheckout&lt;\\\/code&gt;:&lt;\\\/p&gt;\\n&lt;pre&gt;&lt;code class=\\&quot;language-js\\&quot;&gt;const checkout = await AdyenCheckout(configuration);&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&lt;h2&gt;Show the payment result&lt;\\\/h2&gt;\\n&lt;p&gt;Use the\\u00a0 &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#responses-200-resultCode\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;resultCode&lt;\\\/a&gt; from the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; response to show the payment result to your shopper.&lt;\\\/p&gt;\\n&lt;p&gt;You will also receive the outcome of the payment asynchronously in a &lt;a href=\\&quot;\\\/pt\\\/development-resources\\\/webhooks\\&quot;&gt;webhook&lt;\\\/a&gt;. For gift card payments, you can receive the following &lt;code&gt;resultCode&lt;\\\/code&gt; values:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;resultCode&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;th&gt;Action to take&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Authorised&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment was successful.&lt;\\\/td&gt;\\n&lt;td&gt;Inform the shopper that the payment has been successful. &lt;br&gt; If you are using &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/capture#manual-capture\\&quot;&gt;manual capture&lt;\\\/a&gt;, you also need to &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/capture\\&quot;&gt;capture&lt;\\\/a&gt; the payment.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Cancelled&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper cancelled the payment.&lt;\\\/td&gt;\\n&lt;td&gt;Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Error&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;There was an error when the payment was being processed. For more information, check the &lt;a href=\\&quot;\\\/pt\\\/development-resources\\\/refusal-reasons\\&quot;&gt;\\n  &lt;code&gt;refusalReason&lt;\\\/code&gt;\\n&lt;\\\/a&gt; field.&lt;\\\/td&gt;\\n&lt;td&gt;Inform the shopper that there was an error processing their payment.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Refused&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment was refused.  For more information, check the &lt;a href=\\&quot;\\\/pt\\\/development-resources\\\/refusal-reasons\\&quot;&gt;\\n  &lt;code&gt;refusalReason&lt;\\\/code&gt;\\n&lt;\\\/a&gt; field.&lt;\\\/td&gt;\\n&lt;td&gt;Ask the shopper to try the payment again using a different payment method.&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;config-payments_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h3>(Optional) Customize logos<\/h3>\n<p>You can specify a custom logo for a gift card brand when <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Drop-in#configure\">creating a configuration object<\/a>. This example shows a custom icon for Plastix:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'AdyenCheckout configuration'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const configuration = {\\n  \\\/\\\/ ...  other configuration\\n  paymentMethodsConfiguration: {\\n    giftcard: {\\n                brandsConfiguration: {\\n                    plastix: {\\n                        icon: 'https:\\\/\\\/mymerchant.com\\\/icons\\\/customIcon.svg'\\n                    }\\n                }\\n    }\\n  }\\n}&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Before making live gift card payments, simulate transactions:<\/p>\n<ol>\n<li>\n<p>Test your integration using our <a href=\"\/pt\/development-resources\/test-cards-and-credentials\/alternative-payment-method-credentials#gift-cards\">test card numbers<\/a> depending on your gift card provider. When testing, you use a simulator that tries to behave and respond in the same way as an end-to-end connection.<\/p>\n<p>To simulate a scenario, send one of the following amounts in the test payment request:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Amount (last three digits)<\/th>\n<th style=\"text-align: left;\"><code>resultCode<\/code><\/th>\n<th style=\"text-align: left;\"><code>refusalReason<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">100<\/td>\n<td style=\"text-align: left;\">Authorised<\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">123<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">124<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Not enough balance<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">125<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Blocked Card<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">126<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Expired Card<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">130<\/td>\n<td style=\"text-align: left;\">Error<\/td>\n<td style=\"text-align: left;\">Acquirer Error<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">134<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Invalid Pin<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">135<\/td>\n<td style=\"text-align: left;\">Refused<\/td>\n<td style=\"text-align: left;\">Pin tries exceeded<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!--list separator-->\n<p>For example, send a payment amount with <strong>100<\/strong> as the last three digits, such as 1.00 or 11.00. This will result in an <strong>Authorised<\/strong> transaction.<\/p>\n<\/li>\n<li>\n<p>Check the status of test payments in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a>\u00a0&gt;\u00a0<strong>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<p>When you are ready to go live:<\/p>\n<ol>\n<li>Onboard with a gift card provider and add the <a href=\"\/pt\/payment-methods\/gift-cards#supported-gift-cards\">gift card variant<\/a> to your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/li>\n<li>\n<p>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 the gift card to 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<p><div class=\"sc-notice info\"><div>You can test end-to-end scenarios in your live environment using real gift card details and small amounts.<\/div><\/div><\/p>\n<\/li>\n<\/ol>\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\/drop-in-web\"\n                        target=\"_self\"\n                        >\n                    Web 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\/gift-cards\/web-drop-in","articleFields":{"description":"Add gift cards to your Drop-in integration","feedback_component":false,"parameters":{"integration":"Drop-in","platform":"Web","integration_guide_url":"build-your-integration\/sessions-flow?platform=Web&integration=Drop-in","component_name":"Drop-in","component_name_capitalized":"Drop-in","payment_method":"gift cards","component_class":"Giftcard","payment_method_type":"giftcard","component_js_const":"giftcard","api_explorer_shortcode":"[api=\"Checkout\/sessions\" inlineCode=\"false\" t=\"Try it in our API Explorer.\"]","logo_1":"![](\/reuse\/development-resources\/additional-info-resources\/java-original.svg?resize=25)","example_1":"[Java Spring](https:\/\/github.com\/adyen-examples\/adyen-java-spring-online-payments\/tree\/main\/giftcard-example)","logo_2":"![](\/reuse\/development-resources\/additional-info-resources\/dot-net-original.svg?resize=25)","example_2":"[.NET](https:\/\/github.com\/adyen-examples\/adyen-dotnet-online-payments\/tree\/main\/giftcard-example)","logo_3":"![](\/reuse\/development-resources\/additional-info-resources\/nodejs-original.svg?resize=25)","example_3":"[Node.js](https:\/\/github.com\/adyen-examples\/adyen-node-online-payments\/tree\/main\/giftcard-example)"},"status":"current","filters_component":false},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/gift-cards\/web-drop-in","title":"Gift card Drop-in integration","content":"\n&nbsp;&nbsp;Postman collectionImplementation examples&nbsp;&nbsp;Java Spring&nbsp;&nbsp;.NET&nbsp;&nbsp;Node.js\n\nThis page explains how to add gift cards to your existing Web Drop-in integration.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built your Drop-in integration.\n\n\nSetup steps\nBefore you begin, in your Customer Area add each gift card variant that you want to test.\n\n\n\nImport resources for v6\nIf you are using Web Drop-in v6, import the resources you need for gift cards:\nimport { AdyenCheckout, Giftcard} from '@adyen\/adyen-web'\nAPI reference\nYou do not need to send additional fields for gift cards. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:\n\n \/sessions&#58; This is the default with Drop-in v5.0.0 or later.\n \/payments&#58; If you implemented an additional use case.\n\nDrop-in configuration\nSelect which endpoint you are integrating:\n\n\n    \n        \n        \n    \n\n\n(Optional) Customize logos\nYou can specify a custom logo for a gift card brand when creating a configuration object. This example shows a custom icon for Plastix:\n\n    \n\nTest and go live\nBefore making live gift card payments, simulate transactions:\n\n\nTest your integration using our test card numbers depending on your gift card provider. When testing, you use a simulator that tries to behave and respond in the same way as an end-to-end connection.\nTo simulate a scenario, send one of the following amounts in the test payment request:\n\n\n\nAmount (last three digits)\nresultCode\nrefusalReason\n\n\n\n\n100\nAuthorised\n\n\n\n123\nRefused\nRefused\n\n\n124\nRefused\nNot enough balance\n\n\n125\nRefused\nBlocked Card\n\n\n126\nRefused\nExpired Card\n\n\n130\nError\nAcquirer Error\n\n\n134\nRefused\nInvalid Pin\n\n\n135\nRefused\nPin tries exceeded\n\n\n\n\nFor example, send a payment amount with 100 as the last three digits, such as 1.00 or 11.00. This will result in an Authorised transaction.\n\n\nCheck the status of test payments in your test Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\n\n\nWhen you are ready to go live:\n\nOnboard with a gift card provider and add the gift card variant to your live Customer Area.\n\nContact our Support Team to add the gift card to your live Customer Area.\nYou can test end-to-end scenarios in your live environment using real gift card details and small amounts.\n\n\nSee also\n\n\n                    Web 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":"Gift cards","lvl3":"Gift card 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\/gift-cards","lvl3":"\/pt\/payment-methods\/gift-cards\/web-drop-in"},"levels":4,"category":"Payment method","category_color":"green","tags":["Drop-in","integration"]}}
