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

@stripe/stripe-js

Package Overview
Dependencies
Maintainers
16
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.49.0 to 1.50.0

2

dist/pure.esm.js

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

name: 'stripe-js',
version: "1.49.0",
version: "1.50.0",
startTime: startTime

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

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

name: 'stripe-js',
version: "1.49.0",
version: "1.50.0",
startTime: startTime

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

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

name: 'stripe-js',
version: "1.49.0",
version: "1.50.0",
startTime: startTime

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

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

name: 'stripe-js',
version: "1.49.0",
version: "1.50.0",
startTime: startTime

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

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

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

@@ -0,1 +1,2 @@

import {StripeElement, StripeElements} from '../stripe-js';
import {Metadata, MetadataParam, Address} from './shared';

@@ -319,2 +320,43 @@

export interface CreatePaymentMethodFromElements {
/**
* The Elements instance
*
* @docs https://stripe.com/docs/js/elements_object
*/
elements: StripeElements;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export interface CreatePaymentMethodFromElement {
/**
* The specific Element used to collect payment details
*
* @docs https://stripe.com/docs/js/element
*/
element: StripeElement;
/**
* Parameters that will be passed on to the PaymentMethod API
*
* @docs https://stripe.com/docs/api/payment_methods/create
*/
params?: PaymentMethodCreateParams;
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: MetadataParam;
}
export namespace PaymentMethodCreateParams {

@@ -321,0 +363,0 @@ export interface BillingDetails {

@@ -53,2 +53,3 @@ import {

} from './elements';
import {StripeError} from './stripe';

@@ -68,2 +69,8 @@ export interface StripeElements {

/**
* Before confirming payment, call elements.submit() to validate the state of the
* Payment Element and collect any data required for wallets.
*/
submit(): Promise<{error?: StripeError}>;
/////////////////////////////

@@ -624,3 +631,3 @@ /// address

*/
export interface StripeElementsOptions {
interface BaseStripeElementsOptions {
/**

@@ -647,9 +654,2 @@ * An array of custom fonts, which elements created from the `Elements` object can use.

/**
* The client secret for a PaymentIntent or SetupIntent used by the Payment Element.
*
* @docs https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
*/
clientSecret?: string;
/**
* Display skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.

@@ -671,2 +671,50 @@ * Supported for the `payment`, `shippingAddress`, and `linkAuthentication` Elements.

export interface StripeElementsOptionsClientSecret
extends BaseStripeElementsOptions {
/**
* The client secret for a PaymentIntent or SetupIntent used by the Payment Element.
*
* @docs https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
*/
clientSecret?: string;
}
export interface StripeElementsOptionsMode extends BaseStripeElementsOptions {
/**
* Whether the Payment Element will be used to create a PaymentIntent, SetupIntent, or Subscription.
*/
mode?: 'payment' | 'setup' | 'subscription';
/**
* Three character currency code (e.g., usd).
*/
currency?: string;
/**
* The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
*/
amount?: number;
/**
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
*
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
*/
setup_future_usage?: 'off_session' | 'on_session';
/**
* Controls when the funds will be captured from the customer’s account.
*
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
*/
capture_method?: 'manual' | 'automatic';
/**
* Instead of using automatic payment methods, declare specific payment methods to enable.
*
* @docs https://stripe.com/docs/payments/payment-methods/overview
*/
payment_method_types?: string[];
}
/*

@@ -690,2 +738,38 @@ * Updatable options for an `Elements` instance

appearance?: Appearance;
/**
* Whether the Payment Element will be used to create a PaymentIntent, SetupIntent, or Subscription.
*/
mode?: 'payment' | 'setup' | 'subscription';
/**
* Three character currency code (e.g., usd).
*/
currency?: string;
/**
* The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
*/
amount?: number;
/**
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
*
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
*/
setup_future_usage?: 'off_session' | 'on_session';
/**
* Controls when the funds will be captured from the customer’s account.
*
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
*/
capture_method?: 'manual' | 'automatic';
/**
* Instead of using automatic payment methods, declare specific payment methods to enable.
*
* @docs https://stripe.com/docs/payments/payment-methods/overview
*/
payment_method_types?: string[];
}

@@ -692,0 +776,0 @@

@@ -112,3 +112,3 @@ import {

*/
update(options: Partial<StripeCardElementOptions>): void;
update(options: StripeCardElementUpdateOptions): void;
};

@@ -150,4 +150,46 @@

disabled?: boolean;
/**
* Hides and disables the Link Button in the Card Element.
* Default is false.
*/
disableLink?: boolean;
}
export interface StripeCardElementUpdateOptions {
classes?: StripeElementClasses;
style?: StripeElementStyle;
/**
* A pre-filled set of values to include in the input (e.g., `{postalCode: '94110'}`).
* Note that sensitive card information (card number, CVC, and expiration date) cannot be pre-filled.
*/
value?: {postalCode?: string};
/**
* Hide the postal code field.
* Default is `false`.
* If you are already collecting a full billing address or postal code elsewhere, set this to `true`.
*/
hidePostalCode?: boolean;
/**
* Appearance of the icon in the Element.
*/
iconStyle?: 'default' | 'solid';
/**
* Hides the icon in the Element.
* Default is `false`.
*/
hideIcon?: boolean;
/**
* Applies a disabled state to the Element such that user input is not accepted.
* Default is false.
*/
disabled?: boolean;
}
export interface StripeCardElementChangeEvent extends StripeElementChangeEvent {

@@ -154,0 +196,0 @@ /**

@@ -129,2 +129,7 @@ import {StripeElementBase, StripeElementClasses} from './base';

height?: string;
/**
* The gap between buttons when multile buttons are shown. Accepts px unit values.
*/
buttonSpacing?: string;
};

@@ -137,2 +142,8 @@ };

paymentRequest: PaymentRequest;
/**
* Disable showing multiple buttons.
* Default is `false`.
*/
disableMultipleButtons?: boolean;
}

@@ -139,0 +150,0 @@

@@ -44,2 +44,7 @@ import {

export {
CreatePaymentMethodFromElement,
CreatePaymentMethodFromElements,
} from '../api';
export interface CreatePaymentMethodAlipayData

@@ -127,3 +132,4 @@ extends PaymentMethodCreateParams {

interface CreatePaymentMethodCashappData extends PaymentMethodCreateParams {
export interface CreatePaymentMethodCashappData
extends PaymentMethodCreateParams {
type: 'cashapp';

@@ -657,3 +663,3 @@ }

*/
interface ConfirmCashappPaymentData extends PaymentIntentConfirmParams {
export interface ConfirmCashappPaymentData extends PaymentIntentConfirmParams {
/**

@@ -676,3 +682,3 @@ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).

*/
interface ConfirmCashappPaymentOptions {
export interface ConfirmCashappPaymentOptions {
/**

@@ -679,0 +685,0 @@ * Set this to `false` if you want to [manually handle the authorization QR code or redirect](https://stripe.com/docs/payments/cash-app-pay/accept-a-payment?platform=web&ui=API#handle-redirect).

@@ -45,3 +45,3 @@ import {SetupIntentConfirmParams} from '../api';

interface ConfirmCashappSetupData extends SetupIntentConfirmParams {
export interface ConfirmCashappSetupData extends SetupIntentConfirmParams {
/*

@@ -48,0 +48,0 @@ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.

Sorry, the diff of this file is too big to display

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