{"title":"Refund a transaction from the POS","category":"default","creationDate":1776961627,"content":"<h2 id=\"pos-object\">POS Object<\/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>POS<\/code><\/td>\n<td>POS object representing the cash register application.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"with-a-psp-reference\">With a PSP Reference<\/h2>\n<h3 id=\"method\">Method<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 26%\"><col style=\"width: 73%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>CancelOrRefundPspReference<\/code><\/td><td>Initiates the cancel or refund process. Use the PSP reference to identify the transaction to be cancelled.<\/td><\/tr><\/tbody><\/table>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 19%\"><col style=\"width: 9%\"><col style=\"width: 6%\"><col style=\"width: 65%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Required<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>merchantAccount<\/code><\/p><\/td><td><p>String<\/p><\/td><td><p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p><\/td><td><p>The merchant account account that is canceling the transaction and refunding the money (if applicable).<\/p><\/td><\/tr><tr><td><code>pspreference<\/code><\/td><td>String<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td><p>PSP reference of the original transaction.<\/p><\/td><\/tr><tr><td><code>reference<\/code><\/td><td>String<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td>Reference for the merchant, used in reporting.<\/td><\/tr><\/tbody><\/table>\n<h3 id=\"callback\">Callback<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 18%\"><col style=\"width: 81%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><p><code>CancelOrRefundCB<\/code><\/p><\/td><td><p>Refund Callback returns the result of a partial refund, as well as any errors.<\/p><\/td><\/tr><\/tbody><\/table>\n<p>The response contains a\u00a0<code>cancelOrRefundObj<\/code>. This object contains a getResponse method which should return a result of \"<span translate=\"no\"><strong>refund-received<\/strong><\/span>\". The response also includes the following parameters:<\/p>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 15%\"><col style=\"width: 5%\"><col style=\"width: 78%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>pedResult<\/code><\/p><\/td><td><p>int<\/p><\/td><td>Result denoting whether an error occurred on the PED.\u00a0A value of 0 means no error occurred.<\/td><\/tr><tr><td><p><code>pspResult<\/code><\/p><\/td><td><p>int<\/p><\/td><td>Result denoting whether an error occurred on the PSP.\u00a0A value of 0 means no error occurred.<\/td><\/tr><tr><td><code>libResult<\/code><\/td><td>int<\/td><td>Result denoting whether an error occurred in the Library. A value of 0 means no error occurred.<\/td><\/tr><tr><td><code>errorMessage<\/code><\/td><td>String<\/td><td>Reference for the transaction, used as the PSP reference is not available.<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"with-a-tender-reference\">With a Tender Reference<\/h2>\n<h3 id=\"method-1\">Method<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 26%\"><col style=\"width: 73%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>CancelOrRefundTenderReference<\/code><\/p><\/td><td><p>Initiates the cancel or refund process where the PSP reference is unknown. Use the tender reference instead of the PSP reference.<\/p><div class=\"sc-notice note\"><div><p>Occurs when the original sale transaction was performed offline, where the\u00a0<code>PspReference<\/code>\u00a0was not generated because it requires online access. In this case, provide the\u00a0<code>TerminalId<\/code>\u00a0and\u00a0<code>TenderReference<\/code>. The property\u00a0<code>PspReference<\/code>\u00a0is not required.<\/p><\/div><\/div><\/td><\/tr><\/tbody><\/table>\n<h3 id=\"parameters-1\">Parameters<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 19%\"><col style=\"width: 9%\"><col style=\"width: 6%\"><col style=\"width: 65%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Required<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>merchantAccount<\/code><\/p><\/td><td><p>String<\/p><\/td><td><p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p><\/td><td><p>The merchant account that is canceling the transaction and refunding the money (if applicable).<\/p><\/td><\/tr><tr><td><code>uniqueTerminalId<\/code><\/td><td>Long<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td><p>Unique terminal ID to reference the PED that is processing the request.<\/p><\/td><\/tr><tr><td><code>tenderReference<\/code><\/td><td>String<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td>Reference for the transaction, used as the PSP reference is not available.<\/td><\/tr><tr><td><code>reference<\/code><\/td><td>String<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td>Reference for the merchant, used in reporting.<\/td><\/tr><\/tbody><\/table>\n<h3 id=\"callback-1\">Callback<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 18%\"><col style=\"width: 81%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><p><code>CancelOrRefundCB<\/code><\/p><\/td><td><p>The Cancel or Refund Callback returns the result of a cancellation or refund, as well as any errors.<\/p><\/td><\/tr><\/tbody><\/table>\n<p>The response contains a\u00a0<code>cancelOrRefundObj<\/code>. This object contains a getResponse method which should return a result of \"refund-received\". The response also includes the following parameters:<\/p>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 15%\"><col style=\"width: 5%\"><col style=\"width: 78%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>pedResult<\/code><\/p><\/td><td><p>int<\/p><\/td><td>Result denoting whether an error occurred on the PED.\u00a0A value of 0 means no error occurred.<\/td><\/tr><tr><td><p><code>pspResult<\/code><\/p><\/td><td><p>int<\/p><\/td><td>Result denoting whether an error occurred on the PSP.\u00a0A value of 0 means no error occurred.<\/td><\/tr><tr><td><code>libResult<\/code><\/td><td>int<\/td><td>Result denoting whether an error occurred in the Library. A value of 0 means no error occurred.<\/td><\/tr><tr><td><code>errorMessage<\/code><\/td><td>String<\/td><td>Reference for the transaction, used as the PSP reference is not available.<\/td><\/tr><\/tbody><\/table>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/cancel-or-refund-a-transaction-com-extension\/refund-a-transaction-from-the-pos-com","articleFields":{"id":"25143522","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\/cancel-or-refund-a-transaction-com-extension\/refund-a-transaction-from-the-pos-com","title":"Refund a transaction from the POS","content":"POS Object\n\n\n\nName\nDescription\n\n\n\n\nPOS\nPOS object representing the cash register application.\n\n\n\nWith a PSP Reference\nMethod\nNameDescriptionCancelOrRefundPspReferenceInitiates the cancel or refund process. Use the PSP reference to identify the transaction to be cancelled.\nParameters\nNameTypeRequiredDescriptionmerchantAccountStringThe merchant account account that is canceling the transaction and refunding the money (if applicable).pspreferenceStringPSP reference of the original transaction.referenceStringReference for the merchant, used in reporting.\nCallback\nNameDescriptionCancelOrRefundCBRefund Callback returns the result of a partial refund, as well as any errors.\nThe response contains a\u00a0cancelOrRefundObj. This object contains a getResponse method which should return a result of \"refund-received\". The response also includes the following parameters:\nNameTypeDescriptionpedResultintResult denoting whether an error occurred on the PED.\u00a0A value of 0 means no error occurred.pspResultintResult denoting whether an error occurred on the PSP.\u00a0A value of 0 means no error occurred.libResultintResult denoting whether an error occurred in the Library. A value of 0 means no error occurred.errorMessageStringReference for the transaction, used as the PSP reference is not available.\nWith a Tender Reference\nMethod\nNameDescriptionCancelOrRefundTenderReferenceInitiates the cancel or refund process where the PSP reference is unknown. Use the tender reference instead of the PSP reference.Occurs when the original sale transaction was performed offline, where the\u00a0PspReference\u00a0was not generated because it requires online access. In this case, provide the\u00a0TerminalId\u00a0and\u00a0TenderReference. The property\u00a0PspReference\u00a0is not required.\nParameters\nNameTypeRequiredDescriptionmerchantAccountStringThe merchant account that is canceling the transaction and refunding the money (if applicable).uniqueTerminalIdLongUnique terminal ID to reference the PED that is processing the request.tenderReferenceStringReference for the transaction, used as the PSP reference is not available.referenceStringReference for the merchant, used in reporting.\nCallback\nNameDescriptionCancelOrRefundCBThe Cancel or Refund Callback returns the result of a cancellation or refund, as well as any errors.\nThe response contains a\u00a0cancelOrRefundObj. This object contains a getResponse method which should return a result of \"refund-received\". The response also includes the following parameters:\nNameTypeDescriptionpedResultintResult denoting whether an error occurred on the PED.\u00a0A value of 0 means no error occurred.pspResultintResult denoting whether an error occurred on the PSP.\u00a0A value of 0 means no error occurred.libResultintResult denoting whether an error occurred in the Library. A value of 0 means no error occurred.errorMessageStringReference for the transaction, used as the PSP reference is not available.","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":"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\/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\/cancel-or-refund-a-transaction-com-extension","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/cancel-or-refund-a-transaction-com-extension\/refund-a-transaction-from-the-pos-com"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Refund","transaction"]}}
