#ferb0000

1 messages · Page 1 of 1 (latest)

spice lavaBOT
hollow peak
#

Hello! Yes, that's possible.

sharp schooner
#

how would i go about doing this?

hollow peak
#

There are several ways. Can you tell me more about how your Stripe integration works?

#

At a high level you need to set up Payment Methods for future use so you can charge them with Payment Intents later.

sharp schooner
#

ooo thats interesting

#

so i am using flutterflow (flutter) with a fastapi backend

#

its a bit janky

hollow peak
#

We don't officially support Flutter, so you might want to ask the folks who built flutterflow for help.

sharp schooner
#

so in order to do this i would need to create a stripe express account and have the user add a card

hollow peak
#

I'm not sure how an Express account would be involved?

sharp schooner
#

i have just been building it in python then using api to get it across

#

how would i store the card details?

#

to automatically charge the card

hollow peak
#

There are, again, several ways. You can use a Setup Intent. You can use a Payment Intent with setup_future_usage. You can use Checkout, etc.

sharp schooner
#

this is interesting, however the only issue that that i dont know how much the amount is till after

#

so a booking is made, payment for the booking is taken. after the booking is complete i want to be able to charge them any extras

hallow thicket
#

👋 hopping in here since rubeus has to head out

#

If you don't know the amount ahead of time then SetupIntents are what you want - they don't require any amount to save the payment method

sharp schooner
#

np

#

and it just allows me to in theory charge anything to that payment method

#

with out their permission

hallow thicket
#

It gives you the ability to attempt to charge that payment method later while the cusotmer isn't on-session

#

It's always possible that for cards the bank/card network will still want to collect authentication again, but that should be exception, not the norm

sharp schooner
#

ok

#

so i am currently using an integration that does an inital payment here

#

pi_3NpHPzDzTJHYWfEw1VhKo5LW

#

for example

#

could i use the information from this payment intent to create a setup intent

hallow thicket
#

What do you mean by "use the information from this payment intent"?

sharp schooner
#

so with the stripe customer connected to this payment intent

#

or the payment method on this payment intent

#

can i create a setupIntent

#

i.e

my current integration with stripe, creates the pi i have given you. using python. can i from the pi. create a setupIntent

hallow thicket
#

The payment intent is unrelated here

#

All you'd need to do is create a Setup Intent w/ the Payment Method you want to setup

sharp schooner
#

could i do

pi = stripe.PaymentIntent.retrieve(
  "pi_3NpHPzDzTJHYWfEw1VhKo5LW",
)

stripe.SetupIntent.create(
  "payment_method":pi.payment_method,
  "usage":off_session,
)


#

something like this?

hallow thicket
#

Yes, for this specific case it would work

#

but is this something you're planning on building into your app?

sharp schooner
#

somthing along these lines

#

however i then need to have the user confim it?

hallow thicket
#

If this is something you're actually intending to build into your app, then instead of creating a separate Setup Intent AND a Payment Intent, you should just create the Payment Intent w/ setup_future_usage: off_session

#

I suggested creating a SetupIntent for that specific payment intent you shared because it's already been created, but moving forward you should just change your integration to use setup_future_usage with payment intetns to make it easier

sharp schooner
#

ok, great. just one more area

#

the confirmation

#

how does that work

#

in your case

#

of adding it to the first payment intent

hallow thicket
#

You mean when using setup_future_usage?

sharp schooner
#

yes

#

i assume that is an optional attribute on a pi?

#

ahh it is

#

then yes

hallow thicket
#

Yup it's somethign you'd set when you create the PI

sharp schooner
#

amazing

#

you have been amazing, thank you!