#zyondev-reactnative

1 messages · Page 1 of 1 (latest)

strange monolithBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

fringe steppe
#

hello, what guide are you following? I see you've had quite a few questions over the last day so want to make sure I'm setting you up on the right track so you don't have further confusion

fringe steppe
#

one sec

#

have a look at that and after completing step 4, you'll have the PaymentMethod

strange monolithBOT
fringe steppe
#

@jolly lake let us know if you have questions, otherwise we'll archive this thread

jolly lake
#

Reviewing now

#

How do I get token of the card for future use from CardField?

fringe steppe
#

are you using CardField or PaymentSheet?

#

ignore "tokens" entirely, the new object is PaymentMethod

jolly lake
#

I’m using both in different places

fringe steppe
#

there's a function in stripe iOS SDK called createPaymentMethod to which you pass an instance of STPPaymentMethodParams obtained from CardField

jolly lake
#

For PaymentSheet, I need to forget about tokens right?

fringe steppe
#

for both

#

Tokens are no longer relevant

#

both CardField and PaymentSheet create PaymentMethods

#

which you use with SetupIntents or PaymentIntents or Subscriptions

jolly lake
#

Tokens are only relevant for PCI compliant methods?

#

Or are token’s completely deprecated system wide?

fringe steppe
#

PaymentMethods are (better) Tokens basically

jolly lake
#

What’s about sources?

fringe steppe
#

Tokens and Sources are deprecated, PaymentMethods does what both did

jolly lake
#

Got it. Thanks

fringe steppe
#

let us kow if there's any more questions, otherwise we'll archive the thread

jolly lake
#

Ok

#

It’s says this one is deprecated

flat sinew
#

👋 hoppoing in here since hmunoz has to head out

jolly lake
#

Hey

flat sinew
#

Are you asking whether you can still use cardParams? Is there a reason you don't want to use paymentMethodParams?

fringe steppe
#

sorry, I recommended that, that's what zyondev is flagging

#

my mistake, yes paymentMethodParams is the right param to use

jolly lake
#

Ok all of this works with react native?

flat sinew
jolly lake
#

ok let me try

jolly lake
#

ok i got it

#

so for connected accounts...

#

do i still need a token for... const connectedAccount = await stripe.accounts.createExternalAccount(stripeConnectedAccountId, { external_account: tokenId });

#

how do i handle stripe.accounts.createExternalAccount?

#

Do i just use paymentMethodId with paymentIntent to send a connected user a payout?

flat sinew
#

No, for payouts w/ connect you'd still want a token (which we need to create the external account)

strange monolithBOT
#

zyondev-reactnative

jolly lake
#

so how can i get token from payment method object? previously i was generating token from raw card data

flat sinew
jolly lake
#

so for external accounts flow, i can pass raw card data to my api server?

#

or do i can createToken instead of calling createPaymentMethod on client side?

flat sinew
#

It'd be client-side. You really shouldn' t be passing raw card details to your server at all unless you're prepared to deal with PCI compliance

jolly lake
#

ok ill call createToken instead of createPaymentMethod

flat sinew
#

Yes - again, this should jsut be for your external account creation flow. For payments you'll still want createPaymentMethod

jolly lake
#

ok so i can call both if i wanted to

#

?

#

for payments...createPaymentMethod
for payouts... createToken

flat sinew
#

yup

jolly lake
#

cool