@stripe/stripe-js
Advanced tools
Comparing version 1.15.1 to 1.16.0
@@ -57,3 +57,3 @@ function _typeof(obj) { | ||
name: 'stripe-js', | ||
version: "1.15.1", | ||
version: "1.16.0", | ||
startTime: startTime | ||
@@ -60,0 +60,0 @@ }); |
@@ -61,3 +61,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "1.15.1", | ||
version: "1.16.0", | ||
startTime: startTime | ||
@@ -64,0 +64,0 @@ }); |
@@ -41,3 +41,3 @@ var V3_URL = 'https://js.stripe.com/v3'; | ||
name: 'stripe-js', | ||
version: "1.15.1", | ||
version: "1.16.0", | ||
startTime: startTime | ||
@@ -44,0 +44,0 @@ }); |
@@ -45,3 +45,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "1.15.1", | ||
version: "1.16.0", | ||
startTime: startTime | ||
@@ -48,0 +48,0 @@ }); |
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "1.15.1", | ||
"version": "1.16.0", | ||
"description": "Stripe.js loading utility", | ||
@@ -5,0 +5,0 @@ "main": "dist/stripe.js", |
@@ -9,1 +9,2 @@ ///<reference path='./shared.d.ts' /> | ||
///<reference path='./Cards.d.ts' /> | ||
///<reference path='./VerificationSessions.d.ts' /> |
@@ -88,11 +88,40 @@ ///<reference path='./base.d.ts' /> | ||
* An object used to customize the appearance of the Payment Request Button. | ||
* The object must have a single `paymentRequestButton` field, containing any of the following sub-fields | ||
*/ | ||
style?: { | ||
paymentRequestButton: { | ||
type?: 'default' | 'book' | 'buy' | 'donate'; | ||
/** | ||
* Preferred button type to display. Available types, by wallet: | ||
* | ||
* Browser card: default, book, buy, or donate. | ||
* | ||
* Google Pay: default, buy, or donate. | ||
* | ||
* Apple Pay: default, book, buy, donate, check-out, subscribe, reload, add-money, top-up, order, rent, support, contribute, tip | ||
* | ||
* When a wallet does not support the provided value, default is used as a fallback. | ||
*/ | ||
type?: | ||
| 'default' | ||
| 'book' | ||
| 'buy' | ||
| 'donate' | ||
| 'check-out' | ||
| 'subscribe' | ||
| 'reload' | ||
| 'add-money' | ||
| 'top-up' | ||
| 'order' | ||
| 'rent' | ||
| 'support' | ||
| 'contribute' | ||
| 'tip'; | ||
/** | ||
* One of dark, light, or light-outline. The default is dark. | ||
*/ | ||
theme?: 'dark' | 'light' | 'light-outline'; | ||
/** | ||
* The height of the Payment Request Button. | ||
* The height of the Payment Request Button. Accepts px unit values. | ||
*/ | ||
@@ -99,0 +128,0 @@ height?: string; |
@@ -270,2 +270,21 @@ ///<reference path='./checkout.d.ts' /> | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
* Use `stripe.confirmPayPalPayment` in the [PayPal Payments](https://stripe.com/docs/payments/paypal) with Payment Methods flow when the customer submits your payment form. | ||
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) 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`. | ||
* | ||
* 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_paypal_payment | ||
*/ | ||
confirmPayPalPayment( | ||
clientSecret: string, | ||
data?: ConfirmPayPalPaymentData | ||
): Promise<PaymentIntentResult>; | ||
/** | ||
* Use `stripe.confirmSepaDebitPayment` in the [SEPA Direct Debit Payments](https://stripe.com/docs/payments/sepa-debit) with Payment Methods flow when the customer submits your payment form. | ||
@@ -479,2 +498,20 @@ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide. | ||
/** | ||
* Use `stripe.confirmPayPalSetup` in the [Set up future payments](https://stripe.com/docs/payments/paypal/set-up-future-payments) flow when the customer submits your payment form. | ||
* 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/paypal/set-up-future-payments) 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_paypal_setup | ||
*/ | ||
confirmPayPalSetup( | ||
clientSecret: string, | ||
data?: ConfirmPayPalSetupData | ||
): Promise<SetupIntentResult>; | ||
/** | ||
* 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. | ||
@@ -668,2 +705,14 @@ * When called, it will confirm the `SetupIntent` with `data` you provide. | ||
registerAppInfo(wrapperLibrary: WrapperLibrary): void; | ||
///////////////////////////// | ||
/// Identity | ||
/// | ||
///////////////////////////// | ||
/** | ||
* Use `stripe.verifyIdentity` to display an [Identity](https://stripe.com/docs/identity) modal that securely collects verification information. | ||
* | ||
* * @docs https://stripe.com/docs/js/identity/modal | ||
*/ | ||
verifyIdentity(clientSecret: string): Promise<VerificationSessionResult>; | ||
} | ||
@@ -691,2 +740,6 @@ | ||
type VerificationSessionResult = | ||
| {verificationSession: VerificationSession; error?: undefined} | ||
| {verificationSession?: undefined; error: StripeError}; | ||
interface WrapperLibrary { | ||
@@ -693,0 +746,0 @@ /** |
@@ -195,2 +195,6 @@ declare module '@stripe/stripe-js' { | ||
interface CreatePaymentMethodPayPalData extends PaymentMethodCreateParams { | ||
type: 'paypal'; | ||
} | ||
interface CreatePaymentMethodSepaDebitData extends PaymentMethodCreateParams { | ||
@@ -716,2 +720,21 @@ type: 'sepa_debit'; | ||
/** | ||
* Data to be sent with a `stripe.confirmPayPalPayment` request. | ||
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
*/ | ||
interface ConfirmPayPalPaymentData 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<CreatePaymentMethodPayPalData, 'type'>; | ||
/** | ||
* The required url your customer will be directed to after they complete authentication. | ||
*/ | ||
return_url: string; | ||
} | ||
/** | ||
* An options object to control the behavior of `stripe.confirmP24Payment`. | ||
@@ -718,0 +741,0 @@ */ |
@@ -42,2 +42,21 @@ 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 ConfirmPayPalSetupData 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<CreatePaymentMethodPayPalData, 'type'>; | ||
/** | ||
* The required url your customer will be directed to after they complete authentication. | ||
*/ | ||
return_url: string; | ||
} | ||
/** | ||
* Data to be sent with a `stripe.confirmSepaDebitSetup` request. | ||
@@ -44,0 +63,0 @@ * Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters. |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
300054
47
7615
1