#explas2_api

1 messages ยท Page 1 of 1 (latest)

blazing needleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433433860577693728

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

upbeat wagon
#

So this doesnt work and I am wondering can I use payment intent or invoice of failed update request for customer to pay it manually?
Yes, this is what you should do rather than creating a new intent

#

There'll be a latest_invoice property in the update Subscription response. That's the new invoice for the update, and with it will be an intent you can confirm

kindred pelican
#

But when I do update request with error_if_incomplete the error I catch does not have any invoice or payment intent information (both parameters are null), and when I retrieve latest invoice from subscription I only see the invoice for initial subscription purchase and not a new invoice for failed subscription update

upbeat wagon
#

What's the sub_xxx ID?

kindred pelican
#

sub_1SNutEDuAOfmQUpwCFqAkbRy
It is in test environment

upbeat wagon
#

I don't see any updates to that sub?

kindred pelican
#

I am doing update request with payment behavior 'error_if_incomplete'

#

did one just a few seconds ago

upbeat wagon
#

OK, I see it. What is unexpected here? error_if_incomplete does exactly that โ€“ if the payment fails for whatever reason, the request errors

kindred pelican
#

So yea, what i want to know is the invoice and payment intent gets created? Can I use them to finish payment and do the subscription update? Or is it not possible in this way?

upbeat wagon
#

You need to use allow_incomplete and then you can handle the payment failures as I described

blazing needleBOT
kindred pelican
#

so with error_if_incomplete no invoice and payment intent is created? Sorry, but AI on Stripe API docs said that invoice and payment intent are created even when request use error_if_incomplete, so just want to be sure

upbeat wagon
#

so with error_if_incomplete no invoice and payment intent is created?
Correct. The LLM is hallucinating

kindred pelican
#

Ok, thanks. We want to not use allow_incomplete anymore. Would the solution, where we create a new subscription and close old one when payment is successful is possible?

upbeat wagon
#

Sounds like you want to rollback the update in scnearios where the payment fails?

kindred pelican
#

Yes. And I will get ahead - pending_if_incomplete flag is not good for us, because it does not let to change subscription description

upbeat wagon
#

Yeah saw that in your original message. You can update the description in a follow-up request?

#

Otherwise there's no real elegant option other than manually re-applying the old state, or using a new sub (but there's a lot of toil involved with that and can skew metrics)

kindred pelican
#

We cant update description in follow-up request, because customer will see old description in their invoice for updates subscription. Our subscription description hold all the info about limits and prices in it, so we have to change description.

#

would i be possible to create a checkout/invoice for required amount, give url to customer to pay it and then update subscription without triggering another payment, but still have automatic payments on next billing cycle?

upbeat wagon
kindred pelican
#

that a possible option, thanks! And what about my other idea?
"would i be possible to create a checkout/invoice for required amount, give url to customer to pay it and then update subscription without triggering another payment, but still have automatic payments on next billing cycle?"