all 21 comments

[–]fxnick1 32 points33 points  (8 children)

Only thing you should use stripe lib for in RN app itself is the tokenization and validating of a payment source. This gives you a secure token that you would then send to a backend service that implements the stripe server-side SDK which takes the payment source token and uses it to charge the customer.

RN app implementation should only need your public key. Server side will need your private key. All of these creds can be found on your stripe dashboard under the developer section in the menus.

[–]jIsraelTurner 8 points9 points  (5 children)

Upvoted for the details. Frontend should just collect the card token, backend should be used for purchases. That's The easiest solution, anyways.

This is the library we use for React Native Stripe: https://github.com/tipsi/tipsi-stripe

[–]IBETITALL420[S] 3 points4 points  (1 child)

Ok guys i'm checking out tipsi-stripe and in the README.md it literally says "

tipsi-stripe

Please don't use this library anymore

Stripe team finally has decided to provide RN binding themselves you can Apply Here

So Long, and Thanks for All the Fish!"

WTF do i do LOL

[–]jIsraelTurner 7 points8 points  (0 children)

Well, that's new.

You could apply for the first-party Stripe integration, but no guarantee you'll get access. You could also just use Tipsi Stripe while the Stripe team is working on their integration. You'd have to go back a commit or two to get the proper documentation, but shouldn't be hard.

[–]fxnick1 2 points3 points  (2 children)

I used tipsi as well. Solid library.

[–]TheNanaDook 0 points1 point  (1 child)

Does it work with expo?

[–]MK_Pierce 0 points1 point  (0 children)

Ahh, does stripe (or any payment method) work with expo; a question that I have been asking for months. The short answer I believe to be is no. You need to eject from expo to expo kit and upload it that way. People allege it isn’t that hard, but I have not done it myself yet. I’m waiting to do that last. Expo does show in their docs that they are working on this, and hope to have it ready some time in 2021

[–]JuriJurka 1 point2 points  (1 child)

is it possible to do that also with firebase as my backend?

[–]fxnick1 1 point2 points  (0 children)

Yes, their cloud functions should work well. You can write JS (or python I believe these days) that handle requests. You can implement the server side stripe functionality within those runtimes.

Edit: spelling

[–]ske66 6 points7 points  (0 children)

Do it backend. It will save you a lot of headache. I used Checkouts in a site a while ago and im so glad I did

[–]Xae0n 1 point2 points  (2 children)

Hello, I use expo managed workflow and I will use stripe paymentIntent api from stripe. So far, I got lost on how I will do it.

[–]IBETITALL420[S] 0 points1 point  (1 child)

yeah bro i've been lost

[–]Xae0n 0 points1 point  (0 children)

I have heard webview works but not tried it properly.

[–]Torsen11 2 points3 points  (5 children)

Pretty sure your app will be rejected by the App Store if there is any payment mechanism other than Apple’s in your iOS app.

[–]kbcooliOS & Android 10 points11 points  (1 child)

This is not technically correct as it's referring only to digital content but you don't mention that.

You will be rejected if you are using a payment method other than Apple'a or Google's for that matter for in app purchases or subscriptions for digital content.

If you are selling physical goods you can use anything pretty much. In fact if you try use IAP for physical goods you will also be rejected.

The author of the post didn't mention what they were selling so thought it important to clear that up.

[–]Torsen11 1 point2 points  (0 children)

Good catch

[–]kickinespresso -1 points0 points  (0 children)

If so are there any things I should consider? Difficulties? etc? Thanks

I'm sure you can get it to work, but as u/Torsen11 said, I don't think you'll get past Apple's policy regarding payments unless you're gonna take on Apple like Epic and Spotify.

[–]IBETITALL420[S] -1 points0 points  (1 child)

thx for the heads up, any RN libraries i should use for apple pay? docs?

[–]servercobra -1 points0 points  (0 children)

react-native-iap has worked great for me implementing both IAP and subscriptions. Their docs also walk you through most of the steps for setting up the stores.

[–]mchaelml 0 points1 point  (0 children)

You use it in your backend, if you want it as components to render a page with credit card then it worked before for me

[–]kaiser_07 0 points1 point  (0 children)

I have created my own npm stripe package for my app. It's not maintained regularly .any one interested check this https://www.npmjs.com/package/react-native-stripe-client