#ferb0000
1 messages · Page 1 of 1 (latest)
Hello! Yes, that's possible.
how would i go about doing this?
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.
ooo thats interesting
so i am using flutterflow (flutter) with a fastapi backend
its a bit janky
We don't officially support Flutter, so you might want to ask the folks who built flutterflow for help.
so in order to do this i would need to create a stripe express account and have the user add a card
I'm not sure how an Express account would be involved?
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
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.
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
👋 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
np
and it just allows me to in theory charge anything to that payment method
with out their permission
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
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
What do you mean by "use the information from this payment intent"?
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
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
could i do
pi = stripe.PaymentIntent.retrieve(
"pi_3NpHPzDzTJHYWfEw1VhKo5LW",
)
stripe.SetupIntent.create(
"payment_method":pi.payment_method,
"usage":off_session,
)
something like this?
Yes, for this specific case it would work
but is this something you're planning on building into your app?
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
ok, great. just one more area
the confirmation
how does that work
in your case
of adding it to the first payment intent
You mean when using setup_future_usage?
Yup it's somethign you'd set when you create the PI