1000+ Startup, SME's & Enterprises
July 3, 2020

How to integrate Apple Pay in mobile apps?

Consult Our Experts

Nowadays a payment gateway is one of the most significant things that everyone needs to set up in their mobile device. In case you are running a business then you cannot succeed without integrating an app. It will not only boost your sales rate but also helps in improving customer experience with your services. When you plan to develop a mobile app for business considers integrating Apple Pay in the iOS app. The mobile apps that offer easy payment procedures are easy to use and enhance the customer experience.

Boost your revenue by app development

Apple pay allows its users to easily shop online, and offer various benefits to make payments with the help of NFC (Near Field Communication) Technology. The app is completely safe to use with Touch ID and Face recognition technologies used for payment approval.

Here, in this blog, we are going to discuss the procedure to integrate apple pay into the mobile applications which are already developed and need payment gateway integration.

Why Mobile apps Need Payment Gateway Integration?

The integration of the apple payment app makes all your payments easy with its unique Face recognition technology, which lets you shop for things with one click. With Apple Pay integration in your iOS apps, you can send payments to anyone right through your Messages or Siri. It offers you complete security as you don’t need to carry your credit and debit cards every time with you while shopping. The app manages cards and sends cash right in friction of seconds. Apple Pay is one of the safest mobile apps for the payment method as it provides users with 2 step authentication and a unique code. There is no need to store your card number on the device as with the rising cyber threats people are more concerned about their information safety.

How to integrate Apple Pay in Your mobile App?

To set up Apple Pay integration in your mobile apps you need Swift 4 language to execute the task. Following are the steps to add Apple Pay in your apps:

Create a Merchant ID

icon

To start the process, first of all, you need to navigate to https://developer.apple.com and then you need to sign in to your developer account.

icon

After this find the way to Identifiers, Certificates, and Profiles. Now go to the Identifier option and select App ID.

icon

Choose the simple ID, because if it isn’t clear, then you cannot make payment with your app.

icon

After selecting the ID tap on the continue option and Submit.

icon

The creation of your new App ID is complete!

icon

Now it is time to navigate to the Merchant ID section. Here tap on the + icon. It is a place you have to write a short description you want, to create a Bundle ID for your app in which you want to use the apple pay feature. Start the id With the word “merchant.” For example – “merchant.com.XYZcompany.yourapp”

Build up Apple Pay capabilities in Xcode for your project

icon

After the successful completion of your Merchant ID, now it is time to open up your project in Xcode and select Capabilities under the .xcproject section.

icon

Now turn on the Apple Pay and write your Merchant ID and make sure that the toggle of the Apple pay from the right side is kept on.

icon

Then, you need to add your ID to the developer gateway and make certain that the Team Box is representing to the right time and test out all items mentioned are correct.

icon

Create a Gmail account for connecting in iTunes

icon

It is time to create a Gmail account. Once the complete the above steps, go to https://itunesconnect.apple.com/. Here tap on the users and roles option and tap on the “+” icon. Pick a country where you want to enable Apple Pay in your app. It is the time when you confirm your new Gmail created by Apple ID.

Add a test card

icon

Now it is time to logout from the Apple ID and uses the sandbox account. To test the ID you need to follow a test card step by adding the following details :

icon

FPAN: 5233 2477 5777 1505

icon

Expiration Date: 12/2026

icon

CVC: 999

Create payment from Apple ID

To check the integration process create a payment request, add any button from the storyboard to the View Controller option to execute the step.

after that, connect IBAction with your ViewController.swift. To make your Apple Pay work efficiently, you must add the following line into ViewController:

Import PassKit

Now, you can build up the payment request in purchase item():

@IBAction func purchaseitem(_ sender: Any) {

let request = PKPaymentRequest()

request.merchantIdentifier = “merchant.net.mobindustry.likeMe”

request.supportedNetworks = [PKPaymentNetwork.visa, PKPaymentNetwork.masterCard, PKPaymentNetwork.amex]

request.merchantCapabilities = PKMerchantCapability.capability3DS

request.countryCode = “US”

request.currencyCode = “USD”

request.paymentSummaryItems = [

PKPaymentSummaryItem(label: “Some Product”, amount: 9.99)

]

let applePayController = PKPaymentAuthorizationViewController(paymentRequest: request)

self.present(applePayController!, animated: true, completion: nil)

}

Handle the output

You need to add the following line to purchaseItem():

You need to add the following line to purchaseItem():

applePayController?.delegate = self

After that, make the following extension:

extension PaymentViewController:

