Q:

Working of Apple Pay in iOS swift

I have integrated the code required for Apple Pay in my app based on the documentation available with Apple.
However, as a beginner, I have a doubt.
We have not used any third party payment processors like PayPal, Stripe etc. 
Is it mandatory to use a third party processors? Can we just use the code and passbook/wallet and do the transactions?
Note: Merchant IDs, Payment certificates are created in the developer account.

A:

Based on Apple documentation a payment provider is recommended but not mandatory.

Using one of these SDKs or hosted solutions is highly recommended

About develop your own payment process...

The alternative is to provide your own server-side solution to receive
  payments from your app or website, decrypt payment tokens and
  interface with the payment provider to process the authorization.
  Handling credit and debit card payments can be complicated and unless
  you already have the expertise and systems in place, an Apple Pay SDK
  or JS API from a payment provider is the quickest and most reliable
  way to support Apple Pay in your app or website.

In my opinion, It's better use a payment provider than develop your own. You're working with money, credit cards numbers... 

