#Thomas-invoice-payment
1 messages · Page 1 of 1 (latest)
no problem, the id is in_1K6CE6E01WQPNDrcyPNXTXIJ
Have you implemented the client-side code with Stripe.js to 'confirm' (complete) the initial payment? https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements#complete-payment
The Payment Intent associated with that Invoice has the status requires_confirmation: https://dashboard.stripe.com/test/payments/pi_3K6CE7E01WQPNDrc1w0q8rk5
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 !
Sure, np!
I have a problem with confirming the initial payment. The PaymentElement shows me this
But the customer already have the payment method registered
You won't need to use the Payment Element then. Skip that part of the guide I linked and just use confirmCardPayment with the client_secret returned on the Payment Intent: https://stripe.com/docs/js/payment_intents/confirm_card_payment
Complete reference documentation for the Stripe JavaScript SDK.
That worked ! Thanks you ! And now, next invoices for this subscription wont require user action to be paid ?
They shouldn't, no. Assuming the payment method was setup for off-session payments correctly
Yes I have precised usage=off_session when creating the SetupIntent
You can tell if you check the Customer object in Dashboard and look at their payment methods
It's the seti_XXX id ?
Yep, if you click that it should state off-session usage
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
Ae you sure you're using the right client_secret (from the PI on that Invoice?)