{"title":"Partially refund a balance","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<p>You can partially refund a tender where the PSP reference has been generated, and where it is unknown. You will need to implement both types of partial refund.<\/p>\n<h2 id=\"where-the-psp-reference-is-known\">Where the PSP reference is known:<\/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><p>Name<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>RefundPspReference<\/code><\/p><\/td><td><p>Call used to initiate a partial refund where the PSP reference is known.<\/p><\/td><\/tr><\/tbody><\/table>\n<h3 id=\"request\">Request<\/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>RefundTransactionRequest<\/code><\/p><\/td><td><p>Sent with the partial refund call where the PSP reference is known.<\/p><\/td><\/tr><\/tbody><\/table>\n<h3 id=\"refundpspreference-parameters\">RefundPspReference\u00a0Parameters<\/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>Name<\/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>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 current transaction.<\/p><\/td><\/tr><tr><td><code>originalPspReference<\/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>PSP reference of the original transaction.<\/td><\/tr><tr><td><code>modificationAmountValue<\/code><\/td><td>Amount<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td>A container for the amount that needs to be refunded.<\/td><\/tr><tr><td><code>modificationAmountCurrency<\/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>The three-character\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_4217\" class=\"external-link external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ISO currency code<\/a>. The\u00a0<code>currency<\/code>\u00a0must match the currency used in the original payment request.<\/p><p>\u00a0<\/p><\/td><\/tr><tr><td><code>value<\/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>The\u00a0<code>value<\/code>\u00a0must be less than or equal to the authorized amount.<\/p><\/td><\/tr><\/tbody><\/table>\n<h2 id=\"where-the-psp-reference-is-not-known\">Where the PSP reference is not known:<\/h2>\n<h3 id=\"method-1\">Method<\/h3>\n<table><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>RefundTenderReference<\/code><\/p><\/td><td><p>Call used to initiate a partial refund where the PSP reference is unknown.<\/p><p>This can happen when the original Sale transaction was performed offline, in which case there will be no PSPReference, since this is generated only in an online situation.<\/p><\/td><\/tr><\/tbody><\/table>\n<h3 id=\"request-1\">Request<\/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>RefundTransactionRequest<\/code><\/p><\/td><td><p>Sent with the partial refund call where the PSP reference is unknown. Use the tender reference instead of the PSP reference.<\/p><\/td><\/tr><\/tbody><\/table>\n<h3 id=\"refundtenderreference-parameters\">RefundTenderReference\u00a0Parameters<\/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><tr><td><code>modificationAmountValue<\/code><\/td><td>Amount<\/td><td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td><td>A container for the amount that needs to be refunded.<\/td><\/tr><tr><td><code>modificationAmountCurrency<\/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>The three-character\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_4217\" class=\"external-link external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ISO currency code<\/a>. The\u00a0<code>currency<\/code>\u00a0must match the currency used in the original payment request.<\/p><\/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>RefundCB<\/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>pspResultObj<\/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>","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\/partially-refund-a-balance-com","articleFields":{"id":"31504782","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\/partially-refund-a-balance-com","title":"Partially refund a balance","content":"POS Object\n\n\n\nName\nDescription\n\n\n\n\nPOS\nPOS object representing the cash register application.\n\n\n\nYou can partially refund a tender where the PSP reference has been generated, and where it is unknown. You will need to implement both types of partial refund.\nWhere the PSP reference is known:\nMethod\nNameDescriptionRefundPspReferenceCall used to initiate a partial refund where the PSP reference is known.\nRequest\nNameDescriptionRefundTransactionRequestSent with the partial refund call where the PSP reference is known.\nRefundPspReference\u00a0Parameters\nNameTypeRequiredDescriptionmerchantAccountStringThe merchant account that is canceling the transaction and refunding the money (if applicable).PSPReferenceStringPSP reference of the current transaction.originalPspReferenceStringPSP reference of the original transaction.modificationAmountValueAmountA container for the amount that needs to be refunded.modificationAmountCurrencyLongThe three-character\u00a0ISO currency code. The\u00a0currency\u00a0must match the currency used in the original payment request.\u00a0valueStringThe\u00a0value\u00a0must be less than or equal to the authorized amount.\nWhere the PSP reference is not known:\nMethod\nNameDescriptionRefundTenderReferenceCall used to initiate a partial refund where the PSP reference is unknown.This can happen when the original Sale transaction was performed offline, in which case there will be no PSPReference, since this is generated only in an online situation.\nRequest\nNameDescriptionRefundTransactionRequestSent with the partial refund call where the PSP reference is unknown. Use the tender reference instead of the PSP reference.\nRefundTenderReference\u00a0Parameters\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.modificationAmountValueAmountA container for the amount that needs to be refunded.modificationAmountCurrencyLongThe three-character\u00a0ISO currency code. The\u00a0currency\u00a0must match the currency used in the original payment request.\nCallback\nNameDescriptionRefundCBRefund Callback returns the result of a partial refund, as well as any errors.\nThe response contains a\u00a0pspResultObj. 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":"Partially refund a balance"},"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\/partially-refund-a-balance-com"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Partially","refund","balance"]}}
