#chokies-subscription-defaultpm
1 messages · Page 1 of 1 (latest)
@dull crater Hello! It can be a Source id src_123 but it doesn't have to be. It's just that we made them compatible
chokies-subscription-defaultpm
@elfin hamlet whats happens is if a stripe customer initial default card fails
then they retry the payment i attached the new card then set it to default but when the new subxcription is created it tries the old card still the one i intiial set as default not the new one
It's on you to change/set the right value in default_payment_method.
so if i added a payment method and set it to default then it fails then added a new payment method and set it a default then create a new. subscription it will still default to the first one?
If you set the Customer's default payment method then it will be used for all Subscriptions and Invoices moving forward. So if you update it from A to B and then you create a new Subscription, it would use B
@elfin hamlet will you be able to ccheck a transaction for me?
I help developers with questions about their own code. I can't check a transaction for you. But I can answer a clear and detailed question that you have
based on the logs i have the one i set as the default source was not the one used for the subscription creation
why are you saying "default source" when you said default_payment_method earlier? sorry, you seem super lost
i might probably figure it out. Setting the default source and creating the new subscription based on the log have the same timestamp
so they are running in parallel so a possiblit that the new subscripion is being charged on the 1st default source
Maybe ¯_(ツ)_/¯ sorry that's extremely theoretical/vague
There's no reason to run those "in parallel" that doesn't make sense to me
sorry for the confusion too im just trying to figure whats happening
actually they dont run in parallel. What happens in my php code is i add the card set it a teh default source then create a subscription. But looking at the logs right now in the dashboard both "setting default source" and "creating a new subscription" are in the same timestamp
But why are you talking about default source. Sorry you changed the words and they mean completely different things. It's crucial to be crisp and clear and use the exact same word as the API.
Please share the exact relevant lines of your code. Not hundreds of lines
of course it's a picture with big arrows 😅
That Subscription creation at the bottom explicitly passes default_payment_method => $source->id so nothing else matters and it would use that specific object as the default payment method
yeah i just aded that one a few mins ago based on my question here.
anyway ill try to push this for and see if it will help fix the problem. And sorry for the confusion. You actually did help me figuring out whats the possible culprit for my issue
yup a few years code