Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stripe/stripe-js

Package Overview
Dependencies
Maintainers
14
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stripe/stripe-js - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

2

dist/pure.esm.js

@@ -57,3 +57,3 @@ function _typeof(obj) {

name: 'stripe-js',
version: "1.9.0",
version: "1.10.0",
startTime: startTime

@@ -60,0 +60,0 @@ });

@@ -61,3 +61,3 @@ 'use strict';

name: 'stripe-js',
version: "1.9.0",
version: "1.10.0",
startTime: startTime

@@ -64,0 +64,0 @@ });

@@ -41,3 +41,3 @@ var V3_URL = 'https://js.stripe.com/v3';

name: 'stripe-js',
version: "1.9.0",
version: "1.10.0",
startTime: startTime

@@ -44,0 +44,0 @@ });

@@ -45,3 +45,3 @@ 'use strict';

name: 'stripe-js',
version: "1.9.0",
version: "1.10.0",
startTime: startTime

@@ -48,0 +48,0 @@ });

{
"name": "@stripe/stripe-js",
"version": "1.9.0",
"version": "1.10.0",
"description": "Stripe.js loading utility",

@@ -5,0 +5,0 @@ "main": "dist/stripe.js",

@@ -26,5 +26,7 @@ # Stripe.js ES Module

This function returns a `Promise` that resolves with a newly created `Stripe`
object once Stripe.js has loaded. If necessary, it will load Stripe.js for you
by inserting the Stripe.js script tag. If you call `loadStripe` in a server
environment it will resolve to `null`.
object once Stripe.js has loaded. It takes the same parameters passed when
directly
[initializing a `Stripe` instance](https://stripe.com/docs/js/initializing). If
necessary, it will load Stripe.js for you by inserting the Stripe.js script tag.
If you call `loadStripe` in a server environment it will resolve to `null`.

@@ -41,3 +43,3 @@ ```js

For more information on how to use Stripe.js once it loads, please refer to the
For more information on how to use Stripe.js, please refer to the
[Stripe.js API reference](https://stripe.com/docs/js) or learn to

@@ -137,3 +139,3 @@ [accept a payment](https://stripe.com/docs/payments/accept-a-payment) with

- [Stripe.js Docs](https://stripe.com/docs/stripe-js)
- [Stripe.js Reference](https://stripe.com/docs/api)
- [Stripe.js Reference](https://stripe.com/docs/js)
- [React Stripe.js Docs](https://stripe.com/docs/stripe-js/react)

@@ -170,5 +170,5 @@ declare module '@stripe/stripe-js' {

* Available for the `idealBank` element.
* Accepts integer `px` values.
* Accepts integer length with `px` unit as values.
*/
padding?: number;
padding?: string;

@@ -175,0 +175,0 @@ /**

@@ -218,2 +218,18 @@ ///<reference path='./checkout.d.ts' />

/**
* Use `stripe.confirmSofortPayment` in the [Sofort Payments with Payment Methods](https://stripe.com/docs/payments/sofort) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide. It will then automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_sofort_payment
*/
confirmSofortPayment(
clientSecret: string,
data?: ConfirmSofortPaymentData
): Promise<{paymentIntent?: PaymentIntent; error?: StripeError}>;
/**
* Use `stripe.handleCardAction` in the Payment Intents API [manual confirmation](https://stripe.com/docs/payments/payment-intents/web-manual) flow to handle a [PaymentIntent](https://stripe.com/docs/api/payment_intents) with the `requires_action` status.

@@ -289,3 +305,2 @@ * It will throw an error if the `PaymentIntent` has a different status.

* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
* These use cases are detailed in the sections that follow.
*

@@ -316,2 +331,20 @@ * @docs https://stripe.com/docs/js/setup_intents/confirm_bacs_debit_setup

/**
* Use `stripe.confirmIdealSetup` in the [Set up future payments](https://stripe.com/docs/payments/ideal/set-up-payment) flow to use iDEAL bank details to set up a SEPA Direct Debit payment method for future payments.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/ideal/set-up-payment) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_ideal_setup
*/
confirmIdealSetup(
clientSecret: string,
data?: ConfirmIdealSetupData
): Promise<{setupIntent?: SetupIntent; error?: StripeError}>;
/**
* Use `stripe.confirmSepaDebitSetup` in the [SEPA Direct Debit with Setup Intents](https://stripe.com/docs/payments/sepa-debit-setup-intents) flow when the customer submits your payment form.

@@ -333,2 +366,18 @@ * When called, it will confirm the `SetupIntent` with `data` you provide.

/*
* Use `stripe.confirmSofortSetup` in the [Set up future payments](https://stripe.com/docs/payments/sofort/set-up-payment) flow to use SOFORT bank details to set up a SEPA Direct Debit payment method for future payments.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/sofort/set-up-payment) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*/
confirmSofortSetup(
clientSecret: string,
data?: ConfirmSofortSetupData
): Promise<{setupIntent?: SetupIntent; error?: StripeError}>;
/**

@@ -509,2 +558,10 @@ * Retrieve a [SetupIntent](https://stripe.com/docs/api/setup_intents) using its client secret.

locale?: StripeElementLocale | CheckoutLocale;
/**
* Opt-in to prerelease Stripe.js features by passing `betas` when instantiating a `Stripe` object.
*
* Supported values for the `betas` option can be found in integration guides for prerelease features.
* Most users of Stripe.js do not pass this option.
*/
betas?: string[];
}

@@ -511,0 +568,0 @@

@@ -15,3 +15,4 @@ declare module '@stripe/stripe-js' {

| CreatePaymentMethodFpxData
| CreatePaymentMethodSepaDebitData;
| CreatePaymentMethodSepaDebitData
| CreatePaymentMethodSofortData;

@@ -26,3 +27,3 @@ interface CreatePaymentMethodAlipayData extends PaymentMethodCreateParams {

/*
/**
* The customer's billing details.

@@ -47,3 +48,3 @@ * `name` is required.

/*
/**
* The customer's billing details.

@@ -75,3 +76,3 @@ * `name` is required.

/*
/**
* The customer's billing details.

@@ -103,3 +104,3 @@ * `name` is required.

/*
/**
* The customer's billing details.

@@ -127,3 +128,3 @@ * `email` is required.

/*
/**
* The customer's billing details.

@@ -140,2 +141,21 @@ * `name` and `email` are required.

interface CreatePaymentMethodSofortData extends PaymentMethodCreateParams {
type: 'sofort';
sofort: {
/**
* The country code where customer's bank is located.
*/
country: string;
};
/**
* The customer's billing details.
* Required when `setup_future_usage` is set to `off_session`.
*
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
*/
billing_details?: PaymentMethodCreateParams.BillingDetails;
}
interface CreatePaymentMethodAuBecsDebitData

@@ -167,3 +187,3 @@ extends PaymentMethodCreateParams {

/*
/**
* The customer's billing details.

@@ -195,3 +215,3 @@ * `name` and `email` are required.

/*
/**
* The customer's billing details.

@@ -219,3 +239,3 @@ * `name`, `email`, and `address` are required.

interface ConfirmBancontactPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -241,3 +261,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmAlipayPaymentData extends PaymentIntentConfirmParams {
/*
/**
* The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).

@@ -262,3 +282,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.

interface ConfirmAlipayPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/alipay/accept-a-payment#handle-redirect).

@@ -274,3 +294,3 @@ * Default is `true`.

interface ConfirmBancontactPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/bancontact#handle-redirect).

@@ -287,3 +307,3 @@ * Default is `true`.

interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -301,3 +321,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmCardPaymentOptions {
/*
/**
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).

@@ -314,3 +334,3 @@ * Default is `true`.

interface ConfirmEpsPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -335,3 +355,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmEpsPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/eps#handle-redirect).

@@ -348,3 +368,3 @@ * Default is `true`.

interface ConfirmSepaDebitPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -369,3 +389,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmFpxPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -390,3 +410,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmFpxPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/fpx#handle-redirect).

@@ -403,3 +423,3 @@ * Default is `true`.

interface ConfirmGiropayPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -424,3 +444,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmGiropayPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/giropay#handle-redirect).

@@ -437,3 +457,3 @@ * Default is `true`.

interface ConfirmIdealPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -458,3 +478,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmIdealPaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).

@@ -471,3 +491,3 @@ * Default is `true`.

interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -492,3 +512,3 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

interface ConfirmP24PaymentOptions {
/*
/**
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).

@@ -501,2 +521,30 @@ * Default is `true`.

/**
* Data to be sent with a `stripe.confirmSofortPayment` request.
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
*/
interface ConfirmSofortPaymentData extends PaymentIntentConfirmParams {
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
*
* @recommended
*/
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
/**
* The url your customer will be directed to after they complete authentication.
*
* @recommended
*/
return_url?: string;
/**
* To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment, set this parameter to `off_session`.
* When using this parameter, a `customer` will need to be set on the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
* The newly created SEPA Direct Debit [PaymentMethod](https://stripe.com/docs/api/payment_methods) will be attached to this customer.
*/
setup_future_usage?: 'off_session';
}
/**
* Data to be sent with a `stripe.confirmAuBecsDebitPayment` request.

@@ -506,3 +554,3 @@ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.

interface ConfirmAuBecsDebitPaymentData extends PaymentIntentConfirmParams {
/*
/**
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

@@ -509,0 +557,0 @@ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.

@@ -28,2 +28,16 @@ declare module '@stripe/stripe-js' {

/**
* Data to be sent with a `stripe.confirmIdealSetup` request.
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
*/
interface ConfirmIdealSetupData extends SetupIntentConfirmParams {
/*
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
*
* @recommended
*/
payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
}
/**
* Data to be sent with a `stripe.confirmSepaDebitSetup` request.

@@ -43,2 +57,16 @@ * Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.

/**
* Data to be sent with a `stripe.confirmSofortSetup` request.
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
*/
interface ConfirmSofortSetupData extends SetupIntentConfirmParams {
/*
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
*
* @recommended
*/
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
}
/**
* Data to be sent with a `stripe.confirmAuBecsDebitSetup` request.

@@ -45,0 +73,0 @@ * Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.

@@ -80,3 +80,3 @@ declare module '@stripe/stripe-js' {

account_holder_name: string;
account_holder_name?: string;

@@ -83,0 +83,0 @@ account_holder_type: string;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc