#Laxislad-save-pm

1 messages ยท Page 1 of 1 (latest)

cerulean bridge
#

Hey, can you share a Setup Intent ID? seti_xxx

tawny robin
#

sure

#

seti_1Kl8s5IyPXW2OgqxDFHqDo9r

cerulean bridge
#

Checking

tawny robin
#

ah

#

did I?

cerulean bridge
tawny robin
#

oh my bad

#

I waas so confused

#

thanks for your time

cerulean bridge
#

Np!

tawny robin
#

thaankssssss

tawny robin
#

hi

cerulean bridge
#

Hey

tawny robin
#

welcome back

#

now I have saved cards

#

yei

#

now I wanna show saved cards on my react froentend

#

is there a recomended way or some pre defined elements?

cerulean bridge
#

Sure! You'll need to build this yourself as there's no Element for this

#

But there are APIs you can use

tawny robin
#

yeah I.m aware of it

cerulean bridge
tawny robin
#

I created api for it

cerulean bridge
#

So you can use the JSON returned from that endpoint to build a UI as you need

tawny robin
#

now I wanna create it

#

show iy

#

it

#

I found this. but it uses pure js

cerulean bridge
#

What specific issue are you encountering?

tawny robin
#

the details I need to show the customer?

#

like last elements of card, expiry date etc...

cerulean bridge
#

I guess last 4 digits, expiry date, maybe the brand?

tawny robin
#

ah yes

#

like visa

cerulean bridge
#

It's entirely up to you! All Stripe needs is the pm_xxx ID to charge the card

tawny robin
#

number,exp,brand,

tawny robin
#

did it

cerulean bridge
#

๐ŸŽ‰

tawny robin
#

how to update defalut payment method?

#

I just want to make the card as a default card

eager dock
tawny robin
#

I just wanna do this from API

#

actions set as default

eager dock
#

that does the second option I mentioned(it sets customer.invoice_settings[default_payment_method])

tawny robin
#

ah yes

#

const customer = await stripe.customers.update(
'cus_xxx',
invoice_settings:[]
);

#

I got it now