#eleanor

1 messages · Page 1 of 1 (latest)

reef mossBOT
toxic widget
#

Seeing this in stage/dev (subscription_update)

#

but this in prod (subscription_create)

#

It's possible that something is funky with our billing settings between test and live modes, but we can't find any issues yet, so were wondering if you knew why this might be the case! Thanks and lmk if I can provide any other info 🙂

sinful mango
#

Hey there, let let take a look. Can you share those event/invoice IDs here so I can inspect them?

toxic widget
#

oh no is it because our api version of stage is 2018... (this is the only difference I have just noticed)

#

yeah I can get the ids, one sec

#

live: evt_1NLA3OHXmgnvESxQQRXHDv2c

#

test: evt_1NLA3NHXmgnvESxQPp9ESmgt

#

it may very well be the api version thing, in which case, sorry to take up your time

sinful mango
toxic widget
#

no idea how that escaped our upgrade 🤦

#

thanks so much! that'd do it

sinful mango
#

NP!

toxic widget
#

also wait ok so

#

our live mode api is on a later version and we're not sure how to change test mode, actually?

#

when we create our stripe client in-app, we do something like:

export const STRIPE_API_VERSION = '2022-11-15';

const stripe = new Stripe(process.env['STRIPE_SECRET_KEY']!, {
apiVersion: STRIPE_API_VERSION,
timeout: 10000,
});

sinful mango
#

But you do something different in test mode?

toxic widget
#

no, we do that for everything — though I see that even in the production/live screenshot, it says api version 2020-08-27, which also wouldn't make sense since in our code we have it as 2022? I can't find anything in the docs if there's another step we're missing somehow

sinful mango
#

Ah its because of the webhook endpoint api version.
The test mode endpoint is set for API version 2018-09-24 (predating the change)
https://dashboard.stripe.com/webhooks/we_1FcJuPHXmgnvESxQslxUiIte
While the live version is using your account default (2020-08-27)
https://dashboard.stripe.com/webhooks/we_1FfBaZHXmgnvESxQB5oTUH27

#

So you should create a new test mode webhook endpoint using the API version you want to receive events in

reef mossBOT
toxic widget
#

Ah ok, there's no way to change an already-existing endpoint to the latest api version?

woven dove
#

Hello 👋
No, there's no way to update an existing endpoint to a diff version.
You'll need to re-create it

toxic widget
#

ok, thanks!