#ing32_api

1 messages ยท Page 1 of 1 (latest)

proper foxBOT
idle valveBOT
#

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.

proper foxBOT
#

๐Ÿ‘‹ 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/1234941283198308423

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

edgy knot
#

Is there any efficient way to solve this besides checking on unload (i'm using react & typescript) or on other pages continously if the customer's subscription ID is incomplete and cancel it manually?

#

The solution I provided above can be an issue if someone, for example, refreshes the page 5000 times and creates 5000 subscription intents. Then I would have to cancel 5000 subscriptions which can affect my code. (and prob rate limit my stripe account)

weak stone
#

So there's no subscription intents resource on Stripe's API. Are you referring to subscription object?

#

Just trying to make sure I am on the same page ๐Ÿ™‚

edgy knot
#

Yes. I refer to it as an intent because I got used to payment intents LOL. I am using stripe.subscriptions.create with payment_behavior: "default_incomplete" option.

#

If i have multiple of this active in one currency (or at least one), if the client goes back in the menu and tries to change the currency, my error fails with this error:

You cannot combine currencies on a single customer. This customer has an active subscription, subscription schedule, discount, quote, or invoice item with currency ron.

#

And I don't want to start working on this using an inefficient way, so I am curious if there's any way to handle this with stripe?

weak stone
edgy knot
#

Oh that's cool, I did not know I can do that

#

let me check something, ill be right back

#

So if I can select the mode, I would not require to create those "intents" in the back end, right?

#

What other modes are there except "subscription"?

edgy knot
#

Thanks.
However I am not sure about one thing, how would I transfer all the specific things I need using this method? Do I not need a product id for example? The subscription is created based on what?

weak stone
edgy knot
#

Got it. Thanks for the links, I'll read through them and come back if I still have issues! Thanks a lot for the help.

weak stone
#

NP! ๐Ÿ™‚ Happy to help

#

Good luck

edgy knot
#

Ty!

edgy knot
#

Hey Hanzo! You can close this thread.

I've read through the defer intent docs, however I'd have to change a lot. I'm thinking of using a subscriptions check approach, and if the user has incompleted subscription objects and a currency change is detected (compared to last subscription object, if existent) then I just delete his incompleted intents. Not the most efficient way but I think is alright for a MVP (that I can improve later).

#

As long as it's possible to delete "incompleted" subscriptions then I can try to fix it this way for the moment, but I'll definitely save those docs so I can improve the system later.

#

Thanks once again.

weak stone
#

NP! ๐Ÿ™‚ Good luck