You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been using this package for a long time, but we noticed that some Typescript types are missing, more specifically - confirming the "card" payment intents by following this manual.
Stripe version: 8.186.0
Typescript version: 4.3.5
payment_method_data.type doesn't accept card as a valid value, and Typescript compilation fails. Up until this point we were using @ts-ignore comment to skip this call from TS errors, but I'm afraid it may ignore some upcoming changes that we need to be aware of.
The text was updated successfully, but these errors were encountered:
@Borales Today we don't have types for card payments as this hash can also take raw card details (like number and CVC) which is strongly discouraged as it has PCI implications (see doc). It agree it'd be helpful to support passing those masterpass details and other related parameters though so we might do this in the future. Tagging as future and assigning to @richardm-stripe to look into this
@remi-stripe is it an experimental payment method or something?
You could still add types for Card type with the cart_id and transaction_id (omitting the variant with the raw card details), since the described snippet is in the official documentation, the API can handle these requests, so it's just the package itself that blocks the usage of it (well, mostly breaks the TS checks).
You could still add types for Card type with the cart_id and transaction_id (omitting the variant with the raw card details)
We could and should! It's just a bit more complex than it appears to be from the outside and so for now we've defaulted to no types for the card hash just yet. We definitely need to improve this but it's not a higher priority compared to a lot of new core features we're working on as it doesn't block any integration from using this. You can disable type signature for that one case.
The API is stable and you can use it without worry about this changing, it's just a legacy limitation we haven't gotten around to fix just yet in the Typescript definitions.
We have been using this package for a long time, but we noticed that some Typescript types are missing, more specifically - confirming the "card" payment intents by following this manual.
Stripe version:
8.186.0
Typescript version:
4.3.5
payment_method_data.type
doesn't acceptcard
as a valid value, and Typescript compilation fails. Up until this point we were using@ts-ignore
comment to skip this call from TS errors, but I'm afraid it may ignore some upcoming changes that we need to be aware of.The text was updated successfully, but these errors were encountered: