#joe0030

1 messages · Page 1 of 1 (latest)

faint kettleBOT
vernal raft
#

No that's not how it works unfortunately. You need an invoice to exist to attempt payment, and that's just how Checkout works

haughty prairie
#

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

vernal raft
haughty prairie
#

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"

vernal raft
#

You can if they don't leave the page

#

They should be able to just retry

haughty prairie
#

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

vernal raft
#

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

haughty prairie
#

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

vernal raft
#

You'll need to create a new sesion in that case

haughty prairie
#

and i can create it if the is let say an open invoice?

vernal raft
#

I don't understand the question

haughty prairie
#

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

vernal raft
#

You should be able to

haughty prairie
#

ok

#

so the error i was getting was this: invalid_request_error
You cannot update a subscription that is canceled or incomplete_expired.

vernal raft
#

Can you share the request id?

haughty prairie
#

req_YA5bE0o56zwbN0

vernal raft
#

You aren't creating a new checkout session there

#

You're attempting to update an existing subscription

haughty prairie
#

so the problem in that case was a wrong request

vernal raft
#

Yeah. If the customer hasn't paid yet and they want to select a different plan, just create a new checkout session with the right plan so they can pay

#

Updating a subscription with a new plan like that is really for existing active subscriptions you want to change

haughty prairie
#

ok i make some try

#

thanks for the support