{"title":"Handle the Additional Data callback","category":"default","creationDate":1776961627,"content":"<h2 id=\"handle-the-callback\">Handle the callback<\/h2>\n<p>The <code>TenderAdditionalData<\/code> callback is tender-based and includes both a PED object and tender object as parameters.\u00a0<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pedObj<\/code><\/td>\n<td><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/com-extension-for-windows-objects\/peddevice\">PedDevice<\/a><\/td>\n<td>PED object that represents the terminal.<\/td>\n<\/tr>\n<tr>\n<td><code>tenderObj<\/code><\/td>\n<td><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/com-extension-for-windows-objects\/tender\">Tender<\/a><\/td>\n<td>The tender associated with the additional data.<\/td>\n<\/tr>\n<tr>\n<td><code>headerObj<\/code><\/td>\n<td>ResponseHdr<\/td>\n<td>Header object that includes generic statuses, information about merchant, additional data from the PED.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"confirm-the-additional-data-to-the-adyen-payments-platform\">Confirm the additional data to the Adyen payments platform<\/h2>\n<p>Use <code>ConfirmAdditionalData<\/code> to provide additional data to the terminal. After the POS receives the additional data callback from the PED, the POS must confirm this in order to continue the transaction. At this point, based upon the information received during the callback, the amount can be adjusted. The currency must be the same as the original currency.<\/p>\n<h3 id=\"parameters-1\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>adjustedAmountValue<\/code><\/td>\n<td>long<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Final (potentially adjusted) value of the transaction.<\/td>\n<\/tr>\n<tr>\n<td><code>amountCurrency<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Currency of the amount.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperReference<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Use this field to record the shopper reference with the transaction and for recurring or one-click functionality shopper data.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperEmail<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Supply a shopper reference and\/or shopper email to allow for digital shopper recognition.<\/td>\n<\/tr>\n<tr>\n<td><code>recurring_contract<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Recurring contract reference. Use this field to\u00a0set up\u00a0recurring or one-click functionality.<\/td>\n<\/tr>\n<tr>\n<td><code>recurring_contract_detail_name<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Recurring contract details. Use this field to\u00a0set up\u00a0recurring or one-click functionality.<\/td>\n<\/tr>\n<tr>\n<td><code>additionalData<\/code><\/td>\n<td><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/com-extension-for-windows-objects\/additionaldata\">AdditionalData<\/a><\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Additional data returned by Adyen.\u00a0The\u00a0<code>additionalData<\/code>\u00a0object is a generic container that can hold extra response fields.<\/td>\n<\/tr>\n<tr>\n<td><code>transactionType<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<td>Type of transaction, for example: GOODSSERVICES, REFUND.\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A new, possibly altered, amount must be provided, typically used to offer a loyalty discount.<\/p>\n<h2 id=\"getter\">Getter<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>GetValueByKey<\/code><\/td>\n<td>Return a value from an array by using a key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"parameters-2\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>key<\/code><\/td>\n<td>String<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Key used to retrieve value from the array.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"additional-data-elements\">Additional data elements<\/h2>\n<p>When something triggers the additional data callback, the callback provides the cash register with a large number of data elements that can be used to make decisions on the progress of the transaction. This is typically used for loyalty as the most distinguishing information concerns the cardholder-specific information.<\/p>\n<p>An example list contains the following:<\/p>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 56%\"><col style=\"width: 42%\"><\/colgroup><thead><tr class=\"header\"><th>additionalDataKey<\/th><th>additionalDataValue<\/th><\/tr><\/thead><tbody><tr><td>alias<\/td><td>M469509594859802<\/td><\/tr><tr><td>cardIssueNumber<\/td><td>53<\/td><\/tr><tr><td>tid<\/td><td>83814241<\/td><\/tr><tr><td>posOriginalAmountValue<\/td><td>14823<\/td><\/tr><tr><td>cardHolderName<\/td><td>TC02_MC_Approved<\/td><\/tr><tr><td>merchantReference<\/td><td>Mref-12345<\/td><\/tr><tr><td>transactionType<\/td><td>GOODS_SERVICES<\/td><\/tr><tr><td>cardIssuerCountryId<\/td><td>056<\/td><\/tr><tr><td>cardSummary<\/td><td>9999<\/td><\/tr><tr><td>cardBin<\/td><td>541333<\/td><\/tr><tr><td>paymentMethod<\/td><td>mc<\/td><\/tr><tr><td>paymentMethodVariant<\/td><td>mccredit<\/td><\/tr><tr><td>applicationLabel<\/td><td>MCNL<\/td><\/tr><tr><td>posAuthAmountValue<\/td><td>14823<\/td><\/tr><tr><td>posAuthAmountCurrency<\/td><td>EUR<\/td><\/tr><tr><td>txdate<\/td><td>1-4-2018<\/td><\/tr><tr><td>txtime<\/td><td>09:34:34<\/td><\/tr><tr><td>iso8601TxDate<\/td><td>2018-04-01T09:34:34.0000000+0000<\/td><\/tr><tr><td>applicationPreferredName<\/td><td>mc nl<\/td><\/tr><tr><td>AID<\/td><td>A000000004101001<\/td><\/tr><tr><td>posEntryMode<\/td><td>ICC<\/td><\/tr><tr><td>expiryMonth<\/td><td>02<\/td><\/tr><tr><td>expiryYear<\/td><td>2028<\/td><\/tr><\/tbody><\/table>\n<p>You can provide the following optional additional elements:<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>shopperReference<\/td>\n<td>shopref123456789<\/td>\n<\/tr>\n<tr>\n<td>shopperEmail<\/td>\n<td><a href=\"mailto:my.name@email.com\" class=\"mailto\">my.name@email.com<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice note\"><div>\n<p>All these elements are present for chip-based transactions while several are non-existent for MSR or NFC transactions. Non-existence should not block the cash register from standard operating. Additional elements may be present depending on the transaction options, for example <span translate=\"no\"><strong>Gratuity<\/strong><\/span> .<\/p>\n<\/div><\/div>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-additional-data-callback-com-extension","articleFields":{"id":"25143518","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-additional-data-callback-com-extension","title":"Handle the Additional Data callback","content":"Handle the callback\nThe TenderAdditionalData callback is tender-based and includes both a PED object and tender object as parameters.\u00a0\nParameters\n\n\n\nName\nType\nDescription\n\n\n\n\npedObj\nPedDevice\nPED object that represents the terminal.\n\n\ntenderObj\nTender\nThe tender associated with the additional data.\n\n\nheaderObj\nResponseHdr\nHeader object that includes generic statuses, information about merchant, additional data from the PED.\n\n\n\nConfirm the additional data to the Adyen payments platform\nUse ConfirmAdditionalData to provide additional data to the terminal. After the POS receives the additional data callback from the PED, the POS must confirm this in order to continue the transaction. At this point, based upon the information received during the callback, the amount can be adjusted. The currency must be the same as the original currency.\nParameters\n\n\n\nName\nType\nRequired\nDescription\n\n\n\n\nadjustedAmountValue\nlong\n\nFinal (potentially adjusted) value of the transaction.\n\n\namountCurrency\nString\n\nCurrency of the amount.\n\n\nshopperReference\nString\n\nUse this field to record the shopper reference with the transaction and for recurring or one-click functionality shopper data.\n\n\nshopperEmail\nString\n\nSupply a shopper reference and\/or shopper email to allow for digital shopper recognition.\n\n\nrecurring_contract\nString\n\nRecurring contract reference. Use this field to\u00a0set up\u00a0recurring or one-click functionality.\n\n\nrecurring_contract_detail_name\nString\n\nRecurring contract details. Use this field to\u00a0set up\u00a0recurring or one-click functionality.\n\n\nadditionalData\nAdditionalData\n\nAdditional data returned by Adyen.\u00a0The\u00a0additionalData\u00a0object is a generic container that can hold extra response fields.\n\n\ntransactionType\nString\n\nType of transaction, for example: GOODSSERVICES, REFUND.\u00a0\n\n\n\nA new, possibly altered, amount must be provided, typically used to offer a loyalty discount.\nGetter\n\n\n\nName\nDescription\n\n\n\n\nGetValueByKey\nReturn a value from an array by using a key.\n\n\n\nParameters\n\n\n\nName\nType\nRequired\nDescription\n\n\n\n\nkey\nString\n\nKey used to retrieve value from the array.\n\n\n\nAdditional data elements\nWhen something triggers the additional data callback, the callback provides the cash register with a large number of data elements that can be used to make decisions on the progress of the transaction. This is typically used for loyalty as the most distinguishing information concerns the cardholder-specific information.\nAn example list contains the following:\nadditionalDataKeyadditionalDataValuealiasM469509594859802cardIssueNumber53tid83814241posOriginalAmountValue14823cardHolderNameTC02_MC_ApprovedmerchantReferenceMref-12345transactionTypeGOODS_SERVICEScardIssuerCountryId056cardSummary9999cardBin541333paymentMethodmcpaymentMethodVariantmccreditapplicationLabelMCNLposAuthAmountValue14823posAuthAmountCurrencyEURtxdate1-4-2018txtime09:34:34iso8601TxDate2018-04-01T09:34:34.0000000+0000applicationPreferredNamemc nlAIDA000000004101001posEntryModeICCexpiryMonth02expiryYear2028\nYou can provide the following optional additional elements:\n\n\n\n\n\n\n\n\n\nshopperReference\nshopref123456789\n\n\nshopperEmail\nmy.name@email.com\n\n\n\n\nAll these elements are present for chip-based transactions while several are non-existent for MSR or NFC transactions. Non-existence should not block the cash register from standard operating. Additional elements may be present depending on the transaction options, for example Gratuity .\n","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"COM extension for Windows integration","lvl5":"Key steps","lvl6":"Process a basic transaction","lvl7":"Handle the Additional Data callback"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation","lvl3":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations","lvl4":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-additional-data-callback-com-extension"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Handle","Additional","callback"]}}
