#dishant0144_32519
1 messages · Page 1 of 1 (latest)
The invoice link will always be the same unless it's expired after 30 days [0]: https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
[0] https://support.stripe.com/questions/invoice-link-expiration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes!
okay
and for ex if last 2-3 invoices are not paid so Is there a way I can get the link?
Yes, you can use Invoice Retrieval API to get the hosted_invoice_url: https://stripe.com/docs/api/invoices/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can we use retrieve the invoices based on the customer id not by invoice id?
Yes! List Invoices API with customer set will retrieve the invoices on this specific customer: https://stripe.com/docs/api/invoices/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay
and also we can filter invoices with the status
right?
Yes! Both customer and status filters can be set
one more query
If any subscription's invoice failed due card expired or insufficient balance how many retry stripe will do to recollect payment for that specific invoice?
This depends on your retry settings in the Dashboard: https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
okay
Let's say I set retry after 1 day & 3 day, So if during this time if customer changed the payment method so taht payment method applies from next subscription's invoice OR from this current failed invoice?\
How does the customer change the payment method? If the payment method is changed on the default_payment_method of the subscription, then it'll be applied to the failed invoices as well
I have one custom UI from where customers can change payment method and cancel the subscription
For. ex. one of my customer have subscription occuring at 18th of every month, somehow the in the first attempt payment fails and thru webhook I notified the customer about it and he/she changes the payment method
so in the next retry attempt stripe consider new assigned payment method and success the payment or that payment method will be applicable on next month's 18th
?
I see! Which API do you call to update the payment method? Is it via Update Subscription API with default_payment_method set https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes
to update subscription's payment method I am using Update Subscription and before that I am attacthing the payment method to the customer
Thanks! Then the payment method will be applied to the existing and future invoices
okay
So in next retry from stripe it will debit the amount from the new payment method
right?
Yes! I'd recommend giving a try in test mode to ensure that the behaviour aligns with your expectation
okay
how can I execute this scenario in local can you guide me?
I'd recommend using Test Clock to advance the time: https://stripe.com/docs/billing/testing/test-clocks with the declined test card with Decline after attaching: https://stripe.com/docs/testing#declined-payments
Okay
I'll try this
Thanks for the information