{"id":22040,"date":"2018-10-10T12:17:00","date_gmt":"2018-10-10T12:17:00","guid":{"rendered":"https:\/\/www.knowband.com\/blog\/?p=22040\/"},"modified":"2022-07-18T07:23:12","modified_gmt":"2022-07-18T07:23:12","slug":"apple-pay-integration-ios-using-swift","status":"publish","type":"post","link":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/","title":{"rendered":"Apple Pay Integration in iOS using swift"},"content":{"rendered":"<h3>1. The First step would be to get the Apple Merchant Id.<\/h3>\n<p>a)\u00a0Login to your Apple Developer Account.<\/p>\n<p>b) Go to &#8220;Certificates, Identifiers &amp; Profiles&#8221;. Choose iOS, tvOS, and watchOS from the Navigation menu on the left.<\/p>\n<ul>\n<li>Select the Merchant Id section in the same left menu.<\/li>\n<li>Click on the &#8220;<strong>+<\/strong>&#8221; button.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22022 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID.png\" alt=\"apple-merchant-id\" width=\"1054\" height=\"703\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID.png 1054w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID-300x200.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID-768x512.png 768w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-Merchant-ID-1024x683.png 1024w\" sizes=\"auto, (max-width: 1054px) 100vw, 1054px\" \/><\/a><\/p>\n<p>c) A new tab will open. Add Merchant Id description and a Unique Identifier and continue\u00a0until the same is added. Save the Merchant Id you created.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Merchant-ID.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22023 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Merchant-ID.png\" alt=\"merchant-id\" width=\"1008\" height=\"679\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Merchant-ID.png 1008w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Merchant-ID-300x202.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Merchant-ID-768x517.png 768w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/a><\/p>\n<h3>2. Payment Processing Certificate:<\/h3>\n<p>a) Tap on the merchant ID that you created earlier. A tab will open up, and select the &#8220;Edit&#8221; option.<\/p>\n<p>b) A new tab will open. Tap on Create Certificate.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/payment-processing.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22025 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/payment-processing.png\" alt=\"payment-processing\" width=\"1006\" height=\"694\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/payment-processing.png 1006w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/payment-processing-300x207.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/payment-processing-768x530.png 768w\" sizes=\"auto, (max-width: 1006px) 100vw, 1006px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>c) Open Keychain Access on your Mac using &#8220;cmd + Space&#8221;.<br \/>\nd) Request a new certificate from the authority.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/keychain-access.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22026 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/keychain-access.png\" alt=\"keychain-access\" width=\"842\" height=\"279\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/keychain-access.png 842w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/keychain-access-300x99.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/keychain-access-768x254.png 768w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/a><\/p>\n<p>e) Fill in the Email and Common Name fields. Check &#8220;Save to disk&#8221; and &#8220;Let me specify Key Pair Information&#8221;. Click continue.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/certificate-information.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22027 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/certificate-information.png\" alt=\"certificate-information\" width=\"620\" height=\"434\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/certificate-information.png 620w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/certificate-information-300x210.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>f) Select Algorithm to &#8220;ECC&#8221; and Key Size to &#8220;256 bits&#8221;. Click Continue.<\/p>\n<p>g) Continue with step 2. Upload the certificate that you have created.<\/p>\n<p>h) After the upload is complete, please download the Apple-generated certificate.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/download-certificate.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22028 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/download-certificate.png\" alt=\"download-certificate\" width=\"987\" height=\"544\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/download-certificate.png 987w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/download-certificate-300x165.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/download-certificate-768x423.png 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/a><\/p>\n<p><strong>Recommended Read:\u00a0<\/strong><a href=\"https:\/\/www.knowband.com\/blog\/tips\/fetch-data-firebase-swift-language-ios\/\">How to fetch data from Firebase in Swift Language (iOS)?<\/a><\/p>\n<h3>3. Configure Apple Pay :<\/h3>\n<p>a) Setup Apple pay in the Xcode project.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22030 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay.png\" alt=\"apple-pay\" width=\"1137\" height=\"634\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay.png 1137w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay-300x167.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay-768x428.png 768w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Apple-pay-1024x571.png 1024w\" sizes=\"auto, (max-width: 1137px) 100vw, 1137px\" \/><\/a><\/p>\n<h3>4. Add the below line into the podfile and install pods.<\/h3>\n<blockquote><p># Pods for Apple Pay Demo<br \/>\npod &#8216;Stripe\/ApplePay&#8217;<\/p><\/blockquote>\n<p>5. After pod installation, make sure that you are using &#8220;project. xcworkspace&#8221;.<\/p>\n<p><strong>Note:<\/strong> Please don&#8217;t use &#8220;project.xcodeproj&#8221;<\/p>\n<p>6. Add the below code at the top of your Controller class to import pod libraries. There are chances that you don&#8217;t find these SDKs in the suggestion. Don&#8217;t worry it will take some time. Or you can type the code manually.<\/p>\n<blockquote><p>import Stripe<br \/>\nimport PassKit<\/p><\/blockquote>\n<p>7. Extend your view controller class with the &#8220;PKPaymentAuthorizationViewControllerDelegate&#8221; class.<\/p>\n<blockquote><p>class ViewController: UIViewController, PKPaymentAuthorizationViewControllerDelegate<\/p><\/blockquote>\n<h3>8. Add the below code in your controller class.<\/h3>\n<blockquote><p>var paymentRequest: PKPaymentRequest!<br \/>\nvar transactionId = &#8220;&#8221;<br \/>\nvar status = &#8220;&#8221;<br \/>\nvar amount = 100<\/p>\n<p>\/**<br \/>\n* This function is called on tap of the ApplePay Payment option on Payment Page.<\/p>\n<p>* **Author:** Asharma<\/p>\n<p>* **Date:** 01-Oct-2018<br \/>\n*\/<br \/>\nfunc setupApplePay()<br \/>\n{<br \/>\npaymentRequest = PKPaymentRequest()<br \/>\npaymentRequest.currencyCode = &#8220;USD&#8221;<br \/>\npaymentRequest.countryCode = &#8220;US&#8221;<br \/>\npaymentRequest.merchantIdentifier = &#8220;Your Merchant Id&#8221;<\/p>\n<p>\/\/ Payment networks array<br \/>\nlet paymentNetworks = [PKPaymentNetwork.amex, .visa, .masterCard, .discover]<br \/>\nif PKPaymentAuthorizationViewController.canMakePayments(usingNetworks:\u00a0 \u00a0 \u00a0 \u00a0 paymentNetworks)<br \/>\n{<br \/>\npaymentRequest.supportedNetworks = paymentNetworks<br \/>\npaymentRequest.merchantCapabilities = .capability3DS<\/p>\n<p>let item = PKPaymentSummaryItem(label: &#8220;Order Total&#8221;, amount: NSDecimalNumber(string: &#8220;\\(amount)&#8221;))<\/p>\n<p>paymentRequest.paymentSummaryItems = [item]<\/p>\n<p>let applePayVC = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest)<br \/>\napplePayVC.delegate = self<br \/>\nself.present(applePayVC, animated: true, completion: nil)<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n\/\/ Notify the user that he\/she needs to set up Apple Pay on the device<br \/>\n\/\/ Below code calls a common function to display an alert message. You can either create an alert or\u00a0 can just print something on console.<br \/>\nCommonMethods.displayAlert(message: &#8220;Apple Pay is not available on this device.&#8221;, viewController: self)<br \/>\nprint(&#8220;Apple Pay is not available on this device&#8221;)<br \/>\n}<br \/>\n}<\/p>\n<p>\/**<br \/>\n* This function is called when Apple Pay payment will be authorized.<\/p>\n<p>* **Author:** Asharma<\/p>\n<p>* **Date:** 01-Oct-2018<br \/>\n*\/<br \/>\nfunc paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -&gt; Void)<\/p>\n<p>{<br \/>\n\/\/ Payment token can be found like this<br \/>\nprint(payment.token)<br \/>\n\/\/ Get response from the server and set the PKPaymentAuthorizationStatus<br \/>\nlet status = PKPaymentAuthorizationStatus(rawValue: 0)!<\/p>\n<p>self.transactionId = payment.token.transactionIdentifier<\/p>\n<p>switch status.rawValue {<br \/>\ncase 0:<br \/>\nself.status = &#8220;approved&#8221;<br \/>\n\/\/ perform Functionality on Apple Pay Successfull Payment<br \/>\ndefault:<br \/>\nself.status = &#8220;failed&#8221;<br \/>\n}<\/p>\n<p>}<br \/>\n\/**<br \/>\n* This function is called when Apple Pay payment authorization is finished.<\/p>\n<p>* **Author:** Asharma<\/p>\n<p>* **Date:** 01-Oct-2018<br \/>\n*\/<br \/>\nfunc paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController)<\/p>\n<p>{<br \/>\nself.dismiss(animated: true, completion: nil)<br \/>\n}<\/p><\/blockquote>\n<p><a href=\"https:\/\/www.knowband.com\/mobile-app\/?utm_source=banner-ads&amp;utm_medium=website-blog&amp;utm_campaign=apple-pay-integration-ios-using-swift\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-134029\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Convert-Your-eCommercet.jpg\" alt=\"convert-your-ecommercet\" width=\"900\" height=\"146\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Convert-Your-eCommercet.jpg 900w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Convert-Your-eCommercet-300x49.jpg 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Convert-Your-eCommercet-768x125.jpg 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><br \/>\n9.\u00a0You can call the function setup apple pay() whenever you want to start an Apple Pay transaction. Either you can call the same function in viewDidLoad() or you can call this function with the tap of a button.<\/p>\n<p>Example: In the case of a button tap, you need to add a button in UI, and draw the IBAction of the button. IBAction is a function that will be called on a tap of the button from which is referenced. In this action, you can call this function.<\/p>\n<blockquote><p>@IBAction func onTapBtnPay(_ sender: Any) {<br \/>\nsetupApplePay()<\/p>\n<p>}<\/p><\/blockquote>\n<p><strong>Recommended Read:<\/strong>\u00a0<a href=\"https:\/\/www.knowband.com\/blog\/mobile-app\/payu-integration-ios-using-swift\/\">PayU Integration in iOS using Swift<\/a><\/p>\n<h2>Apple Pay Sandbox Testing<\/h2>\n<h3>1. Create a Sandbox Tester Account.<\/h3>\n<p>a) Login to https:\/\/appstoreconnect.apple.com\/<br \/>\nb) Select Users and Access.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22034 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing.png\" alt=\"sandbox-testing\" width=\"1411\" height=\"699\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing.png 1411w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing-300x149.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing-768x380.png 768w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/sandbox-testing-1024x507.png 1024w\" sizes=\"auto, (max-width: 1411px) 100vw, 1411px\" \/><\/a><\/p>\n<p>c) Go to the testers section in the left navigation menu. Then click on the &#8220;+&#8221; button.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22035 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access.png\" alt=\"user-access\" width=\"1397\" height=\"651\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access.png 1397w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access-300x140.png 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access-768x358.png 768w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/user-access-1024x477.png 1024w\" sizes=\"auto, (max-width: 1397px) 100vw, 1397px\" \/><\/a><\/p>\n<p>d) A popup will appear. Please fill out that form.<br \/>\nNote: Please use mail that is not registered with Apple.<\/p>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/popup.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-22036 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/popup.png\" alt=\"popup- new tester\" width=\"702\" height=\"560\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/popup.png 702w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/popup-300x239.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/a><\/p>\n<p>f) Sign out of your Apple ID on all testing devices and sign back in with your new sandbox tester account.<\/p>\n<h3>2. Adding a test card number :<\/h3>\n<p>a) Make sure you have logged out from iCloud and iTunes.<br \/>\nb) Sign into your test device using the sandbox tester account you created.<br \/>\nc) Add a sandbox card.<br \/>\nExample :<br \/>\nFPAN: 4761 1200 1000 0492<br \/>\nExpiration Date: 11\/2022<br \/>\nCVV: 533<\/p>\n<p>You can find more cards here.<\/p>\n<p><strong>Note:<\/strong> The issue you might face is that the card will not be added. It will show some errors. Possible resolution maybe &#8211; you might have not logged out of the device completely. Please log out from iCloud and iTunes.<\/p>\n<p>d) After adding the card, you can proceed with the Apple Pay transaction.<\/p>\n<h2>Wrap UP<\/h2>\n<p>Create your eCommerce mobile app with Knowband&#8217;s\u00a0<a href=\"https:\/\/www.knowband.com\/mobile-app\/\" target=\"_blank\">mobile app builder<\/a>\u00a0and integrate PayU just by following these simple steps.\u00a0You can develop and publish a pair of entirely native Android and iOS apps for your eCommerce website with KnowBand&#8217;s eCommerce Mobile App Builder.<\/p>\n<p><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/Ok1-CjOBwXQ\" width=\"660\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>With the aid of our feature-rich eCommerce Mobile App Builder solution, you can start selling on mobile devices and attract customers from all over the world to your store. Knowband is a well-known brand that creates eCommerce mobile apps. Our main objective is to create robust yet user-friendly eCommerce mobile apps that may provide any eCommerce business with a competitive edge. You can create a user-friendly environment and make it easier for e-merchants to reach their customer base using Knowband&#8217;s eCommerce Mobile App Builder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. The First step would be to get the Apple Merchant Id. a)\u00a0Login to your Apple Developer Account. b) Go to &#8220;Certificates, Identifiers &amp; Profiles&#8221;. Choose iOS, tvOS, and watchOS from the Navigation menu on the left. Select the Merchant Id section in the same left menu. Click on the &#8220;+&#8221; button. c) A new [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":816829,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kbui_enabled":"","footnotes":""},"categories":[859],"tags":[7368,7371,7369],"class_list":["post-22040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobile-app","tag-apple-pay","tag-apple-pay-and-ios-integration","tag-apple-pay-integration-in-ios-using-swift"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to integrate Apple Pay with iOS using Swift? - Knowband Blog<\/title>\n<meta name=\"description\" content=\"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to integrate Apple Pay with iOS using Swift? - Knowband Blog\" \/>\n<meta property=\"og:description\" content=\"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowband Blog | Ecommerce Modules\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Knowband\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-10T12:17:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-18T07:23:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png\" \/>\n\t<meta property=\"og:image:width\" content=\"760\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Akash Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@KnowbandPlugin\" \/>\n<meta name=\"twitter:site\" content=\"@KnowbandPlugin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Akash Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/\"},\"author\":{\"name\":\"Akash Sharma\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/person\\\/ef7cba7baa8b174cc01029e0b203bddc\"},\"headline\":\"Apple Pay Integration in iOS using swift\",\"datePublished\":\"2018-10-10T12:17:00+00:00\",\"dateModified\":\"2022-07-18T07:23:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/\"},\"wordCount\":982,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Main-Banner-Apple.png\",\"keywords\":[\"Apple Pay\",\"Apple Pay and iOS integration\",\"Apple Pay Integration in iOS using swift\"],\"articleSection\":[\"Mobile App\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/\",\"name\":\"How to integrate Apple Pay with iOS using Swift? - Knowband Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Main-Banner-Apple.png\",\"datePublished\":\"2018-10-10T12:17:00+00:00\",\"dateModified\":\"2022-07-18T07:23:12+00:00\",\"description\":\"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Main-Banner-Apple.png\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Main-Banner-Apple.png\",\"width\":760,\"height\":300,\"caption\":\"Apple Pay Integration in iOS using swift\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/mobile-app\\\/apple-pay-integration-ios-using-swift\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apple Pay Integration in iOS using swift\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\",\"name\":\"Knowband Blog | Ecommerce Modules\",\"description\":\"Magento, Prestashop, Opencart, Shopify\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\",\"name\":\"Knowband Blog | Ecommerce Modules\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/cropped-knowband_logo-v2.png\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/cropped-knowband_logo-v2.png\",\"width\":153,\"height\":61,\"caption\":\"Knowband Blog | Ecommerce Modules\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Knowband\",\"https:\\\/\\\/x.com\\\/KnowbandPlugin\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/person\\\/ef7cba7baa8b174cc01029e0b203bddc\",\"name\":\"Akash Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1392073474142574760-150x150.jpg\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1392073474142574760-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1392073474142574760-150x150.jpg\",\"caption\":\"Akash Sharma\"},\"description\":\"I'm Akash Sharma, an engineering graduate and software developer by profession. Challenges fascinate me and I like solving them.\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/author\\\/asharma\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to integrate Apple Pay with iOS using Swift? - Knowband Blog","description":"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/","og_locale":"en_US","og_type":"article","og_title":"How to integrate Apple Pay with iOS using Swift? - Knowband Blog","og_description":"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.","og_url":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/","og_site_name":"Knowband Blog | Ecommerce Modules","article_publisher":"https:\/\/www.facebook.com\/Knowband","article_published_time":"2018-10-10T12:17:00+00:00","article_modified_time":"2022-07-18T07:23:12+00:00","og_image":[{"width":760,"height":300,"url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png","type":"image\/png"}],"author":"Akash Sharma","twitter_card":"summary_large_image","twitter_creator":"@KnowbandPlugin","twitter_site":"@KnowbandPlugin","twitter_misc":{"Written by":"Akash Sharma","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#article","isPartOf":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/"},"author":{"name":"Akash Sharma","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/person\/ef7cba7baa8b174cc01029e0b203bddc"},"headline":"Apple Pay Integration in iOS using swift","datePublished":"2018-10-10T12:17:00+00:00","dateModified":"2022-07-18T07:23:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/"},"wordCount":982,"commentCount":0,"publisher":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png","keywords":["Apple Pay","Apple Pay and iOS integration","Apple Pay Integration in iOS using swift"],"articleSection":["Mobile App"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/","url":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/","name":"How to integrate Apple Pay with iOS using Swift? - Knowband Blog","isPartOf":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#primaryimage"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png","datePublished":"2018-10-10T12:17:00+00:00","dateModified":"2022-07-18T07:23:12+00:00","description":"Do you want to integrate Apple Pay with iOS using Swift? The article by Knowband discusses simple steps to integrate Apple Pay with iOS using Swift.","breadcrumb":{"@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#primaryimage","url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/Main-Banner-Apple.png","width":760,"height":300,"caption":"Apple Pay Integration in iOS using swift"},{"@type":"BreadcrumbList","@id":"https:\/\/www.knowband.com\/blog\/mobile-app\/apple-pay-integration-ios-using-swift\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knowband.com\/blog\/fr\/"},{"@type":"ListItem","position":2,"name":"Apple Pay Integration in iOS using swift"}]},{"@type":"WebSite","@id":"https:\/\/www.knowband.com\/blog\/fr\/#website","url":"https:\/\/www.knowband.com\/blog\/fr\/","name":"Knowband Blog | Ecommerce Modules","description":"Magento, Prestashop, Opencart, Shopify","publisher":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knowband.com\/blog\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization","name":"Knowband Blog | Ecommerce Modules","url":"https:\/\/www.knowband.com\/blog\/fr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2016\/09\/cropped-knowband_logo-v2.png","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2016\/09\/cropped-knowband_logo-v2.png","width":153,"height":61,"caption":"Knowband Blog | Ecommerce Modules"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Knowband","https:\/\/x.com\/KnowbandPlugin"]},{"@type":"Person","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/person\/ef7cba7baa8b174cc01029e0b203bddc","name":"Akash Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/1392073474142574760-150x150.jpg","url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/1392073474142574760-150x150.jpg","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2018\/10\/1392073474142574760-150x150.jpg","caption":"Akash Sharma"},"description":"I'm Akash Sharma, an engineering graduate and software developer by profession. Challenges fascinate me and I like solving them.","url":"https:\/\/www.knowband.com\/blog\/author\/asharma\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/posts\/22040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/comments?post=22040"}],"version-history":[{"count":9,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/posts\/22040\/revisions"}],"predecessor-version":[{"id":816917,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/posts\/22040\/revisions\/816917"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/media\/816829"}],"wp:attachment":[{"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/media?parent=22040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/categories?post=22040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/wp-json\/wp\/v2\/tags?post=22040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}