#dennis-paymentintent-retry
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.
- dennis_de, 1 day ago, 11 messages
@green kiln I don't fully grasp the question and am lacking a lot of context so I'm mostly guessing. But if you do one-time payments via our API, then usually you show an error on the client and have the customer retry.
I assume there's more to your question here but you said "no Stripe Billing" so hard to say
We work with setup intents and get the authorization and only debit later. Sometimes it happens that the credit card is no longer covered, security settings then suddenly prevent it or similar. - and we are now considering how to build the user flow to change the means of payment and therefore the question of whether it is necessary to generate the payment intent again (in our case also the transfers, etc.) or whether there is a process within stripe that makes it possible to change the means of payment again in order to carry out the debit again.
I hope that explains it better ๐
With "No stripe billing" I wanted to say that we do not generate invoices via stripe which the customer can then pay freely, but generate our own payment intents based on invoices in our ERP system and therefore the retry process of stripe billing, for example, does not work.
Okay so you are doing an off-session one time payment via PaymentIntent? In that case the answer is no. You can see the error like the API request to charge will fail and you get an error back. And then you would email your customer and have them come back to your own page/website to pay
dennis-paymentintent-retry
Okay and then I would cancel the actual payment intent and create a new one?
We currently do this by simply trying to debit the means of payment up to 3 times, sometimes this helps. But often it doesn't and then it just hangs...
no reason to cancel that PaymentIntent. You would keep the same one and confirm it client-side with new payment method details
Oh yes, that was my initial question. Is there a hosted page that I can take the user to or how can I update the payment intent with a new payment method? Do you have a link to the documentation for me?
Sorry, I was in a meeting and unable to reply.
And if there is no hosted page where I can generate a link for this, a documentation link explaining how I have to build this in the frontend to update the payment intent with another payment method would be good.
๐ taking over here and sure, 1 moment
Just to confirm that's a standalone PaymentIntent, not belong to a Subscription/Invoice by any chance, right?
Right
Unfortunately, Stripe Billing is not functionally strong enough to be an option, so we had to map our own processes. Maybe this will change in the future, but it's not an option right now.
Yeah so we have a built in email for failed payment in Subscription, ie.
But unfortunately we don't for a standalone PI. You would do the same, by taking its client secret and feed into a PaymentElement in frontend just like as if you were collecting their Payment Method first time
Then you can send them an email with a button, link to your page with PaymentElement and the client secret pre-loaded
And the payment intent is then updated?
It then presumably creates a new setup intent that I can update with the payment intent?
No SetupIntent here. The PaymentIntent will just be updated with the new PaymentMethod
Do we have to let him add a new payment method with the Payment Elements or can we also update an Intent with a different Payment Method Id (which the customer has already stored)? Then we could offer a preselection like in the checkout (for new orders) or alternatively the option to add a new payment method.
And what would the API call look like here? Unfortunately, I couldn't find anything relevant in the documentation.
Authorization: Bearer {your_stripe_secret_key}
Content-Type: application/x-www-form-urlencoded
payment_method={new_payment_method_id}```
this?
can we also update an Intent with a different Payment Method Id (which the customer has already stored)
Yes. Do you have multiple of their payment methods already? If you do that could be just faster. If all of saved payment method failed then you will need to re collect using PaymentElement anyway
Yes exactly, the customer usually already has other payment methods linked in their Stripe Customer.
Yes. I recommend looking at our API Reference here https://stripe.com/docs/api/payment_intents/update#update_payment_intent-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.
Are there any restrictions on updating a payment method? Or could I theoretically turn a credit card payment into a bank transfer (EU)?
Or credit card -> PayPal as an example?
And then we have to capture it again? Presumably this is not done automatically just by changing a payment method?
Each Payment Method could be different. And capture is only a concept for card I believe
np!