#joshualaba
1 messages · Page 1 of 1 (latest)
👋 how may I help?
hello... i need some help. previously i did not encounter this error on "stripe": "11.9.1", but currently on "stripe": "^13.4.0", i am having the following issue:
import { Stripe } from 'stripe';
export type PaymentEvent = Stripe.Event;
event: PaymentEvent
When I enter: event.data.object.id
Property 'id' does not exist on type 'Object'.
would you mind elaborating please?
i am getting shown the above error that id does not exist on type object?
for the new stripe version 13.4
is there somethign wrong with the packge
would you mind sharing your code?
it is exactly as i sentt u?
import { Stripe } from 'stripe';
export type PaymentEvent = Stripe.Event;
func1(event: PaymentEvent) {
console.log(event.data.object.id)
}
Error: Property 'id' does not exist on type 'Object'.
this is a known issue https://github.com/stripe/stripe-node/issues/758#issuecomment-580027514
you need to cast event.data.object to the corresponding Stripe object type
based on the event.type
yes
alright cool,anyway this works thank you
let me know if you need any more help