{"title":"Cancel a transaction","category":"default","creationDate":1776961627,"content":"<p>Use this function to cancel a transaction that is actively being processed on the PED. For transactions that have already been processed by the plataforma de pagamentos da Adyen, use\u00a0<a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library\/refund-a-transaction-from-the-pos-c\">Refund a transaction from the POS - C<\/a>.<\/p>\n<h2 id=\"function\">Function<\/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>cancel_transaction<\/code><\/td>\n<td>Call this function to cancel a transaction. The POS application must never assume the final state and should wait for the final state of the transaction as reported by the PED (from the library).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"parameters\">Parameters<\/h3>\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>terminal_id<\/code><\/td>\n<td>The terminal ID of the PED.<\/td>\n<\/tr>\n<tr>\n<td><code>tender_reference<\/code><\/td>\n<td>A reference for the transaction to cancel.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"code-example\">Code example<\/h3>\n<p>The declaration of the call to cancel a transaction is:<\/p>\n<pre><code class=\"language-cpp\">ADYEN_RESULT cancel_transaction(char * terminal_id, char *tender_reference)<\/code><\/pre>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library\/cancel-a-transaction-c","articleFields":{"id":"24217507","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library\/cancel-a-transaction-c","title":"Cancel a transaction","content":"Use this function to cancel a transaction that is actively being processed on the PED. For transactions that have already been processed by the plataforma de pagamentos da Adyen, use\u00a0Refund a transaction from the POS - C.\nFunction\n\n\n\nName\nDescription\n\n\n\n\ncancel_transaction\nCall this function to cancel a transaction. The POS application must never assume the final state and should wait for the final state of the transaction as reported by the PED (from the library).\n\n\n\nParameters\n\n\n\nName\nDescription\n\n\n\n\nterminal_id\nThe terminal ID of the PED.\n\n\ntender_reference\nA reference for the transaction to cancel.\n\n\n\nCode example\nThe declaration of the call to cancel a transaction is:\nADYEN_RESULT cancel_transaction(char * terminal_id, char *tender_reference)","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"C library integration","lvl5":"Key steps","lvl6":"Cancel or refund a transaction","lvl7":"Cancel a transaction"},"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\/c-library-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library\/cancel-a-transaction-c"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Cancel","transaction"]}}
