#tofutiger
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Not sure I completely understand how "sources" status might help here?
Can you elaborate?
and my current method is to use the invoice object to get the subscription, then using the subscription to get the default payment method and check the exp month and year, but I think there might be other ways for the payment to fail.
Ah I see. Hmm, I don't think there's an alternative here really. There's no way to know if a payment method would fail/succeed without running a charge.
You could prompt your customers to update the payment method if you do see the expiry date is near (you'd typically get customer.source.expiring webhook event)
https://stripe.com/docs/api/events/types#event_types-customer.source.expiring
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
mmm I see, I had considered that as well, decided to go with invoice.upcoming because not all of these payments are monthly so wanted to avoid some false-positives when customers might update their card before their payment is due. also, we wanted to screen these events ourselves via slack first before messaging the customer.
is there a way to run a "test" charge ahead of the actual charge? probably not, but thought I'd ask haha
No worries ๐ You could technically place a hold on the payment method (and release it before sub renews) but the customers would see this on their statement and might be confused why they are seeing this before the sub is renewed
https://stripe.com/docs/payments/place-a-hold-on-a-payment-method