React Stripe Elements Versions Save

Moved to stripe/react-stripe-js.

v4.0.1

4 years ago

Bug Fixes

  • Fixes a bug where calling stripe.handleCardPayment with only a client secret caused an error to be thrown.

v4.0.0

4 years ago

New Features

  • Renamed CardCVCElement to CardCvcElement which better mirrors the Elements API. We will keep the old component name around as an alias until 5.0.0.

  • Added support for stripe.handleCardSetup

      stripe.handleCardSetup(
        clientSecret: string,
        data?: Object
      ): Promise<{error?: Object, setupIntent?: Object}>
    

    For more information, please review the Stripe Docs:

Deprecations

  • CardCVCElement has been renamed to CardCvcElement. CardCVCElement will be removed in version 5.0.0.

Breaking Changes

  • If you were already using handleCardSetup with react-stripe-elements, you should upgrade your integration. This method will now automatically find and use valid Elements.

    Old Way

    <CardElement
      ...
      onReady={this.handleReady}
    />
    
    handleReady = (element) => {
      this.setState({cardElement: element}) ;
    };
    
    const {setupIntent, error} = await this.props.stripe.handleCardSetup(
      intent.client_secret, this.state.cardElement, {}
    );
    

    New Way

    <CardElement />;
    
    const {setupIntent, error} = await this.props.stripe.handleCardSetup(
      intent.client_secret,
      {}
    );
    

v3.0.0

5 years ago

New Features

  • added a changelog
  • added support for stripe.handleCardPayment and stripe.createPaymentMethod. These methods allow you to easily integrate Stripe's new Payment Intents API. Like createToken and createSource, these new methods will automatically find and use a corresponding Element when they are called.
      stripe.createPaymentMethod(
        paymentMethodType: string,
        paymentMethodDetails: Object
      ): Promise<{error?: Object, paymentIntent?: Object}>
    
      stripe.handleCardPayment(
        clientSecret: string,
        paymentMethodDetails: Object
      ): Promise<{error?: Object, paymentIntent?: Object}>
    
    For more information, please review the Stripe Docs:

Breaking Changes:

  • If you were already using handleCardPayment or createPaymentMethod with react-stripe-elements, you should upgrade your integration. These methods will now automatically find and use valid Elements.

    Old Way

    <CardElement
      ...
      onReady={this.handleReady}
    />
    
    handleReady = (element) => {
      this.setState({cardElement: element}) ;
    };
    
    let { paymentIntent, error } = await this.props.stripe.handleCardPayment(
      intent.client_secret, this.state.cardElement, {}
    );
    

    New Way

    <CardElement />
    
    let { paymentIntent, error } = await this.props.stripe.handleCardPayment(
      intent.client_secret, {}
    );
    
  • Passing a beta flag to Stripe.js to use one of the PaymentIntents betas is not supported.

    Old Way

    // Old Way
    const stripe = window.Stripe(
      publicKey,
      {betas: ['payment_intent_beta_3']},
    );
    
    <StripeProvider stripe={stripe}>
      <YourCheckoutComponent>
    </StripeProvider>
    

    New Way

    <StripeProvider apiKey={publicKey}>
      <YourCheckoutComponent>
    </StripeProvider>
    
  • PostalCodeElement has been removed. Users are suggested to build their own postal code input.

v2.0.3

5 years ago
  • Fixes a bug where the elements.update event was triggered far too often, incorrectly, when an Element was repeatedly rendered with the same options (#304)
  • Actually is the expected release of master, fixing the bad release of v2.0.2.

v2.0.2

5 years ago

(This release was tagged mistakenly and should not be used. Sorry for the confusion.)

v2.0.1

5 years ago

Bug fixes

  • The Element higher-order component now reports a proper displayName, which is more useful for debugging. (Thanks @emilrose!)

    See #220 for more.

v2.0.0

6 years ago

New Features

  • Support for the IbanElement and IdealBankElement.

Breaking Changes

  • stripe.createSource now requires the Source type be passed in.

    For example, if you previously called stripe.createSource({ name: 'Jenny Rosen' }), you now must use stripe.createSource({ type: 'card', name: 'Jenny Rosen' }).

  • elementRef is no longer a valid prop you can pass to an <Element />. Use onReady instead to get a reference to the underlying Element instance.

v1.7.0

6 years ago

Deprecations

  • createSource automatically infers the type of Source to create based on which Elements are in use. This behavior is now deprecated, and the Source type will be required in version 2.0.0.

v1.6.0

6 years ago

Deprecations

  • The elementRef callback is deprecated and will be removed in version 2.0.0.
    • Use onReady instead, which is the exact same.

Bug fixes

  • The id prop from v1.5.0 was absent from the PaymentRequestButtonElement. Now, the PaymentRequestButtonElement behaves like all the other *Element components.

v1.5.0

6 years ago

New features

  • (#177 / #178) The *Element classes learned a new id prop. This can be used to set the ID of the underlying DOM Element.