#aaparth-subscription-failed-payment
1 messages ยท Page 1 of 1 (latest)
Continues on 2nd question
I want to change the card when its expired so customer can add new one
hello @wet hatch
I'm going to work backwards through your questions if you don't mind
yeah please
#3: For testing failed payments, the way I do it is by creating a subscription with a trial period using a test card that will fail payment, such as 4000000000000002.
The trial period skips the charge initially since the first invoice is for $0. Then I forcibly end the trial period to trigger the first non-zero-dollar invoice, which should then fail.
okay
We also have a public beta out for our test clocks which allow you to simulate fast-forwarding time to see how a subscription will be in the future. This could be useful for testing these scenarios:
https://stripe.com/docs/billing/testing/test_clocks
I have applied for Test Clocks but can't use it now, so will you be able to tell me when can I use that ?
Sorry, that I don't know, that's a question better suited for our support team.
okay
#2 If you specified a default_payment_method on the subscription, then you can update that field to change the payment method that the subscription will try to use. If you didn't set it on the subscription, then the payment method is likely being pulled from the customer record and will need to be updated there.
https://stripe.com/docs/api/subscriptions/update#update_subscription-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.
okay
#1 This doc helps walk through the possible reasons a payment could fail, and our recommendations for handling those scenarios:
https://stripe.com/docs/billing/subscriptions/overview#how-payments-work-subscriptions
I wanted to know how can I make customer pay the pending or overdue invoice
can you just point me up in that directions
This particular subsection of that doc:
https://stripe.com/docs/billing/subscriptions/overview#requires-payment-method
Essentially you need to collect new payment info, find the payment intent associated with the invoice, update it with the new payment info and confirm it.
thanks mate
Any time!
let me try it out and I will reach to you if need any additional help
Sounds great, we'll be here.