#krishnaKanabar-Saved Cards
1 messages ยท Page 1 of 1 (latest)
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
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 asinvoice_settings.default_payment_methodon the customer object then this would be used for any future subscriptions where you don't pass a payment method for that subscription
card details means I am using card element only
yes I understand, you're generating a payment method and passing it to the backend to generate a SetupIntent
but again when user comes to renew subscription I want to put that card number nd all to my card element
ok let's focus on your 1st question first, and we'll circle back to my comment on your SetupIntent implementation
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this will give me card number's ;ast 4 didgits only right??
yes
that won't be possible we don't expose the full card number
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
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
okay
why not use the Customer Portal
https://stripe.com/docs/billing/subscriptions/integrating-customer-portal
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
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.
ok