{"title":"Handle receipts","category":"default","creationDate":1776961627,"content":"<h2 id=\"delegate\">Delegate<\/h2>\n<p>The\u00a0<code>transactionRequiresPrintedReceipt<\/code> delegate\u00a0is called when a receipt must be printed out by the app.<\/p>\n<p>After this method has been called, transaction-processing will be paused until\u00a0<code>confirmReceiptPrinted:<\/code>\u00a0is called on the given\u00a0<code>printReceiptRequest<\/code>.<\/p>\n<p>This method must be implemented to print a receipt on paper, based on the data provided in the\u00a0<code>printReceiptRequest<\/code>.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>Instead of calling\u00a0<code>[ADYPrintReceiptRequest confirmReceiptPrinted:]<\/code>, it is also possible to cancel the transaction at this point by calling\u00a0<code>[ADYTransactionRequest requestCancel]<\/code>. If this is done, do not call\u00a0<code>confirmReceiptPrinted:<\/code>\u00a0anymore.<\/p>\n<p>However, it is possible that\u00a0<code>transactionRequiresPrintedReceipt:<\/code>\u00a0will be called a second time as part of the transaction-flow. If that happens, and it is not desirable to print out a receipt at that time, cancel the transaction again.<\/p>\n<\/div><\/div>\n<p>Card schemes have very specific requirements on what should be included on a receipt. These requirements differ per scheme and country\/region, and can change. Receipts generated by Adyen have been certified as compliant by the card schemes that we support.<\/p>\n<p>Card schemes will occasionally visit live stores to verify that receipts being generated are fully-compliant.<\/p>\n<div class=\"notices red\">\n<p>To prevent non-compliance and avoidable chargebacks, we strongly recommend using the Adyen-generated receipts without alterations. If you override this receipt data, or validate values against a hard-coded list, it is your responsibility to ensure that scheme requirements are met at all times.<\/p>\n<\/div>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: right;\">Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: right;\"><code>printReceiptRequest<\/code><\/td>\n<td>ADYPrintReceiptRequest<\/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>Object containing receipt-data, and methods to continue transaction-processing.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"declaration-code-example\">Declaration code example<\/h3>\n<h4 id=\"objective-c\">Objective-C<\/h4>\n<pre><code class=\"language-objectivec\">- (void)transactionRequiresPrintedReceipt:\n    (ADYPrintReceiptRequest *)printReceiptRequest;<\/code><\/pre>\n<h4 id=\"swift\">Swift<\/h4>\n<pre><code class=\"language-swift\">func transactionRequiresPrintedReceipt(_ printReceiptRequest: ADYPrintReceiptRequest!)<\/code><\/pre>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-receipts-ios","articleFields":{"id":"34120800","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-receipts-ios","title":"Handle receipts","content":"Delegate\nThe\u00a0transactionRequiresPrintedReceipt delegate\u00a0is called when a receipt must be printed out by the app.\nAfter this method has been called, transaction-processing will be paused until\u00a0confirmReceiptPrinted:\u00a0is called on the given\u00a0printReceiptRequest.\nThis method must be implemented to print a receipt on paper, based on the data provided in the\u00a0printReceiptRequest.\n\nInstead of calling\u00a0[ADYPrintReceiptRequest confirmReceiptPrinted:], it is also possible to cancel the transaction at this point by calling\u00a0[ADYTransactionRequest requestCancel]. If this is done, do not call\u00a0confirmReceiptPrinted:\u00a0anymore.\nHowever, it is possible that\u00a0transactionRequiresPrintedReceipt:\u00a0will be called a second time as part of the transaction-flow. If that happens, and it is not desirable to print out a receipt at that time, cancel the transaction again.\n\nCard schemes have very specific requirements on what should be included on a receipt. These requirements differ per scheme and country\/region, and can change. Receipts generated by Adyen have been certified as compliant by the card schemes that we support.\nCard schemes will occasionally visit live stores to verify that receipts being generated are fully-compliant.\n\nTo prevent non-compliance and avoidable chargebacks, we strongly recommend using the Adyen-generated receipts without alterations. If you override this receipt data, or validate values against a hard-coded list, it is your responsibility to ensure that scheme requirements are met at all times.\n\nParameters\n\n\n\nName\nType\nRequired\nDescription\n\n\n\n\nprintReceiptRequest\nADYPrintReceiptRequest\n\nObject containing receipt-data, and methods to continue transaction-processing.\n\n\n\nDeclaration code example\nObjective-C\n- (void)transactionRequiresPrintedReceipt:\n    (ADYPrintReceiptRequest *)printReceiptRequest;\nSwift\nfunc transactionRequiresPrintedReceipt(_ printReceiptRequest: ADYPrintReceiptRequest!)","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"iOS integration","lvl5":"Key steps","lvl6":"Process a basic transaction","lvl7":"Handle receipts"},"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\/ios-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-receipts-ios"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Handle","receipts"]}}
