I just started on my Flutter journey and need to integrate Paypal payments into my app. However, there seems to be no standard Flutter API provided by Paypal and I couldn't find an acceptable answer anywhere.
-
Seems like you have to work on your own package. See https://pub.dev/documentation/paypal/latest/ . Or you need to see if others can be nudged to upgrade https://github.com/flutter/flutter/issues/23096 . – rhand Jan 01 '20 at 01:18
-
Try Razorpay ! It has official docs to integrate with flutter. https://razorpay.com/docs/payment-gateway/flutter-integration/ – Naveen Avidi Jan 01 '20 at 03:53
-
Hi Naveen, thanks for letting me know about Razorpay. Since I'm building the app for the US market, I'm not sure if its the right solution (don't think many people use it here). Are there alternate, easy ways to send / receive payments to users? Zelle, Venmo, etc. come to mind but no plugins exist for these either (nor am I holding my breath given small marketshare). – Kalyan Jan 02 '20 at 20:15
-
1Hi, have you figured out a way to implement payments yet? – Chris Feb 22 '20 at 17:45
-
hi @chris have you found any solution?? – Gulshan Yadav May 12 '20 at 15:52
-
1hi @Gulshan, I never found a way when I was trying but there might be now .. I ended up managing to get some basic Stripe functions to work using Firebase and Cloud Functions .. I think there are some official docs on it – Chris May 12 '20 at 16:35
4 Answers
You can achieve this using WebView. PayPal provides some APIs to do transaction. Using those APIs you can achieve this.
Read this article
Paypal Payment Gateway Integration in Flutter
This article demonstrates the steps you need to follow.

- 424
- 5
- 13
-
I couldn't find anyway to get the shipping address from the user while they are in the checkout process, there's an option to change the shipping address there. Is there anyway to restrict the user to only use that address or if I can get that particular address from the paypal somehow for tax calculations. – Bani Akram May 02 '23 at 06:34
Braintree is the payment processor provided by Paypal to accept safe and secure payments with feature Drop-in UI and custom UI design. It also provides the Apple Pay, Google Pay feature to accept the payments.
Open Braintree Sandbox Account
Get the tokenization key from Braintree account
Add the flutter_braintree dependencies in your pubspec.yaml file
dependencies:
flutter_braintree: ^0.5.3+1Create custom UI
Paypal Credit card: accept the followings from user
a. Card Number
b. Expiration Month
c. Expiration Year
Create a Braintree Request
final request = BraintreeCreditCardRequest(
card number: '4115511771161116',
expiration month: '02',
expiration year: '2020',
);
Ask Braintree to tokenization it
BraintreePaymentMethodNonce result = await Braintree.tokenizeCreditCard(
'<Insert your tokenization key>',
request,
);
For PayPal
create Paypal request
final request = BraintreePayPalRequest(amount: '50.00');
then launch Paypal Request
BraintreePaymentMethodNonce result = await Braintree.requestPaypalNonce(
"Insert your tokenization key or client token here",
request,
);
Get the NONCE from Braintree after successful payment and get the failure message on cancel the Paypal Payment by the user.
Save this NONCE for future reference in your database

- 820
- 2
- 10
- 17
-
The problem with BrainTree is that it may temporary block your payment service if something happens (could be anything) then you have to wait for them to respond. So, BrainTree is an easy and viable solution, still keep a backup Webview method of implementation for Paypal as well in case. – Bani Akram Apr 27 '23 at 07:40
There is a package in pub.dev called flutter_paypal https://pub.dev/packages/flutter_paypal You can also check this youtube video, he cleared up everything that how to use it or how it works https://youtu.be/QfLPdh771fA

- 11
- 1
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Risheek Mittal Dec 06 '22 at 11:19
you will find to do in this package flutter PayPal package

- 117
- 1
- 3
-
2While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/29950266) – Satria Suria Sep 29 '21 at 11:41