#jwerre_subscription-payment-methods

1 messages ยท Page 1 of 1 (latest)

wide flameBOT
craggy narwhalBOT
#

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.

wide flameBOT
#

๐Ÿ‘‹ 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.

craggy narwhalBOT
warm salmon
#

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?

prime cove
#
payment_settings: {
   save_default_payment_method: 'on_subscription',
}
warm salmon
#

That sets the created Payment Method as the default Payment Method that the Subscription will use for payments.

prime cove
#

right, my question is should i turn this to off and use:

customers.update(customerId, {
  invoice_settings: {
    default_payment_method: paymentMethodId
}});
warm salmon
#

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?

prime cove
#

What's the difference

#

why use one over the other

warm salmon
#

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.

prime cove
#

fine, thanks

warm salmon
#

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.

prime cove
#

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?

warm salmon
#

It remains attached to the Customer unless a call is made to explicitly detach it.

prime cove
#

okay, thanks for your help

warm salmon