#Aliciant - API Upgrades

1 messages ยท Page 1 of 1 (latest)

median vessel
#

HI ๐Ÿ‘‹
Our API docs are always based on the most current version

#

It's a kind of passive aggressive way to get people to stay up-to-date on their version ๐Ÿ˜…

elder sparrow
#

Ok, so I am trying to store card information on a client's account.

#

I follow the instructions and it says to setupIntent, collect payment info and then confirmSetup.

#

But I keep getting an error that says Invalid value for stripe.confirmSetup(): elements should have a mounted Payment Element.

median vessel
#

Yeah it all depends on what Element you load

elder sparrow
#

Yep, that is the one

#

I am loading the CardElement

median vessel
#

Okay

elder sparrow
#

Ok, so I think I'm making progress. I was able to confirm card setup. But it isn't attached to the customer object yet. Do I need to explicitly attached the card to the customer?

median vessel
#

Did you create the Setup Intent with a Customer?

elder sparrow
#

yep! I did setupIntent and then the confirmCardSetup

median vessel
elder sparrow
#

i see the problem - i think that I am not passing the clientSecret correctly. Here is the request ID: req_RgLZYTZwofBMwA

#

But in that case, I don't see the correct way to pass the clientSecret

#

Oh! Actually, I think it worked!

median vessel
#

I see the Customer attached

#

It looks like it worked to me ๐Ÿ™‚

elder sparrow
#

Ok great! I think I'm getting the hang of it.

median vessel
#

๐ŸŽ‰

elder sparrow
#

Thanks so much for your help!

elder sparrow
#

I haven't been able to find any guidance that tells me how to display the card info once it's been saved.

#

Any thoughts there?

magic fjord
#

Hello! Catching up now... are you using Payment Methods?

elder sparrow
#

I am using the CardElement to capture the information.

#

I create a setupIntent, then confirmCardSetup

#

And once that information is saved, I'd like to display the last 4 digits of the user's card

#

but I don't find anything that tells me how to do that using elements

magic fjord
#

You don't do this using Elements, you do this using regular HTML.

elder sparrow
#

Oh ok

#

Got it. Thx!

magic fjord
#

You fetch the Payment Method server-side and pass the data you want to display to the client.

elder sparrow
#

fantastic! thank you!