@stripe/stripe-js
Advanced tools
Comparing version 1.11.0 to 1.12.0
@@ -57,3 +57,3 @@ function _typeof(obj) { | ||
name: 'stripe-js', | ||
version: "1.11.0", | ||
version: "1.12.0", | ||
startTime: startTime | ||
@@ -60,0 +60,0 @@ }); |
@@ -61,3 +61,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "1.11.0", | ||
version: "1.12.0", | ||
startTime: startTime | ||
@@ -64,0 +64,0 @@ }); |
@@ -41,3 +41,3 @@ var V3_URL = 'https://js.stripe.com/v3'; | ||
name: 'stripe-js', | ||
version: "1.11.0", | ||
version: "1.12.0", | ||
startTime: startTime | ||
@@ -44,0 +44,0 @@ }); |
@@ -45,3 +45,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "1.11.0", | ||
version: "1.12.0", | ||
startTime: startTime | ||
@@ -48,0 +48,0 @@ }); |
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "1.11.0", | ||
"version": "1.12.0", | ||
"description": "Stripe.js loading utility", | ||
@@ -5,0 +5,0 @@ "main": "dist/stripe.js", |
@@ -74,3 +74,3 @@ # Stripe.js ES Module | ||
loaded on every page, not just your checkout page. This | ||
[allows Stripe to detect suspicious behavior](/docs/disputes/prevention/advanced-fraud-detection) | ||
[allows Stripe to detect suspicious behavior](https://stripe.com/docs/disputes/prevention/advanced-fraud-detection) | ||
that may be indicative of fraud as customers browse your website. | ||
@@ -77,0 +77,0 @@ |
@@ -36,4 +36,8 @@ declare module '@stripe/stripe-js' { | ||
grabpay?: PaymentMethod.GrabPay; | ||
ideal?: PaymentMethod.Ideal; | ||
p24?: PaymentMethod.P24; | ||
/** | ||
@@ -191,2 +195,4 @@ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. | ||
interface GrabPay {} | ||
interface Ideal { | ||
@@ -204,2 +210,9 @@ /** | ||
interface P24 { | ||
/** | ||
* The customer's bank. | ||
*/ | ||
bank: string; | ||
} | ||
interface SepaDebit { | ||
@@ -206,0 +219,0 @@ /** |
@@ -307,2 +307,7 @@ declare module '@stripe/stripe-js' { | ||
/** | ||
* Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. | ||
*/ | ||
political_exposure?: Individual.PoliticalExposure; | ||
/** | ||
* The last four digits of the individual's Social Security Number (U.S. only). | ||
@@ -368,2 +373,4 @@ */ | ||
type PoliticalExposure = 'none' | 'existing'; | ||
interface Verification { | ||
@@ -370,0 +377,0 @@ /** |
@@ -11,2 +11,3 @@ ///<reference path='./elements/card.d.ts' /> | ||
///<reference path='./elements/eps-bank.d.ts' /> | ||
///<reference path='./elements/p24-bank.d.ts' /> | ||
@@ -130,4 +131,2 @@ import {StripeAuBankAccountElement} from '@stripe/stripe-js'; | ||
/** | ||
* Requires beta access: | ||
* Contact [Stripe support](https://support.stripe.com/) for more information. | ||
* | ||
@@ -150,2 +149,21 @@ * Creates an `EpsBankElement`. | ||
///////////////////////////// | ||
/// p24Bank | ||
///////////////////////////// | ||
/** | ||
* | ||
* Creates an `P24BankElement`. | ||
*/ | ||
create( | ||
elementType: 'p24Bank', | ||
options: StripeP24BankElementOptions | ||
): StripeP24BankElement; | ||
/** | ||
* | ||
* Looks up a previously created `Element` by its type. | ||
*/ | ||
getElement(elementType: 'p24Bank'): StripeP24BankElement | null; | ||
///////////////////////////// | ||
/// iban | ||
@@ -216,2 +234,3 @@ ///////////////////////////// | ||
| 'idealBank' | ||
| 'p24Bank' | ||
| 'paymentRequestButton'; | ||
@@ -229,2 +248,3 @@ | ||
| StripeIdealBankElement | ||
| StripeP24BankElement | ||
| StripePaymentRequestButtonElement; | ||
@@ -263,2 +283,3 @@ | ||
| 'sv' | ||
| 'th' | ||
| 'zh'; | ||
@@ -265,0 +286,0 @@ |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeAuBankAccountElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeAuBankAccountElementChangeEvent) => any | ||
): StripeAuBankAccountElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeAuBankAccountElementChangeEvent) => any | ||
): StripeAuBankAccountElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeAuBankAccountElement; | ||
once(eventType: 'ready', handler: () => any): StripeAuBankAccountElement; | ||
off(eventType: 'ready', handler?: () => any): StripeAuBankAccountElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeAuBankAccountElement; | ||
once(eventType: 'focus', handler: () => any): StripeAuBankAccountElement; | ||
off(eventType: 'focus', handler?: () => any): StripeAuBankAccountElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeAuBankAccountElement; | ||
once(eventType: 'blur', handler: () => any): StripeAuBankAccountElement; | ||
off(eventType: 'blur', handler?: () => any): StripeAuBankAccountElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeAuBankAccountElement; | ||
once(eventType: 'escape', handler: () => any): StripeAuBankAccountElement; | ||
off(eventType: 'escape', handler?: () => any): StripeAuBankAccountElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeCardCvcElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeCardCvcElementChangeEvent) => any | ||
): StripeCardCvcElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeCardCvcElementChangeEvent) => any | ||
): StripeCardCvcElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeCardCvcElement; | ||
once(eventType: 'ready', handler: () => any): StripeCardCvcElement; | ||
off(eventType: 'ready', handler?: () => any): StripeCardCvcElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeCardCvcElement; | ||
once(eventType: 'focus', handler: () => any): StripeCardCvcElement; | ||
off(eventType: 'focus', handler?: () => any): StripeCardCvcElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeCardCvcElement; | ||
once(eventType: 'blur', handler: () => any): StripeCardCvcElement; | ||
off(eventType: 'blur', handler?: () => any): StripeCardCvcElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeCardCvcElement; | ||
once(eventType: 'escape', handler: () => any): StripeCardCvcElement; | ||
off(eventType: 'escape', handler?: () => any): StripeCardCvcElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeCardExpiryElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeCardExpiryElementChangeEvent) => any | ||
): StripeCardExpiryElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeCardExpiryElementChangeEvent) => any | ||
): StripeCardExpiryElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeCardExpiryElement; | ||
once(eventType: 'ready', handler: () => any): StripeCardExpiryElement; | ||
off(eventType: 'ready', handler?: () => any): StripeCardExpiryElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeCardExpiryElement; | ||
once(eventType: 'focus', handler: () => any): StripeCardExpiryElement; | ||
off(eventType: 'focus', handler?: () => any): StripeCardExpiryElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeCardExpiryElement; | ||
once(eventType: 'blur', handler: () => any): StripeCardExpiryElement; | ||
off(eventType: 'blur', handler?: () => any): StripeCardExpiryElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeCardExpiryElement; | ||
once(eventType: 'escape', handler: () => any): StripeCardExpiryElement; | ||
off(eventType: 'escape', handler?: () => any): StripeCardExpiryElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeCardNumberElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeCardNumberElementChangeEvent) => any | ||
): StripeCardNumberElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeCardNumberElementChangeEvent) => any | ||
): StripeCardNumberElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeCardNumberElement; | ||
once(eventType: 'ready', handler: () => any): StripeCardNumberElement; | ||
off(eventType: 'ready', handler?: () => any): StripeCardNumberElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeCardNumberElement; | ||
once(eventType: 'focus', handler: () => any): StripeCardNumberElement; | ||
off(eventType: 'focus', handler?: () => any): StripeCardNumberElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeCardNumberElement; | ||
once(eventType: 'blur', handler: () => any): StripeCardNumberElement; | ||
off(eventType: 'blur', handler?: () => any): StripeCardNumberElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeCardNumberElement; | ||
once(eventType: 'escape', handler: () => any): StripeCardNumberElement; | ||
off(eventType: 'escape', handler?: () => any): StripeCardNumberElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeCardElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeCardElementChangeEvent) => any | ||
): StripeCardElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeCardElementChangeEvent) => any | ||
): StripeCardElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeCardElement; | ||
once(eventType: 'ready', handler: () => any): StripeCardElement; | ||
off(eventType: 'ready', handler?: () => any): StripeCardElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeCardElement; | ||
once(eventType: 'focus', handler: () => any): StripeCardElement; | ||
off(eventType: 'focus', handler?: () => any): StripeCardElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeCardElement; | ||
once(eventType: 'blur', handler: () => any): StripeCardElement; | ||
off(eventType: 'blur', handler?: () => any): StripeCardElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeCardElement; | ||
once(eventType: 'escape', handler: () => any): StripeCardElement; | ||
off(eventType: 'escape', handler?: () => any): StripeCardElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeEpsBankElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeEpsBankElementChangeEvent) => any | ||
): StripeEpsBankElement; | ||
off( | ||
eventType: 'change', | ||
handler: (event: StripeEpsBankElementChangeEvent) => any | ||
): StripeEpsBankElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeEpsBankElement; | ||
once(eventType: 'ready', handler: () => any): StripeEpsBankElement; | ||
off(eventType: 'ready', handler: () => any): StripeEpsBankElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeEpsBankElement; | ||
once(eventType: 'focus', handler: () => any): StripeEpsBankElement; | ||
off(eventType: 'focus', handler: () => any): StripeEpsBankElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeEpsBankElement; | ||
once(eventType: 'blur', handler: () => any): StripeEpsBankElement; | ||
off(eventType: 'blur', handler: () => any): StripeEpsBankElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeEpsBankElement; | ||
once(eventType: 'escape', handler: () => any): StripeEpsBankElement; | ||
off(eventType: 'escape', handler: () => any): StripeEpsBankElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeFpxBankElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeFpxBankElementChangeEvent) => any | ||
): StripeFpxBankElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeFpxBankElementChangeEvent) => any | ||
): StripeFpxBankElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeFpxBankElement; | ||
once(eventType: 'ready', handler: () => any): StripeFpxBankElement; | ||
off(eventType: 'ready', handler?: () => any): StripeFpxBankElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeFpxBankElement; | ||
once(eventType: 'focus', handler: () => any): StripeFpxBankElement; | ||
off(eventType: 'focus', handler?: () => any): StripeFpxBankElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeFpxBankElement; | ||
once(eventType: 'blur', handler: () => any): StripeFpxBankElement; | ||
off(eventType: 'blur', handler?: () => any): StripeFpxBankElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeFpxBankElement; | ||
once(eventType: 'escape', handler: () => any): StripeFpxBankElement; | ||
off(eventType: 'escape', handler?: () => any): StripeFpxBankElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeIbanElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeIbanElementChangeEvent) => any | ||
): StripeIbanElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeIbanElementChangeEvent) => any | ||
): StripeIbanElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeIbanElement; | ||
once(eventType: 'ready', handler: () => any): StripeIbanElement; | ||
off(eventType: 'ready', handler?: () => any): StripeIbanElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeIbanElement; | ||
once(eventType: 'focus', handler: () => any): StripeIbanElement; | ||
off(eventType: 'focus', handler?: () => any): StripeIbanElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeIbanElement; | ||
once(eventType: 'blur', handler: () => any): StripeIbanElement; | ||
off(eventType: 'blur', handler?: () => any): StripeIbanElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeIbanElement; | ||
once(eventType: 'escape', handler: () => any): StripeIbanElement; | ||
off(eventType: 'escape', handler?: () => any): StripeIbanElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripeIdealBankElement; | ||
once( | ||
eventType: 'change', | ||
handler: (event: StripeIdealBankElementChangeEvent) => any | ||
): StripeIdealBankElement; | ||
off( | ||
eventType: 'change', | ||
handler?: (event: StripeIdealBankElementChangeEvent) => any | ||
): StripeIdealBankElement; | ||
@@ -18,2 +26,4 @@ /** | ||
on(eventType: 'ready', handler: () => any): StripeIdealBankElement; | ||
once(eventType: 'ready', handler: () => any): StripeIdealBankElement; | ||
off(eventType: 'ready', handler?: () => any): StripeIdealBankElement; | ||
@@ -24,2 +34,4 @@ /** | ||
on(eventType: 'focus', handler: () => any): StripeIdealBankElement; | ||
once(eventType: 'focus', handler: () => any): StripeIdealBankElement; | ||
off(eventType: 'focus', handler?: () => any): StripeIdealBankElement; | ||
@@ -30,2 +42,4 @@ /** | ||
on(eventType: 'blur', handler: () => any): StripeIdealBankElement; | ||
once(eventType: 'blur', handler: () => any): StripeIdealBankElement; | ||
off(eventType: 'blur', handler?: () => any): StripeIdealBankElement; | ||
@@ -36,2 +50,4 @@ /** | ||
on(eventType: 'escape', handler: () => any): StripeIdealBankElement; | ||
once(eventType: 'escape', handler: () => any): StripeIdealBankElement; | ||
off(eventType: 'escape', handler?: () => any): StripeIdealBankElement; | ||
@@ -38,0 +54,0 @@ /** |
@@ -12,2 +12,10 @@ ///<reference path='./base.d.ts' /> | ||
): StripePaymentRequestButtonElement; | ||
once( | ||
eventType: 'click', | ||
handler: (event: StripePaymentRequestButtonElementClickEvent) => any | ||
): StripePaymentRequestButtonElement; | ||
off( | ||
eventType: 'click', | ||
handler?: (event: StripePaymentRequestButtonElementClickEvent) => any | ||
): StripePaymentRequestButtonElement; | ||
@@ -21,2 +29,10 @@ /** | ||
): StripePaymentRequestButtonElement; | ||
once( | ||
eventType: 'ready', | ||
handler: () => any | ||
): StripePaymentRequestButtonElement; | ||
off( | ||
eventType: 'ready', | ||
handler?: () => any | ||
): StripePaymentRequestButtonElement; | ||
@@ -30,2 +46,10 @@ /** | ||
): StripePaymentRequestButtonElement; | ||
once( | ||
eventType: 'focus', | ||
handler: () => any | ||
): StripePaymentRequestButtonElement; | ||
off( | ||
eventType: 'focus', | ||
handler?: () => any | ||
): StripePaymentRequestButtonElement; | ||
@@ -39,2 +63,10 @@ /** | ||
): StripePaymentRequestButtonElement; | ||
once( | ||
eventType: 'blur', | ||
handler: () => any | ||
): StripePaymentRequestButtonElement; | ||
off( | ||
eventType: 'blur', | ||
handler?: () => any | ||
): StripePaymentRequestButtonElement; | ||
@@ -41,0 +73,0 @@ /** |
@@ -167,2 +167,16 @@ ///<reference path='./checkout.d.ts' /> | ||
/** | ||
* Use `stripe.confirmGrabPayPayment` in the [GrabPay payments](https://stripe.com/docs/payments/grabpay) flow when the customer submits your payment form. | ||
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents). | ||
* Refer to our [integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment) for more details. | ||
* | ||
* @docs https://stripe.com/docs/js/payment_intents/confirm_grabpay_payment | ||
*/ | ||
confirmGrabPayPayment( | ||
clientSecret: string, | ||
data?: ConfirmGrabPayPaymentData, | ||
options?: ConfirmGrabPayPaymentOptions | ||
): Promise<{paymentIntent?: PaymentIntent; error?: StripeError}>; | ||
/** | ||
* Use `stripe.confirmIdealPayment` in the [iDEAL Payments with Payment Methods](https://stripe.com/docs/payments/ideal) flow when the customer submits your payment form. | ||
@@ -185,2 +199,20 @@ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to the authorize the transaction. | ||
/** | ||
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) 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. | ||
* 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/oxxo) for more details. | ||
* | ||
* 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_oxxo_payment | ||
*/ | ||
confirmOxxoPayment( | ||
clientSecret: string, | ||
data?: ConfirmOxxoPaymentData, | ||
options?: ConfirmOxxoPaymentOptions | ||
): Promise<{paymentIntent?: PaymentIntent; error?: StripeError}>; | ||
/** | ||
* Use `stripe.confirmP24Payment` in the [Przelewy24 Payments with Payment Methods](https://stripe.com/docs/payments/p24#web) flow when the customer submits your payment form. | ||
@@ -187,0 +219,0 @@ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to the authorize the transaction. |
@@ -12,2 +12,3 @@ declare module '@stripe/stripe-js' { | ||
| CreatePaymentMethodGiropayData | ||
| CreatePaymentMethodGrabPayData | ||
| CreatePaymentMethodIdealData | ||
@@ -94,2 +95,11 @@ | CreatePaymentMethodP24Data | ||
interface CreatePaymentMethodGrabPayData extends PaymentMethodCreateParams { | ||
type: 'grabpay'; | ||
/** | ||
* Can be omitted as there are no GrabPay-specific fields. | ||
*/ | ||
grabpay?: {}; | ||
} | ||
interface CreatePaymentMethodIdealData extends PaymentMethodCreateParams { | ||
@@ -108,2 +118,17 @@ type: 'ideal'; | ||
interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams { | ||
type: 'oxxo'; | ||
/** | ||
* The customer's billing details. | ||
* `email` and `name` are required. | ||
* | ||
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details | ||
*/ | ||
billing_details: PaymentMethodCreateParams.BillingDetails & { | ||
email: string; | ||
name: string; | ||
}; | ||
} | ||
interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams { | ||
@@ -121,2 +146,10 @@ type: 'p24'; | ||
}; | ||
p24?: | ||
| StripeP24BankElement | ||
| { | ||
/** | ||
* The customer's bank. | ||
*/ | ||
bank?: string; | ||
}; | ||
} | ||
@@ -459,2 +492,34 @@ | ||
/** | ||
* Data to be sent with a `stripe.confirmGrabPayPayment` request. | ||
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
*/ | ||
interface ConfirmGrabPayPaymentData 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<CreatePaymentMethodGrabPayData, 'type'>; | ||
/** | ||
* The url your customer will be directed to after they complete authentication. | ||
* | ||
* @recommended | ||
*/ | ||
return_url?: string; | ||
} | ||
/** | ||
* An options object to control the behavior of `stripe.confirmGrabPayPayment`. | ||
*/ | ||
interface ConfirmGrabPayPaymentOptions { | ||
/** | ||
* Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe GrabPay integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment) | ||
* for more info. Default is `true`. | ||
*/ | ||
handleActions?: boolean; | ||
} | ||
/** | ||
* Data to be sent with a `stripe.confirmIdealPayment` request. | ||
@@ -492,2 +557,26 @@ * 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.confirmOxxoPayment` request. | ||
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
*/ | ||
interface ConfirmOxxoPaymentData 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<CreatePaymentMethodOxxoData, 'type'>; | ||
} | ||
/** | ||
* An options object to control the behavior of `stripe.confirmOxxoPayment`. | ||
*/ | ||
interface ConfirmOxxoPaymentOptions { | ||
/** | ||
* Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](https://stripe.com/docs/payments/oxxo) for more info. Default is `true`. | ||
*/ | ||
handleActions?: boolean; | ||
} | ||
/** | ||
* Data to be sent with a `stripe.confirmP24Payment` request. | ||
@@ -505,2 +594,14 @@ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters. | ||
payment_method_options?: { | ||
/** | ||
* Configuration for this Przelewy24 payment. | ||
*/ | ||
p24: { | ||
/** | ||
* Specify that payer has agreed to the Przelewy24 Terms of Service | ||
*/ | ||
tos_shown_and_accepted?: boolean; | ||
}; | ||
}; | ||
/** | ||
@@ -507,0 +608,0 @@ * The url your customer will be directed to after they complete authentication. |
declare module '@stripe/stripe-js' { | ||
interface PaymentRequest { | ||
/** | ||
* Returns a `Promise` that resolves with an object detailing if a browser payment API is available. | ||
* If no API is available, it resolves with `null`. | ||
* Returns a `Promise` that resolves with a truthy value if an enabled wallet is ready to pay. | ||
* If no wallet is available, it resolves with `null`. | ||
*/ | ||
canMakePayment(): Promise<CanMakePaymentResult | null>; | ||
canMakePayment(): Promise<Record<string, boolean> | null>; | ||
@@ -17,2 +17,8 @@ /** | ||
/** | ||
* `true` if the browser’s payment interface is showing. | ||
* When using the `PaymentRequestButtonElement`, this is called for you automatically. | ||
*/ | ||
isShowing: () => boolean; | ||
/** | ||
* `PaymentRequest` instances can be updated with an options object. | ||
@@ -34,2 +40,10 @@ * | ||
): this; | ||
once( | ||
eventType: 'token', | ||
handler: (event: PaymentRequestTokenEvent) => any | ||
): this; | ||
off( | ||
eventType: 'token', | ||
handler?: (event: PaymentRequestTokenEvent) => any | ||
): this; | ||
@@ -44,2 +58,10 @@ /** | ||
): this; | ||
once( | ||
eventType: 'paymentmethod', | ||
handler: (event: PaymentRequestPaymentMethodEvent) => any | ||
): this; | ||
off( | ||
eventType: 'paymentmethod', | ||
handler?: (event: PaymentRequestPaymentMethodEvent) => any | ||
): this; | ||
@@ -54,2 +76,10 @@ /** | ||
): this; | ||
once( | ||
eventType: 'source', | ||
handler: (event: PaymentRequestSourceEvent) => any | ||
): this; | ||
off( | ||
eventType: 'source', | ||
handler?: (event: PaymentRequestSourceEvent) => any | ||
): this; | ||
@@ -64,2 +94,4 @@ /** | ||
on(eventType: 'cancel', handler: () => any): this; | ||
once(eventType: 'cancel', handler: () => any): this; | ||
off(eventType: 'cancel', handler?: () => any): this; | ||
@@ -73,2 +105,10 @@ /** | ||
): this; | ||
once( | ||
eventType: 'shippingaddresschange', | ||
handler: (event: PaymentRequestShippingAddressEvent) => any | ||
): this; | ||
off( | ||
eventType: 'shippingaddresschange', | ||
handler?: (event: PaymentRequestShippingAddressEvent) => any | ||
): this; | ||
@@ -82,14 +122,12 @@ /** | ||
): this; | ||
once( | ||
eventType: 'shippingoptionchange', | ||
handler: (event: PaymentRequestShippingOptionEvent) => any | ||
): this; | ||
off( | ||
eventType: 'shippingoptionchange', | ||
handler?: (event: PaymentRequestShippingOptionEvent) => any | ||
): this; | ||
} | ||
interface CanMakePaymentResult { | ||
/** | ||
* `true` if the browser payment API supports Apple Pay. | ||
* In this case, you‘ll want to show a button that conforms to the Apple Pay [Human Interface Guidelines](https://developer.apple.com/apple-pay/web-human-interface-guidelines/). | ||
* Note that using the `PaymentRequestButtonElement` is automatically cross-browser. | ||
* If you use this `PaymentRequest` object to create a `paymentRequestButton` Element, you don't need to check `applePay` yourself. | ||
*/ | ||
applePay: boolean; | ||
} | ||
interface PaymentRequestUpdateOptions { | ||
@@ -182,2 +220,11 @@ /** | ||
shippingOptions?: PaymentRequestShippingOption[]; | ||
/** | ||
* An array of `PaymentRequestWallet` strings. | ||
* | ||
* By default, if no `wallets` option is passed in, all wallets will be enabled. | ||
* If you use this property, only wallets passed in will be enabled. | ||
* If an empty array is specified, all wallets will be disabled. | ||
*/ | ||
wallets?: PaymentRequestWallet[]; | ||
} | ||
@@ -233,2 +280,4 @@ | ||
type PaymentRequestWallet = 'applePay' | 'googlePay' | 'browserCard'; | ||
type PaymentRequestCompleteStatus = | ||
@@ -235,0 +284,0 @@ /** |
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
264287
45
6566