-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webhook event payload for account.application.authorized / account.application.deauthorized has incorrect API version #928
Comments
Thanks for the report! We're tracking the issue internally; it's a bug on our end. I don't have an ETA for the fix, but it is on our list. |
Just circling to check if there is any progress on this issue? It's definitely very counter intuitive. |
Unfortunately I still don't have an ETA. The issue is owned by another team and this hasn't made it into their current prioritization yet. I've bumped the ticket internally to see if they can move it up. |
We've encountered this issue as well. @clement911, thanks for submitting this issue, and did you find a reasonable workaround? Is there any progress on resolving this, @gabrielhurley-stripe? |
I don't see this as a bug as we perform actions on the user's invoice metadata to indicate if the item is unshipped. We require the user's API version to perform the correct action on our connected accounts. For example: import Stripe from 'stripe'
const stripe = new Stripe(process.env.STRIPE_API_KEY!);
// Receive event here with additional logic
const perhapsMarkInvoiceUnshipped = async (event: Stripe.Event) => {
if (event.type === 'invoice.created' && event.account && event.api_version) {
if (event.data.object.shipping_cost) {
await markInvoiceAsUnshipped(event.account, event.data.object.id, event.api_version)
}
}
}
const markInvoiceAsUnshipped = async (accountId: string, invoiceId: string, apiVersion: string) => {
const invoice = await stripe.invoices.update(invoiceId,
{
metadata: {
"ship_status": "unshipped"
}
},
{
stripeAccount: accountId,
apiVersion: apiVersion
}
);
} |
Thanks for the example. We'll take a closer look. For more information, we are using the Stripe At least in the
Example of the exception:
I think it still should be classified as a bug based on this. |
This is definitely a bug and it is has nothing to do with invoices or with the .NET library. |
Even though our webhook endpoints are pinned to a specific API version, whenever we received events for account.application.authorized / account.application.deauthorized , it seems that the api version field has the value of the account that is being authorized/deauthorized instead of the value of our pinned webhook API version.
The text was updated successfully, but these errors were encountered: