Use Apple Pay from an iOS SDK - ios

We provide an SDK for integration in partner apps.
Is it possible to use Apple Pay within the SDK to support purchases?
Will that require tight coupling with the host app, as Passkit is tied to app permissions?
Would it be preferable to use a web view for payment instead?

You can make a wrapper to simplify apple setup process in host app. However, host app's developer still need to enable Apple Pay capability, setup merchant ID on his own
Apple Pay on the Web is recommended for website to support Apple Pay, not to use it as a Web View inside your app

Related

Does Apple rejects app which has react native webview and third party payments in it

We are making web application and using paypal and stripe as payment gatweys for upgrading plan in the web application, now we are trying to make an iOS app using react native webview and using same payment gatways in it.
I have read somewhere that apple reject third parties payment gateway for subscriptions so we are not trying it
So, please help us out because we are confused and not taking any step yet
If your APP contains virtual goods, you must add Apple Pay;
Apple insists on using Apple Pay so they can, I think, have a percentage of the payments (20 or 30%).
If you offer a payment system other than Apple Pay, Apple may simply not validate the app on the stores.

Is it possible to configure Apple Pay right from the app?

We are using Stripe gateway for Apple Pay integration. It provides way to check if Apple Pay configured on device, but I'm curious if it is possible to show a kind of system dialog asking to configure Apple Pay. Opening system preferences (ex. How to open Settings programmatically like in Facebook app?) will also do, though I'm not sure if it's the allowed approach, and the app will not be banned by Apple.
Thanks.
PKAddPaymentPassController is intended for banks who want to add their own cards directly to Apple Pay. You won't be able to use it for what you're intending.
Instead you should use PKPassLibrary -openPaymentSetup, which will allow you to open the Apple Pay setup flow (either in Wallet on iPhone, or Settings on iPad).

iOS enterprise app store, include a way to accept credit card payments

When developing an app for the iOS enterprise app store can you include a way to accept credit card payments?
Depending on what users are purchasing*, you should be just fine accepting payments in your app. Instead of trying to incorporate some type of payment library into the app I would recommend using a payment API that offloads the work. Take a look at http://stripe.com/ for an example of an excellent payment system designed for ease of integration. Their API reference even mentions integration with iPhone apps.
*If you are trying to sell features or services of the app itself you will almost definitely be running afoul of Apple's guidelines, but based on the fact that you said "products" I am assuming this is not the case. In fact, while you must use the in-app purchase system for "content, functionality, or services in an app" you are specifically forbidden from using it for "physical goods or goods and services used outside of the application" (item 11.3 of Apple's App Store Review Guidelines).
You can use any technologies that that you would use in a regular app. PayPal, Square Pay, etc.

iOS - Integrating credit card payments

I'm aware that we can integrate in-app purchases with storekit. but i want to integrate payments using credit card. will apple allow to integrate such libraries? Are there any such libraries available where users can use their credit card for payment of products with in my app?
Depending on what users are purchasing*, you should be just fine accepting payments in your app. Instead of trying to incorporate some type of payment library into the app I would recommend using a payment API that offloads the work. Take a look at http://stripe.com/ for an example of an excellent payment system designed for ease of integration. Their API reference even mentions integration with iPhone apps.
*If you are trying to sell features or services of the app itself you will almost definitely be running afoul of Apple's guidelines, but based on the fact that you said "products" I am assuming this is not the case. In fact, while you must use the in-app purchase system for "content, functionality, or services in an app" you are specifically forbidden from using it for "physical goods or goods and services used outside of the application" (item 11.3 of Apple's App Store Review Guidelines).
Apple does allow not Apple's IAP in-app payments for goods not consumed in the phone (Digital content) as stated above.
See this example of an approved app that use external library for accepting credit cards in their app:
iStash
In my opinion Stripe is good solution but not the ideal for in-app as it is a web based solution and focuses on web experience.
If you want a true mobile in-app experience I suggest you check out PayPal library or my company, ZooZ, which accepts both PayPal and Credit Cards in one integration.
working project can be find here on github stripe example.
As an iOS dev you'd best have a good read through this. Specifically pertinent to you is section 11.2:
11.2 Apps utilizing a system other than the In App Purchase API (IAP) to purchase content, functionality, or services in an app will be rejected
They want the profit, and they get their cut if you use the IAP API. Hope that clears up any issues.
EDIT: I am assuming based on the wording of your question that the payment will unlock something transitory in the app. IAP are only appropriate when purchasing something digital. If what you are selling is physically tenable, then you shouldn't, and in fact are not allowed, to use the IAP API. In that case, something along the lines of Stripe or a web-based version of Paypal's API would work.
In support of David's answer, I would like to add that, using a payment API to accept payments for products/donation through your app would be ideal.
Apple Pay is now available (as of today) on iPhone 6 and 6 Plus, and active only in US.
But if you still want to add support in your app for devices that cannot use Apple Pay, Authorize.Net now has an iOS SDK which you can use to integrate and enable credit card payments.

Is it allowed to ask users to enter credit card details for own payment method?

It seems to me Apple won't allow this, but I need to make sure.
For an app we're building, we want to ask the user to enter payment information (including credit card details) to pay for tickets. The transaction will be completed by calling a webservice of our service provider. The application we're developing will be a front-end for the services of our service provider.
Please Note: We wouldn't be using Apple's in-app purchasing (IAP) system for this transaction.
I'm concerned about the following point from Apple's developer license agreement:
11.2
Apps utilizing a system other than the In App Purchase API (IAP) to purchase
content, functionality, or services in an app will be rejected.
I've seen apps use webviews to complete payments and that seems to be allowed. We'd like to use native controls for users to enter payment details.
That only applies to content for an app, functionality for an app, or services related to the app. You'll be fine (though, you should make sure you let users known that you're using SSL, etc). The problem'll be that your users probably won't trust you, since they probably only trust a browser telling them they're using a https connection.

Resources