Socket
Socket
Sign inDemoInstall

@stripe/stripe-js

Package Overview
Dependencies
Maintainers
8
Versions
127
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.0.0-beta.8 to 1.0.0-beta.9

types/stripe-js/elements/au-bank-account.d.ts

2

package.json
{
"name": "@stripe/stripe-js",
"version": "1.0.0-beta.8",
"version": "1.0.0-beta.9",
"description": "Stripe.js loading utility",

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

@@ -32,2 +32,4 @@ declare module '@stripe/stripe-js' {

fpx?: PaymentMethod.Fpx;
ideal?: PaymentMethod.Ideal;

@@ -54,2 +56,19 @@

namespace PaymentMethod {
interface AuBecsDebit {
/**
* Bank State Branch
*/
bsb_number: string | null;
/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;
/**
* Last four characters of the account number.
*/
last4: string | null;
}
interface BillingDetails {

@@ -104,3 +123,3 @@ /**

/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example.
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number.
*/

@@ -158,2 +177,9 @@ fingerprint?: string | null;

interface Fpx {
/**
* The customer's bank.
*/
bank: string;
}
interface Ideal {

@@ -160,0 +186,0 @@ /**

@@ -7,7 +7,34 @@ ///<reference path='./elements/card.d.ts' />

///<reference path='./elements/ideal-bank.d.ts' />
///<reference path='./elements/fpx-bank.d.ts' />
///<reference path='./elements/payment-request-button.d.ts' />
///<reference path='./elements/au-bank-account.d.ts' />
import {StripeAuBankAccountElement} from '@stripe/stripe-js';
declare module '@stripe/stripe-js' {
interface StripeElements {
/////////////////////////////
/// auBankAccount
/////////////////////////////
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Creates an `AuBankAccountElement`.
*/
create(
elementType: 'auBankAccount',
options?: StripeAuBankAccountElementOptions
): StripeAuBankAccountElement;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Looks up a previously created `Element` by its type.
*/
getElement(elementType: 'auBankAccount'): StripeAuBankAccountElement | null;
/////////////////////////////
/// card

@@ -81,2 +108,19 @@ /////////////////////////////

/////////////////////////////
/// fpxBank
/////////////////////////////
/**
* Creates an `FpxBankElement`.
*/
create(
elementType: 'fpxBank',
options: StripeFpxBankElementOptions
): StripeFpxBankElement;
/**
* Looks up a previously created `Element` by its type.
*/
getElement(elementType: 'fpxBank'): StripeFpxBankElement | null;
/////////////////////////////
/// iban

@@ -138,2 +182,3 @@ /////////////////////////////

type StripeElementType =
| 'auBankAccount'
| 'card'

@@ -143,2 +188,3 @@ | 'cardNumber'

| 'cardCvc'
| 'fpxBank'
| 'iban'

@@ -149,2 +195,3 @@ | 'idealBank'

type StripeElement =
| StripeAuBankAccountElement
| StripeCardElement

@@ -154,2 +201,3 @@ | StripeCardNumberElement

| StripeCardCvcElement
| StripeFpxBankElement
| StripeIbanElement

@@ -156,0 +204,0 @@ | StripeIdealBankElement

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeCardCvcElementChangeEvent) => any
): void;
): StripeCardCvcElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `CardCvcElement` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeCardExpiryElementChangeEvent) => any
): void;
): StripeCardExpiryElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `CardExpiryElement` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeCardNumberElementChangeEvent) => any
): void;
): StripeCardNumberElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `Element` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeCardElementChangeEvent) => any
): void;
): StripeCardElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `CardElement` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeIbanElementChangeEvent) => any
): void;
): StripeIbanElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `IbanElement` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripeIdealBankElementChangeEvent) => any
): void;
): StripeIdealBankElement;

@@ -33,4 +33,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `IdealBankElement` can be dynamically changed using `element.update`.

@@ -37,0 +35,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -11,3 +11,3 @@ ///<reference path='./base.d.ts' />

handler: (event: StripePaymentRequestButtonElementClickEvent) => any
): void;
): StripePaymentRequestButtonElement;

