#Nancy-webhook-api-versions
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- Nancy, 5 days ago, 33 messages
- nancy-invoice-event, 5 days ago, 15 messages
So when i run the code in our default - 2017 version it works, but when I change the setting to latest it error 404.
I tried different ways to fix it by specifiying the api version, but still running into error.
Can you share more about how you're doing this?
And can you provided an example test event ID that failed delivery which i can inspect?
try {
await stripe.subscriptions.create({
customer: customerID,
items: [
{
price: subscriptionPriceID,
},
],
metadata: {
'Student Name': 'Test LastName',
},
});
} catch (err) {
console.log(`********ERROR**************${err}`);
}
};
createSubscription();
i am testing a simple create subscription event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Taking a look at that example, thanks
Ok, i see you created a new endpoint with the latest API version here: https://dashboard.stripe.com/test/logs/req_1MJLKAZiu529w5
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Your server is returning this 404 error and an indication that the endpoint can't be reached
You'll need ot investigate why it's doing that in your code and server logs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /webhook/stripe</pre>
</body>
</html>
That's the response body from your server
gotcha
does the version of API matter?
cuz it works when I am on 2017 which is our default version and I am testing a new webhook with 2023 and it does work
I don't see why the API version of the event request would matter, but it's possible your code rejects objects with an unexpected structure with 404
Can you share your webhook endpoint code?
Sorry, found the error!
I have another question, can you by any chance update the webhooks api version once it's created?
No, that's immutable, you'd need to create a new endpoint to set a different API version