#krishnaKanabar-Saved Cards

1 messages ยท Page 1 of 1 (latest)

jovial star
#

๐Ÿ‘‹ happy to help

#

are you using Checkout Sessions?

regal arch
#

I am building monthly recurring plans

#

So first I collect card details, billing details then do setup intent from backend. From backend I retrieve clientsecret and then pass it to confimCardPayment

#

Now User cancels subscription and again comes then I create new subscription for that. But want to keep billing details, card details in short customer as previous one

jovial star
#

So first I collect card details, billing details then do setup intent from backend. From backend I retrieve clientsecret and then pass it to confimCardPayment
Since you're already using SetupIntent and Card Element why are you collecting the card details upfront?

#

I know that has nothing to do with your question

#

but I'm just wondering

#

new subscription for that. But want to keep billing details, card details in short customer as previous one
if you save the payment method as invoice_settings.default_payment_method on the customer object then this would be used for any future subscriptions where you don't pass a payment method for that subscription

regal arch
#

card details means I am using card element only

jovial star
regal arch
#

but again when user comes to renew subscription I want to put that card number nd all to my card element

jovial star
#

ok let's focus on your 1st question first, and we'll circle back to my comment on your SetupIntent implementation

regal arch
#

this will give me card number's ;ast 4 didgits only right??

jovial star
#

yes

regal arch
#

What if I want whole card number?

#

from Frontnd only can I receive through stripe.js?

jovial star
#

that won't be possible we don't expose the full card number

regal arch
#

okay

#

So like I wanted to do something like this

When user renews subscription, show him card details that he has previously entered. If User wants to change any of card details like number, cvc, stc he can update then I will call confirmCardPayment

jovial star
#

why not use the Customer Portal

#

f User wants to change any of card details like number, cvc, etc
you can't show them those details, you can't have access to that information it's not PCI compliant

regal arch
#

okay

jovial star
regal arch
#

okay

#

stripe
.confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {
payment_method: {
card: cardElement,
billing_details: {
name: 'Jenny Rosen',
},
},
})

#

In this I am using card element and passing that in this method

#

now my question is , is there any way I can set data to card element

#

like I want to set last 4 digits of card number to card element then how to do it

wind ice
#

Hi ๐Ÿ‘‹ jumping in as my teammate needed to step away. No, that is not something that is possible. If you want to display the last-4 to your Customer then you will need to create custom fields to do so.

regal arch
#

ok