#evan-stripejs-types
1 messages · Page 1 of 1 (latest)
Hi 👋
Is this an error or a warning? Does it block rendering of the payment element?
It is not blocking the payment element from rendering
this is the options am passing to the elements
const options: StripeElementsOptions = {
mode: 'subscription',
amount: selectedPlan.price * 100,
currency: selectedPlan.currency.toLowerCase(),
paymentMethodCreation: 'manual',
appearance: {
theme: 'stripe',
variables: {
colorPrimaryText: '#EAAA00',
colorPrimary: '#EAAA00'
}
}
}
Okay then it's just a warning suggesting best practices. You can ignore it
I also get
terms: {
applePay: 'never',
googlePay: 'never',
paypal: 'never',
card: 'never'
}
typescript complaining about setting the terms of applePay to false
Type '{ applePay: string; googlePay: string; paypal: string; card: "never"; }' is not assignable to type 'TermsOption'.
Object literal may only specify known properties, and 'applePay' does not exist in type 'TermsOption'.
I have the latest version of stripe
When creating the Payment Element?
yes
although in the doc
https://stripe.com/docs/js/elements_object/create_payment_element
I can see that applePay is one of the options
Yes and you can see here: https://github.com/stripe/stripe-js/blob/master/tests/types/src/valid.ts#L385, it is included in our valid tests
evan-stripejs-types