Payment method for automatic charges when event is completed - flutter

I want to build an mobile app with flutter that gets payment when event is done.
for example, i call a taxi from an app and app is calculates payment from distance, time etc.when finish driving button tapped, app is gonna take payment from saved credit card immediately no 3d secure or anything.
my question is what is that payment method called, how can i implement that service (stripe, paypal etc.)

You can integrate Stripe payment services.
There are two ways you can choose to start:
Install and use Stripe via Firebase Extensions
Install and use Stripe via Dart Packages
I recommend them as they are very well documented and supported by Flutter.

With PayPal, charging from a user account on file is variously called "reference transactions with billing agreements" (Classic API), or reference / customer not present transactions with Vault in newer APIs.
To use reference transactions, the PayPal account must first be approved for it. You can contact the business support and explain the business need for the feature. Alternatively you look into getting PayPal's Braintree service which always has reference transactions enabled.
Provided reference transactions are approved and enabled on an account (which it must be emphasized is something the business side does, not a technical matter), PayPal can then guide you on which specific API to use.

Related

Saving Payment Methods with PayPal Checkout

Is it possible to attach payment methods to customers when PayPal uses the card checkout? I'm asking this because it seems like in order to have the PayPal buttons on the checkout, trying to use PayPal's hosted payment fields seems to not support having external customers with saved cards.
My goal is to have it so I can have the PayPal button along with the PayPal hosted fields for cards, and then if a user does checkout with the hosted fields, it will save their card somehow. This sort of functionality doesn't really seem to be supported by PayPal's API according to the docs unless I'm missing something.
I'm just trying to figure out a way if you can use previous cards in paypal's hosted checkout if that is possible.
Saving payment methods requires a feature variously called reference transactions or vaulting (the v2 vault API, not v1). The feature is not enable by default. The business owner should contact PayPal's general business support (not technical support) or an account manager to inquire about the reference transactions feature and explain the business need.
If approved for the feature, PayPal can then guide you on which API to integrate.

PayPal Rest API - Webhooks / IPN - Is it possible to receive eBay payment notifications?

I've been developing a marketplace type platform. Implementing PayPal Payouts seemed to be perfect for dealing with commissions. Especially being as PayPal will be handling all payments too.
I've successfully developed this part of the system. Inc. the webhook and verifying transmissions.
Now I wish to get my eBay sales info into my system. So that we can see it all in one place and have the system work the commissions out for those sales too. Having just invested the time into learning and implementing this PayPal API integration, it would be nice to use it for getting this data too.
So having tested the sandbox app thoroughly for the Payouts, I configured the live one. This is in my PayPal developer account where the app settings are. I've done nothing in my main Paypal account. Am I meant too?
My live webhook URL is just set to log all received data from PayPal. So I waited for a eBay sale and went to check the log but no data received? Am I misunderstanding this? The webhook is subscribed to all events.
The Drupal Commerce shopping cart I'm using already implements a IPN. Is it the IPN that I need to be thinking about? I'd prefer to not interfere with it to be honest, to keep future security updates safer. That said, I suspect there will be a way to extend it.
I guess the actual question is - what is the easiest way to get eBay sales info through PayPal?
Any help would be much appreciated.
eBay has their own system for that called Platform Notifications.
If I'm working with payment data, and I just need extra data from eBay, I will typically start with PayPal IPN / Webhooks and then use the eBay APIs within my IPN app to pull and push data as necessary.
Of course, depending on the scenario, you may decide to build out your primary solution inside of an eBay Platform Notifications app, and then make calls to PayPal APIs within that if you need to pull/push data.

PayPal Payments without user interaction

