#evan-stripejs-types

1 messages · Page 1 of 1 (latest)

red viperBOT
slim knot
#

Hi 👋

Is this an error or a warning? Does it block rendering of the payment element?

tranquil glade
#

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'
      }
    }
  }
slim knot
#

Okay then it's just a warning suggesting best practices. You can ignore it

tranquil glade
#

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

slim knot
#

When creating the Payment Element?

tranquil glade
#

yes

#

I can see that applePay is one of the options

slim knot
red viperBOT
tranquil glade
#

No worries, thanks, I had to upgrade @stripe/stripe-js

#

Thanks for the followup

bold grove
#

evan-stripejs-types