{"title":"Start gift card transactions - iOS","category":"default","creationDate":1776961627,"content":"<h2 id=\"method\">Method<\/h2>\n<p>Call\u00a0<code>createSpecialTransactionRequest<\/code>\u00a0\u00a0on the selected\u00a0<code>ADYDevice<\/code>. This creates\u00a0an\u00a0<code>ADYSpecialTransactionRequest<\/code>\u00a0object.<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table><thead><tr class=\"header\"><th><p>Parameters<\/p><\/th><th><p>Type<\/p><\/th><th><p>Required<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>reference<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>A merchant-supplied reference for the transaction<\/p>\n<\/td><\/tr><tr><td>\n<p><code>amount<\/code><\/p>\n<\/td><td>\n<p>NSNumber<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>The amount of the transaction.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>currency<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>The currency of the transaction.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>transactionType<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<ul><li>\n<p><span translate=\"no\"><strong>payment<\/strong><\/span> - Make a payment with the balance.<\/p>\n<\/li><li>\n<p><span translate=\"no\"><strong>load<\/strong><\/span> - Load a balance to a card.<\/p>\n<\/li><li>\n<p><span translate=\"no\"><strong>redeem<\/strong><\/span> - Redeem the value of a card.<\/p>\n<\/li><li>\n<p><span translate=\"no\"><strong>balanceInquiry<\/strong><\/span> - Check the balance of a card.<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p><code>options<\/code><\/p>\n<\/td><td>\n<p>Dictionary<\/p>\n<\/td><td>\n<p><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/p>\n<\/td><td>\n<p>Options is an NSDictionary with key value pairs. This information is passed directly to the PED, which interprets it.Activate, load, or refund a balance to a card by creating a special tender and passing the following values as the <code>loadType<\/code> in special options:<\/p>\n<ul>\n<li><strong>activate<\/strong> - Activates a gift card.<\/li>\n<li><strong>load<\/strong> - Adds a balance to a gift card.<\/li>\n<li><strong>merchandise_return<\/strong> -\u00a0Add a refund balance back on to a gift card. This uses the same functionally as a load but is separated for accounting purposes.<\/li>\n<\/ul>\n<div class=\"sc-notice info\"><div>\n<p>The activate and load values can be piped to chain the tasks by passing \"<strong>activate|load<\/strong>\".<\/p>\n<p><\/div><\/div>Perform a cash back or deactivate a card by creating a special tender and passing a <code>redemptionType<\/code>\u00a0as a special option.\u00a0<\/p>\n<ul>\n<li>\n<p><strong>cashback -<\/strong> Cash out the value of a gift card. For SVS, you must create a zero-value transaction to cash out the entire balance of a card. You can not cash out a specific amount.<\/p>\n<\/li>\n<li>\n<p><strong>deactivate\u00a0<\/strong>- Deactivates a gift card.\u00a0\u00a0(Deactivate is not available for SVS).<\/p>\n<\/li>\n<li>\n<p><strong>gratuity<\/strong> - Used to provide a tip from a gift card. (For SVS cards only).<\/p>\n<\/li>\n<\/ul>\n<div class=\"sc-notice info\"><div>\n<p>The cashback and deactivate values can be piped to chain the tasks by passing\u00a0 \"<strong>cashback|deactivate<\/strong>\".<\/p>\n<\/div><\/div>\n<\/td><\/tr><tr><td>\n<p><code>paymentMethodType<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p><strong>Values:<\/strong><ul><li markdown=\"1\"><span translate=\"no\"><strong>svs<\/strong><\/span> for an SVS gift card.<\/li><li markdown=\"1\"><span translate=\"no\"><strong>givex<\/strong><\/span> for a Givex gift card.<\/li><\/ul><\/p>\n<\/td><\/tr><tr><td>\n<p><code>merchantReference<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>The unique merchant reference for the transaction.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>handleReceipt<\/code><\/p>\n<\/td><td>\n<p>Boolean<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>Specifies that the POS handles and prints receipts. If omitted, it is required that the PED prints the receipt. If there is no printer unit, the transaction will fail.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>additionalData<\/code><\/p>\n<\/td><td>\n<p>NSMutableDictionary<\/p>\n<\/td><td>\n<p><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/p>\n<\/td><td>\n<p>Contains key\/value pairs that can be used by the merchant to return specific additional data, in particular in the final transaction result.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h3 id=\"callbacks\">Callbacks<\/h3>\n<p>Implement the\u00a0<code>ADYTransactionProcessorDelegate<\/code>, specifically the methods:<\/p>\n<ul>\n<li>\n<p><code>(void)transactionComplete:(ADYTransactionData*)transaction<\/code><\/p>\n<\/li>\n<li>\n<p><code>(void)transactionRequiresPrintedReceipt:(ADYPrintReceiptRequest*)printReceiptRequest<\/code><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"check-transaction-progress\">Check transaction progress<\/h2>\n<p>Use the <code>ADYTransactionProcessorDelegate<\/code> to stay informed about the transaction's progress and completion. The <code>error<\/code> param is set if the transaction cannot be started.<\/p>\n<pre><code class=\"language-objectivec\">- (BOOL)startWithDelegate:(id&lt;ADYTransactionProcessorDelegate&gt;)delegate error:(NSError **)error;<\/code><\/pre>\n<h2 id=\"cancel-a-gift-card-transaction\">Cancel a gift card transaction<\/h2>\n<p>Use the <code>requestCancel<\/code> method to cancel a gift card transaction.<\/p>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/extras-ios\/start-gift-card-transactions-ios","articleFields":{"id":"39950015","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/extras-ios\/start-gift-card-transactions-ios","title":"Start gift card transactions - iOS","content":"Method\nCall\u00a0createSpecialTransactionRequest\u00a0\u00a0on the selected\u00a0ADYDevice. This creates\u00a0an\u00a0ADYSpecialTransactionRequest\u00a0object.\nParameters\nParametersTypeRequiredDescription\nreference\n\nString\n\n\n\nA merchant-supplied reference for the transaction\n\namount\n\nNSNumber\n\n\n\nThe amount of the transaction.\n\ncurrency\n\nString\n\n\n\nThe currency of the transaction.\n\ntransactionType\n\nString\n\n\n\n\npayment - Make a payment with the balance.\n\nload - Load a balance to a card.\n\nredeem - Redeem the value of a card.\n\nbalanceInquiry - Check the balance of a card.\n\n\noptions\n\nDictionary\n\n\n\nOptions is an NSDictionary with key value pairs. This information is passed directly to the PED, which interprets it.Activate, load, or refund a balance to a card by creating a special tender and passing the following values as the loadType in special options:\n\nactivate - Activates a gift card.\nload - Adds a balance to a gift card.\nmerchandise_return -\u00a0Add a refund balance back on to a gift card. This uses the same functionally as a load but is separated for accounting purposes.\n\n\nThe activate and load values can be piped to chain the tasks by passing \"activate|load\".\nPerform a cash back or deactivate a card by creating a special tender and passing a redemptionType\u00a0as a special option.\u00a0\n\n\ncashback - Cash out the value of a gift card. For SVS, you must create a zero-value transaction to cash out the entire balance of a card. You can not cash out a specific amount.\n\n\ndeactivate\u00a0- Deactivates a gift card.\u00a0\u00a0(Deactivate is not available for SVS).\n\n\ngratuity - Used to provide a tip from a gift card. (For SVS cards only).\n\n\n\nThe cashback and deactivate values can be piped to chain the tasks by passing\u00a0 \"cashback|deactivate\".\n\n\npaymentMethodType\n\nString\n\n\n\nValues:svs for an SVS gift card.givex for a Givex gift card.\n\nmerchantReference\n\nString\n\n\n\nThe unique merchant reference for the transaction.\n\nhandleReceipt\n\nBoolean\n\n\n\nSpecifies that the POS handles and prints receipts. If omitted, it is required that the PED prints the receipt. If there is no printer unit, the transaction will fail.\n\nadditionalData\n\nNSMutableDictionary\n\n\n\nContains key\/value pairs that can be used by the merchant to return specific additional data, in particular in the final transaction result.\n\nCallbacks\nImplement the\u00a0ADYTransactionProcessorDelegate, specifically the methods:\n\n\n(void)transactionComplete:(ADYTransactionData*)transaction\n\n\n(void)transactionRequiresPrintedReceipt:(ADYPrintReceiptRequest*)printReceiptRequest\n\n\nCheck transaction progress\nUse the ADYTransactionProcessorDelegate to stay informed about the transaction's progress and completion. The error param is set if the transaction cannot be started.\n- (BOOL)startWithDelegate:(id&lt;ADYTransactionProcessorDelegate&gt;)delegate error:(NSError **)error;\nCancel a gift card transaction\nUse the requestCancel method to cancel a gift card transaction.","type":"page","locale":"pt","boost":14,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"iOS integration","lvl5":"Extras","lvl6":"Start gift card transactions - iOS"},"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\/extras-ios","lvl6":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/extras-ios\/start-gift-card-transactions-ios"},"levels":7,"category":"In-person payments","category_color":"green","tags":["Start","transactions"]}}
