#skammerens-datter_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1265281399842410557
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- skammerens-datter_api, 1 hour ago, 11 messages
- skammerens-datter_api, 1 day ago, 34 messages
- skammerens-datter_api, 3 days ago, 24 messages
- skammerens-datter_api, 4 days ago, 35 messages
- skammerens-datter_api, 4 days ago, 13 messages
- skammerens-datter_api, 4 days ago, 10 messages
and 1 more
hi there!
so you have an active Subscription, and you want the user to change theiir payment method?
if so, the simplest option is to use the Customer Portal: https://docs.stripe.com/customer-management
I want to enable them to do so, for example if their payment declines for the next billing cycle
I have implemented everything else tightly tied together with our SaaS product, so this I would prefer to be the same as well
We use Elements and the rest is API calls
then yes the Customer Portal would work for this. otherwise you would use a SetupIntent + Payment Element to collect a new payment method, and then set it as default for the Customer or Subscription.
is there a guide anywhere for that? I am using a payment element now, and a setupintent, but the process is a bit convoluted, since I wish to only change the payment method of the subscription, not the customer
we have a guide on PaymentElement + SetupIntent here: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements
the missing step would be to set the payment method as default for the customer (https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method) or the subscription (https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method), by making an extra API call at the end.
Okay, I'll try those steps. If I run a simple subscription update of the default_payment_method, will I have to set proration behaviour and other properties in that call to retain the subscription's properties set when it was created with the API - or will Stripe keep those properties as is, if not submitted in the update?
you would only update the default_payment_method.
okay, great - I was under a different impression from a previous talk with someone else
I recommend doing some tests in test mode to make sure everything work as expected. you can also use Test Clocks for this: https://docs.stripe.com/billing/testing/test-clocks