#Yevhenii

1 messages · Page 1 of 1 (latest)

keen sentinelBOT
tulip vortex
#

Can you share more details about how you want to implement this? Do you currently use Stripe Checkout or Elements to integrate with Stripe?

viral needle
#

I'm not sure what I use for integration, but. I use stripe-go library. Example code:
stripeCustomer, err := customer.Get("cus_Ov7ZkDhAz9pxmM", &stripe.CustomerParams{
Params: stripe.Params{Context: c.Request().Context()},
Expand: []*string{stripe.String("subscriptions.data.default_payment_method")},
})

#

Can I get a link to update the customer subscription payment method from the code?

tulip vortex
#

However, this assumes you've already collected payment details and created a PaymentMethod object

tulip vortex
#

I recommend looking into using the Billing Portal. You can programmatically create a billing portal session and deep link to the payment method update page

viral needle
#

Will check, thanks!
Is there another way to get or create a link to update or change the bank card details in the subscription?

tulip vortex
#

Not programmatically, no.

#

You can use the Dashboard, create a customer portal session programmatically, or use SetupIntents