{"id":31888857,"url":"https://github.com/tap-payments/gosellsdk-ios","last_synced_at":"2025-10-13T06:21:54.618Z","repository":{"id":29733905,"uuid":"121246974","full_name":"Tap-Payments/goSellSDK-iOS","owner":"Tap-Payments","description":"goSell iOS SDK","archived":false,"fork":false,"pushed_at":"2025-04-20T12:54:30.000Z","size":10591,"stargazers_count":24,"open_issues_count":48,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-10T22:18:52.367Z","etag":null,"topics":["api","gosell","ios","payments","sdk","swift","tap","tappayments"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tap-Payments.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-02-12T12:59:36.000Z","updated_at":"2025-10-08T16:01:16.000Z","dependencies_parsed_at":"2023-12-21T16:12:10.634Z","dependency_job_id":"6effd7c0-3414-4a2f-9b07-7b95c68da68c","html_url":"https://github.com/Tap-Payments/goSellSDK-iOS","commit_stats":{"total_commits":503,"total_committers":10,"mean_commits":50.3,"dds":0.5506958250497018,"last_synced_commit":"341b71693a2ccf5c4e4f2b8aee17ad6b021e3047"},"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"purl":"pkg:github/Tap-Payments/goSellSDK-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap-Payments%2FgoSellSDK-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap-Payments%2FgoSellSDK-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap-Payments%2FgoSellSDK-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap-Payments%2FgoSellSDK-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tap-Payments","download_url":"https://codeload.github.com/Tap-Payments/goSellSDK-iOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap-Payments%2FgoSellSDK-iOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013958,"owners_count":26085429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","gosell","ios","payments","sdk","swift","tap","tappayments"],"created_at":"2025-10-13T06:21:52.694Z","updated_at":"2025-10-13T06:21:54.610Z","avatar_url":"https://github.com/Tap-Payments.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goSell iOS SDK\n\niOS SDK to use [goSell API][1].\n\n[![Platform](https://img.shields.io/cocoapods/p/goSellSDK.svg?style=flat)](https://tap-payments.github.io/goSellSDK-iOS)\n[![Build Status](https://travis-ci.org/Tap-Payments/goSellSDK-iOS.svg?branch=master)](https://travis-ci.org/Tap-Payments/goSellSDK-iOS)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/goSellSDK.svg?style=flat)](https://img.shields.io/Tap-Payments/v/goSellSDK)\n[![Documentation](docs/badge.svg)](https://tap-payments.github.io/goSellSDK-iOS)\n\nA library that fully covers payment/authorization/card saving process inside your iOS application.\n\n# Table of Contents \n\n---\n\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n   1. [Installation with CocoaPods](#installation_with_cocoapods)\n   2. [Installation with Carthage](#installation_with_carthage)\n   3. [M1 based Macs](#M1_based_Macs)\n   4. [Installation with App Clip](#Installation_To_App_Clip)\n3. [Setup](#setup)\n   1. [goSellSDK Class Properties](#setup_gosellsdk_class_properties)\n   2. [goSellSDK Class Methods](#setup_gosellsdk_class_methods)\n   3. [Setup Steps](#setup_steps)\n4. [Usage](#usage)\n   1. [SDK modes](#sdk_modes)\n   2. [Pay Button](#pay_button)\n      1. [Pay Button Placement](#pay_button_placement)\n      2. [Properties](#pay_button_properties)\n      3. [Methods](#pay_button_methods)\n   3. [Session](#session)\n      1. [Properties](#session_properties)\n       2. [Methods](#session_methods)\n   4. [API Session](#api_session)\n      1. [Properties](#api_session_properties)\n       2. [Methods](#api_session_methods)\n   5. [Session Data Source](#session_data_source)\n      1. [Structure](#session_data_source_structure)\n      2. [Samples](#session_data_source_samples)\n   6. [Session Delegate](#session_delegate)\n      1. [Payment Success Callback](#payment_success_callback)\n      2. [Payment Failure Callback](#payment_failure_callback)\n      3. [Authorization Success Callback](#authorization_success_callback)\n      4. [Authorization Failure Callback](#authorization_failure_callback)\n      5. [Card Saving Success Callback](#card_saving_success_callback)\n      6. [Card Saving Failure Callback](#card_saving_failure_callback)\n      7. [Card Tokenization Success Callback](#card_tokenization_success_callback)\n      8. [Card Tokenization Failure Callback](#card_tokenization_failure_callback)\n      9. [Session Is Starting Callback](#session_is_starting_callback)\n      10. [Session Has Started Callback](#session_has_started_callback)\n      11. [Session Has Failed to Start Callback](#session_has_failed_to_start_callback)\n      12. [Session Cancel Callback](#session_cancel_callback)\n   7. [Session Appearance](#session_appearance)\n5. [Sample](#sample) \n        \n\n\u003ca name=\"requirements\"\u003e\u003c/a\u003e\n\n# Requirements\n\n---\n\nTo use the SDK the following requirements must be met:\n\n1. **Xcode 10.0** or newer\n2. **Swift 4.0** or newer (preinstalled with Xcode)   \n3. Deployment target SDK for the  app: **iOS 11.0** or later\n4. To support apps below iOS 11 please use this command : **pod \"goSellSDK\", '2.2.22'**\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n\n# Installation\n\n---\n\n\u003ca name=\"installation_with_cocoapods\"\u003e\u003c/a\u003e\n\n## Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager, which automates and simplifies the process of using 3rd-party libraries in your projects.\u003cbr\u003eYou can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n### Podfile\n\n**To integrate goSellSDK into your Xcode 12+ project using CocoaPods, Please make sure you are using goSellSDK version \u003e= 2.2.33**\n\n\nTo integrate goSellSDK into your iOS 11+ Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nplatform :ios, '12.0'\nuse_frameworks!\n\nsource 'https://github.com/CocoaPods/Specs.git'\n\ntarget 'MyApp' do\n    \n    pod 'goSellSDK'\n\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod update\n```\n\nTo integrate goSellSDK into your less than iOS 11 Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nplatform :ios, '11.0'\nuse_frameworks!\n\nsource 'https://github.com/CocoaPods/Specs.git'\n\ntarget 'MyApp' do\n    \n    pod \"goSellSDK\", '2.2.22'\n\nend\n```\n\n\u003c!---\n\n## Installation with Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate goSellSDK into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"Tap-Payments/goSellSDK-iOS\"\n```\n\nRun `carthage` to build the framework and drag the built `goSellSDK.framework` into your Xcode project.\n--\u003e\n\nWe also recommend you to include **ErrorReporting** submodule in order to allow your customers to report unexpected behaviour of the SDK directly to Tap.\n\nTo include error reporting, please add the following line to your `Podfile`:\n\n```ruby\ntarget 'MyApp' do\n    \n    # Other pods\n    ...\n    \n    # Error reporting submodule.\n    pod 'goSellSDK/ErrorReporting' \n\nend\n\n```\n\n\u003ca name=\"setup\"\u003e\u003c/a\u003e\n\n## M1 based Macs\n\nYou may face a compilation error when compiled using M1 based Mac devices, to solve this please follow these steps:\n\n1. Close the Xcode.\n  \n2. Go to the `application` folder.\n  \n3. Find the `Xcode` icon.\n  \n4. Right click on Xcode icon.\n  \n5. Choose `Get info`\n  \n6. Check the option `Open using Rosetta`\n\n![img](https://i.ibb.co/vQDnnwG/Stephen-Mickelsen-2-1645220554524.png)\n\n## Installation To App Clip\n\nApple introduced in iOS 14+ an app on demand fashion called it \"App Clip\", where it gives the merchant the opportunity to provide his services on the go without the need for his customers to download an app.\n\nIn Tap we strive following the highest standards and utilising the latest provided technologies, hence we provided a comptible SDK to be embedded inside an App Clip target. The sdk is used exactly the same as this SDK code wise.\n\nFor more info please follow : [goSellAppClipSDK](https://github.com/Tap-Payments/goSellAppClipSDK)\n\n# Setup\n\n---\n\nFirst of all, `goSellSDK` should be set up. In this section only secret key is required.\n\n\u003ca name=\"setup_gosellsdk_class_properties\"\u003e\u003c/a\u003e\n\n## goSellSDK Class Properties\n\nBelow is the list of properties in goSellSDK class you can manipulate. Make sure you do the setup before any usage of the SDK.\n\n\u003ca name=\"setup_gosellsdk_class_properties_secret_key\"\u003e\u003c/a\u003e\n\n### Secret Key\n\nTo set it up, add the following line of code somewhere in your project and make sure it will be called before any usage of `goSellSDK`, otherwise an exception will be thrown. **Required**.\nPS: This key is just a ‘Tap identifier’ for the application integrating with our SDK. Please don’t confuse it with public/secret keys used for encryption and decryption, which are stored safely on our PCI approved servers.\n\n*Swift*:\n\n```swift\nlet secretKey = SecretKey(sanbox: \"YOUR_SANDBOX_SECRET_KEY\", production: \"YOUR_PRODUCTION_SECRET_KEY\") // (format of the key: \"sk_XXXXXXXXXXXXXXXXXXXXXXXX\")\ngoSellSDK.secretKey = secretKey // Secret key (format: \"sk_XXXXXXXXXXXXXXXXXXXXXXXX\")\n```\n\n*Objective-C*:\n\n```objective-c\nSecretKey *secretKey = [[SecretKey alloc] initWithSandbox:@\"YOUR_SANDBOX_SECRET_KEY\" production:@\"YOUR_PRODUCTION_SECRET_KEY\"]; // (format of the key: \"sk_XXXXXXXXXXXXXXXXXXXXXXXX\")\n[goSellSDK setSecretKey:secretKey];\n```\n\nDon't forget to import the framework at the beginning of the file:\n\n*Swift*:\n\n```swift\nimport goSellSDK\n```\n\n*Objective-C*:\n\n\n```objective-c\n@import goSellSDK;\n```\n\nor\n\n```objective-c\n#import \u003cgoSellSDK/goSellSDK-Swift.h\u003e\n```\n\n\u003ca name=\"setup_gosellsdk_class_properties_mode\"\u003e\u003c/a\u003e\n\n### Mode\n\nSDK mode is a mode SDK is operating in, either **sandbox** or **production**.\n\nUse this property to test your integration with the sandbox transactions.\n\n**WARNING:** Default value of this property is *production* which means your transaction are real transactions. Switch to *sandbox* while in development.\n\n\u003ca name=\"setup_gosellsdk_class_properties_language\"\u003e\u003c/a\u003e\n\n### Language\n\nLocalization language of the UI part of the SDK. This is locale identifier. \n\nMake sure it consists only from 2 lowercased letters and is presented in the list of **availableLanguages** property of *goSellSDK* class.\n\n**Notice:** Starting from *iOS 9* SDK user interface layout direction is based on the language you select, which means that if you would like to have it in Arabic language, the UI will be switched to RTL (right-to-left).\n\n### Available Languages\n\nThis property returns the list of locale identifiers the SDK is currently localized into.\n\nCurrently we support the following languages:\n\n\u003ctable\u003e\n\t\u003cth style=\"text-align:center\"\u003eLanguage\u003c/th\u003e\u003cth style=\"text-align:center\"\u003eLocale Identifier\u003c/th\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eArabic\u003c/td\u003e\u003ctd\u003ear\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eEnglish\u003c/td\u003e\u003ctd\u003een\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eRussian\u003c/td\u003e\u003ctd\u003eru\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n### SDK Version\n\nThis property returns current SDK version.\n\n\u003ca name=\"setup_gosellsdk_class_methods\"\u003e\u003c/a\u003e\n\n## goSellSDK Class Methods\n\n### Reset\n\nResets all settings and makes the SDK to reinitialize on next usage.\u003cbr\u003e\nMight be useful when you are switching accounts.\u003cbr\u003e\nAlso when you are logging the user out, although that's not required.\n\n\u003ca name=\"setup_steps\"\u003e\u003c/a\u003e\n\n## Setup Steps\n\n### With PayButton\n\nFor those, who would like to use PayButton.\n\n1. Place *PayButton*.\n2. Assign its *datasource* and *delegate*.\n3. Implement *datasource* and *delegate*.\n\n### Without PayButton\n\nFor those who would like to keep their design and start the SDK process manually.\n\n1. Create *Session* object.\n2. Assign its *datasource* and *delegate*.\n3. Implement *datasource* and *delegate*.\n\n### Apple Pay\n\n*Make sure, your current goSellSDK version is \u003e= 2.2.12-beta*\n\n1. Ask for the CSR from Tap team.\n\n2. From your Apple Developer account:\n\n3. 1. Create a merchant identifier\n\n      A *merchant identifier* uniquely identifies you to Apple Pay as a merchant who is able to accept payments. You can use the same merchant identifier for multiple native and web apps. It never expires.\n\n      1. In [Certificates, Identifiers \u0026 Profiles](https://developer.apple.com/account/resources), select Identifiers from the sidebar, then click the Add button (+) in the upper-left corner. ![img](https://i.imgur.com/50MJuuk.png)\n      2. Select Merchant IDs, then click Continue. ![img](https://i.imgur.com/lYAE2am.png)\n      3. Enter the merchant description and identifier name, then click Continue. ![img](https://i.imgur.com/w6gpIo4.png)\n      4. Review the settings, then click Register.\n\n   2. Create Payment Processing Certificate:A *payment processing certificate* is associated with your merchant identifier and used to encrypt payment information. The payment processing certificate expires every 25 months. If the certificate is revoked, you can recreate it.\n\n      1. In [Certificates, Identifiers \u0026 Profiles](https://developer.apple.com/account/resources), select Identifiers from the sidebar. ![img](https://i.imgur.com/eBKFkvo.png)\n\n      2. Under Identifiers, select Merchant IDs using the filter in the top-right.\n\n      3. On the right, select your merchant identifier.\n\n         *Note:* If a banner appears at the top of the page saying that you need to accept an agreement, click the Review Agreement button and follow the instructions before continuing.\n\n      4. Under Apple Pay Payment Processing Certificate, click Create Certificate.\n\n      5. [Create a certificate signing request](https://help.apple.com/developer-account/#/devbfa00fef7) on your Mac, and click Continue.\n\n      6. Click Choose File.\n\n      7. In the dialog that appears, select the certificate request file (a file with a `.certSigningRequest` file extension), then click Choose.\n\n      8. Click Continue.\n\n      9. Click Download.\n\n         The certificate file (a file with a `.cer` file extension) appears in your `Downloads` folder.\n\n4. Share your .cer file, merchant identifier and app bundle id back to Tap team.\n\n5. Enable Apple Pay capability into your project from Xcode and select the merchant identifier. ![img](https://i.imgur.com/PT29us3.png)\n\n6. Tap Apple Pay button will appear if:\n\n   1. You did all the previous steps.\n   2. The customer is paying with a currency that has Apple Pay option enabled from our side.\n   3. The customer paying already activate Apple pay in his device.\n   4. The customer paying has already added at least one valid card in his Apple Wallet with one our Apple pay payment networks.\n\n\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n\n# Usage\n\n---\n\nAfter `goSellSDK` is set up, you can actually use the SDK.\u003cbr\u003e\nWe have tried to make the SDK integration as simple as possible, requiring the minimum from you.\n\n\u003ca name=\"sdk_modes\"\u003e\u003c/a\u003e\n\n## SDK Modes\n\n**goSellSDK** works in 4 modes:\n\n1. *Purchase*: Default mode. Normal customer charge.\n2. *Authorize*: Only authorization is happening. You should specify an action after successful authorization: either capture the amount or void the charge after specific period of time.\n3. *Card Saving*: Use this mode to save the card of the customer with Tap and use it later.\n4. *Card Tokenization*: Use this mode if you are willing to perform the charging/authorization manually. The purpose of this mode is only to collect and tokenize card information details of your customer if you don't have PCI compliance certificate but willing to process the payment manually using our services.\n\nThe mode is set through **SessionDataSource** interface.\n\n\u003ca name=\"pay_button\"\u003e\u003c/a\u003e\n\n## Pay Button\n\nHere at Tap, we have designed our custom Pay button and all you need to do is just to put it somewhere on the screen and provide at least required payment details through its ```dataSource``` property.\n\n\u003ca name=\"pay_button_placement\"\u003e\u003c/a\u003e\n\n### Pay Button Placement \n\nPay Button is restricted to the height of exactly **44 points**. For better experience, make sure that it has enough **width** to display the content.\n\n#### XIB/Storyboard\n\nYou can add Pay button on your view in XIB/Storyboard file.\nTo do that, do the following:\n\n1. Drag \u0026 drop an instance of ```UIView``` at the desired location.\n2. Select added view and open **Identity Inspector**\n3. Enter the following values:\n   1. Class: **PayButton**\n   2. Module: **goSellSDK**\n4. For your convenience, you may also connect ```dataSource``` and ```delegate``` outlets.\n\n#### Code\n\nYou can also add Pay button with the code:\n\n*Swift*:\n\n```swift\nimport goSellSDK\n...\nfunc addPayButton() {\n\n    let buttonFrame = CGRect(x: 8.0, y: UIScreen.main.bounds.height - 52.0, width: UIScreen.main.bounds.width - 16.0, height: 44.0)\n    let button = PayButton(frame: buttonFrame)\n    self.view.addSubview(button) // or where you want it\n    \n    button.dataSource = self // or whatever\n    button.delegate = self // or whatever\n}\n```\n\n*Objective-C*:\n\n\n```objective-c\n@import goSellSDK;\n...\n- (void)addPayButton {\n\n    CGRect buttonFrame = CGRectMake(8.0, UIScreen.mainScreen.bounds.size.height - 52.0, UIScreen.mainScreen.bounds.size.width - 16.0, 44.0);\n    PayButton *button = [[PayButton alloc] initWithFrame:buttonFrame];\n    [self.view addSubview:button]; // or where you want it\n    \n    button.dataSource = self; // or whatever\n    button.delegate = self; // or whatever\n}\n\n```\n\n\u003ca name=\"pay_button_properties\"\u003e\u003c/a\u003e\n\n### Properties\n\nBelow is the list of Pay button properties\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth colspan=2\u003eProperty\u003c/th\u003e\n    \u003cth colspan=2\u003eType\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eenabled\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003ci\u003eisEnabled\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eBOOL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eBool\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eDefines whether the button is enabled.\u003cbr\u003ePerhaps you will need it for your internal logic.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003edataSource\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionDataSource\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionDataSource\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eSession data source. All input payment information is passed through this protocol. Required.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003edelegate\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionDelegate\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionDelegate\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eSession delegate. Payment status along with all output payment information is passed through this protocol.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003eappearance\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionAppearance\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionAppearance\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eSession appearance. Implement only if you need UI customization. For more details please refer to SessionAppearance section.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\u003ca name =\"pay_button_methods\"\u003e\u003c/a\u003e\n\n### Methods\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth colspan=2\u003eMethod\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/th\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cnobr\u003e- (void)updateDisplayedState\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cnobr\u003efunc updateDisplayedState()\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eCall this method to update displayed amount on the button.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e If amount is non positive then pay button is force disabled.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\u003ca name=\"session\"\u003e\u003c/a\u003e\n\n## Session\n\nYou want to use `Session` object if you are not using `PayButton`.\n\n\u003ca name=\"session_properties\"\u003e\u003c/a\u003e\n\n### Properties\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth colspan=2\u003eProperty\u003c/th\u003e\n    \u003cth colspan=2\u003eType\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e\u003csub\u003e\u003ci\u003edataSource\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionDataSource\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionDataSource\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd align=\"justify\"\u003e\u003csub\u003eSession data source. All input payment information is passed through this protocol. Required.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003edelegate\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionDelegate\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionDelegate\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eSession delegate. Payment status along with all output payment information is passed through this protocol.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003eappearance\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eid\u0026lt;SessionAppearance\u0026gt;\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eSessionAppearance\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eSession appearance. Implement only if you need UI customization. For more details please refer to SessionAppearance section.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003ecanStart\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eBOOL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eBool\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eReadonly. Defines if session can start with the data you have provided through the \u003cb\u003edataSource\u003c/b\u003e.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\u003ca name=\"session_methods\"\u003e\u003c/a\u003e\n\n### Methods\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth colspan=2\u003eMethod\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/th\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=\"2\"\u003e\u003csub\u003e\u003cnobr\u003ecalculateDisplayedAmount\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eCalculates and returns an amount based on the details provided through the \u003cb\u003edataSource\u003c/b\u003e. You might want to call this method every time you update your \u003cb\u003edataSource\u003c/b\u003e to reflect changes in UI if you are not using \u003ci\u003ePayButton\u003c/i\u003e provided by the SDK.\u003cbr\u003e\u003cb\u003eReturns:\u003c/b\u003e Amount suggested to display to the customer or \u003ci\u003enil\u003c/i\u003e in the following cases:\n        \t\u003col\u003e\n\t\t\t\t\u003cli\u003eSession cannot start with the provided details.\u003c/li\u003e\n\t\t\t\t\u003cli\u003eYou are in card saving mode.\u003c/li\u003e\n\t\t\t\u003c/ol\u003e\n\t\t\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=\"2\"\u003e\u003csub\u003e\u003cnobr\u003estart\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"justify\"\u003e\u003csub\u003eInitiates the session.\u003cbr\u003e\u003cb\u003eReturns:\u003c/b\u003e boolean value which determines whether all conditions are met to start the sesssion.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \t\u003ctd colspan=\"2\"\u003e\u003csub\u003e\u003cnobr\u003estop\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\n    \t\u003ctd align=\"justify\"\u003e\u003csub\u003eStops the session. You might want to use this method when you need to close the SDK externally from your app, for example when performing a deep link.\u003cbr\u003e\u003cb\u003eArguments:\u003c/b\u003e\u003cbr\u003e\u003ci\u003ecompletion\u003c/i\u003e: Completion closure that will be called once all opened user interface of the SDK will be dismissed.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\u003ca name=\"api_session\"\u003e\u003c/a\u003e\n\n## API Session\n\n**APISession** is a class you want to use when you need to call plain APIs without the UI. Currently not all APIs are available.\n\n\u003ca name=\"api_session_properties\"\u003e\u003c/a\u003e\n\n### Properties\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth colspan=2\u003eProperty\u003c/th\u003e\n    \u003cth colspan=2\u003eType\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n        \u003cth\u003e\u003csub\u003e\u003cnobr\u003eObjective-C\u003c/nobr\u003e\u003c/sub\u003e\u003c/td\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \t\u003ctd\u003e\u003csub\u003e\u003ci\u003esharedInstance\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n    \t\u003ctd\u003e\u003csub\u003e\u003ci\u003eshared\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n    \t\u003ctd colspan=\"2\"\u003e\u003csub\u003e\u003cb\u003eAPISession\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n    \t\u003ctd align=\"justify\"\u003e\u003csub\u003eShared singleton APISession instance.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\u003ca name=\"api_session_methods\"\u003e\u003c/a\u003e\n\n### Methods\n\nPlease refer to `APISession` class documentation for more details.\n\n\u003ca name=\"session_data_source\"\u003e\u003c/a\u003e\n\n## Session Data Source\n\n**SessionDataSource** is an interface which you should implement somewhere in your code to pass payment information  in order to be able to access payment flow within the SDK.\n\n\u003ca name=\"session_data_source_structure\"\u003e\u003c/a\u003e\n\n### Strucure\n\nThe following table describes its structure and specifies which fields are required for each of the modes.\n\n\u003ctable style=\"text-align:center\"\u003e\n    \u003cth rowspan=2\u003eMember\u003c/th\u003e\n    \u003cth colspan=2\u003eType\u003c/th\u003e\n    \u003cth colspan=3\u003eRequired\u003c/th\u003e\n    \u003cth rowspan=2\u003eDescription\u003c/th\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003csub\u003eObjective-C\u003c/sub\u003e\u003c/th\u003e\u003cth\u003e\u003csub\u003eSwift\u003c/sub\u003e\u003c/th\u003e\n        \u003cth\u003e\u003csub\u003ePurchase\u003c/sub\u003e\u003c/th\u003e\u003cth\u003e\u003csub\u003eAuthorize\u003c/sub\u003e\u003c/th\u003e\u003cth\u003e\u003csub\u003eCard Saving\u003c/sub\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003emode\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eTransactionMode\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eMode of the transactions (\u003cb\u003epurchase\u003c/b\u003e, \u003cb\u003eauthorize\u003c/b\u003e, \u003cb\u003ecard saving\u003c/b\u003e or \u003cb\u003ecard tokenization\u003c/b\u003e). If this property is not implemented, \u003ci\u003epurchase\u003c/i\u003e mode is used.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003ecustomer\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eCustomer\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003etrue\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eCustomer information. For more details on how to create the customer, please refer to \u003ci\u003eCustomer\u003c/i\u003e class reference.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003ecurrency\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eCurrency\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003ci\u003etrue\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eCurrency of the transaction.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eamount\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003eNSDecimal\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003eDecimal\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003ePayment/Authorization amount.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e In order to have payment amount either \u003ci\u003eamount\u003c/i\u003e or \u003ci\u003eitems\u003c/i\u003e should be implemented. If both are implemented, \u003ci\u003eitems\u003c/i\u003e is preferred.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eitems\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSArray \u003cnobr\u003e\u0026lt;PaymentItem *\u0026gt;\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003e[PaymentItem]\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eList of items to pay for.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e In order to have payment amount either \u003ci\u003eamount\u003c/i\u003e or \u003ci\u003eitems\u003c/i\u003e should be implemented. If both are implemented, \u003ci\u003eitems\u003c/i\u003e is preferred.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003edestinations\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSArray \u003cnobr\u003e\u0026lt;Destination *\u0026gt;\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003e[Destination]\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eThe list of merchant desired destinations accounts to receive funds from payment/authorization transactions.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n\t\t\u003ctd\u003e\u003csub\u003e\u003ci\u003emerchantID\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n       \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eIf you have multiple merchant accounts, please specify which one you would like to use through this field.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003etaxes\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSArray \u003cnobr\u003e\u0026lt;Tax *\u0026gt;\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003e[Tax]\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eYou can specify taxation details here. By default, there are no taxes.\u003cbr\u003e \u003cb\u003eNote:\u003c/b\u003e Specifying taxes will affect total payment/authorization amount.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eshipping\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSArray \u003cnobr\u003e\u0026lt;Shipping *\u0026gt;\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003e[Shipping]\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eYou can specify shipping details here. By default, there are no shipping details.\u003cbr\u003e \u003cb\u003eNote:\u003c/b\u003e Specifying shipping will affect total payment/authorization amount.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epostURL\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSURL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eURL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eThe URL which will be called by Tap system notifying that payment has either succeed or failed.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentDescription\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDescription of the payment.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentMetadata\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSDictionary \u003cnobr\u003e\u0026lt;NSString *, NSString *\u0026gt;\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e\u003cnobr\u003e[String: String]\u003c/nobr\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eAdditional information you would like to pass along with the transaction.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentReference\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eReference\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eYou can keep a reference to the transaction using this property.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentStatementDescriptor\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eStatement descriptor.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003erequire3DSecure\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eBOOL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eBool\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines if 3D secure check is required. If not implemented, treated as \u003ci\u003etrue\u003c/i\u003e.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e If you disable 3D secure check, it still may occure. Final decision is taken by Tap.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003ereceiptSettings\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eReceipt\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eReceipt recipient details.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eauthorizeAction\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003eAuthorizeAction\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003ci\u003etrue\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eAction to perform after authorization succeeds.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eallowsToSaveSameCardMoreThanOnce\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eBOOL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eBool\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines if same card can be saved more than once.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e Same cards means absolutely equal data set. For example, if customer specifies same card details, but different cardholder names, we will treat this like different cards.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\t\u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eapplePayMerchantID\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines the Apple pay merchant id you get from Apple developer account\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\t\u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eallowedCadTypes\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSArray\u003c\\CardType *\u003e\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003e[CardType]\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines the allowed card types the merchant wants his clients to pay with (Credit, Debit, All)\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003eisSaveCardSwitchOnByDefault\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eBOOL\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eBool\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines if save card switch is on by default.\u003cbr\u003e\u003cb\u003eNote:\u003c/b\u003e If value of this property is \u003ci\u003etrue\u003c/i\u003e, then switch will be remaining off until card information is filled and valid. And after will be toggled on automatically.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n       \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentType\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003ePaymentType\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines payment types to show.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003ecardHolderName\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003csub\u003e\u003cb\u003eNSString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\u003ctd\u003e\u003csub\u003e\u003cb\u003eString\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eProvide a default card holder name to be written in the card input view.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n       \u003ctr\u003e\n        \u003ctd\u003e\u003csub\u003e\u003ci\u003epaymentType\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=2\u003e\u003csub\u003e\u003cb\u003ePaymentType\u003c/b\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003e\u003csub\u003e\u003ci\u003efalse\u003c/i\u003e\u003c/sub\u003e\u003c/td\u003e\n        \u003ctd align=\"left\"\u003e\u003csub\u003eDefines payment types to show.\u003c/sub\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003ca name=\"session_data_source_samples\"\u003e\u003c/a\u003e\n\n### Samples\n\n---\n\n#### Mode\n\n**Objective-C**\n\n```objective-c\n- (enum TransactionMode)mode {\n    \n    return Purchase;\n}\n```\n\n**Swift**\n\n```swift\nvar mode: TransactionMode {\n        \n    return .purchase\n}\n```\n\n#### Customer\n\n**Objective-C**\n\n```objective-c\n- (Customer *)customer {\n    \n    if ( customerIDIsKnown ) {\n        \n        return [self identifiedCustomer];\n    }\n    else {\n        \n        return [self newCustomer];\n    }\n}\n\n/// Creating a customer with known identifier received from Tap before.\n- (Customer *)identifiedCustomer {\n    \n    return [[Customer alloc] initWithIdentifier:@\"cus_tomer_id\"];\n}\n\n/// Creating a customer with raw information.\n- (Customer *)newCustomer {\n    \n    EmailAddress *email = [EmailAddress withEmailAddressString:@\"customer@mail.com\"];\n    PhoneNumber *phoneNumber = [[PhoneNumber alloc] initWithISDNumber:@\"965\" phoneNumber:@\"96512345\"];\n    \n    Customer *newCustomer = [[Customer alloc] initWithEmailAddress:email\n                                                       phoneNumber:phoneNumber\n                                                         firstName:@\"Steve\"\n                                                        middleName:nil\n                                                          lastName:@\"Jobs\"];\n    \n    return newCustomer;\n}\n```\n\n**Swift**\n\n```swift\nvar customer: Customer? {\n        \n    if customerIDIsKnown {\n            \n        return self.identifiedCustomer\n    }\n    else {\n            \n        return self.newCustomer\n    }\n}\n\n/// Creating a customer with known identifier received from Tap before.\nvar identifiedCustomer: Customer? {\n        \n    return try? Customer(identifier: \"cus_to_mer\")\n}\n\n/// Creating a customer with raw information. \nvar newCustomer: Customer? {\n        \n    let emailAddress = try! EmailAddress(emailAddressString: \"customer@mail.com\")\n    let phoneNumber = try! PhoneNumber(isdNumber: \"965\", phoneNumber: \"96512345\")\n        \n    return try? Customer(emailAddress:  emailAddress,\n                         phoneNumber:   phoneNumber,\n                         firstName:     \"Steve\",\n                         middleName:    nil,\n                         lastName:      \"Jobs\")\n}\n```\n\n#### Currency\n\nTap supports processing payments in 10+ currencies, allowing you to charge customers in their native currency while receiving funds in yours. This is especially helpful if you have a global presence, as charging in a customer’s native currency can increase sales. \n\n##### SupportedCurrencies\n\n| Currency          | Code |\n| ----------------- | ---- |\n| UAE Dirham        | AED  |\n| Bahraini Dinar    | BHD  |\n| Egyptian Pound    | EGP  |\n| Euro              | EUR  |\n| UK Pound Sterling | GBP  |\n| Kuwaiti Dinar     | KWD  |\n| Omani Riyal       | OMR  |\n| Qatari Riyal      | QAR  |\n| Saudi Riyal       | SAR  |\n| US Dollar         | USD  |\n\n**Objective-C**\n\n```objective-c\n- (Currency *)currency {\n    \n    return [Currency withISOCode:@\"KWD\"];\n}\n```\n\n**Swift**\n\n```swift\nvar currency: Currency? {\n        \n    return .with(isoCode: \"KWD\")\n}\n```\n\n#### Amount\n\n**Objective-C**\n\n```objective-c\n- (NSDecimal)amount {\n    \n    return [NSDecimalNumber one].decimalValue;\n}\n```\n\n**Swift**\n\n```swift\nvar amount: Decimal {\n        \n    return 1.0\n}\n```\n\n#### Items\n\n**Objective-C**\n\n```objective-c\n- (NSArray\u003cPaymentItem *\u003e *)items {\n    \n    Quantity *oneUnit = [[Quantity alloc] initWithValue:[NSDecimalNumber one].decimalValue\n                                      unitOfMeasurement:[Measurement units]];\n    NSDecimal ten = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:1].decimalValue;\n    \n    PaymentItem *firstItem = [[PaymentItem alloc] initWithTitle:@\"Test item #1\"\n                                                       quantity:oneUnit\n                                                  amountPerUnit:ten];\n    \n    \n    NSDecimal oneHundred = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:2].decimalValue;\n    Quantity *oneHundredSquareMeters = [[Quantity alloc] initWithValue:oneHundred unitOfMeasurement:[Measurement area:SquareMeters]];\n    \n    NSDecimal seventeen = [NSDecimalNumber numberWithDouble:17.0].decimalValue;\n    \n    AmountModificator *tenPercents = [[AmountModificator alloc] initWithPercents:ten];\n    \n    NSDecimal oneThousand = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:3].decimalValue;\n    \n    AmountModificator *thousandMoney = [[AmountModificator alloc] initWithFixedAmount:oneThousand];\n    Tax *thousandKD = [[Tax alloc] initWithTitle:@\"KD 1,000.000\" descriptionText:@\"This is an example of a tax.\" amount:thousandMoney];\n    \n    PaymentItem *secondItem = [[PaymentItem alloc] initWithTitle:@\"Test item #2\"\n                                                 descriptionText:@\"Test item #2 awesome description\"\n                                                        quantity:oneHundredSquareMeters\n                                                   amountPerUnit:seventeen\n                                                        discount:tenPercents\n                                                           taxes:@[thousandKD]];\n    \n    return @[firstItem, secondItem];\n}\n```\n\n**Swift**\n\n```swift\nvar items: [PaymentItem]? {\n        \n    let oneUnit = Quantity(value: 1, unitOfMeasurement: .units)\n    let firstItem = PaymentItem(title:          \"Test item #1\",\n                                quantity:       oneUnit,\n                                amountPerUnit:  10)\n        \n    let oneHundredSquareMeters = Quantity(value:                100,\n                                          unitOfMeasurement:    .area(.squareMeters))\n    let tenPercents = AmountModificator(percents: 10)\n    let thousandMoney = AmountModificator(fixedAmount: 1000)\n    let thousandKD = Tax(title:             \"KD 1,000.000\",\n                         descriptionText:   \"This is an example of a tax.\",\n                         amount: thousandMoney)\n        \n    let secondItem = PaymentItem(title:             \"Test item #2\",\n                                 descriptionText:   \"Test item #2 awesome description.\",\n                                 quantity:          oneHundredSquareMeters,\n                                 amountPerUnit:     17,\n                                 discount:          tenPercents,\n                                 taxes:             [thousandKD])\n        \n    return [firstItem, secondItem]\n}\n```\n\n#### Taxes\n\n**Objective-C**\n\n```objective-c\n- (NSArray\u003cTax *\u003e *)taxes {\n    \n    NSDecimal fifteen = [NSDecimalNumber numberWithDouble:15.0].decimalValue;\n    AmountModificator *fifteenPercents = [[AmountModificator alloc] initWithPercents:fifteen];\n    \n    Tax *fifteenPercentsTax = [[Tax alloc] initWithTitle:@\"15 percents\"\n                                         descriptionText:@\"Just another fifteen percents.\"\n                                                  amount:fifteenPercents];\n    \n    return @[fifteenPercentsTax];\n}\n```\n\n**Swift**\n\n```swift\nvar taxes: [Tax]? {\n        \n    let fifteenPercents = AmountModificator(percents: 15)\n    \n    let fifteenPercentsTax = Tax(title:             \"15 percents\",\n                                 descriptionText:   \"Just another fifteen percents\",\n                                 amount:            fifteenPercents)\n        \n    return [fifteenPercentsTax]\n}\n```\n\n#### Shipping\n\n**Objective-C**\n\n```objective-c\n- (NSArray\u003cShipping *\u003e *)shipping {\n    \n    NSDecimal fiveHundred = [NSDecimalNumber numberWithDouble:500.0].decimalValue;\n    Shipping *deliveryToHome = [[Shipping alloc] initWithName:@\"Delivery\"\n                                              descriptionText:@\"Delivery to Home\"\n                                                       amount:fiveHundred];\n    \n    return @[deliveryToHome];\n}\n```\n\n**Swift**\n\n```swift\nvar shipping: [Shipping]? {\n        \n    let deliveryToHome = Shipping(name:             \"Delivery\",\n                                  descriptionText:  \"Delivery to Home\",\n                                  amount:           500)\n    return [deliveryToHome]\n}\n```\n\n#### Post URL\n\n**Objective-C**\n\n```objective-c\n- (NSURL *)postURL {\n    \n    return [NSURL URLWithString:@\"https://tap.company/post\"];\n}\n```\n\n**Swift**\n\n```swift\nvar postURL: URL? {\n        \n    return URL(string: \"https://tap.company/post\")\n}\n```\n\n#### Payment Description\n\n**Objective-C**\n\n```objective-c\n- (NSString *)paymentDescription {\n    \n    return @\"Awesome payment description will be here.\";\n}\n```\n\n**Swift**\n\n```swift\nvar paymentDescription: String? {\n        \n    return \"Awesome payment description will be here.\";\n}\n```\n\n#### Payment Metadata\n\n**Objective-C**\n\n```objective-c\n- (NSDictionary\u003cNSString *,NSString *\u003e *)paymentMetadata {\n    \n    return @{@\"note\": @\"some note\",\n             @\"internal_linking_id\": @\"id3424141414\"};\n}\n```\n\n**Swift**\n\n```swift\nvar paymentMetadata: [String : String]? {\n        \n    return [\n        \n        \"note\": \"some note\",\n        \"internal_linking_id\": \"id3424141414\"\n    ]\n}\n```\n\n#### Payment Reference\n\n**Objective-C**\n\n```objective-c\n- (Reference *)paymentReference {\n    \n    return [[Reference alloc] initWithTransactionNumber:@\"tr_2352358020f\"\n                                            orderNumber:@\"ord_2352094823\"];\n}\n```\n\n**Swift**\n\n```swift\nvar paymentReference: Reference? {\n        \n    return Reference(transactionNumber: \"tr_2352358020f\",\n                     orderNumber:       \"ord_2352094823\")\n}\n```\n\n#### Payment Statement Descriptor\n\n**Objective-C**\n\n```objective-c\n- (NSString *)paymentStatementDescriptor {\n    \n    return @\"Payment statement descriptor will be here\";\n}\n```\n\n**Swift**\n\n```swift\nvar paymentStatementDescriptor: String? {\n        \n    return \"Payment statement descriptor will be here\"\n}\n```\n\n#### Require 3D Secure\n\n**Objective-C**\n\n```objective-c\n- (BOOL)require3DSecure {\n    \n    return YES;\n}\n```\n\n**Swift**\n\n```swift\nvar require3DSecure: Bool {\n        \n    return true\n}\n```\n\n#### Receipt Settings\n\n**Objective-C**\n\n```objective-c\n- (Receipt *)receiptSettings {\n    \n    return [[Receipt alloc] initWithEmail:YES sms:YES];\n}\n```\n\n**Swift**\n\n```swift\nvar receiptSettings: Receipt? {\n        \n    return Receipt(email: true, sms: true)\n}\n```\n\n#### Authorize Action\n\n**Objective-C**\n\n```objective-c\n- (AuthorizeAction *)authorizeAction {\n    \n    AuthorizeAction *captureAfterTwoHours = [AuthorizeAction captureAfterTimeInHours:2];\n    return captureAfterTwoHours;\n}\n```\n\n**Swift**\n\n```swift\nvar authorizeAction: AuthorizeAction {\n        \n    return .capture(after: 2)\n}\n```\n\n#### Allows to Save Same Card More Than Once\n\n**Objective-C**\n\n```objective-c\n- (BOOL)allowsToSaveSameCardMoreThanOnce {\n    \n    return NO;\n}\n```\n\n**Swift**\n\n```swift\nvar allowsToSaveSameCardMoreThanOnce: Bool {\n        \n    return false\n}\n```\n\n\n#### Apple Pay Merchant ID\n\n**Objective-C**\n\n```objective-c\n-(NSString *)applePayMerchantID\n{\n    return @\"merchant.com.example\";\n}\n```\n\n**Swift**\n\n```swift\nvar applePayMerchantID: String\n{\n\treturn \"merchant.com.example\"\n}\n```\n\n\n#### Define acceptable card types\n\n**Objective-C**\n\n```objective-c\n- (NSArray\u003cCardType *\u003e *)allowedCadTypes {\n    CardType* credit = [[CardType alloc]initWithCardType:Credit];\n    CardType* debit = [[CardType alloc]initWithCardType:Debit];\n    return @[credit,debit];\n}\n```\n\n**Swift**\n\n```swift\nvar allowedCadTypes: [CardType]? {\n\treturn [CardType(cardType: .Debit), CardType(cardType: .Credit)]\n}\n```\n\n\u003ca name=\"session_delegate\"\u003e\u003c/a\u003e\n\n## Session Delegate\n\n**SessionDelegate** is an interface which you may want to implement to receive payment/authorization/card saving status updates and update your user interface accordingly when payment window closes.\n\nBelow are listed down all available callbacks:\n\n\u003ca name=\"payment_success_callback\"\u003e\u003c/a\u003e\n\n### Payment Success Callback\n\nNotifies the receiver that payment has succeed. Can be called only in **purchase** mode.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)paymentSucceed:(Charge * _Nonnull)charge onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc paymentSucceed(_ charge: Charge, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**charge**: Successful charge object.\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"payment_failure_callback\"\u003e\u003c/a\u003e\n\n### Payment Failure Callback\n\nNotifies the receiver that payment has failed. Can be called only in **purchase** mode.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)paymentFailedWithCharge:(Charge * _Nullable)charge error:(TapSDKError * _Nullable)error onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc paymentFailed(with charge: Charge?, error: TapSDKError?, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**charge**: Charge object that has failed (if reached the stage of charging).\n\n**error**: An error that has occured (if any).\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\nYou may assume that at least one, `charge` or `error` is not `nil`.\n\n\u003ca name=\"authorization_success_callback\"\u003e\u003c/a\u003e\n\n### Authorization Success Callback\n\nNotifies the receiver that authorization has succeed. Can be called only in **authorization** mode.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)authorizationSucceed:(Authorize * _Nonnull)authorize onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc authorizationSucceed(_ authorize: Authorize, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**authorize**: Successful authorize object.\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"authorization_failure_callback\"\u003e\u003c/a\u003e\n\n### Authorization Failure Callback\n\nNotifies the receiver that authorization has failed. Can be called only in **authorization** mode.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)authorizationFailedWithAuthorize:(Authorize * _Nullable)authorize error:(TapSDKError * _Nullable)error onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc authorizationFailed(with authorize: Authorize?, error: TapSDKError?, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**authorize**: Authorize object that has failed (if reached the stage of authorization).\n\n**error**: An error that has occured (if any).\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\nYou may assume that at least one, `authorize` or `error` is not `nil`.\n\n\u003ca name=\"card_saving_success_callback\"\u003e\u003c/a\u003e\n\n### Card Saving Success Callback\n\nNotifies the receiver that the customer has successfully saved the card. Can be called only in **card saving** mode.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)cardSaved:(CardVerification * _Nonnull)cardVerification onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc cardSaved(_ cardVerification: CardVerification, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**cardVerification**: Card verification object with the details.\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"card_saving_failure_callback\"\u003e\u003c/a\u003e\n\n### Card Saving Failure Callback\n\nNotifies the receiver that the customer failed to save the card. Can be called only in **card saving** mode.\n\n#### Declaration\n\n*Objective-C*:\n\n```objective-c\n- (void)cardSavingFailedWithCardVerification:(CardVerification * _Nullable)cardVerification error:(TapSDKError * _Nullable)error onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc cardSavingFailed(with cardVerification: CardVerification?, error: TapSDKError?, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**cardVerification**: Card verification object with the details (if reached the stage of card saving).\n\n**error**: Error that has occured. If `nil`, please refer to the `cardVerification` object for error details.\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"card_tokenization_success_callback\"\u003e\u003c/a\u003e\n\n### Card Tokenization Success Callback\n\nNotifies the receiver that card token has successfully created. Can be called only in **card tokenization** mode.\n\n#### Declaration\n\n*Objective-C*:\n\n```objective-c\n- (void)cardTokenized:(Token * _Nonnull)token onSession:(id \u003cSessionProtocol\u003e _Nonnull)session customerRequestedToSaveTheCard:(BOOL)saveCard;\n```\n\n*Swift*:\n\n```swift\nfunc cardTokenized(_ token: Token, on session: SessionProtocol, customerRequestedToSaveTheCard saveCard: Bool)\n```\n\n#### Arguments\n\n**token**: Token of the card provided by your customer.\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n**saveCard**: Boolean flag which determines whether the customer wants to save the card. Actual card saving process is not happening.\n\n\u003ca name=\"card_tokenization_failure_callback\"\u003e\u003c/a\u003e\n\n### Card Tokenization Failure Callback\n\nNotifies the receiver that card token has failed to be created. Can be called only in **card tokenization** mode.\n\n#### Declaration\n\n*Objective-C*:\n\n```objective-c\n- (void)cardTokenizationFailedWithError:(TapSDKError * _Nonnull)error onSession:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift*:\n\n```swift\nfunc cardTokenizationFailed(with error: TapSDKError, on session: SessionProtocol)\n```\n\n#### Arguments\n\n**error**: Error that has occured.\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"session_is_starting_callback\"\u003e\u003c/a\u003e\n\n### Session Is Starting Callback\n\nNotifies the receiver that session is about to start, but hasn't yet shown the SDK UI. You might want to use this method if you are not using `PayButton` in your application and want to show a loader before SDK UI appears on the screen. Will be called in all modes.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)sessionIsStarting:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc sessionIsStarting(_ session: SessionProtocol)\n```\n\n#### Arguments\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"session_has_started_callback\"\u003e\u003c/a\u003e\n\n### Session Has Started Callback\n\nNotifies the receiver that session has successfully started and shown the SDK UI on the screen. You might want to use this method if you are not using `PayButton` in your application and want to hide a loader after SDK UI has appeared on the screen. Will be called in all modes.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)sessionHasStarted:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc sessionHasStarted(_ session: SessionProtocol)\n```\n\n#### Arguments\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"session_has_failed_to_start_callback\"\u003e\u003c/a\u003e\n\n### Session Has Failed to Start Callback\n\nNotifies the receiver that session has failed to start and will not show the SDK UI on the screen. You might want to use this method if you are not using `PayButton` in your application and want to hide a loader because the session has failed. For the actual failure cause please implement other methods from this protocol and listen to the callbacks. Will be called in all modes.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)sessionHasFailedToStart:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc sessionHasFailedToStart(_ session: SessionProtocol)\n```\n\n#### Arguments\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"session_cancel_callback\"\u003e\u003c/a\u003e\n\n### Session Cancel Callback\n\nNotifies the receiver that payment/authorization was cancelled by user. Will be called in all modes.\n\n#### Declaration\n\n*Objective-C:*\n\n```objective-c\n- (void)sessionCancelled:(id \u003cSessionProtocol\u003e _Nonnull)session;\n```\n\n*Swift:*\n\n```swift\nfunc sessionCancelled(_ session: SessionProtocol)\n```\n\n#### Arguments\n\n**session**: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.\n\n\u003ca name=\"session_appearance\"\u003e\u003c/a\u003e\n\n## Session Appearance\n\nYou might want to implement `SessionAppearance` protocol if you need some UI customization to match your user interface and provide great user experience.\n\nPlease refer to `SessionAppearance` class documentation to see what kind of customization is currently available.\n\n\u003ca name=\"sample\"\u003e\u003c/a\u003e\n\n# Sample\n\nSample application integration is available in [Example][2] folder.\n\n-----\n\n# Documentation\n\nDocumentation is available at [github-pages][3].\u003cbr\u003e\nAlso documented sources are attached to the library.\n\n[1]:https://www.tap.company/developers/\n[2]:Example\n[3]:https://tap-payments.github.io/goSellSDK-iOS/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftap-payments%2Fgosellsdk-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftap-payments%2Fgosellsdk-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftap-payments%2Fgosellsdk-ios/lists"}