#Thomas-invoice-payment

1 messages · Page 1 of 1 (latest)

sharp orbit
#

Hey! Can you share the ID of the Invoice?

#

Sorry I missed your question initially!

steep sierra
#

no problem, the id is in_1K6CE6E01WQPNDrcyPNXTXIJ

sharp orbit
steep sierra
#

Oh that may be the problem. Previously we did it this way because the customer was entering is payment method on the subscription payment, but we changed the flow by registering the payment method first then subscribing to services whenever you want. I'll try this and tell you if it work, thanks !

sharp orbit
#

Sure, np!

steep sierra
#

I have a problem with confirming the initial payment. The PaymentElement shows me this

#

But the customer already have the payment method registered

sharp orbit
steep sierra
#

That worked ! Thanks you ! And now, next invoices for this subscription wont require user action to be paid ?

sharp orbit
#

They shouldn't, no. Assuming the payment method was setup for off-session payments correctly

steep sierra
#

Yes I have precised usage=off_session when creating the SetupIntent

sharp orbit
#

You can tell if you check the Customer object in Dashboard and look at their payment methods

steep sierra
#

It's the seti_XXX id ?

sharp orbit
#

Yep, if you click that it should state off-session usage

steep sierra
#

Oh ok, thanks for the tips

#

I have another problem, now that I have successfully paid the first invoice, if I update my subscription by adding new items, the new invoice generated is failed. It requires user authentication, but when I tried to authenticate him with confirmCardPayment, I have this error :

payment_intent_unexpected_state
You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed.

Invoice id : in_1K6Ea4E01WQPNDrcbqeOfaa2

sharp orbit
#

Ae you sure you're using the right client_secret (from the PI on that Invoice?)

steep sierra
#

Ok thanks you, I was trying to pay with the client_secret of the latest invoice before the subscription update...

#

You solved all my problems, thanks you a lot !

sharp orbit
#

Sure, np!

#

I'll close the thread now, but feel free to ask in #dev-help with any follow-up Qs