#.lonestarx

1 messages ยท Page 1 of 1 (latest)

white wraithBOT
dense forge
#

๐Ÿ‘‹ 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)

strong socket
#

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?

dense forge
#

you can see on the Payment Intent whether setup_future_usage is set or not

strong socket
#

ahaaa

dense forge
#

it doesn't necessarily need to be set as default

strong socket
#

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

dense forge
#

and listen to the payment_intent.succeeded events

strong socket
#

pfff

#

there is no native way to get it?

dense forge
#

actually since you already have the client_secret

#

you can retrieve the PaymentIntent using that

strong socket
#

how come the sdk doesn't return that with paymentsheetresult?

dense forge
#

that's just how it was conceived

strong socket
#

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?

white wraithBOT
keen sluice
#

Is there a question I can help with?

strong socket
#

@keen sluice i'd love some clarification about the save payment method checkbox in iOS

#

this one i mean

keen sluice
#

Sure, what about it?

strong socket
#

am i supposed to do something specifically or does it automagically works in the backend based on the customer id?

#

oh

#

i just realised

keen sluice
strong socket
#

it does automagically work in the backend

#

when i made another payment intent for that customer i got