@@ -42,4 +42,2 @@ /**

*
* If you collect certain information in a different part of your interface (e.g., ZIP or postal code), use `element.update` with the appropriate information.
*
* The styles of an `PaymentRequestButtonElement` can be dynamically changed using `element.update`.

@@ -46,0 +44,0 @@ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.

@@ -42,2 +42,22 @@ ///<reference path='./checkout.d.ts' />

/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmAuBecsDebitPayment` in the [BECS Direct Debit Payments](https://stripe.com/docs/payments/payment-methods/au-becs-debit) 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/payment-methods/au-becs-debit-quickstart-payment-intents) 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_au_becs_debit_payment
*/
confirmAuBecsDebitPayment(
clientSecret: string,
data?: ConfirmAuBecsDebitPaymentData
): Promise<{paymentIntent?: PaymentIntent; error?: StripeError}>;
/**
* Use `stripe.confirmCardPayment` when the customer submits your payment form.

@@ -61,2 +81,19 @@ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide and carry out 3DS or other next actions if they are required.

/**
* Use `stripe.confirmFpxPayment` in the [FPX Payments with Payment Methods](https://stripe.com/docs/payments/fpx#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to the 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_fpx_payment
*/
confirmFpxPayment(
clientSecret: string,
data?: ConfirmFpxPaymentData,
options?: ConfirmFpxPaymentOptions
): 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.

@@ -138,2 +175,22 @@ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to the authorize the transaction.

/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmAuBecsDebitSetup` in the [BECS Direct Debit with Setup Intents](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-setup-intents) flow when the customer submits your payment form.
* When called, it will confirm the `SetupIntent` 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/payment-methods/au-becs-debit-quickstart-setup-intents) 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_au_becs_debit_setup
*/
confirmAuBecsDebitSetup(
clientSecret: string,
data?: ConfirmAuBecsDebitSetupData
): Promise<{setupIntent?: SetupIntent; error?: StripeError}>;
/**
* Use `stripe.confirmCardSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.

@@ -145,2 +202,4 @@ * When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide and carry out 3DS or other next actions if they are required.

* 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_card_setup
*/

@@ -162,3 +221,4 @@ confirmCardSetup(

* 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.
* These use cases are detailed in the sections that follow.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_sepa_debit_setup
*/

@@ -165,0 +225,0 @@ confirmSepaDebitSetup(

@@ -6,4 +6,6 @@ declare module '@stripe/stripe-js' {

type CreatePaymentMethodData =
| CreatePaymentMethodAuBecsDebitData
| CreatePaymentMethodCardData
| CreatePaymentMethodIdealData
| CreatePaymentMethodFpxData
| CreatePaymentMethodSepaDebitData;

@@ -17,2 +19,15 @@

interface CreatePaymentMethodFpxData extends PaymentMethodCreateParams {
type: 'fpx';
fpx:
| StripeFpxBankElement
| {
/**
* The customer's bank.
*/
bank: string;
};
}
interface CreatePaymentMethodIdealData extends PaymentMethodCreateParams {

@@ -55,2 +70,40 @@ type: 'ideal';

interface CreatePaymentMethodAuBecsDebitData
extends PaymentMethodCreateParams {
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*/
type: 'au_becs_debit';
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*/
au_becs_debit:
| StripeAuBankAccountElement
| {
/**
* A BSB number.
*/
bsb_number: string;
/**
* An account number.
*/
account_number: string;
};
/*
* The customer's billing details.
* `name` and `email` are required.
*
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
*/
billing_details: PaymentMethodCreateParams.BillingDetails & {
name: string;
email: string;
};
}
/**

@@ -102,2 +155,34 @@ * Data to be sent with a `stripe.confirmCardPayment` request.

/**
* Data to be sent with a `stripe.confirmFpxPayment` request.
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
*/
interface ConfirmFpxPaymentData 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<CreatePaymentMethodFpxData, '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.confirmFpxPayment`.
*/
interface ConfirmFpxPaymentOptions {
/*
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/fpx#handle-redirect).
* Default is `true`.
*/
handleActions?: boolean;
}
/**
* Data to be sent with a `stripe.confirmIdealPayment` request.

@@ -128,3 +213,3 @@ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.

/*
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/payments/ideal#handle-redirect)).
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).
* Default is `true`.

@@ -134,2 +219,22 @@ */

}
/**
* Data to be sent with a `stripe.confirmAuBecsDebitPayment` request.
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
*/
interface ConfirmAuBecsDebitPaymentData 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<CreatePaymentMethodAuBecsDebitData, 'type'>;
/**
* To save the BECS Direct Debit account for reuse, set this parameter to `off_session`.
* BECS Direct Debit only accepts an `off_session` value for this parameter.
*/
setup_future_usage?: 'off_session';
}
}

@@ -40,2 +40,16 @@ declare module '@stripe/stripe-js' {

}
/**
* Data to be sent with a `stripe.confirmAuBecsDebitSetup` request.
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
*/
interface ConfirmAuBecsDebitSetupData 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<CreatePaymentMethodAuBecsDebitData, 'type'>;
}
}
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