{"title":"Refund a transaction from the POS","category":"default","creationDate":1776961627,"content":"<h2>Class<\/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>MerchantPos<\/code><\/td>\n<td>Extends <code>AdyenPos<\/code>. Class used to implement all payment platform functionality. Implements all functions that do not involve the PED.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"method\">Method<\/h2>\n<table><colgroup><col style=\"width: 19%\"><col style=\"width: 80%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>cancelOrRefundAtPsp<\/code><\/p>\n<\/td><td>\n<p>Start a cancel or refund. If a <code>pspReference<\/code> has been generated, pass this as a reference for the transaction. Otherwise, provide the <code>tenderReference<\/code>.<div class=\"sc-notice note\"><div><\/p>\n<p>This method returns an immediate response of type <code>LibraryResult<\/code>. Check if this result is \"OK\", before continuing the operation. If the <code>LibraryResult<\/code> value is not \"OK\", the system will not return the related callback with the asynchronous result. See <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/handle-and-extract-data-from-callbacks-jni\">here<\/a> for more on extracting data from an event or callback.<\/p>\n<\/div><\/div>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"tender-parameter\">Tender Parameter<\/h2>\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>tender<\/code><\/td>\n<td>Tender<\/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>Represents the tender.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"attributes\">Attributes<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Definition<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>merchantAccount<\/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>The <code>merchantAccount<\/code> account to receive the money.<\/td>\n<\/tr>\n<tr>\n<td><code>merchantReference<\/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>The transaction reference provided by the Merchant (reported in the plataforma de pagamentos da Adyen).<\/td>\n<\/tr>\n<tr>\n<td><code>pspReference<\/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>The reference provided by the Adyen PSP (reported in the plataforma de pagamentos da Adyen). Use the PSP reference to identify the transaction to be cancelled.<\/td>\n<\/tr>\n<tr>\n<td><code>tenderReference<\/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>Tender reference provided by the library if there is no connection to the PSP. Use the Tender reference to identify the transaction to be cancelled.<\/td>\n<\/tr>\n<tr>\n<td><code>terminalId<\/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>The PED to process the transaction on.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"callback\">Callback<\/h2>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 14%\"><col style=\"width: 85%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p>\u00a0<code>cancelOrRefundAtPspCallback<\/code><\/p>\n<\/td><td>\n<p>Returns the result of creating the tender<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"callback-response-attributes\">Callback Response Attributes<\/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>additionalData<\/code><\/td>\n<td>Adyen returns the\u00a0<code>additionalData<\/code>\u00a0object, a generic container that can hold extra response fields<\/td>\n<\/tr>\n<tr>\n<td><code>tenderReference<\/code><\/td>\n<td>Reference the PED provides for the transaction, used in reporting on the plataforma de pagamentos da Adyen.<\/td>\n<\/tr>\n<tr>\n<td><code>tenderState<\/code><\/td>\n<td>Transaction state<\/td>\n<\/tr>\n<tr>\n<td><code>adyenResult<\/code><\/td>\n<td>Transaction result details<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"determine-the-current-and-final-tender-state\">Determine the current and final tender state<\/h2>\n<p>Adyen provides a method to determine the current, or final, tender state. For more information, see\u00a0<a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/determine-the-current-and-final-tender-state-jni\">Determine the current and final tender state - JNI<\/a>.<\/p>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/cancel-or-refund-a-transaction-jni\/refund-a-transaction-from-the-pos-jni","articleFields":{"id":"24217580","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/cancel-or-refund-a-transaction-jni\/refund-a-transaction-from-the-pos-jni","title":"Refund a transaction from the POS","content":"Class\n\n\n\nName\nDescription\n\n\n\n\nMerchantPos\nExtends AdyenPos. Class used to implement all payment platform functionality. Implements all functions that do not involve the PED.\n\n\n\nMethod\nNameDescription\ncancelOrRefundAtPsp\n\nStart a cancel or refund. If a pspReference has been generated, pass this as a reference for the transaction. Otherwise, provide the tenderReference.\nThis method returns an immediate response of type LibraryResult. Check if this result is \"OK\", before continuing the operation. If the LibraryResult value is not \"OK\", the system will not return the related callback with the asynchronous result. See here for more on extracting data from an event or callback.\n\n\nTender Parameter\n\n\n\nName\nType\nRequired\nDescription\n\n\n\n\ntender\nTender\n\nRepresents the tender.\n\n\n\nAttributes\n\n\n\nName\nType\nRequired\nDefinition\n\n\n\n\nmerchantAccount\nString\n\nThe merchantAccount account to receive the money.\n\n\nmerchantReference\nString\n\nThe transaction reference provided by the Merchant (reported in the plataforma de pagamentos da Adyen).\n\n\npspReference\nString\n\nThe reference provided by the Adyen PSP (reported in the plataforma de pagamentos da Adyen). Use the PSP reference to identify the transaction to be cancelled.\n\n\ntenderReference\nString\n\nTender reference provided by the library if there is no connection to the PSP. Use the Tender reference to identify the transaction to be cancelled.\n\n\nterminalId\nString\n\nThe PED to process the transaction on.\n\n\n\nCallback\nNameDescription\n\u00a0cancelOrRefundAtPspCallback\n\nReturns the result of creating the tender\n\nCallback Response Attributes\n\n\n\nName\nDescription\n\n\n\n\nadditionalData\nAdyen returns the\u00a0additionalData\u00a0object, a generic container that can hold extra response fields\n\n\ntenderReference\nReference the PED provides for the transaction, used in reporting on the plataforma de pagamentos da Adyen.\n\n\ntenderState\nTransaction state\n\n\nadyenResult\nTransaction result details\n\n\n\nDetermine the current and final tender state\nAdyen provides a method to determine the current, or final, tender state. For more information, see\u00a0Determine the current and final tender state - JNI.","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"Java Native Interface integration","lvl5":"Key steps","lvl6":"Cancel or refund a transaction","lvl7":"Refund a transaction from the POS"},"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\/java-native-interface-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/cancel-or-refund-a-transaction-jni","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/cancel-or-refund-a-transaction-jni\/refund-a-transaction-from-the-pos-jni"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Refund","transaction"]}}
