#thebeard_api
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/1346646941081014333
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! No, there's not really a way to test what you're asking about because often saved cards will continue to work even after they expire, so making them all decline in test mode would not be an accurate representation of what happens.
ok make sense. since I am unable to attach an expired card. do you know if api would filter expired cards in live mode?
That's too vague a question for me to answer. Can you be more specific? Like what API endpoint are you talking about?
oh sorry, i meant this endpoint
https://api.stripe.com/v1/customers/:cus_id/payment_methods
Yeah, attaching an expired card to a Customer should fail, but a Customer can have expired cards attached (ones that were added prior to their expiration).
the thing I am trying to get to is creating subscriptions without providing default_payment_method. I know subscriptions would pick up default payment method for a customer if no payment method is provided. what if customer's default payment method is expired, but the customer also has another payment method attached. is there a way to fallback on non-default payment methods?
Hi! Stepping in for my colleague! Allowing a card to be charged after its expiration date has passed depends entirely on the issuer. If the charge with the default payment is declined due to card expiry, this hierarchy is followed: default_payment_method โ default_source โ invoice_settings.default_payment_method โ default_source
(https://docs.stripe.com/api/subscriptions/create#create_subscription-default_payment_method)
is there a way to know which one is a default payment method from list of payment methods that we get from api endpoint?
https://api.stripe.com/v1/customers/:cus_id/payment_methods
You will need to retrieve the customer and look for the default payment method: https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method
yea, that's what i was trying to avoid making multiple api calls but i guess that's the only way