{"title":"Make a gift card payment","category":"default","creationDate":1779533779,"content":"<p>After you have <a href=\"\/point-of-sale\/gift-cards-terminal-api\/activate\">activated a gift card<\/a> and <a href=\"\/point-of-sale\/gift-cards-terminal-api\/load-a-balance\">loaded with a balance<\/a>, you can make a payment with the gift card. There are two gift card payment flows: one using partial authorizations and another that involves a balance check first.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements, limitations, and preparations.<\/p>\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;\">A <a href=\"\/point-of-sale\/design-your-integration\/terminal-api\">Terminal API<\/a> integration with payment terminals.<\/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: <ul><li markdown=\"1\"><a href=\"\/point-of-sale\/what-we-support\/payment-methods\/add-payment-methods\">Add the payment method to your Adyen account<\/a>.<\/li><li markdown=\"1\">Complete the onboarding process with the gift card provider.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>You can choose one of two payment flows:<\/p>\n<ul>\n<li>A flow with one or more partial payment requests if you do not know the exact balance on the gift card:\n<ol>\n<li>Make a partial gift card payment request for the full amount due.<\/li>\n<li>If the gift card balance is not enough, you <a href=\"\/point-of-sale\/gift-cards-terminal-api\/payment#partial-authorisation\">make a follow-up payment<\/a> request to let the shopper pay the remainder with another card or cash.<\/li>\n<\/ol><\/li>\n<li>A flow without partial authorizations where you first check the balance of the gift card:\n<ol>\n<li><a href=\"\/point-of-sale\/gift-cards-terminal-api\/query-the-balance#make-a-balance-inquiry\">Make a balance request<\/a> to check the balance on the gift card.<\/li>\n<li>Decide what to do next:\n<ul>\n<li>If the balance is enough, you make a gift card payment request for the full amount due.<\/li>\n<li>If the balance is not enough, you make a gift card payment request for the full balance, and then you make a regular payment request to let the shopper pay the remainder with a different card or cash.<\/li>\n<\/ul><\/li>\n<\/ol><\/li>\n<\/ul>\n<h2 id=\"make-payment-request\">1. Make the initial payment<\/h2>\n<div class=\"additional-info-block output-inline\">\n<h5 class=\"article__heading additional-info-block__title\">Testing<\/h5><div class=\"additional-info-block__body\"><p>You can <a href=\"\/point-of-sale\/partial-authorizations#testing-partial-authorizations\">test the partial authorization flow<\/a> using an amount ending in <strong>139<\/strong>.<\/p><\/div><\/div>\n\n<p>To make a payment using a gift card where partial authorization is possible:<\/p>\n<ol>\n<li>\n<p>Determine the <a href=\"\/point-of-sale\/gift-cards-terminal-api#card-entry\">card entry method<\/a>:<\/p>\n<ul>\n<li>If you want to scan the card, do that first and use the obtained card details in your request.<\/li>\n<li>\n<p>If you want to swipe the card or use manual key entry (MKE), send the request first. The payment terminal will show a prompt to swipe the card or enter the card details.<\/p>\n<!-- list separator -->\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/point-of-sale\/basic-tapi-integration\/make-a-payment#make-a-payment\">Make a payment request<\/a>, specifying:<\/p>\n<ul>\n<li>\n<p>The standard <a href=\"\/point-of-sale\/design-your-integration\/terminal-api#request-message-header\">\n  <code>SaleToPOIRequest.MessageHeader<\/code>\n<\/a> object, with <code>MessageClass<\/code> set to <span translate=\"no\"><strong>Service<\/strong><\/span> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>Payment<\/strong><\/span>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>ProtocolVersion<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><strong>3.0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageClass<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Service<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageCategory<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Payment<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageType<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Request<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>ServiceID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (<code>POIID<\/code>) being used.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for the POS system component to send this request from.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>POIID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The unique ID of the terminal to send this request to. Format: <em>[device model]-[serial number]<\/em>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#request-SaleData\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest.SaleData<\/a> object with:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>SaleTransactionID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">An object with: <ul><li markdown=\"1\"><code>TransactionID<\/code>: your reference to identify a payment. We recommend using a unique value. In your Customer Area and Adyen reports, this will show as the <strong>merchant reference<\/strong> for the transaction.<\/li> <li markdown=\"1\"><code>TimeStamp<\/code>: Date and time of the request in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601#Coordinated_Universal_Time_(UTC)\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">UTC format<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleReferenceID<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Unique reference, such as your order number plus a sequence number, that lets you identify partial authorizations that belong together. In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, this will appear as the <strong>Merchant Order<\/strong> for the transaction.<br> <br>For example, if the order number is <em>Order12345<\/em>, you specify <strong>Order12345-1<\/strong> in the first partial authorization request and <strong>Order12345-2<\/strong> in the second partial authorization request.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleToAcquirerData<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\">The <span translate=\"no\"><strong>AllowPartialAuthorisation<\/strong><\/span> tender option. See the <a href=\"#sale-to-acquirer-data\">instructions below<\/a>.<\/li> <li markdown=\"1\">Optional for manually keying in the card number (MKE): <span translate=\"no\"><strong>maxLength<\/strong><\/span> and <span translate=\"no\"><strong>cardMask<\/strong><\/span>. Use these fields to specify card numbers with more than 24 digits. See the <a href=\"\/point-of-sale\/gift-cards-terminal-api\/payment?tab=gift_card_payment_mke_2\">example MKE gift card request<\/a>.<\/li><li markdown=\"1\">Optional for Stored Value Solutions (SVS) gift cards: <span translate=\"no\"><strong>ssc<\/strong><\/span>. This is the secondary security code of the gift card, and allows up to 8 digits. For example, <code>ssc<\/code>: <strong>1111<\/strong>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"sale-to-acquirer-data\"><\/a><br \/>\nIn <code>SaleData.SaleToAcquirerData<\/code>, specify the tender option in one of the following formats:<\/p>\n<ul>\n<li>\n<p>Option 1: a JSON object converted to a Base64 encoded string.<br \/>\nEncode <code>{\"tenderOption\": \"AllowPartialAuthorisation\"}<\/code> to Base64, and pass the resulting string:<br \/>\n<code>\"SaleToAcquirerData\": \"eyJ0ZW5kZXJPcHRpb24iOiAiQWxsb3dQYXJ0aWFsQXV0aG9yaXNhdGlvbiJ9\"<\/code><\/p>\n<\/li>\n<li>\n<p>Option 2: a key-value pair:<br \/>\n<code>\"SaleToAcquirerData\": \"tenderOption=AllowPartialAuthorisation\"<\/code><\/p>\n<\/li>\n<\/ul>\n<p>The format that you use here will also be the format of the <code>AdditionalResponse<\/code> that you receive. If there are more tender options (for example, <span translate=\"no\"><strong>ReceiptHandler<\/strong><\/span> ) or other data elements that you need to pass in the <code>SaleToAcquirerData<\/code> field, refer to <a href=\"\/point-of-sale\/add-data\">Add information to a payment<\/a>.<br \/>\n<br><\/p>\n<\/li>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#request-PaymentTransaction\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest.PaymentTransaction<\/a> object with:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>AmountsReq<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">An object with: <ul><li markdown=\"1\"><code>Currency<\/code>: The transaction <a href=\"\/development-resources\/currency-codes\">currency<\/a>.<\/li><li markdown=\"1\"><code>RequestedAmount<\/code>: The purchase amount, with decimals.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#request-PaymentData-PaymentInstrumentData\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest.PaymentData.PaymentInstrumentData<\/a> object. This is where you indicate that a gift card is used.<br \/>\n<a id=\"payment-instrument-data\"><\/a><\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>PaymentInstrumentType<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>StoredValue<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>StoredValueAccountID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The gift card details: <ul><li markdown=\"1\"><code>StoredValueAccountType<\/code>: <span translate=\"no\"><strong>GiftCard<\/strong><\/span><\/li> <li markdown=\"1\"><code>StoredValueProvider<\/code>: the gift card issuer, such as <span translate=\"no\"><strong>givex<\/strong><\/span>, <span translate=\"no\"><strong>svs<\/strong><\/span>, <span translate=\"no\"><strong>valuelink<\/strong><\/span>, <span translate=\"no\"><strong>genericgiftcard<\/strong><\/span>, or <strong><a href=\"\/payment-methods\/gift-cards#supported-gift-cards\">any Intersolve-supported card type<\/a><\/strong>.<\/li> <li markdown=\"1\"><code>IdentificationType<\/code>: <span translate=\"no\"><strong>PAN<\/strong><\/span><\/li> <li markdown=\"1\"><code>EntryMode<\/code>, <code>StoredValueID<\/code> and <code>ExpiryDate<\/code>: these parameters depend on the <a href=\"\/point-of-sale\/gift-cards-terminal-api#card-entry\">card entry method<\/a> you are using. See the following table.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card entry<\/th>\n<th style=\"text-align: left;\">Parameters<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Scan<\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\"><code>EntryMode<\/code>: <span translate=\"no\"><strong>Scanned<\/strong><\/span><\/li><li markdown=\"1\"><code>StoredValueID<\/code>: gift card number.<\/li><li markdown=\"1\"><code>ExpiryDate<\/code>: expiry date of the gift card.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Swipe<\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\"><code>EntryMode<\/code>: <span translate=\"no\"><strong>MagStripe<\/strong><\/span><\/li><li markdown=\"1\"><code>StoredValueID<\/code>: include this parameter but do not provide a value.<\/li><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">MKE<\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\"><code>EntryMode<\/code>: <span translate=\"no\"><strong>Keyed<\/strong><\/span><\/li><li markdown=\"1\"><code>StoredValueID<\/code>: include this parameter but do not provide a value.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>Select the tabs below to see some example gift card payment requests.<\/p>\n\n<div id=\"tabKCkUL\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Gift card payment - Scanned&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;This example shows a request for a EUR&amp;nbsp;25.99 payment with a scanned gift card with a secondary security code in the &lt;code&gt;SaleToAcquirerData&lt;\\\/code&gt; field.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Gift card payment with partial payment tender option&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;SaleToPOIRequest\\\\\\&quot;:{\\\\n    \\\\\\&quot;MessageHeader\\\\\\&quot;:{\\\\n      \\\\\\&quot;ProtocolVersion\\\\\\&quot;:\\\\\\&quot;3.0\\\\\\&quot;,\\\\n      \\\\\\&quot;MessageClass\\\\\\&quot;:\\\\\\&quot;Service\\\\\\&quot;,\\\\n      \\\\\\&quot;MessageCategory\\\\\\&quot;:\\\\\\&quot;Payment\\\\\\&quot;,\\\\n      \\\\\\&quot;MessageType\\\\\\&quot;:\\\\\\&quot;Request\\\\\\&quot;,\\\\n      \\\\\\&quot;ServiceID\\\\\\&quot;:\\\\\\&quot;9267\\\\\\&quot;,\\\\n      \\\\\\&quot;SaleID\\\\\\&quot;:\\\\\\&quot;POSSystemID12345\\\\\\&quot;,\\\\n      \\\\\\&quot;POIID\\\\\\&quot;:\\\\\\&quot;V400m-324688179\\\\\\&quot;\\\\n    },\\\\n    \\\\\\&quot;PaymentRequest\\\\\\&quot;:{\\\\n      \\\\\\&quot;SaleData\\\\\\&quot;:{\\\\n        \\\\\\&quot;SaleTransactionID\\\\\\&quot;:{\\\\n          \\\\\\&quot;TransactionID\\\\\\&quot;:\\\\\\&quot;44740\\\\\\&quot;,\\\\n          \\\\\\&quot;TimeStamp\\\\\\&quot;:\\\\\\&quot;2019-03-26T09:13:41+00:00\\\\\\&quot;\\\\n        },\\\\n        \\\\\\&quot;SaleReferenceID\\\\\\&quot;:\\\\\\&quot;Order12345-1\\\\\\&quot;,\\\\n        \\\\\\&quot;SaleToAcquirerData\\\\\\&quot;:\\\\\\&quot;tenderOption=AllowPartialAuthorisation&amp;amp;ssc=1111\\\\\\&quot;\\\\n      },\\\\n      \\\\\\&quot;PaymentTransaction\\\\\\&quot;:{\\\\n        \\\\\\&quot;AmountsReq\\\\\\&quot;:{\\\\n          \\\\\\&quot;Currency\\\\\\&quot;:\\\\\\&quot;EUR\\\\\\&quot;,\\\\n          \\\\\\&quot;RequestedAmount\\\\\\&quot;:25.99\\\\n        }\\\\n      },\\\\n      \\\\\\&quot;PaymentData\\\\\\&quot;:{\\\\n        \\\\\\&quot;PaymentInstrumentData\\\\\\&quot;:{\\\\n          \\\\\\&quot;PaymentInstrumentType\\\\\\&quot;:\\\\\\&quot;StoredValue\\\\\\&quot;,\\\\n          \\\\\\&quot;StoredValueAccountID\\\\\\&quot;:{\\\\n            \\\\\\&quot;StoredValueAccountType\\\\\\&quot;:\\\\\\&quot;GiftCard\\\\\\&quot;,\\\\n            \\\\\\&quot;StoredValueProvider\\\\\\&quot;:\\\\\\&quot;svs\\\\\\&quot;,\\\\n            \\\\\\&quot;IdentificationType\\\\\\&quot;:\\\\\\&quot;PAN\\\\\\&quot;,\\\\n            \\\\\\&quot;EntryMode\\\\\\&quot;:[\\\\n              \\\\\\&quot;Scanned\\\\\\&quot;\\\\n            ],\\\\n            \\\\\\&quot;StoredValueID\\\\\\&quot;:\\\\\\&quot;6006490000000000\\\\\\&quot;,\\\\n            \\\\\\&quot;ExpiryDate\\\\\\&quot;:\\\\\\&quot;1122\\\\\\&quot;\\\\n          }\\\\n        }\\\\n      }\\\\n    }\\\\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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Gift card payment - MKE&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;&lt;a id=\\&quot;mke-gift-card\\&quot;&gt;&lt;\\\/a&gt;&lt;br \\\/&gt;\\nThe following example shows a gift card payment request for manual key entry (&lt;code&gt;EntryMode&lt;\\\/code&gt; &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;Keyed&lt;\\\/strong&gt;&lt;\\\/span&gt;), where &lt;code&gt;SaleToAcquirerData&lt;\\\/code&gt; specifies the &lt;code&gt;maxLength&lt;\\\/code&gt; and &lt;code&gt;cardMask&lt;\\\/code&gt; for the gift card number. To ensure the entered numbers are visible, use &lt;code&gt;*&lt;\\\/code&gt; as card mask character. Using &lt;code&gt;x&lt;\\\/code&gt; hides entered numbers.&lt;br \\\/&gt;\\nIf you expect the card number to be 24 characters or less, there is no need to include a maximum length and card mask.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;MKE gift card payment request to allow an extra long card number&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;SaleToPOIRequest\\\\\\&quot;:{\\\\n    \\\\\\&quot;MessageHeader\\\\\\&quot;:{...},\\\\n    \\\\\\&quot;PaymentRequest\\\\\\&quot;:{\\\\n      \\\\\\&quot;SaleData\\\\\\&quot;:{\\\\n        \\\\\\&quot;SaleTransactionID\\\\\\&quot;:{\\\\n          \\\\\\&quot;TransactionID\\\\\\&quot;:\\\\\\&quot;44740\\\\\\&quot;,\\\\n          \\\\\\&quot;TimeStamp\\\\\\&quot;:\\\\\\&quot;2019-03-26T09:13:41+00:00\\\\\\&quot;\\\\n        },\\\\n        \\\\\\&quot;SaleReferenceID\\\\\\&quot;:\\\\\\&quot;Order12345-1\\\\\\&quot;,\\\\n        \\\\\\&quot;SaleToAcquirerData\\\\\\&quot;:\\\\\\&quot;maxLength=27&amp;amp;cardMask=****-****-****-****-****-****-***&amp;amp;tenderOption=AllowPartialAuthorisation\\\\\\&quot;\\\\n      },\\\\n      \\\\\\&quot;PaymentTransaction\\\\\\&quot;:{\\\\n        \\\\\\&quot;AmountsReq\\\\\\&quot;:{\\\\n          \\\\\\&quot;Currency\\\\\\&quot;:\\\\\\&quot;EUR\\\\\\&quot;,\\\\n          \\\\\\&quot;RequestedAmount\\\\\\&quot;:25.99\\\\n        }\\\\n      },\\\\n      \\\\\\&quot;PaymentData\\\\\\&quot;:{\\\\n        \\\\\\&quot;PaymentInstrumentData\\\\\\&quot;:{\\\\n          \\\\\\&quot;PaymentInstrumentType\\\\\\&quot;:\\\\\\&quot;StoredValue\\\\\\&quot;,\\\\n          \\\\\\&quot;StoredValueAccountID\\\\\\&quot;:{\\\\n            \\\\\\&quot;StoredValueAccountType\\\\\\&quot;:\\\\\\&quot;GiftCard\\\\\\&quot;,\\\\n            \\\\\\&quot;StoredValueProvider\\\\\\&quot;:\\\\\\&quot;svs\\\\\\&quot;,\\\\n            \\\\\\&quot;IdentificationType\\\\\\&quot;:\\\\\\&quot;PAN\\\\\\&quot;,\\\\n            \\\\\\&quot;EntryMode\\\\\\&quot;:[\\\\n              \\\\\\&quot;Keyed\\\\\\&quot;\\\\n            ],\\\\n            \\\\\\&quot;StoredValueID\\\\\\&quot;:\\\\\\&quot;\\\\\\&quot;\\\\n          }\\\\n        }\\\\n      }\\\\n    }\\\\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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<\/li>\n<li>\n<p>In the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#responses-200\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentResponse<\/a>, note the following:<\/p>\n<ul>\n<li><code>Response.Result<\/code>: If the payment was successful, <span translate=\"no\"><strong>Success<\/strong><\/span> indicates a full authorization, or <span translate=\"no\"><strong>Partial<\/strong><\/span> indicates a partial authorization.<\/li>\n<li><code>PaymentResult.AmountsResp.AuthorizedAmount<\/code>: The amount that was authorized. This may be less than the requested amount.<\/li>\n<li><code>AdditionalResponse<\/code>: Contains <code>posOriginalAmountValue<\/code> with the requested amount, and <code>posAuthAmountValue<\/code> with the authorized amount.<\/li>\n<li><code>SaleData.SaleReferenceID<\/code>: Your order number. If you are going to make another payment for the remainder, the <code>SaleReferenceID<\/code> of that other payment must be based on this one.<\/li>\n<\/ul>\n<p>The example below shows that the gift card payment was successful, but only EUR&nbsp;10.00 of the original EUR&nbsp;25.99 was authorized.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response for a partial gift card payment'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"MessageHeader\\\": {...},\\n        \\\"PaymentResponse\\\": {\\n            \\\"POIData\\\": {\\n                \\\"POIReconciliationID\\\": \\\"1000\\\",\\n                \\\"POITransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-11-16T11:26:19.000Z\\\",\\n                    \\\"TransactionID\\\": \\\"CWf3001637061979001.M32P3JBKR65ZGN82\\\"\\n                }\\n            },\\n            \\\"PaymentReceipt\\\": [...],\\n            \\\"PaymentResult\\\": {\\n                \\\"AmountsResp\\\": {\\n                    \\\"AuthorizedAmount\\\": 10.00,\\n                    \\\"Currency\\\": \\\"EUR\\\"\\n                },\\n                ...,\\n                \\\"PaymentAcquirerData\\\": {...},\\n                    ...\\n                },\\n                \\\"PaymentInstrumentData\\\": {\\n                    \\\"StoredValueAccountID\\\":{\\n                        \\\"IdentificationType\\\":\\\"PAN\\\",\\n                        \\\"EntryMode\\\":[\\n                            \\\"Scanned\\\"\\n                        ],\\n                        \\\"StoredValueID\\\":\\\"6006490000000000\\\",\\n                        \\\"StoredValueAccountType\\\":\\\"GiftCard\\\",\\n                        \\\"StoredValueProvider\\\":\\\"svs\\\",\\n                        \\\"ExpiryDate\\\":\\\"1122\\\"\\n                    },\\n                    \\\"PaymentInstrumentType\\\": \\\"StoredValue\\\"\\n                }\\n            },\\n            \\\"Response\\\": {\\n                \\\"AdditionalResponse\\\": \\\"...&amp;posOriginalAmountValue=2599...&amp;posAuthAmountValue=1000\\\",\\n                \\\"Result\\\": \\\"Partial\\\"\\n            },\\n            \\\"SaleData\\\": {\\n                \\\"SaleReferenceID\\\": \\\"Order12345-1\\\",\\n                \\\"SaleTransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-11-16T11:26:15.253Z\\\",\\n                    \\\"TransactionID\\\": \\\"644\\\"\\n                }\\n            }\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>If the <code>Response.Result<\/code> is <span translate=\"no\"><strong>Partial<\/strong><\/span>, <a href=\"#partial-authorisation\">make a follow-up partial payment<\/a> or let the customer pay the remainder in cash.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"partial-authorisation\">2. (Optional) Make a follow-up payment<\/h2>\n<p>If the initial partial payment with the gift card didn't cover the full amount, you can follow up with another partial payment for the remainder:<\/p>\n<ol>\n<li>\n<p>Calculate the remaining amount after the initial partial authorization: subtract the <code>AuthorizedAmount<\/code> in the response from the <code>RequestedAmount<\/code> in the request.<br \/>\nAlternatively, you can calculate the remaining amount using <code>posAuthAmountValue<\/code> and <code>posOriginalAmountValue<\/code> from the <code>AdditionalResponse<\/code>.<\/p>\n<\/li>\n<li>\n<p><a href=\"\/point-of-sale\/basic-tapi-integration\/make-a-payment#make-a-payment\">Make a payment request<\/a>, specifying:<\/p>\n<ul>\n<li>\n<p>The standard <a href=\"\/point-of-sale\/design-your-integration\/terminal-api#request-message-header\">\n  <code>SaleToPOIRequest.MessageHeader<\/code>\n<\/a> object, with <code>MessageClass<\/code> set to <span translate=\"no\"><strong>Service<\/strong><\/span> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>Payment<\/strong><\/span>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>ProtocolVersion<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><strong>3.0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageClass<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Service<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageCategory<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Payment<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageType<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Request<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>ServiceID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (<code>POIID<\/code>) being used.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for the POS system component to send this request from.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>POIID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The unique ID of the terminal to send this request to. Format: <em>[device model]-[serial number]<\/em>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#request-SaleData\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest.SaleData<\/a> object with:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>SaleReferenceID<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Unique reference, such as your order number plus a sequence number, that lets you identify partial authorizations that belong together. <p>For example, if you specified <strong>Order12345-1<\/strong> in the first partial authorization request with the gift card, you'd specify <strong>Order12345-2<\/strong> in this second payment request.<\/p><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleToAcquirerData<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The <span translate=\"no\"><strong>AllowPartialAuthorisation<\/strong><\/span> tender option. <p>For the format, see the <a href=\"#sale-to-acquirer-data\">initial partial authorization<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/payment#request-PaymentTransaction\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest.PaymentTransaction<\/a> object with:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">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>PaymentTransaction.AmountsReq<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">An object with: <ul><li markdown=\"1\"><code>Currency<\/code>: The transaction <a href=\"\/development-resources\/currency-codes\">currency<\/a>.<\/li><li markdown=\"1\"><code>RequestedAmount<\/code>: The calculated remaining amount.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>This example shows a payment request for the remaining EUR 15.99.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Follow-up payment for the remainder'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIRequest\\\":{\\n        \\\"MessageHeader\\\":{\\n            \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n            \\\"MessageClass\\\":\\\"Service\\\",\\n            \\\"MessageCategory\\\":\\\"Payment\\\",\\n            \\\"MessageType\\\":\\\"Request\\\",\\n            \\\"ServiceID\\\":\\\"9267\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"V400m-324688179\\\"\\n        },\\n        \\\"PaymentRequest\\\":{\\n            \\\"SaleData\\\":{\\n                \\\"SaleTransactionID\\\":{\\n                    \\\"TransactionID\\\":\\\"44740\\\",\\n                    \\\"TimeStamp\\\":\\\"2019-03-26T09:13:45+00:00\\\"\\n                },\\n                \\\"SaleReferenceID\\\": \\\"Order12345-2\\\",\\n                \\\"SaleToAcquirerData\\\": \\\"tenderOption=AllowPartialAuthorisation\\\"\\n            },\\n            \\\"PaymentTransaction\\\":{\\n                \\\"AmountsReq\\\":{\\n                    \\\"Currency\\\":\\\"EUR\\\",\\n                    \\\"RequestedAmount\\\":15.99\\n                }\\n            }\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>When you receive the response, check if the <code>Response.Result<\/code> is now <span translate=\"no\"><strong>Success<\/strong><\/span>. That means the amount due is paid in full.<\/p>\n<\/li>\n<\/ol>\n<h2>Alternative flow with the balance check<\/h2>\n<p>In this flow you first check the balance on the gift card, and then adjust your payment request(s) accordingly.<\/p>\n<p>To illustrate this, we use an example where the purchase amount is EUR&nbsp;25.99, and the shopper has a gift card with a balance of EUR&nbsp;15.99.<\/p>\n<ol>\n<li>\n<p><a href=\"\/point-of-sale\/gift-cards-terminal-api\/query-the-balance\">Check the balance<\/a> on the gift card. In our example, that is EUR&nbsp;15.99.<\/p>\n<\/li>\n<li>\n<p>Make a gift card payment request for the available amount (EUR&nbsp;15.99), including:<\/p>\n<ul>\n<li>The <a href=\"#payment-instrument-data\">\n  <code>PaymentInstrumentData<\/code>\n<\/a> for the gift card.<\/li>\n<li>\n<p>A <code>RequestedAmount<\/code> that doesn't exceed the balance on the gift card.<\/p>\n<!-- list-separator -->\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Gift card payment request for the exact available balance of EUR\u00a015.99'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"SaleToPOIRequest\\\":{\\n    \\\"MessageHeader\\\":{\\n      \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n      \\\"MessageClass\\\":\\\"Service\\\",\\n      \\\"MessageCategory\\\":\\\"Payment\\\",\\n      \\\"MessageType\\\":\\\"Request\\\",\\n      \\\"ServiceID\\\":\\\"9267\\\",\\n      \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n      \\\"POIID\\\":\\\"V400m-324688179\\\"\\n    },\\n    \\\"PaymentRequest\\\":{\\n      \\\"SaleData\\\":{\\n        \\\"SaleTransactionID\\\":{\\n          \\\"TransactionID\\\":\\\"44740\\\",\\n          \\\"TimeStamp\\\":\\\"2019-03-26T09:13:41+00:00\\\"\\n        },\\n        \\\"SaleReferenceID\\\":\\\"Order12345-1\\\",\\n      },\\n      \\\"PaymentTransaction\\\":{\\n        \\\"AmountsReq\\\":{\\n          \\\"Currency\\\":\\\"EUR\\\",\\n          \\\"RequestedAmount\\\":15.99\\n        }\\n      },\\n      \\\"PaymentData\\\":{\\n        \\\"PaymentInstrumentData\\\":{\\n          \\\"PaymentInstrumentType\\\":\\\"StoredValue\\\",\\n          \\\"StoredValueAccountID\\\":{\\n            \\\"StoredValueAccountType\\\":\\\"GiftCard\\\",\\n            \\\"StoredValueProvider\\\":\\\"svs\\\",\\n            \\\"IdentificationType\\\":\\\"PAN\\\",\\n            \\\"EntryMode\\\":[\\n              \\\"Scanned\\\"\\n            ],\\n            \\\"StoredValueID\\\":\\\"6006490000000000\\\",\\n            \\\"ExpiryDate\\\":\\\"1122\\\"\\n          }\\n        }\\n      }\\n    }\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Complete the payment by making a <a href=\"\/point-of-sale\/basic-tapi-integration\/make-a-payment\">regular payment request<\/a> for the remaining EUR 10.00, or by asking the shopper for the remainder in cash.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Payment request of the remaining EUR\u00a010.00'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"SaleToPOIRequest\\\":{\\n    \\\"MessageHeader\\\":{\\n      \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n      \\\"MessageClass\\\":\\\"Service\\\",\\n      \\\"MessageCategory\\\":\\\"Payment\\\",\\n      \\\"MessageType\\\":\\\"Request\\\",\\n      \\\"ServiceID\\\":\\\"9267\\\",\\n      \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n      \\\"POIID\\\":\\\"V400m-324688179\\\"\\n    },\\n    \\\"PaymentRequest\\\":{\\n      \\\"SaleData\\\":{\\n        \\\"SaleTransactionID\\\":{\\n          \\\"TransactionID\\\":\\\"44740\\\",\\n          \\\"TimeStamp\\\":\\\"2019-03-26T09:13:41+00:00\\\"\\n        },\\n        \\\"SaleReferenceID\\\":\\\"Order12345-1\\\",\\n      },\\n      \\\"PaymentTransaction\\\":{\\n        \\\"AmountsReq\\\":{\\n          \\\"Currency\\\":\\\"EUR\\\",\\n          \\\"RequestedAmount\\\":10.00\\n          }\\n        }\\n      }\\n    }\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\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=\"\/point-of-sale\/gift-cards-terminal-api\"\n                        target=\"_self\"\n                        >\n                    Gift cards and other stored value cards\n                <\/a><\/li><li><a href=\"\/point-of-sale\/gift-cards-terminal-api\/activate\"\n                        target=\"_self\"\n                        >\n                    Activate a gift card\n                <\/a><\/li><li><a href=\"\/point-of-sale\/gift-cards-terminal-api\/query-the-balance\"\n                        target=\"_self\"\n                        >\n                    Check the balance of a gift card\n                <\/a><\/li><li><a href=\"\/point-of-sale\/partial-authorizations\/\"\n                        target=\"_self\"\n                        >\n                    Partial authorizations\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/point-of-sale\/alternative-payment-methods\/gift-cards-terminal-api\/payment","articleFields":{"description":"Make a gift card payment at the point of sale.","feedback_component":true,"id":"36196864","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"11-01-2022 18:52","page_id":"5b1e0ff4-232f-4eeb-b343-8595d7ac0c24","filters_component":false,"decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/point-of-sale\/alternative-payment-methods\/gift-cards-terminal-api\/payment","title":"Make a gift card payment","content":"After you have activated a gift card and loaded with a balance, you can make a payment with the gift card. There are two gift card payment flows: one using partial authorizations and another that involves a balance check first.\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nA Terminal API integration with payment terminals.\n\n\nSetup steps\nBefore you begin: Add the payment method to your Adyen account.Complete the onboarding process with the gift card provider.\n\n\n\nHow it works\nYou can choose one of two payment flows:\n\nA flow with one or more partial payment requests if you do not know the exact balance on the gift card:\n\nMake a partial gift card payment request for the full amount due.\nIf the gift card balance is not enough, you make a follow-up payment request to let the shopper pay the remainder with another card or cash.\n\nA flow without partial authorizations where you first check the balance of the gift card:\n\nMake a balance request to check the balance on the gift card.\nDecide what to do next:\n\nIf the balance is enough, you make a gift card payment request for the full amount due.\nIf the balance is not enough, you make a gift card payment request for the full balance, and then you make a regular payment request to let the shopper pay the remainder with a different card or cash.\n\n\n\n1. Make the initial payment\n\nTestingYou can test the partial authorization flow using an amount ending in 139.\n\nTo make a payment using a gift card where partial authorization is possible:\n\n\nDetermine the card entry method:\n\nIf you want to scan the card, do that first and use the obtained card details in your request.\n\nIf you want to swipe the card or use manual key entry (MKE), send the request first. The payment terminal will show a prompt to swipe the card or enter the card details.\n\n\n\n\n\nMake a payment request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Service and MessageCategory set to Payment.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nService\n\n\nMessageCategory\n\nPayment\n\n\nMessageType\n\nRequest\n\n\nServiceID\n\nYour unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (POIID) being used.\n\n\nSaleID\n\nYour unique ID for the POS system component to send this request from.\n\n\nPOIID\n\nThe unique ID of the terminal to send this request to. Format: [device model]-[serial number].\n\n\n\n\n\n\n\nThe  PaymentRequest.SaleData object with:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nSaleTransactionID\n\nAn object with: TransactionID: your reference to identify a payment. We recommend using a unique value. In your Customer Area and Adyen reports, this will show as the merchant reference for the transaction. TimeStamp: Date and time of the request in UTC format.\n\n\nSaleReferenceID\n\nUnique reference, such as your order number plus a sequence number, that lets you identify partial authorizations that belong together. In your Customer Area, this will appear as the Merchant Order for the transaction. For example, if the order number is Order12345, you specify Order12345-1 in the first partial authorization request and Order12345-2 in the second partial authorization request.\n\n\nSaleToAcquirerData\n\nThe AllowPartialAuthorisation tender option. See the instructions below. Optional for manually keying in the card number (MKE): maxLength and cardMask. Use these fields to specify card numbers with more than 24 digits. See the example MKE gift card request.Optional for Stored Value Solutions (SVS) gift cards: ssc. This is the secondary security code of the gift card, and allows up to 8 digits. For example, ssc: 1111.\n\n\n\n\nIn SaleData.SaleToAcquirerData, specify the tender option in one of the following formats:\n\n\nOption 1: a JSON object converted to a Base64 encoded string.\nEncode {\"tenderOption\": \"AllowPartialAuthorisation\"} to Base64, and pass the resulting string:\n\"SaleToAcquirerData\": \"eyJ0ZW5kZXJPcHRpb24iOiAiQWxsb3dQYXJ0aWFsQXV0aG9yaXNhdGlvbiJ9\"\n\n\nOption 2: a key-value pair:\n\"SaleToAcquirerData\": \"tenderOption=AllowPartialAuthorisation\"\n\n\nThe format that you use here will also be the format of the AdditionalResponse that you receive. If there are more tender options (for example, ReceiptHandler ) or other data elements that you need to pass in the SaleToAcquirerData field, refer to Add information to a payment.\n\n\n\nThe  PaymentRequest.PaymentTransaction object with:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nAmountsReq\n\nAn object with: Currency: The transaction currency.RequestedAmount: The purchase amount, with decimals.\n\n\n\n\n\nThe  PaymentRequest.PaymentData.PaymentInstrumentData object. This is where you indicate that a gift card is used.\n\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nPaymentInstrumentType\n\nStoredValue\n\n\nStoredValueAccountID\n\nThe gift card details: StoredValueAccountType: GiftCard StoredValueProvider: the gift card issuer, such as givex, svs, valuelink, genericgiftcard, or any Intersolve-supported card type. IdentificationType: PAN EntryMode, StoredValueID and ExpiryDate: these parameters depend on the card entry method you are using. See the following table.\n\n\n\n\n\n\nCard entry\nParameters\n\n\n\n\nScan\nEntryMode: ScannedStoredValueID: gift card number.ExpiryDate: expiry date of the gift card.\n\n\nSwipe\nEntryMode: MagStripeStoredValueID: include this parameter but do not provide a value.\n\n\nMKE\nEntryMode: KeyedStoredValueID: include this parameter but do not provide a value.\n\n\n\n\n\nSelect the tabs below to see some example gift card payment requests.\n\n\n    \n        \n        \n    \n\n\n\n\nIn the  PaymentResponse, note the following:\n\nResponse.Result: If the payment was successful, Success indicates a full authorization, or Partial indicates a partial authorization.\nPaymentResult.AmountsResp.AuthorizedAmount: The amount that was authorized. This may be less than the requested amount.\nAdditionalResponse: Contains posOriginalAmountValue with the requested amount, and posAuthAmountValue with the authorized amount.\nSaleData.SaleReferenceID: Your order number. If you are going to make another payment for the remainder, the SaleReferenceID of that other payment must be based on this one.\n\nThe example below shows that the gift card payment was successful, but only EUR&nbsp;10.00 of the original EUR&nbsp;25.99 was authorized.\n\n\n\n\n\nIf the Response.Result is Partial, make a follow-up partial payment or let the customer pay the remainder in cash.\n\n\n2. (Optional) Make a follow-up payment\nIf the initial partial payment with the gift card didn't cover the full amount, you can follow up with another partial payment for the remainder:\n\n\nCalculate the remaining amount after the initial partial authorization: subtract the AuthorizedAmount in the response from the RequestedAmount in the request.\nAlternatively, you can calculate the remaining amount using posAuthAmountValue and posOriginalAmountValue from the AdditionalResponse.\n\n\nMake a payment request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Service and MessageCategory set to Payment.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nService\n\n\nMessageCategory\n\nPayment\n\n\nMessageType\n\nRequest\n\n\nServiceID\n\nYour unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (POIID) being used.\n\n\nSaleID\n\nYour unique ID for the POS system component to send this request from.\n\n\nPOIID\n\nThe unique ID of the terminal to send this request to. Format: [device model]-[serial number].\n\n\n\n\n\n\n\nThe  PaymentRequest.SaleData object with:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nSaleReferenceID\n\nUnique reference, such as your order number plus a sequence number, that lets you identify partial authorizations that belong together. For example, if you specified Order12345-1 in the first partial authorization request with the gift card, you'd specify Order12345-2 in this second payment request.\n\n\nSaleToAcquirerData\n\nThe AllowPartialAuthorisation tender option. For the format, see the initial partial authorization.\n\n\n\n\n\nThe  PaymentRequest.PaymentTransaction object with:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nPaymentTransaction.AmountsReq\n\nAn object with: Currency: The transaction currency.RequestedAmount: The calculated remaining amount.\n\n\n\n\n\nThis example shows a payment request for the remaining EUR 15.99.\n\n\n\n\n\nWhen you receive the response, check if the Response.Result is now Success. That means the amount due is paid in full.\n\n\nAlternative flow with the balance check\nIn this flow you first check the balance on the gift card, and then adjust your payment request(s) accordingly.\nTo illustrate this, we use an example where the purchase amount is EUR&nbsp;25.99, and the shopper has a gift card with a balance of EUR&nbsp;15.99.\n\n\nCheck the balance on the gift card. In our example, that is EUR&nbsp;15.99.\n\n\nMake a gift card payment request for the available amount (EUR&nbsp;15.99), including:\n\nThe \n  PaymentInstrumentData\n for the gift card.\n\nA RequestedAmount that doesn't exceed the balance on the gift card.\n\n\n\n\n\n\n\n\nComplete the payment by making a regular payment request for the remaining EUR 10.00, or by asking the shopper for the remainder in cash.\n\n\n\n\n\nSee also\n\n\n                    Gift cards and other stored value cards\n                \n                    Activate a gift card\n                \n                    Check the balance of a gift card\n                \n                    Partial authorizations\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"In-person payments","lvl2":"Alternative payment methods","lvl3":"Gift cards and other stored value cards","lvl4":"Make a gift card payment"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/point-of-sale\/alternative-payment-methods","lvl3":"https:\/\/docs.adyen.com\/point-of-sale\/alternative-payment-methods\/gift-cards-terminal-api","lvl4":"\/point-of-sale\/alternative-payment-methods\/gift-cards-terminal-api\/payment"},"levels":5,"category":"In-person payments","category_color":"green","tags":["payment"]},"articleFiles":{"payment_0.json":"<p alt=\"\">payment_0.json<\/p>"}}