I wanted to ask if someone knows a possibility to pay make PayPal payments without user interaction. I am currently working on a Project, where we want to make PayPal Payments on demand without the user having to login to PayPal.
What I found was:
DoReference Transacations
Recurring Payments
The 2 Options would work for my purposes, since its OK if the user has to log in once. Since both of these methods are deprecated I wanted to know if there is another option.
At Cheddar we use the DoReferenceTransaction method with a "billing agreement" to enable transacting against a customer's paypal account repeatedly on any schedule for any amount. We have some documentation in our KB regarding how to create the billing agreement token via your app. Section 2.1 of that article would be relevant to anyone getting started with setting up a billing agreement for purposes of executing reference transactions. The rest of it is specific to Cheddar.
We, too, are aware that this method is officially deprecated. Our inquiries with PayPal suggest that it will be supported indefinitely. The new REST api does not support a modern equivalent. In other words, there's no new replacement for the DoReferenceTransaction method of Express Checkout or any alternative that enables autonomous recurring billing for variable transaction amounts on a custom schedule. If there was, we'd be using it. Practically speaking, there are countless implementations in the wild using reference transactions so I expect it would be impossible for PayPal to stop supporting it without an alternative (new) method.
FWIW, I recommend using a subscription management service provider like Cheddar. There are others that support recurring payments via PayPal account as well. Recurly comes to mind. Recurring billing and subscription management is complicated and it's made quite simple by these services. I recommend against using PayPal's native recurring payments as it is unnecessarily restrictive and once you start using it, you can't stop.

Best Paypal mobile integration option for Subscription services

I have a native mobile app in which I want users to subscribe for a monthly fee. I started by integrating with the native PayPal SDKs and use future payments, but in that case I'm in charge of processing the payments every month. I want a more automatic way where users approve their subscription and PayPal automatically posts the payments every month.
I have also started looking at Stripe, so if there is a solution using another library I would be glad to hear of that too.
(Disclaimer: I work for Stripe.)
Stripe does support recurring payments with the "subscriptions" feature. You can read more about it here:
https://stripe.com/docs/subscriptions
https://stripe.com/docs/guides/subscriptions
To implement this in a mobile app, you'd need to use the iOS SDK and/or the Android SDK. Both SDKs offer the same functionality: the ability to turn card information into a token, by exchanging the information directly between the user's device and Stripe's servers.
This way, the sensitive card information never hits your server, which greatly reduces the burden of PCI compliance. You can read more here: https://support.stripe.com/questions/do-i-need-to-be-pci-compliant-what-do-i-have-to-do. (This article talks about Stripe.js and Checkout, but the mobile SDKs serve the same purpose.)
Once a token has been created, you'd need to send it to an external server, where you would use it to create a customer object and a subscription, as explained in the subscriptions documentation I linked above.
The reason why this needs to be done on an external server and not in the app itself is because aside from the creation of card tokens, all other API requests need to be sent with your secret API key. You cannot embed or otherwise provide the secret API key to your app, as an attacker could extract it and use it for malicious purposes (they could refund past charges, use your account to test stolen card numbers, etc.).

Paypal Rest API vs Classic Sdk

I am working with paypal first time.
I have a product and I want to integrate paypal with it.
I want to achieve the following tasks :
Client comes to my website and select a plan,which is a monthly recurring plan.
Then client is redirected to Paypal for payment.
Client makes payment.
Return backs to home page.
I have gone through the documentation of paypal and I have the following questions.
What should I use REST API or Classic Sdk, as I want to create Recurring Profile,Work with EXPRESS-CHECKOUT and REFERENCE TRANSACTIONS.
I have customers all over globe and it is stated in the documentation that, for the customers in Germany and China , I have to use REFERENCE TRANSACTION.
Some where in the documentation of Merchant SDK it is stated that the classic API's will be deprecated, so is it a good approach to use Classic SDK
I also wanted to track the transactions(payment) made by user, so that I can show him the amount that is deducted in each month in his profile details.
Please suggest a feasible solution to my problem.
Thanks in advance.
Here's what I use. I went to Web Payments Standard and created a Subscription button. (I like the unencrypted variety, but you can encrypt if you want.) In there, you set the terms of the subscription, as well as where to post the IPN message. When the IPN message comes back, you deal with it. You'll get a subscr_signup at the start along with a subscr_payment. Then, on renewals, you'll get a subscr_payment again. What I like to do is store every verified IPN message in the database for my customer.
For handling the management of those subscriptions for things like tracking info, refunds, subscription cancellations, and voids, you'll need to use NVP API, which is a very simple API. If you stored in a database every IPN message with all those fields, then you should be able to pass certain fields of those to the NVP API in order to get what you need done.
If you're worried about longevity of the APIs, then don't. All they do when they deprecate APIs is stop giving you good docs on them. They still let those older versions run. If they didn't, there would be major upheaval on the web with web commerce products breaking all over the place. However, that said, if you want to prepare for the future, then get on the Braintree Payments API because PayPal bought Braintree and that's the future of their API.