#joe0030
1 messages · Page 1 of 1 (latest)
No that's not how it works unfortunately. You need an invoice to exist to attempt payment, and that's just how Checkout works
so what is the best practice in this case. In case a user try a payment and fails. How he can retry to pay if he closes the page let say
If you want a Stripe-hosted page, you could just bring them to the invoice url: https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, but i would like that the user could just retry the payment in the checkout page, as any oter website of tyhis type. If the payment fails "just retry it"
if they leave the page for any reason?
I'm telling this because it happened some times
not many times, but...
I want to find a solid behavior
You could also just store the checkout session url on your end and provide a way for the customer to go back to it
As long as they return within the expiry window that should suffice
a solution that i found was to retrieve the checkout session from the user which was working fine until a certain logic point
but i got an issue, I store the checkout session id and i use it to send again the user in that checkout session. Perfect. But what if a user wants to select the plan2 instead the plan1? beacause in this scenario the user cannot select anymore the plan since it's stored in his previous checkout session
You'll need to create a new sesion in that case
and i can create it if the is let say an open invoice?
I don't understand the question
if I can create a new session checkout for that user that has an open invoice and a incoplete suscription
because i was getting an error, i'll check which one it was
You should be able to
ok
so the error i was getting was this: invalid_request_error
You cannot update a subscription that is canceled or incomplete_expired.
Can you share the request id?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_YA5bE0o56zwbN0
You aren't creating a new checkout session there
You're attempting to update an existing subscription
so the problem in that case was a wrong request