PKPaymentAuthorizationViewControllerDelegate{

func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController) {

controller.dismiss(animated: true, completion: nil)

}

func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, handler completion: @escaping (PKPaymentAuthorizationResult) -> Void) {

completion(PKPaymentAuthorizationResult(status:PKPaymentAuthorizationStatus.success, errors: []))

}

}

Lastly, check whether you have done all the things in the right manner. Make your Apple Pay integration process successful into your iOS mobile app, so that you can make a flourishing payment using your MasterCard, Visa, or any other card.

To complete the payment, put in the following line in the didAuthorizePayment method:

completion(PKPaymentAuthorizationResult(status:PKPaymentAuthorizationStatus.success, errors: []))

Also Read: What is NFC and how it works?

Conclusion

Hopefully, these 6 steps help you in making a successful payment option in your mobile application. It is the best way to integrate Apple payment technology into an iOS app. Make certain to follow the above-mentioned steps carefully, and you can even hire app developers from this task and discussed your Apple Pay integration requirements to make the payment process easier. Moreover, in case you have an iOS app idea, then you can discuss it with our experts. Our team of experts is ready to help you with the mobile app development services. For more assistance, you can connect with us and our experts will clear all your doubts regarding any platform you choose.

Disclaimermobile app development company

 

Hire Our Development Experts.

    About Author


    Akansha Pandey, Director of Sales at Fluper, is a leader in technology sales with a decade of experience. Known for her strategic approach, she excels in driving business growth and forging strong client relationships. Akansha's expertise lies in consultative selling, team leadership, and exceeding revenue targets. Passionate about mentoring, she enjoys sharing insights with aspiring sales professionals.

    Akansha Pandey

    What Makes Fluper Different?

    Fluper is not an idea but an initiative to bring transformation aided by technology
    Learning with a team of seasoned experts and agile thinkers is a real-life experience.

    15+ Million

    Users Engagement

    Guaranteed

    Project Delivery

    Free

    Business Analysis

    Project

    Penalty Enforcement

    IBM

    Certified Partners

    1000+

    Projects Delivered

    16+ Years of

    Of IT Exposure

    Support

    24*7 Availability
    Our Blogs
         

    Transform Your Business With Insights on Digitalization, Automation, Technology Integration and ICT Trends.

    May, 20.2024

    App Development:

    Android apps that are dangerous for
    you, check now how to be safe!

    Read More

    Client's Testimonial

    We’ve been lucky to collaborate and deliver transformation
    with a long list of overseas clients.

    Their Statements are Proud
    Testaments to our Dedication

    Fluper is the best ICT Company that navigates the digital frontier with unmatched solutions pursuit for excellence. Undoubtedly, there is an intense contribution of agile thinkers and growth facilitators behind the screens of our developing excellence.

    • 4.5/5.0
    • 4.8/5.0
    • 4.9/5.0
    • 4.6/5.0
    • 4.8/5.0
    • 4.9/5.0

    1000+ Startups, SMEs & Enterprises

    Launch your Million Dollar Business Idea Into a Successful Growth Story.
    • Free Marketing

    • 2.5 Year Post Launch Assistance

    • Money Back Guarantee

    • Real-Time tracking & Support

    Schedule Call

    Our Global Presence

    500+

    Startups

    300+

    SMEs

    200+

    Enterprises

    We Built

    1000+

    Brands Globally

    30+

    Countries Served

    Office Address

    C- 142, Sector 63 Rd, C Block, Sector 63, Noida, Uttar Pradesh 201301

    Call Fluper

    IND: +91-959-955-1432

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +91-9599551432

    Office Address

    104 Yes Business Tower, Al Barsha 1 Dubai

    Call Fluper

    UAE: +971-54-700-4175

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +971-54-700-4175

    Office Address

    Building 1913 2nd Floor, Manama, Bahrain

    Call Fluper

    Bahrain: +973-3222-0548

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +973-3222-0548

    Office Address

    Level 23, Collins Square Tower Five, 727 Collins Street Postcode VIC 3008 Melbourne Oceania Australia

    Call Fluper

    Australia: +61-29-1919-752

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +61-29-1919-752

    Office Address

    120 High Road, East Finchley London, N29ED, Uk

    Call Fluper

    UK: +44-208-089-4432

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +44-208-089-4432

    Office Address

    Laneoffice Suite Sarasota florida US.

    Call Fluper

    USA: +1-917-732-2131

    Drop An Email

    [email protected]

    Our Skype Id

    live:hirefluper

    Whatsapp Fluper

    Global +1-917-732-2131

    Let's Talk!