#blackbirdgunner

1 messages · Page 1 of 1 (latest)

dull oakBOT
radiant badge
#

are not setting any default card for the user once payment is done. It was working fine before this.
Checkout has never automatically set a saved card as the default on a Customer object

#

It'll attach the card to the Customer, but it won't be set as the invoice_settings[default_payment_method]

umbral flame
#

that's weird, because I don't have any code that explicitly sets a card as default and it used to set the one I enter first time as default card for that customer

radiant badge
#

Can you share some examples?

umbral flame
#

I don't have the previous customer objects with me right now, but for this one cus_OaX9imm3LYIwc2 I had initially used the 4242 card to buy a plan which I'm most certain was set as the default payment before I added another card.

radiant badge
#

Taking a look, but I'd be surprised

umbral flame
#

If user has a card on their account but it's not set as default, does stripe use that in case of plan upgrade/downgrade later on?

radiant badge
radiant badge
umbral flame
#

So when I'm creating the checkout session, I'm passing payment_method_types=['card'] and then later on for the upgrade/downgrade part, I'm just simply using stripe.Subscription.modify() to change the plans.

#

would that use the initially saved non-default card? Because the subscription change in that case worked for me.

radiant badge
#

Well Checkout will set the same PM as the default_payment_method on the Subscription, which is that would be automatically used for any recurring payments

umbral flame
#

okay

#

so in that case even if the card is not marked as default, it will still use that, right?

radiant badge
umbral flame
#

Okay. That might have been the source of my confusion. Because my team received a payment method not set error while testing out on staging and I thought it's related to the card not being marked as default.

#

Thanks for the help