#Wik-Invoice
1 messages · Page 1 of 1 (latest)
HI there, so you want to know if the invoice is paid with customer's balance or not?
yes
Got it. You can check if the invoice.payment_intent == null. If it's null that means no payment is required and the invoice is paid with customer's credit.
You can also check the starting_balance and the ending_balance of the invoice object and see if they are different.
Amazing, thank you so much for your help. Stripe dev-help is just the best 🙏
Welcome! happy to help.
Hi @vocal cargo regardless of the reason of failed payment. Stripe will attempt to recover with a few retries. You can configure the setting to cancel, make the subscription unpaid or leave it as it is after a few retries. More details here https://stripe.com/docs/billing/subscriptions/overview#settings
Of course. I wasn't sure if it'd be better to ask here or if you prefer a new thread for every question
All good, usually we use the same thread to keep the context.
One more thing: I want to test a prepaid card that should fail, like have $0 funds. Unfortunately the only prepaid testing card I can find is supposed to be successful. Do you know any preparid card number that I can use for testing this case?
Sure, there are many test cards for you to test different use cases https://stripe.com/docs/testing#declined-payments