#.lonestarx
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
it will attach the card to the customer and set it up for future usage (setup_future_usage: 'off_session')
so you can then use off_session: true and charge your customer without them being on session (e.g. recurring payments)
hmmm
ok so basically... i need to save the card in userdefaults, for x customer and then later when he buys something else, i should check my user defaults and if it's present, attach the card to the paymentsheet configuration?
also, how do i know if the user checked that box so i can do all this?
you can see on the Payment Intent whether setup_future_usage is set or not
ahaaa
and this is correct?
you can also list all payment methods
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it doesn't necessarily need to be set as default
but where do i get payment intent from after the user makes a purchase?
i only get paymentsheetresult from the completion
which offers only an enum
you need to implement webhooks
and listen to the payment_intent.succeeded events
actually since you already have the client_secret
you can retrieve the PaymentIntent using that
how come the sdk doesn't return that with paymentsheetresult?
that's just how it was conceived
i feel like this is either false or maybe i'm not understanding it?
or is this supposed to be from the database perhaps?
from the backend?
like if i set a customer on paymentsheet, next time i present paymentsheet for that specific customer, i automatically get card details filled in if on previous purchase i had checked that save payment method box?
Is there a question I can help with?
@keen sluice i'd love some clarification about the save payment method checkbox in iOS
this one i mean
Sure, what about it?
am i supposed to do something specifically or does it automagically works in the backend based on the customer id?
oh
i just realised
What is not working as you expect? Have followed the guide here? https://stripe.com/docs/payments/save-during-payment?platform=ios&ui=payment-sheet