{"title":"Cancel","category":"default","creationDate":1776961627,"content":"<div class=\"additional-info-block output-inline\">\n<h5 class=\"article__heading additional-info-block__title\">Cancel in Customer Area <\/h5><div class=\"additional-info-block__body\"><p>You can also cancel payments in your Customer Area. For more information, refer to <a href=\"\/pt\/account\/manage-payments#cancel-a-payment\">Manage payments<\/a>.<\/p><\/div><\/div>\n\n<p>For some\u00a0payment methods, the payment is completed in two steps:<\/p>\n<ol>\n<li><a href=\"\/pt\/get-started-with-adyen\/adyen-glossary\/#authorisation\">Authorisation<\/a>\u00a0\u2013 The payment details of the shopper are verified, and the funds are reserved.<\/li>\n<li><a href=\"\/pt\/online-payments\/classic-integrations\/modify-payments\/capture\">Capture<\/a>\u00a0\u2013\u00a0 The reserved funds are transferred from the shopper to your account.\u00a0<\/li>\n<\/ol>\n<p>If you have authorised a payment but do not want to capture it, for example because an item is out of stock, you need to make a <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/cancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cancel<\/a> request to release the funds back to the shopper. If the payment has already been captured, you need to <a href=\"\/pt\/online-payments\/classic-integrations\/modify-payments\/refund\">refund<\/a> it instead.<\/p>\n<div class=\"notices green\">\n<p>If you want to cancel a payment but are not sure whether it has been <a href=\"\/pt\/online-payments\/classic-integrations\/modify-payments\/capture\">captured<\/a>, use the <a href=\"\/pt\/online-payments\/classic-integrations\/modify-payments\/cancel-or-refund\">\n  <code>\/cancelOrRefund<\/code>\n<\/a> endpoint instead.<\/p>\n<\/div>\n<p>In your call to the <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/cancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cancel<\/a> endpoint, you need to specify the <code>pspReference<\/code> of the original payment. If you do not have this reference, for example because of a timeout error, you can use our <a href=\"#technical-cancel\">technical cancel<\/a> functionality.<\/p>\n<h2>Cancel a payment<\/h2>\n<p>Make a POST request to the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/cancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cancel<\/a>\u00a0endpoint, specifying:\u00a0<\/p>\n<ul>\n<li><code>merchantAccount<\/code>: The name of your merchant account that is used to process the payment.<\/li>\n<li><code>originalReference<\/code>: The\u00a0<code>pspReference<\/code>\u00a0of the original payment request. This is included in the response to your payment request, and in the AUTHORISATION webhook.<\/li>\n<li><code>reference<\/code>: Optionally, you can specify your own reference for this <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/cancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cancel<\/a> request.<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n    \"merchantAccount\" : \"YOUR_MERCHANT_ACCOUNT\",\n    \"originalReference\" : \"8313547924770610\",\n    \"reference\" : \"YOUR_MODIFICATION_REFERENCE\"\n}<\/code><\/pre>\n<p>You will receive a\u00a0<code>\/cancel<\/code>\u00a0response containing:\u00a0<\/p>\n<ul>\n<li><code>response<\/code>: <strong>[cancel-received]<\/strong><\/li>\n<li><code>pspReference<\/code>: The PSP reference associated with this\u00a0<code>\/cancel<\/code>\u00a0request.\u00a0This is different from the PSP reference associated with the original\u00a0payment request.\u00a0<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n    \"pspReference\" : \"8412534564722331\",\n    \"response\" : \"[cancel-received]\"\n}<\/code><\/pre>\n<h3 id=\"cancellation-webhook\">CANCELLATION webhook<\/h3>\n<p>You receive the outcome of the cancel request asynchronously, in a <a href=\"\/pt\/development-resources\/webhooks\">webhook<\/a> that includes :<\/p>\n<ul>\n<li><code>eventCode<\/code>: <strong>CANCELLATION<\/strong>.<\/li>\n<li><code>originalReference<\/code>: The PSP reference of the authorization.<\/li>\n<li><code>pspReference<\/code>: The same as the <code>pspReference<\/code> in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/cancels\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/cancels<\/a> response.<\/li>\n<li>\n<p><code>success<\/code>: Indicates whether the cancel request was successful. Possible values:<\/p>\n<ul>\n<li><strong>true<\/strong>: The cancel request was successful.<\/li>\n<li><strong>false<\/strong>: The cancel request failed. The webhook event includes a <code>reason<\/code> field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the cancel request.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n<div id=\"tabeiWDz\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;success: true&quot;,&quot;content&quot;:&quot;\\n&lt;pre&gt;&lt;code class=\\&quot;language-json\\&quot;&gt;{\\n   \\&quot;live\\&quot;:\\&quot;false\\&quot;,\\n   \\&quot;notificationItems\\&quot;:[\\n      {\\n         \\&quot;NotificationRequestItem\\&quot;:{\\n            \\&quot;amount\\&quot;:{\\n               \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;,\\n               \\&quot;value\\&quot;:500\\n            },\\n            \\&quot;eventCode\\&quot;:\\&quot;CANCELLATION\\&quot;,\\n            \\&quot;eventDate\\&quot;:\\&quot;2021-03-05T09:08:05+01:00\\&quot;,\\n            \\&quot;merchantAccountCode\\&quot;:\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n            \\&quot;originalReference\\&quot;:\\&quot;XB7XNCQ8HXSKGK82\\&quot;,\\n            \\&quot;paymentMethod\\&quot;:\\&quot;mc\\&quot;,\\n            \\&quot;pspReference\\&quot;:\\&quot;JDD6LKT8MBLZNN84\\&quot;,\\n            \\&quot;reason\\&quot;:\\&quot;\\&quot;,\\n            \\&quot;success\\&quot;:\\&quot;true\\&quot;\\n         }\\n      }\\n   ]\\n}&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;success:_true_0_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;success: false&quot;,&quot;content&quot;:&quot;\\n&lt;pre&gt;&lt;code class=\\&quot;language-json\\&quot;&gt;{\\n   \\&quot;live\\&quot;:\\&quot;false\\&quot;,\\n   \\&quot;notificationItems\\&quot;:[\\n      {\\n         \\&quot;NotificationRequestItem\\&quot;:{\\n            \\&quot;amount\\&quot;:{\\n               \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;,\\n               \\&quot;value\\&quot;:500\\n            },\\n            \\&quot;eventCode\\&quot;:\\&quot;CANCELLATION\\&quot;,\\n            \\&quot;eventDate\\&quot;:\\&quot;2021-03-05T09:08:05+01:00\\&quot;,\\n            \\&quot;merchantAccountCode\\&quot;:\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n            \\&quot;originalReference\\&quot;:\\&quot;XB7XNCQ8HXSKGK82\\&quot;,\\n            \\&quot;paymentMethod\\&quot;:\\&quot;mc\\&quot;,\\n            \\&quot;pspReference\\&quot;:\\&quot;JDD6LKT8MBLZNN84\\&quot;,\\n            \\&quot;reason\\&quot;:\\&quot;Transaction not found\\&quot;,\\n            \\&quot;success\\&quot;:\\&quot;false\\&quot;\\n         }\\n      }\\n   ]\\n}&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;success:_false_1_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<p>For more information about the included fields, see the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/CANCELLATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CANCELLATION<\/a> webhook reference.<\/p>\n<h2 id=\"technical-cancel\">Technical cancel<\/h2>\n<p>The <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/technicalCancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/technicalCancel<\/a> endpoint allows you to cancel a payment by using the <code>reference<\/code> that you specified in the original payment request. Technical cancel is only valid for 24 hours after authorisation.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>Only use technical cancel if:<\/p>\n<ol>\n<li>You do not have the <code>pspReference<\/code> of the original payment available, for example because of a timeout error.<\/li>\n<li>You are using <em>unique<\/em> references for payment requests.<\/li>\n<\/ol>\n<\/div><\/div>\n<p>In your call to the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/technicalCancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/technicalCancel<\/a>\u00a0endpoint, specify:<\/p>\n<ul>\n<li><code>merchantAccount<\/code>:\u00a0The name of your merchant account that is used to process the payment.<\/li>\n<li><code>originalMerchantReference<\/code>: Your\u00a0<code>reference<\/code>\u00a0from the original payment\u00a0request.<\/li>\n<li><code>reference<\/code>: Optionally, you can specify your own reference for this <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/technicalCancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/technicalCancel<\/a> request.<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n  \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n  \"originalMerchantReference\": \"YOUR_ORIGINAL_REFERENCE\",\n  \"reference\": \"YOUR_MODIFICATION_REFERENCE\"\n}<\/code><\/pre>\n<p>You will receive a <code>\/technicalCancel<\/code>\u00a0response containing:\u00a0<\/p>\n<ul>\n<li><code>pspReference<\/code>:\u00a0The PSP reference\u00a0associated with this\u00a0<code>\/technicalCancel<\/code>\u00a0request.\u00a0Note that this is different from the PSP reference associated with the original\u00a0payment request.\u00a0\u00a0<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n   \"pspReference\":\"8515208516304269\",\n   \"response\":\"[technical-cancel-received]\"\n}<\/code><\/pre>\n<h3 id=\"technical-cancel-webhook\">TECHNICAL CANCEL webhook<\/h3>\n<p>Once we have processed your cancel request, we send you a\u00a0<a href=\"\/pt\/development-resources\/webhooks\">webhook event<\/a>\u00a0with:<\/p>\n<ul>\n<li><code>eventCode<\/code>:\u00a0<strong>TECHNICAL_CANCEL<\/strong><\/li>\n<li><code>pspReference<\/code>: Same as the\u00a0<code>pspReference<\/code>\u00a0in the\u00a0<code>\/technicalCancel<\/code>\u00a0response.\u00a0<\/li>\n<li><code>success<\/code>: Indicates whether the cancel request was successful.\u00a0<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n   \"live\":\"false\",\n   \"notificationItems\":[\n      {\n         \"NotificationRequestItem\":{\n            \"additionalData\":{\n               \"paymentMethodVariant\":\"visa\"\n            },\n            \"amount\":{\n               \"currency\":\"EUR\",\n               \"value\":5000\n            },\n            \"eventCode\":\"TECHNICAL_CANCEL\",\n            \"eventDate\":\"2018-07-18T22:35:14+02:00\",\n            \"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT\",\n            \"merchantReference\":\"YOUR_ORIGINAL_REFERENCE\",\n            \"originalReference\":\"8313547924770610\",\n            \"paymentMethod\":\"visa\",\n            \"pspReference\":\"8515208516304269\",\n            \"reason\":\"\",\n            \"success\":\"true\"\n         }\n      }\n   ]\n}<\/code><\/pre>\n<p>For more information about the included fields, see the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/TECHNICAL_CANCEL\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">TECHNICAL_CANCEL<\/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\/?classes=codeLabel#\/Payment\/cancel\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Webhooks\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    Online payments webhook reference\n                <\/a><\/li><li><a href=\"\/online-payments\/classic-integrations\/modify-payments\/capture\"\n                        target=\"_self\"\n                        >\n                    Capture\n                <\/a><\/li><li><a href=\"\/online-payments\/classic-integrations\/modify-payments\/cancel-or-refund\"\n                        target=\"_self\"\n                        >\n                    Cancel or refund\n                <\/a><\/li><li><a href=\"\/account\/payments-lifecycle\"\n                        target=\"_self\"\n                        >\n                    Payments lifecycle\n                <\/a><\/li><li><a href=\"\/payment-methods\"\n                        target=\"_self\"\n                        >\n                    Payment methods\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/modify-payments\/cancel","articleFields":{"description":"Cancel the authorisation on an uncaptured payment.","id":"31493913","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"21-01-2021 10:35"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/modify-payments\/cancel","title":"Cancel","content":"\nCancel in Customer Area You can also cancel payments in your Customer Area. For more information, refer to Manage payments.\n\nFor some\u00a0payment methods, the payment is completed in two steps:\n\nAuthorisation\u00a0\u2013 The payment details of the shopper are verified, and the funds are reserved.\nCapture\u00a0\u2013\u00a0 The reserved funds are transferred from the shopper to your account.\u00a0\n\nIf you have authorised a payment but do not want to capture it, for example because an item is out of stock, you need to make a \/cancel request to release the funds back to the shopper. If the payment has already been captured, you need to refund it instead.\n\nIf you want to cancel a payment but are not sure whether it has been captured, use the \n  \/cancelOrRefund\n endpoint instead.\n\nIn your call to the \/cancel endpoint, you need to specify the pspReference of the original payment. If you do not have this reference, for example because of a timeout error, you can use our technical cancel functionality.\nCancel a payment\nMake a POST request to the\u00a0\/cancel\u00a0endpoint, specifying:\u00a0\n\nmerchantAccount: The name of your merchant account that is used to process the payment.\noriginalReference: The\u00a0pspReference\u00a0of the original payment request. This is included in the response to your payment request, and in the AUTHORISATION webhook.\nreference: Optionally, you can specify your own reference for this \/cancel request.\n\n{\n    \"merchantAccount\" : \"YOUR_MERCHANT_ACCOUNT\",\n    \"originalReference\" : \"8313547924770610\",\n    \"reference\" : \"YOUR_MODIFICATION_REFERENCE\"\n}\nYou will receive a\u00a0\/cancel\u00a0response containing:\u00a0\n\nresponse: [cancel-received]\npspReference: The PSP reference associated with this\u00a0\/cancel\u00a0request.\u00a0This is different from the PSP reference associated with the original\u00a0payment request.\u00a0\n\n{\n    \"pspReference\" : \"8412534564722331\",\n    \"response\" : \"[cancel-received]\"\n}\nCANCELLATION webhook\nYou receive the outcome of the cancel request asynchronously, in a webhook that includes :\n\neventCode: CANCELLATION.\noriginalReference: The PSP reference of the authorization.\npspReference: The same as the pspReference in the  \/payments\/{paymentPspReference}\/cancels response.\n\nsuccess: Indicates whether the cancel request was successful. Possible values:\n\ntrue: The cancel request was successful.\nfalse: The cancel request failed. The webhook event includes a reason field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the cancel request.\n\n\n\n\n\n    \n        \n        \n    \n\n\nFor more information about the included fields, see the  CANCELLATION webhook reference.\nTechnical cancel\nThe \/technicalCancel endpoint allows you to cancel a payment by using the reference that you specified in the original payment request. Technical cancel is only valid for 24 hours after authorisation.\n\nOnly use technical cancel if:\n\nYou do not have the pspReference of the original payment available, for example because of a timeout error.\nYou are using unique references for payment requests.\n\n\nIn your call to the\u00a0\/technicalCancel\u00a0endpoint, specify:\n\nmerchantAccount:\u00a0The name of your merchant account that is used to process the payment.\noriginalMerchantReference: Your\u00a0reference\u00a0from the original payment\u00a0request.\nreference: Optionally, you can specify your own reference for this \/technicalCancel request.\n\n{\n  \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n  \"originalMerchantReference\": \"YOUR_ORIGINAL_REFERENCE\",\n  \"reference\": \"YOUR_MODIFICATION_REFERENCE\"\n}\nYou will receive a \/technicalCancel\u00a0response containing:\u00a0\n\npspReference:\u00a0The PSP reference\u00a0associated with this\u00a0\/technicalCancel\u00a0request.\u00a0Note that this is different from the PSP reference associated with the original\u00a0payment request.\u00a0\u00a0\n\n{\n   \"pspReference\":\"8515208516304269\",\n   \"response\":\"[technical-cancel-received]\"\n}\nTECHNICAL CANCEL webhook\nOnce we have processed your cancel request, we send you a\u00a0webhook event\u00a0with:\n\neventCode:\u00a0TECHNICAL_CANCEL\npspReference: Same as the\u00a0pspReference\u00a0in the\u00a0\/technicalCancel\u00a0response.\u00a0\nsuccess: Indicates whether the cancel request was successful.\u00a0\n\n{\n   \"live\":\"false\",\n   \"notificationItems\":[\n      {\n         \"NotificationRequestItem\":{\n            \"additionalData\":{\n               \"paymentMethodVariant\":\"visa\"\n            },\n            \"amount\":{\n               \"currency\":\"EUR\",\n               \"value\":5000\n            },\n            \"eventCode\":\"TECHNICAL_CANCEL\",\n            \"eventDate\":\"2018-07-18T22:35:14+02:00\",\n            \"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT\",\n            \"merchantReference\":\"YOUR_ORIGINAL_REFERENCE\",\n            \"originalReference\":\"8313547924770610\",\n            \"paymentMethod\":\"visa\",\n            \"pspReference\":\"8515208516304269\",\n            \"reason\":\"\",\n            \"success\":\"true\"\n         }\n      }\n   ]\n}\nFor more information about the included fields, see the  TECHNICAL_CANCEL webhook reference.\nSee also\n\n\n                    API Explorer\n                \n                    Online payments webhook reference\n                \n                    Capture\n                \n                    Cancel or refund\n                \n                    Payments lifecycle\n                \n                    Payment methods\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Modify payments","lvl4":"Cancel"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/modify-payments","lvl4":"\/pt\/online-payments\/classic-integrations\/modify-payments\/cancel"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Cancel"]}}
