#AlexElba

1 messages · Page 1 of 1 (latest)

dawn vesselBOT
mental niche
#

Okay backing up here for a minute - requires_action and requires_payment_method are not statuses that would be on a PaymentMethod

#

Those are statuses of a PaymentIntent

#

So those are the statuses that you would see if you retrieved the Subscription and expanded latest_invoice.payment_intent and checked latest_invoice.payment_intent.status on the Subscription

woeful solstice
#

how do I check if payment method is valid?

#

for example if its yearly subscription

#

and in 4th months they wanna change it, but card is expired

mental niche
#

Payment Methods don't have this concept of being "valid" or not - because even a card that's expired may still work with the card issuer for a while

#

If you do want to check that a card is expired you'd check card.exp_month and card.exp_year on the Payment Method, but really the better way to do this is to be checking the status of the PAymentIntent and ask for a new payment method based on that

woeful solstice
#

if payment intent went thru 5 months ago

#

would it mean it will go thru again?