@stripe/stripe-js
Advanced tools
Comparing version 4.9.0 to 4.10.0
@@ -87,2 +87,5 @@ import {StripeElements} from '../stripe-js'; | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature | ||
@@ -89,0 +92,0 @@ */ |
@@ -45,3 +45,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "4.8.0", | ||
version: "4.6.0", | ||
startTime: startTime | ||
@@ -48,0 +48,0 @@ }); |
@@ -61,3 +61,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "4.8.0", | ||
version: "4.6.0", | ||
startTime: startTime | ||
@@ -64,0 +64,0 @@ }); |
@@ -15,4 +15,2 @@ import { | ||
import { | ||
StripeCurrencySelectorElement, | ||
FieldsOption, | ||
StripeElementBase, | ||
@@ -157,3 +155,2 @@ StripeExpressCheckoutElement, | ||
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null; | ||
images: string[]; | ||
}; | ||
@@ -210,8 +207,2 @@ | ||
export type StripeCustomCheckoutCurrencyOption = { | ||
unitAmount: number; | ||
currency: string; | ||
currencyConversion?: {fxRate: number; sourceCurrency: string}; | ||
}; | ||
/* Custom Checkout session */ | ||
@@ -224,3 +215,2 @@ export interface StripeCustomCheckoutSession { | ||
currency: string; | ||
currencyOptions: Array<StripeCustomCheckoutCurrencyOption> | null; | ||
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null; | ||
@@ -253,3 +243,2 @@ email: string | null; | ||
terms?: TermsOption; | ||
fields?: FieldsOption; | ||
}; | ||
@@ -271,3 +260,2 @@ | ||
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder']; | ||
paymentMethods: StripeExpressCheckoutElementOptions['paymentMethods']; | ||
}; | ||
@@ -414,6 +402,4 @@ | ||
) => Promise<StripeCustomCheckoutResult>; | ||
updatePhoneNumber: ( | ||
phoneNumber: string | ||
) => Promise<StripeCustomCheckoutResult>; | ||
updateEmail: (email: string) => Promise<StripeCustomCheckoutResult>; | ||
updatePhoneNumber: (phoneNumber: string) => void; | ||
updateEmail: (email: string) => void; | ||
updateLineItemQuantity: (args: { | ||
@@ -427,2 +413,3 @@ lineItem: string; | ||
confirm: (args?: { | ||
return_url?: string; | ||
returnUrl?: string; | ||
@@ -446,6 +433,2 @@ redirect?: StripeCustomCheckoutRedirectBehavior; | ||
): StripeCustomCheckoutExpressCheckoutElement | null; | ||
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */ | ||
getElement( | ||
elementType: 'currencySelector' | ||
): StripeCurrencySelectorElement | null; | ||
createElement( | ||
@@ -463,4 +446,2 @@ elementType: 'payment', | ||
): StripeCustomCheckoutExpressCheckoutElement; | ||
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */ | ||
createElement(elementType: 'currencySelector'): StripeCurrencySelectorElement; | ||
} |
import { | ||
StripeAddressElement, | ||
StripeAddressElementOptions, | ||
StripeCurrencySelectorElement, | ||
StripeShippingAddressElement, | ||
@@ -336,2 +335,5 @@ StripeShippingAddressElementOptions, | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Creates a `LinkAuthenticationElement`. | ||
@@ -345,2 +347,5 @@ */ | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Looks up a previously created `Element` by its type. | ||
@@ -500,3 +505,2 @@ */ | ||
| 'cardCvc' | ||
| 'currencySelector' | ||
| 'epsBank' | ||
@@ -533,3 +537,2 @@ | 'expressCheckout' | ||
| StripeP24BankElement | ||
| StripeCurrencySelectorElement | ||
| StripeExpressCheckoutElement | ||
@@ -536,0 +539,0 @@ | StripePaymentElement |
@@ -11,3 +11,2 @@ export * from './address'; | ||
export * from './card'; | ||
export * from './currency-selector'; | ||
export * from './eps-bank'; | ||
@@ -14,0 +13,0 @@ export * from './express-checkout'; |
@@ -120,27 +120,2 @@ import {StripeElementBase} from './base'; | ||
/** | ||
* The change event is triggered when the `Element`'s value changes. | ||
* Represents the details of a selected Card payment method. | ||
*/ | ||
on( | ||
eventType: 'carddetailschange', | ||
handler: (event: StripePaymentElementCardDetailsChangeEvent) => any | ||
): StripePaymentElement; | ||
/** | ||
* Triggered when a Saved Payment Method is updated. | ||
*/ | ||
on( | ||
eventType: 'savedpaymentmethodupdate', | ||
handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any | ||
): StripePaymentElement; | ||
/** | ||
* Triggered when a Saved Payment Method is removed. | ||
*/ | ||
on( | ||
eventType: 'savedpaymentmethodremove', | ||
handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any | ||
): StripePaymentElement; | ||
/** | ||
* Updates the options the `PaymentElement` was initialized with. | ||
@@ -187,3 +162,2 @@ * Updates are merged into the existing configuration. | ||
| FieldOption | ||
| 'if_required' | ||
| { | ||
@@ -328,110 +302,1 @@ country?: FieldOption; | ||
} | ||
type CardBrand = | ||
| 'amex' | ||
| 'diners' | ||
| 'discover' | ||
| 'eftpos_au' | ||
| 'jcb' | ||
| 'mastercard' | ||
| 'unionpay' | ||
| 'visa' | ||
| 'unknown'; | ||
type CardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown'; | ||
export interface StripePaymentElementCardDetailsChangeEvent { | ||
/** | ||
* The type of element that emitted this event. | ||
*/ | ||
elementType: 'payment'; | ||
/** | ||
* `true` when the card details are loading. | ||
*/ | ||
loading: boolean; | ||
/** | ||
* The card details for the selected payment method. | ||
* Undefined while loading and for non card payment methods. | ||
*/ | ||
details?: { | ||
brands: CardBrand[] | null; | ||
funding: CardFunding | null; | ||
}; | ||
} | ||
export interface StripePaymentElementSavedPaymentMethodUpdateEvent { | ||
/** | ||
* The type of element that emitted this event. | ||
*/ | ||
elementType: 'payment'; | ||
/** | ||
* `true` when the saved payment method is successfully updated. | ||
*/ | ||
success: boolean; | ||
/** | ||
* Error message if the saved payment method update fails. | ||
*/ | ||
error?: string; | ||
/** | ||
* The updated saved payment method. | ||
*/ | ||
payment_method: { | ||
id: string; | ||
type: string; | ||
billing_details: { | ||
address: { | ||
city: null | string; | ||
country: null | string; | ||
line1: null | string; | ||
line2: null | string; | ||
postal_code: null | string; | ||
state: null | string; | ||
}; | ||
name: null | string; | ||
email: null | string; | ||
phone: null | string; | ||
}; | ||
}; | ||
} | ||
export interface StripePaymentElementSavedPaymentMethodRemoveEvent { | ||
/** | ||
* The type of element that emitted this event. | ||
*/ | ||
elementType: 'payment'; | ||
/** | ||
* `true` when the saved payment method is successfully removed. | ||
*/ | ||
success: boolean; | ||
/** | ||
* Error message if the saved payment method removal fails. | ||
*/ | ||
error?: string; | ||
/** | ||
* The removed saved payment method. | ||
*/ | ||
payment_method: { | ||
id: string; | ||
type: string; | ||
billing_details: { | ||
address: { | ||
city: null | string; | ||
country: null | string; | ||
line1: null | string; | ||
line2: null | string; | ||
postal_code: null | string; | ||
state: null | string; | ||
}; | ||
name: null | string; | ||
email: null | string; | ||
phone: null | string; | ||
}; | ||
}; | ||
} |
@@ -20,25 +20,2 @@ export type StripeEmbeddedCheckoutAddress = { | ||
export type StripeEmbeddedCheckoutLineItem = { | ||
id?: string; | ||
quantity?: number; | ||
price?: string; | ||
display?: { | ||
name?: string; | ||
description?: string; | ||
images?: string[]; | ||
}; | ||
pricingSpec?: { | ||
unitAmount?: number; | ||
unitAmountDecimal?: string; | ||
currency?: string; | ||
taxBehavior?: 'inclusive' | 'exclusive' | 'unspecified'; | ||
taxCode?: string; | ||
}; | ||
}; | ||
export type StripeEmbeddedCheckoutLineItemsChangeEvent = { | ||
checkoutSessionId: string; | ||
lineItems: StripeEmbeddedCheckoutLineItem[]; | ||
}; | ||
export type ResultAction = | ||
@@ -72,9 +49,2 @@ | {type: 'accept'} | ||
) => Promise<ResultAction>; | ||
/** | ||
* onLineItemsChange is called when the customer adds, removes, or modifies a line item. | ||
* The callback is required when [permissions.update.line_items](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-line_items) is set to `server_only`. | ||
*/ | ||
onLineItemsChange?: ( | ||
event: StripeEmbeddedCheckoutLineItemsChangeEvent | ||
) => Promise<ResultAction>; | ||
} | ||
@@ -81,0 +51,0 @@ |
@@ -272,17 +272,2 @@ import { | ||
export interface CreatePaymentMethodMultibancoData | ||
extends PaymentMethodCreateParams { | ||
type: 'multibanco'; | ||
/** | ||
* The customer's billing details. | ||
* `email` is required. | ||
* | ||
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details | ||
*/ | ||
billing_details: PaymentMethodCreateParams.BillingDetails & { | ||
email: string; | ||
}; | ||
} | ||
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams { | ||
@@ -389,7 +374,2 @@ type: 'oxxo'; | ||
export interface CreatePaymentMethodTwintData | ||
extends PaymentMethodCreateParams { | ||
type: 'twint'; | ||
} | ||
export interface CreatePaymentMethodAuBecsDebitData | ||
@@ -1102,32 +1082,2 @@ extends PaymentMethodCreateParams { | ||
/** | ||
* Data to be sent with a `stripe.confirmMultibancoPayment` request. | ||
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
*/ | ||
export interface ConfirmMultibancoPaymentData | ||
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<CreatePaymentMethodMultibancoData, 'type'>; | ||
/** | ||
* The url your customer will be directed to after they complete authentication. | ||
* | ||
* @recommended | ||
*/ | ||
return_url?: string; | ||
} | ||
export interface ConfirmMultibancoPaymentOptions { | ||
/** | ||
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect). | ||
* Default is `true`. | ||
*/ | ||
handleActions?: boolean; | ||
} | ||
/** | ||
* Data to be sent with a `stripe.confirmOxxoPayment` request. | ||
@@ -1335,31 +1285,2 @@ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
/** | ||
* Data to be sent with a `stripe.confirmTwintPayment` request. | ||
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
*/ | ||
export interface ConfirmTwintPaymentData 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<CreatePaymentMethodTwintData, 'type'>; | ||
/** | ||
* The url your customer will be directed to after they complete authentication. | ||
* | ||
* @recommended | ||
*/ | ||
return_url?: string; | ||
} | ||
export interface ConfirmTwintPaymentOptions { | ||
/** | ||
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect). | ||
* Default is `true`. | ||
*/ | ||
handleActions?: boolean; | ||
} | ||
/** | ||
* Data to be sent with a `stripe.confirmWechatPayPayment` request. | ||
@@ -1546,2 +1467,5 @@ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature | ||
@@ -1548,0 +1472,0 @@ */ |
@@ -45,2 +45,5 @@ import {PaymentMethodCreateParams, SetupIntentConfirmParams} from '../api'; | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature | ||
@@ -47,0 +50,0 @@ */ |
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "4.9.0", | ||
"version": "4.10.0", | ||
"description": "Stripe.js loading utility", | ||
@@ -5,0 +5,0 @@ "repository": "github:stripe/stripe-js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
896348
139
12739