#_nerder

1 messages ยท Page 1 of 1 (latest)

slender fossilBOT
cobalt inlet
#

๐Ÿ‘‹ happy to help

topaz heath
#

hey

cobalt inlet
#

would you mind elaborating?

#

is this about a subscription's invoice? a one-off?

topaz heath
#

Yes, basically what i'm trying to achieve is a functionality that is able to retry payment of a past-due subscription

#

but the issue is that my current implementation is retrying the payment always with the payment method used to pay it for the first time

#

a common use-case for my users is to, add a new payment method as default and then attempt to pay with that new method

#

but since my integration is not considering that, they see the payment fail anyway

last stirrup
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. So it sounds like you're likely already making requests to pay an existing Invoice. When doing so, you can provide the ID of a specific Payment Method that you'd like to use for the payment to the payment_method parameter.
https://stripe.com/docs/api/invoices/pay#pay_invoice-payment_method

topaz heath
#

oh, amzing

#

thank you so much

last stirrup
#

Any time! Let me know if that doesn't do what you're hoping though.

topaz heath
#

I'm checking it right now