#dominikganic_best-practices
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/1337497191832485911
๐ 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.
- dominikganic_unexpected, 1 day ago, 40 messages
- dominikganic_best-practices, 2 days ago, 20 messages
- dominikganic_unexpected, 2 days ago, 56 messages
- dominikganic_best-practices, 3 days ago, 22 messages
- dominikganic_best-practices, 6 days ago, 47 messages
By payment method, are you referring to a specific payment method that is on file and not the type of payment method?
Yes sorry, not the payment method type, in this case the customer has for example 5 different payment methods as customer saved in his profile, and now I'd like to offer him the option to select another payment method for a single subscription.
Subscription 1 = PayPal
Subscription 2 = Credit Card
etc.
Just wondering..
Ok, thanks for clarifying. You'll be unable to limit it to a specific payment method, based on the ID. However, you can restrict it to a certain type. For example, Subscription 1 can be restricted to only PayPal:
Stripe::Subscription.update(
'sub_49ty4767H20z6a',
{payment_settings: {payment_method_types: ['paypal']}},
)
Subscription 2 will then look like this:
Stripe::Subscription.update(
'sub_49ty4767H20z6a',
{payment_settings: {payment_method_types: ['card']}},
)
Ah okay no problem, thank you for clarifying this! I was just curious if there is any possibility, but that's fine. ๐
The drawback is you will not be able to specify the specific account if the customer has multiple cards for example.
Yes no problem tho, I will stick by the standards ๐ Thanks a lot for reaching out! Have a nice day / evening here ๐
One thing you can do is specify the default_payment_method via the API by passing the Payment Method ID you want used for the subscription [0].
[0] https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But, wouldn't that mean, that I could pass the payment method id the customer has, to a single subscription - like just what I've expected from beginning? I'm a bit confused ๐