#MidnightCrow
1 messages ยท Page 1 of 1 (latest)
Can you elaborate? What's not working? What error message do you see?
Argument of type '{ elements: StripeElements | undefined; params: { billing_details: { name: string; }; }; }' is not assignable to parameter of type 'CreatePaymentMethodData'.
Object literal may only specify known properties, and 'elements' does not exist in type 'CreatePaymentMethodData'.
I'm trying to follow the payment elements docs https://stripe.com/docs/payments/finalize-payments-on-the-server
and it says you can pass the elements into the creatPaymentMethods, but the types don't match up
any clue why these types would not match?
Hello ๐
Hello hanzo, ty for your time
If you console.log elements, what are you seeing there?
and just to confirm, you're seeing this warning/error in your editor correct? Not actually while you run the code?
It won't let me compile because of the error, I can't print it out now but the type of the elements is in the error
elements: StripeElements | undefined
I see. Let me take a look
yeah not sure why the other functions are getting overridden here
Passing the elements object should use CreatePaymentMethodFromElement type instead
๐ hopping in here as well - @muted crypt do you know what version of the stripejs module you have downloaded?
@stripe/stripe-js": "^1.48.0"
That's the issue then - you need to be on at least 1.50.0 (https://github.com/stripe/stripe-js/releases/tag/v1.50.0) which is the first version where we updated the types for the deferred intent flows