#Dara

1 messages ยท Page 1 of 1 (latest)

median pulsarBOT
icy wedge
crisp shadow
#

Thanks. If the backend function code doesn't need to change, what is the trick to not break the flow of events in live mode?

icy wedge
#

What do you mean by what is the trick to not break the flow of events in live mode??

crisp shadow
#

Because I have to disable the old webhook and enable the new webhook manually. I would think some events would be bypassed. So, we have to monitor them and fix manually if there are?

icy wedge
#

You do not need to disable the old one, you can create the new one and then disable the old one so you do not miss any events.

crisp shadow
#

Ok, I'll try to do that. Thanks. Because no where in the documentation mention that this problem.

median pulsarBOT
crisp shadow
#

Another question I have is that we opened another account for another country the business is moving too. Would you have suggestion on handling code that manage 2 set of API keys?

#

Especially the webhooks. Because the object data doesn't include the account info at all.

edgy totem
#

๐Ÿ‘‹ hopping in here since pgskc has to head out soon

#

We don't have any specific suggestions for handling the two API keys - it'll depend on how your code is set up/how your integration works

#

For the webhooks, you could have the same URL with a diffferent URL parameter so you can check that any know which account it's for

crisp shadow
#

Oh, that's not a bad idea. Can you please be more specific about the URL parameter like /?stripeAccount=""?

#

I thought at first you said about 2 server endpoints with same code. lol

edgy totem
crisp shadow
#

That's clever! It's just the info I needed.

edgy totem
#

๐Ÿ‘

crisp shadow
#

If I use the Stripe account code, it is a breach? Is it supposed to be confidential?

#

It starts with acct_

edgy totem
#

It's not a breach, but I personally wouldn't recommend it (you can never be too careful)

crisp shadow
#

Ok good point. I had the same thought.

#

It's good. I can use the right key by knowing which account it came from. Then, pass some request. Normally, I wouldn't need to but I have to retrieve the expanded price object to save the recurrent amount of the subscription in my database. Thus, I wanted to know if changing the API version of the webhook would allow me to avoid the retrieve price request.

#

On the database, I'll just add a stripeAccount field on the user record.

edgy totem
#

I don't think an api version update would help in this case, but I'd need more details

crisp shadow
#

It's fine, I'll run some webhook test with the new API version and compare the output with text-compare.com, and I'll know if it'll help my case. lol

edgy totem
#

๐Ÿ‘

crisp shadow
#

Thanks for your help!

#

Just a request idea to allow us to update the API version of the webhook. It'd simplify our life. If not, we'd have to create new ones and disable old ones everytime new versions are updated.