{"title":"Reversal","category":"default","creationDate":1776961627,"content":"<p>If you are not sure if a payment has been <a href=\"\/pt\/online-payments\/capture\">captured<\/a>, you can use a reversal to return the funds to the shopper.<\/p>\n<p>A reversal does one of the following:<\/p>\n<ul>\n<li>If the payment has not been captured, it <a href=\"\/pt\/online-payments\/cancel\">cancels<\/a> the payment.<\/li>\n<li>If the payment has been captured, it <a href=\"\/pt\/online-payments\/refund\">refunds<\/a> the payment.<\/li>\n<\/ul>\n<h2>Requirements<\/h2>\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;\">An <a href=\"\/pt\/online-payments\/build-your-integration\/\">online payments integration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/account\/user-roles\">Customer Area roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">To edit capture settings, make sure that you have the following roles: <ul><li markdown=\"1\"><strong>Merchant admin<\/strong><\/li><li markdown=\"1\"><strong>View Payments<\/strong><\/li> <li markdown=\"1\"><strong>Merchant manage payments<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/webhooks\">Webhooks<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Listen for webhook messages with the following <code>eventCode<\/code> value: <ul><li markdown=\"1\"><a href=\"\/pt\/development-resources\/webhooks\/webhook-types#transaction-events\">\n  <strong>CANCEL_OR_REFUND<\/strong>\n<\/a><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">You cannot use a reversal for the following cases:  <ul><li markdown=\"1\">If you have made <a href=\"\/pt\/online-payments\/capture\">multiple partial captures<\/a> for the payment.<\/li><li markdown=\"1\">When the payment includes <a href=\"\/pt\/classic-platforms\/processing-payments#providing-split-instructions\">split data<\/a> in the payment request or in the capture request for Adyen for Platforms.<\/li><\/ul> In these cases, check if the payment has been captured, and <a href=\"\/pt\/online-payments\/cancel\">cancel<\/a> or <a href=\"\/pt\/online-payments\/refund\">refund<\/a> it.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"reverse\">Reverse a payment<\/h2>\n<p>Make a POST\u00a0 <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/reversals\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/reversals<\/a>  request, including the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>paymentPspReference<\/code><br> Path parameter<\/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 PSP reference of the payment. You can find this in the following: <ul><li markdown=\"1\">The webhook message with <code>eventCode<\/code>: <strong>AUTHORISATION<\/strong> for the payment.<\/li><li markdown=\"1\">In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, in the list of payments (<strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>).<\/li><li markdown=\"1\">If you made a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request for the payment, the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td><code>merchantAccount<\/code><\/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>Your merchant account used to process the payment.<\/td>\n<\/tr>\n<tr>\n<td><code>reference<\/code><\/td>\n<td><\/td>\n<td>Your reference for the reversal request. For reconciliation, this can be useful to identify a partial cancel or refund.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of a reversal request'\" :id=\"'reversals-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/VK9DRSLLRCQ2WN82\\\/reversals \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'Content-Type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_UNIQUE_REFERENCE\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;Client client = new Client(System.getenv(\\&quot;API_KEY\\&quot;), Environment.TEST);\\nModificationsApi checkout = new ModificationsApi(client);\\nPaymentReversalRequest paymentReversalRequest = new PaymentReversalRequest();\\npaymentReversalRequest.setMerchantAccount(System.getenv(\\&quot;MERCHANT_ACCOUNT\\&quot;));\\npaymentReversalRequest.setReference(\\&quot;YOUR_UNIQUE_REFERENCE\\&quot;);\\nString paymentPspReference = \\&quot;VK9DRSLLRCQ2WN82\\&quot;;\\nPaymentReversalResponse response = checkout.refundOrCancelPayment(paymentPspReference, paymentReversalRequest);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/reversals\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/reversals<\/a> \u00a0response includes a <code>pspReference<\/code>, Adyen's unique reference\u00a0associated with this reversal\u00a0request.<\/p>\n<pre><code class=\"language-json\">{\n    \"merchantAccount\": \"ADYEN_MERCHANT_ACCOUNT\",\n    \"paymentPspReference\": \"VK9DRSLLRCQ2WN82\",\n    \"pspReference\" : \"TF995R5G6L2GWR82\",\n    \"reference\": \"YOUR_UNIQUE_REFERENCE\",\n    \"status\" : \"received\"\n}<\/code><\/pre>\n<h2 id=\"cancel-or-refund-webhook\">CANCEL_OR_REFUND webhook<\/h2>\n<p>You receive the outcome of the reversal request asynchronously, in a <a href=\"\/pt\/development-resources\/webhooks\">webhook<\/a> message that includes the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>eventCode<\/code><\/td>\n<td><strong>CANCEL_OR_REFUND<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>originalReference<\/code><\/td>\n<td>The PSP reference of the original payment.<\/td>\n<\/tr>\n<tr>\n<td><code>pspReference<\/code><\/td>\n<td>The PSP reference of the reversal that you can find in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/reversals\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/reversals<\/a> response<\/td>\n<\/tr>\n<tr>\n<td><code>success<\/code><\/td>\n<td>Indicates the outcome of the refund validations. Possible values:  <ul><li> <strong>true<\/strong>: Adyen's validations were successful and we sent the refund request to the card scheme. This usually means that the refund will be processed successfully. However, in rare cases the refund can be rejected by the card scheme, or reversed. For information about these exceptions, see <a href=\"\/pt\/online-payments\/refund#refund-failed\"><strong>REFUND_FAILED<\/strong> webhook<\/a>, and <a href=\"\/pt\/online-payments\/refund#refunded-reversed\"><strong>REFUNDED_REVERSED<\/strong> webhook<\/a>. <\/li><li> <strong>false<\/strong>: the refund validations failed. The webhook includes a <code>reason<\/code> field with a short description of the problem. <a href=\"\/pt\/online-payments\/classic-integrations\/modify-payments\/refund#unsuccessful-refund-request\">Review the reason<\/a>, fix the issue if possible, and resubmit the refund request. <\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of a webhook message with the CANCEL_OR_REFUND event code'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"live\\\":\\\"false\\\",\\n   \\\"notificationItems\\\":[\\n      {\\n         \\\"NotificationRequestItem\\\":{\\n            \\\"additionalData\\\":{\\n               \\\"modification.action\\\": \\\"refund\\\"\\n            },\\n            \\\"amount\\\":{\\n               \\\"currency\\\": \\\"EUR\\\",\\n               \\\"value\\\": 1025\\n            },\\n            \\\"eventCode\\\":\\\"CANCEL_OR_REFUND\\\",\\n            \\\"eventDate\\\":\\\"2022-02-03T15:14:15.004Z\\\",\\n            \\\"merchantAccountCode\\\":\\\"YOUR_MERCHANT_ACCOUNT\\\",\\n            \\\"originalReference\\\":\\\"VK9DRSLLRCQ2WN82\\\",\\n            \\\"paymentMethod\\\":\\\"mc\\\",\\n            \\\"pspReference\\\":\\\"TF995R5G6L2GWR82\\\",\\n            \\\"reason\\\":\\\"\\\",\\n            \\\"success\\\":\\\"true\\\"\\n         }\\n      }\\n   ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>For more information about the included fields, see the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/CANCEL_OR_REFUND\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CANCEL_OR_REFUND<\/a> webhook reference.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Webhooks\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    Online payments webhook reference\n                <\/a><\/li><li><a href=\"\/online-payments\/capture\"\n                        target=\"_self\"\n                        >\n                    Capture\n                <\/a><\/li><li><a href=\"\/online-payments\/cancel\"\n                        target=\"_self\"\n                        >\n                    Cancel\n                <\/a><\/li><li><a href=\"\/online-payments\/refund\"\n                        target=\"_self\"\n                        >\n                    Refund\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/reversal","articleFields":{"description":"Return the funds to the shopper when you are not sure whether the payment has been captured.","id":"31493919","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"13-03-2020 09:51","feedback_component":true},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/reversal","title":"Reversal","content":"If you are not sure if a payment has been captured, you can use a reversal to return the funds to the shopper.\nA reversal does one of the following:\n\nIf the payment has not been captured, it cancels the payment.\nIf the payment has been captured, it refunds the payment.\n\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nAn online payments integration.\n\n\nCustomer Area roles\nTo edit capture settings, make sure that you have the following roles: Merchant adminView Payments Merchant manage payments\n\n\nWebhooks\nListen for webhook messages with the following eventCode value: \n  CANCEL_OR_REFUND\n\n\n\nLimitations\nYou cannot use a reversal for the following cases:  If you have made multiple partial captures for the payment.When the payment includes split data in the payment request or in the capture request for Adyen for Platforms. In these cases, check if the payment has been captured, and cancel or refund it.\n\n\n\nReverse a payment\nMake a POST\u00a0 \/payments\/{paymentPspReference}\/reversals  request, including the following:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\npaymentPspReference Path parameter\n\nThe PSP reference of the payment. You can find this in the following: The webhook message with eventCode: AUTHORISATION for the payment.In your Customer Area, in the list of payments (Transactions &gt; Payments).If you made a  \/payments request for the payment, the  \/payments response.\n\n\nmerchantAccount\n\nYour merchant account used to process the payment.\n\n\nreference\n\nYour reference for the reversal request. For reconciliation, this can be useful to identify a partial cancel or refund.\n\n\n\n\n    \n\nThe  \/payments\/{paymentPspReference}\/reversals \u00a0response includes a pspReference, Adyen's unique reference\u00a0associated with this reversal\u00a0request.\n{\n    \"merchantAccount\": \"ADYEN_MERCHANT_ACCOUNT\",\n    \"paymentPspReference\": \"VK9DRSLLRCQ2WN82\",\n    \"pspReference\" : \"TF995R5G6L2GWR82\",\n    \"reference\": \"YOUR_UNIQUE_REFERENCE\",\n    \"status\" : \"received\"\n}\nCANCEL_OR_REFUND webhook\nYou receive the outcome of the reversal request asynchronously, in a webhook message that includes the following:\n\n\n\nParameter\nDescription\n\n\n\n\neventCode\nCANCEL_OR_REFUND\n\n\noriginalReference\nThe PSP reference of the original payment.\n\n\npspReference\nThe PSP reference of the reversal that you can find in the  \/payments\/{paymentPspReference}\/reversals response\n\n\nsuccess\nIndicates the outcome of the refund validations. Possible values:   true: Adyen's validations were successful and we sent the refund request to the card scheme. This usually means that the refund will be processed successfully. However, in rare cases the refund can be rejected by the card scheme, or reversed. For information about these exceptions, see REFUND_FAILED webhook, and REFUNDED_REVERSED webhook.  false: the refund validations failed. The webhook includes a reason field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the refund request. \n\n\n\n\n    \n\nFor more information about the included fields, see the  CANCEL_OR_REFUND webhook reference.\nSee also\n\n\n                    Online payments webhook reference\n                \n                    Capture\n                \n                    Cancel\n                \n                    Refund\n                \n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Reversal"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"\/pt\/online-payments\/reversal"},"levels":3,"category":"Online Payments","category_color":"green","tags":["Reversal"]}}
