#elbek8935
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- elbek-customer-defaultpm, 45 minutes ago, 107 messages
@lofty rune please try to use your existing open thread to ask follow up questions
it's the 3rd thread in a row :p
ohh, sure
thanks
yep I closed the other one
I don't really get the question, you just dumped the error with no context
I have the invoice open and I am calling pay api call
that is the response I am getting
could you check the log
Okay so this is you trying to pay an Invoice. What's the state of the PaymentIntent? What happened to its PaymentMethod? Why is this Pay Invoice call happening in the first place?
payment intent became cancelled I think
good question regarding pay invoice call
for example invoice is created as automatic
but say customer has some problems with card such as insufficient balance or no payment method
if the PaymentIntent is canceled then you can't pay that Invoice.
later if customer fixes it do I need to call pay api call or stripe takes care of it?
Sorry you're asking some meta questions but those are unrelated to the error you are getting right now
If you get your customer back on session to enter card details then you should call the Pay Invoice API afterwards while making sure to make their new PaymentMethod the default
when does new payment method gets created for an invoice since existing one is cancelled?
I'm sorry, this question doesn't really make sense. You're likely mixing up your vocabulary somewhere
invoice's status is open
but its linked payment intent is cancelled
what would happen to invoice
I mean to payment intent, not payment method
My colleague @torn timber is going to take over and help you I have to run
Hi @lofty rune I'm taking over this thread
Looks like you were trying to pay the same invoice multiple times before, and all those payment attemtps were unsuccessful due to insufficient_funds
yeah
I am learning
so now intent is cancelled for the invoice
when does new intent gets created?
This invoice is in live mode. I'd recommend you to use test mode for your testing.
We tested it, this happens when issues such as declined, not enough fund so forth comes up
for this particular case what do I need to given payment method is cancelled?
cancelled is a terminal state (view https://stripe.com/docs/payments/paymentintents/lifecycle to learn more about payment intent lifecycle), so you can't pay this invoice anymore.
You can create a new invoice (by using from_invoice https://stripe.com/docs/api/invoices/create#create_invoice-from_invoice) and ask your cusotmer to pay with a different card.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No, this invoice is in open status, you can void it or mark it uncollectable.
I see, got it
Also Jack one last question. We create invoices with auto charge. This may fail when there is no payment method or card may get declined. Say later customer comes and adds a new payment method. Does stripe automatically retry to settle the invoice with new payment methods? Or I should invoke invoice/pay api?
How does your customer add in the payment method? through customer billing portal?
yeah, from our platform
it uses checkout session and uses stripe element ui or plaid bank account linking
two possible optioons
Do you have some examples (i..e, request IDs) so that I can understand how your add the new payment method?
yeah
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Got it! So you are using SetupIntent to collect a payment method from a customer.
Do you also set the collected payment method as the customer's invoice_settings.default_payment_method? (https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-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, for cc I set that up
for bank I set up as a source on customer's invoice setting
You mean set it as the customer's default_source? (https://stripe.com/docs/api/customers/update#update_customer-default_source)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeah
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this is how I do for bank case
Yes Stripe will use the newly collected source/payment_method for invoice payment.
If that's an one-off invoice, you need to invoke the invoice pay API. If it's a recurring invoice created by a subscription, Stripe will retry based on your settings.
it is one off
When do I need to retry? After new payment method is added?
since there many possibilities not sure how to cover all cases
https://stripe.com/docs/invoicing/send-email#customer-emails you can also configure your settings and let Stripe to send an email to your customer to inform them when payment fails.
Jack, this was for subscriptions
how about for invoices, our plaftorm uses invoices. How do we configure emails for failed invoiceS?
I see a config for Manage failed payments for subscriptions
https://dashboard.stripe.com/settings/billing/automatic you can find settings for one-off invoices in the same page
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Thanks for waiting.