#bhanu365-reuse_card

1 messages · Page 1 of 1 (latest)

novel stratus
#

hello! yes, you can save the card details and submit the the saved card next time instead.

There's two options here :

graceful mirage
#

When I submit the payment the subscription has been created successfully but what I need to do for auto-renewal? When the subscription ends after a month.

#

I am using payment element

novel stratus
#

can you share the subscription id?

graceful mirage
#

sub_1LZTwJFmM52WOkSoVnwPSmiB

novel stratus
#

it'll automatically charge the payment method which the customer made payment with on the invoice's PaymentIntent

graceful mirage
#

Ok if in future customer need to update their payment card details because older card have expired or lost

#

?

novel stratus
graceful mirage
#

So I need to setup on our website portal, what I need to do for the setup and what API i can use for it

novel stratus
graceful mirage
#

I have changed the setting according to the doc now what I need to do for user can update their card details

#

Do I need to add external link of stripe on our website where customer can go through the link to the stripe UI portal and can update their card details?

novel stratus
#

yes, you should add your website link where the customer can go to and update their card details

graceful mirage
#

But I want that customer can only update their card details from our website not from stripe. Why customer will go out on stripe for update their card details if customers are on our website. Can we make a feature on our website so we can ask the card number expiry and cvv and can save in the customer object via API?

novel stratus
#

what will happen is that when payment fails for a subscription, Stripe will send an email to your customer with that link. If that link is for your website, then the Customer will go to your website to update their card details.

#

To allow customers to update their card details on your website, you can retrieve the client_secret of the invoice's PaymentIntent, then display the Payment Element for the customer to make payment. I believe the PaymentMethod will automatically be saved to the customer

graceful mirage
#

Ok got it

#

So at the moment customers can be paid for that subscription also and it will automatically save their card details as well

#

?

#

But I think that only will work by link that customer have visit

#

But if the subscription is not expired and customers want to update their card details in the mid of the subscription before it expires, what?

novel stratus
#

then you can either integrate the customer portal : https://stripe.com/docs/billing/subscriptions/integrating-customer-portal, or if you want to implement your own logic : collect the customer's payment method using SetupIntents and then update the subscription's default_payment_method [0] or the customer's invoice_settings.default_payment_method [1]

[0] https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method
[1] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method

graceful mirage
#

ok got it now

#

if i want to show card number(last 4 digit) and card type for customer, How can I do that?