#jwerre_subscription-payment-methods
1 messages ยท Page 1 of 1 (latest)
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.
- jwerre_api, 16 hours ago, 13 messages
- jwerre_api, 5 days ago, 35 messages
- jwerre_api, 6 days ago, 14 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252626241949925407
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi ๐ I would not recommend explicitly attaching Payment Methods in most cases, nor is it possible to "attach" a Payment Method to a Subscription.
How are you creating the Payment Methods that you intend to let your Customers use for their Subscriptions?
payment_settings: {
save_default_payment_method: 'on_subscription',
}
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That sets the created Payment Method as the default Payment Method that the Subscription will use for payments.
right, my question is should i turn this to off and use:
customers.update(customerId, {
invoice_settings: {
default_payment_method: paymentMethodId
}});
That's up to you. Do you want to set the new Payment Method as the default for all Subscriptions that belong to the Customer, or do you only want to use it for that one Subscription?
Setting the default payment method at the Customer object level uses that payment method as the default for every Subscription that doesn't have a default payment method explicitly set at the Subscription level.
Setting the default payment method at the Subscription level causes that payment method to only be used as the default for that single Subscription.
Which one you use depends on whether you want a default payment method per Subscription, or if you want a single payment method to be the default for all of the Customer's Subscriptions.
fine, thanks
Any time! Let me know if anything is still unclear, or what I'm describing doesn't seem to align with what you see when you're testing this behavior.
one more quick question if that's okay...
If a default payment method is set on a subscription and the subscription ends is the payment method removed or does it stay linked to the customer?
It remains attached to the Customer unless a call is made to explicitly detach it.
okay, thanks for your help
You can also use our Test Clocks to test the full lifecycle of Subscriptions in testmode, allowing you to see exactly how your flows will play out with the settings for your Stripe account:
https://docs.stripe.com/billing/testing/test-clocks