@stripe/stripe-js
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -154,2 +154,17 @@ import {StripeElement, StripeElements} from '../stripe-js'; | ||
/** | ||
* Contains information about card networks that can be used to process the payment. | ||
*/ | ||
networks: { | ||
/** | ||
* The preferred network for co-branded cards. | ||
*/ | ||
preferred: string | null; | ||
/** | ||
* All available networks for the card. | ||
*/ | ||
available: string[]; | ||
} | null; | ||
/** | ||
* Contains details on how this Card maybe be used for 3D Secure authentication. | ||
@@ -156,0 +171,0 @@ */ |
@@ -45,3 +45,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "4.1.0", | ||
version: "4.2.0", | ||
startTime: startTime | ||
@@ -48,0 +48,0 @@ }); |
@@ -61,3 +61,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "4.1.0", | ||
version: "4.2.0", | ||
startTime: startTime | ||
@@ -64,0 +64,0 @@ }); |
@@ -50,2 +50,3 @@ import { | ||
StripeExpressCheckoutElementOptions, | ||
StripeAddressElementGetElementOptions, | ||
} from './elements'; | ||
@@ -88,3 +89,6 @@ import {StripeError} from './stripe'; | ||
*/ | ||
getElement(elementType: 'address'): StripeAddressElement | null; | ||
getElement( | ||
elementType: 'address', | ||
options?: StripeAddressElementGetElementOptions | ||
): StripeAddressElement | null; | ||
@@ -91,0 +95,0 @@ ///////////////////////////// |
@@ -262,1 +262,5 @@ import {StripeElementBase} from './base'; | ||
} | ||
export interface StripeAddressElementGetElementOptions { | ||
mode: AddressMode; | ||
} |
@@ -0,1 +1,24 @@ | ||
export type StripeEmbeddedCheckoutAddress = { | ||
country: string; | ||
line1?: string | null; | ||
line2?: string | null; | ||
city?: string | null; | ||
postal_code?: string | null; | ||
state?: string | null; | ||
}; | ||
export type StripeEmbeddedCheckoutShippingDetails = { | ||
name: string; | ||
address: StripeEmbeddedCheckoutAddress; | ||
}; | ||
export type StripeEmbeddedCheckoutShippingDetailsChangeEvent = { | ||
checkoutSessionId: string; | ||
shippingDetails: StripeEmbeddedCheckoutShippingDetails; | ||
}; | ||
export type ResultAction = | ||
| {type: 'accept'} | ||
| {type: 'reject'; errorMessage?: string}; | ||
export interface StripeEmbeddedCheckoutOptions { | ||
@@ -16,2 +39,11 @@ /** | ||
onComplete?: () => void; | ||
/** | ||
* onShippingDetailsChange is called when the customer completes the shipping details form. | ||
* | ||
* The callback is required when [permissions.update.shipping_details](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-shipping_details) is set to `server_only`. | ||
* For a step-by-step guide on using this callback to customize shipping options during checkout, see [Customize Shipping Options](https://docs.stripe.com/payments/checkout/custom-shipping-options). | ||
*/ | ||
onShippingDetailsChange?: ( | ||
event: StripeEmbeddedCheckoutShippingDetailsChangeEvent | ||
) => Promise<ResultAction>; | ||
} | ||
@@ -18,0 +50,0 @@ |
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "4.2.0", | ||
"version": "4.3.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
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
893663
12703