@stripe/stripe-js 1.38.1 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pure.esm.js CHANGED
@@ -54,7 +54,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
54
54
 
55
55
  stripe._registerWrapper({
56
56
  name: 'stripe-js',
57
- version: "1.38.1",
57
+ version: "1.40.0",
58
58
  startTime: startTime
59
59
  });
60
60
  };
package/dist/pure.js CHANGED
@@ -58,7 +58,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
58
58
 
59
59
  stripe._registerWrapper({
60
60
  name: 'stripe-js',
61
- version: "1.38.1",
61
+ version: "1.40.0",
62
62
  startTime: startTime
63
63
  });
64
64
  };
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "1.38.1",
41
+ version: "1.40.0",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/dist/stripe.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "1.38.1",
45
+ version: "1.40.0",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "1.38.1",
3
+ "version": "1.40.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -1,3 +1,93 @@
1
+ type SupportedPaymentMethodType = 'us_bank_account' | 'link';
2
+
3
+ interface CommonBalance {
4
+ /**
5
+ * The time that the external institution calculated this balance. Measured
6
+ * in seconds since the Unix epoch.
7
+ */
8
+ as_of: number;
9
+
10
+ /**
11
+ * The balances owed to (or by) the account holder.
12
+ *
13
+ * Each key is a three-letter ISO currency code, in lowercase.
14
+ *
15
+ * Each value is a integer amount. A positive amount indicates money owed to
16
+ * the account holder. A negative amount indicates money owed by the account
17
+ * holder.
18
+ */
19
+ current: {
20
+ [key: string]: number | undefined;
21
+ };
22
+ }
23
+
24
+ interface CashBalance {
25
+ /**
26
+ * Information on a `cash` balance. Only set if `balance.type` is `cash`.
27
+ */
28
+ cash: {
29
+ /**
30
+ * The funds available to the account holder. Typically this is the
31
+ * current balance less any holds.
32
+ *
33
+ * Each key is a three-letter ISO currency code, in lowercase.
34
+ *
35
+ * Each value is a integer amount. A positive amount indicates money owed
36
+ * to the account holder. A negative amount indicates money owed by the
37
+ * account holder.
38
+ */
39
+ available: {[key: string]: number | undefined};
40
+ };
41
+
42
+ type: 'cash';
43
+ }
44
+
45
+ interface CreditBalance {
46
+ /**
47
+ * Information on a `credit` balance. Only set if `balance.type` is `credit`.
48
+ */
49
+ credit: {
50
+ /**
51
+ * The credit that has been used by the account holder.
52
+ *
53
+ * Each key is a three-letter ISO currency code, in lowercase
54
+ *
55
+ * Each value is a integer amount. A positive amount indicates money owed
56
+ * to the account holder. A negative amount indicates money owed by the
57
+ * account holder.
58
+ */
59
+ used: {[key: string]: number | undefined};
60
+ };
61
+
62
+ type: 'credit';
63
+ }
64
+
65
+ type Balance = (CommonBalance & CashBalance) | (CommonBalance & CreditBalance);
66
+
67
+ interface BalanceRefresh {
68
+ /**
69
+ * The status of the Balance Refresh
70
+ */
71
+ status: 'pending' | 'succeeded' | 'failed';
72
+
73
+ /**
74
+ * Time at which the Balance Refresh was attempted. Measured in seconds since the Unix epoch.
75
+ */
76
+ last_attempted_at: number;
77
+ }
78
+
79
+ interface OwnershipRefresh {
80
+ /**
81
+ * The status of the Ownership Refresh
82
+ */
83
+ status: 'pending' | 'succeeded' | 'failed';
84
+
85
+ /**
86
+ * Time at which the Ownersip Refresh was attempted. Measured in seconds since the Unix epoch.
87
+ */
88
+ last_attempted_at: number;
89
+ }
90
+
1
91
  /**
2
92
  * The Financial Connections Session object
3
93
  */
@@ -43,10 +133,25 @@ export namespace FinancialConnectionsSession {
43
133
  */
44
134
  object: 'linked_account' | 'financial_connections.account';
45
135
 
136
+ /**
137
+ * The balance for this Account
138
+ */
139
+ balance: null | Balance;
140
+
141
+ /**
142
+ * The most recent Balance Refresh for this Account
143
+ */
144
+ balance_refresh: null | BalanceRefresh;
145
+
46
146
  /**
47
147
  * The type of the account.
48
148
  */
49
- category: string;
149
+ category: 'cash' | 'credit' | 'investment' | 'other';
150
+
151
+ /**
152
+ * Time at which the object was created. Measured in seconds since the Unix epoch.
153
+ */
154
+ created: number;
50
155
 
51
156
  /**
52
157
  * A human-readable name that has been assigned to this account, either by the account holder or by the institution.
@@ -62,6 +167,47 @@ export namespace FinancialConnectionsSession {
62
167
  * The last 4 digits of the account number. If present, this will be 4 numeric characters.
63
168
  */
64
169
  last4: string | null;
170
+
171
+ /**
172
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
173
+ */
174
+ livemode: boolean;
175
+
176
+ /**
177
+ * The ID of this account's Ownership resource.
178
+ */
179
+ ownership: string | null;
180
+
181
+ /**
182
+ * The most recent Ownership Refresh for this Account
183
+ */
184
+ ownership_refresh: null | OwnershipRefresh;
185
+
186
+ /**
187
+ * Permissions granted on this Account
188
+ */
189
+ permissions: Permission[];
190
+
191
+ /**
192
+ * The status of the Account
193
+ */
194
+ status: 'active' | 'inactive' | 'disconnected';
195
+
196
+ /**
197
+ * The sub-category of the Account
198
+ */
199
+ subcategory:
200
+ | 'checking'
201
+ | 'savings'
202
+ | 'mortgage'
203
+ | 'line_of_credit'
204
+ | 'credit_card'
205
+ | 'other';
206
+
207
+ /**
208
+ * The types of Payment Methods which can be set up by this Account
209
+ */
210
+ supported_payment_method_types: SupportedPaymentMethodType[];
65
211
  }
66
212
 
67
213
  /**
@@ -1,4 +1,4 @@
1
- import {StripeElementBase, StripeElementChangeEvent} from './base';
1
+ import {StripeElementBase} from './base';
2
2
  import {StripeError} from '../stripe';
3
3
 
4
4
  export type StripeAddressElement = StripeElementBase & {
@@ -208,8 +208,7 @@ export interface StripeAddressElementOptions {
208
208
  };
209
209
  }
210
210
 
211
- export interface StripeAddressElementChangeEvent
212
- extends StripeElementChangeEvent {
211
+ export interface StripeAddressElementChangeEvent {
213
212
  /**
214
213
  * The type of element that emitted this event.
215
214
  */
@@ -0,0 +1,157 @@
1
+ import {StripeElementBase} from './base';
2
+ import {StripeError} from '../stripe';
3
+
4
+ export type StripeCartElement = StripeElementBase & {
5
+ /**
6
+ * The change event is triggered when the `Element`'s value changes.
7
+ */
8
+ on(
9
+ eventType: 'change',
10
+ handler: (event: StripeCartElementPayloadEvent) => any
11
+ ): StripeCartElement;
12
+ once(
13
+ eventType: 'change',
14
+ handler: (event: StripeCartElementPayloadEvent) => any
15
+ ): StripeCartElement;
16
+ off(
17
+ eventType: 'change',
18
+ handler?: (event: StripeCartElementPayloadEvent) => any
19
+ ): StripeCartElement;
20
+
21
+ /**
22
+ * Triggered when the element is fully rendered and can accept `element.focus` calls.
23
+ */
24
+ on(
25
+ eventType: 'ready',
26
+ handler: (event: StripeCartElementPayloadEvent) => any
27
+ ): StripeCartElement;
28
+ once(
29
+ eventType: 'ready',
30
+ handler: (event: StripeCartElementPayloadEvent) => any
31
+ ): StripeCartElement;
32
+ off(
33
+ eventType: 'ready',
34
+ handler?: (event: StripeCartElementPayloadEvent) => any
35
+ ): StripeCartElement;
36
+
37
+ /**
38
+ * Triggered when the element fails to load.
39
+ */
40
+ on(
41
+ eventType: 'loaderror',
42
+ handler: (event: {elementType: 'cart'; error: StripeError}) => any
43
+ ): StripeCartElement;
44
+ once(
45
+ eventType: 'loaderror',
46
+ handler: (event: {elementType: 'cart'; error: StripeError}) => any
47
+ ): StripeCartElement;
48
+ off(
49
+ eventType: 'loaderror',
50
+ handler?: (event: {elementType: 'cart'; error: StripeError}) => any
51
+ ): StripeCartElement;
52
+
53
+ /**
54
+ * Triggered when the 'checkout' button in the element is clicked
55
+ */
56
+ on(
57
+ eventType: 'checkout',
58
+ handler: (event: StripeCartElementPayloadEvent) => any
59
+ ): StripeCartElement;
60
+ once(
61
+ eventType: 'checkout',
62
+ handler: (event: StripeCartElementPayloadEvent) => any
63
+ ): StripeCartElement;
64
+ off(
65
+ eventType: 'checkout',
66
+ handler?: (event: StripeCartElementPayloadEvent) => any
67
+ ): StripeCartElement;
68
+
69
+ /**
70
+ * Triggered when a line item in the element is clicked
71
+ */
72
+ on(
73
+ eventType: 'lineitemclick',
74
+ handler: (event: StripeCartElementLineItemClickEvent) => any
75
+ ): StripeCartElement;
76
+ once(
77
+ eventType: 'lineitemclick',
78
+ handler: (event: StripeCartElementLineItemClickEvent) => any
79
+ ): StripeCartElement;
80
+ off(
81
+ eventType: 'lineitemclick',
82
+ handler?: (event: StripeCartElementLineItemClickEvent) => any
83
+ ): StripeCartElement;
84
+
85
+ /**
86
+ * Updates the options the `CartElement` was initialized with.
87
+ * Updates are merged into the existing configuration.
88
+ */
89
+ update(options: Partial<StripeCartElementOptions>): StripeCartElement;
90
+ };
91
+
92
+ export type CartDescriptor = 'cart' | 'bag' | 'basket';
93
+
94
+ export type CartShowOnAdd = 'never' | 'auto';
95
+
96
+ export interface StripeCartElementOptions {
97
+ /**
98
+ * Identifies the CartSession the Element will display and modify.
99
+ */
100
+ clientSecret: string;
101
+
102
+ /**
103
+ * Override the verbiage used within the Element to refer to itself.
104
+ * By default the Cart Element will use the term 'cart'.
105
+ */
106
+ descriptor?: CartDescriptor | null;
107
+
108
+ /**
109
+ * Override the text used in the title of the Element.
110
+ * By default the Cart Element will use the title 'Your [descriptor]'.
111
+ */
112
+ header?: {
113
+ text?: string;
114
+ };
115
+
116
+ /**
117
+ * Control whether the Element automatically appears when items are added to the cart.
118
+ * By default, the Cart Element will use 'auto'.
119
+ */
120
+ showOnAdd?: CartShowOnAdd | null;
121
+ }
122
+
123
+ export interface StripeCartElementPayloadEvent {
124
+ /**
125
+ * The type of element that emitted this event.
126
+ */
127
+ elementType: 'cart';
128
+
129
+ /**
130
+ * The ID of the CartSession associated with the Element.
131
+ */
132
+ id: string;
133
+
134
+ /**
135
+ * The number of line items currently in the cart.
136
+ */
137
+ lineItems: {
138
+ count: number;
139
+ };
140
+ }
141
+
142
+ export interface StripeCartElementLineItemClickEvent {
143
+ /**
144
+ * The type of element that emitted this event.
145
+ */
146
+ elementType: 'cart';
147
+
148
+ /**
149
+ * The ID of the CartSession associated with the Element.
150
+ */
151
+ preventDefault: () => void;
152
+
153
+ /**
154
+ * The type of element that emitted this event.
155
+ */
156
+ url: string;
157
+ }
@@ -8,6 +8,7 @@ export * from './card-cvc';
8
8
  export * from './card-expiry';
9
9
  export * from './card-number';
10
10
  export * from './card';
11
+ export * from './cart';
11
12
  export * from './eps-bank';
12
13
  export * from './fpx-bank';
13
14
  export * from './iban';
@@ -17,3 +18,4 @@ export * from './p24-bank';
17
18
  export * from './payment-request-button';
18
19
  export * from './payment';
19
20
  export * from './shipping-address';
21
+ export * from './issuing';
@@ -0,0 +1,5 @@
1
+ export * from './issuing-card-number-display';
2
+ export * from './issuing-card-cvc-display';
3
+ export * from './issuing-card-expiry-display';
4
+ export * from './issuing-card-pin-display';
5
+ export * from './issuing-card-copy-button';
@@ -0,0 +1,37 @@
1
+ import {StripeElementBase, StripeElementStyle} from '../base';
2
+
3
+ export type StripeIssuingCardCopyButtonElement = StripeElementBase & {
4
+ /**
5
+ * Triggered when the element is clicked.
6
+ */
7
+ on(
8
+ eventType: 'click',
9
+ handler: (event: {elementType: 'issuingCardCopyButton'}) => any
10
+ ): StripeIssuingCardCopyButtonElement;
11
+ once(
12
+ eventType: 'click',
13
+ handler: (event: {elementType: 'issuingCardCopyButton'}) => any
14
+ ): StripeIssuingCardCopyButtonElement;
15
+ off(
16
+ eventType: 'click',
17
+ handler?: (event: {elementType: 'issuingCardCopyButton'}) => any
18
+ ): StripeIssuingCardCopyButtonElement;
19
+
20
+ /**
21
+ * Updates the options the `IssuingCardCopyButtonElement` was initialized with.
22
+ * Updates are merged into the existing configuration.
23
+ *
24
+ * The styles of an `IssuingCardCopyButtonElement` can be dynamically changed using `element.update`.
25
+ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
26
+ */
27
+ update(options: Partial<StripeIssuingCardCopyButtonElementOptions>): void;
28
+ };
29
+
30
+ export interface StripeIssuingCardCopyButtonElementOptions {
31
+ /**
32
+ * The issued card data element to copy to the user's clipboard
33
+ */
34
+ toCopy: 'expiry' | 'cvc' | 'number' | 'pin';
35
+
36
+ style?: StripeElementStyle;
37
+ }
@@ -0,0 +1,32 @@
1
+ import {StripeElementBase, StripeElementStyle} from '../base';
2
+
3
+ export type StripeIssuingCardCvcDisplayElement = StripeElementBase & {
4
+ /**
5
+ * Updates the options the `IssuingCardCvcDisplayElement` was initialized with.
6
+ * Updates are merged into the existing configuration.
7
+ *
8
+ * The styles of an `IssuingCardCvcDisplayElement` can be dynamically changed using `element.update`.
9
+ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
+ */
11
+ update(options: Partial<StripeIssuingCardCvcDisplayElementOptions>): void;
12
+ };
13
+
14
+ export interface StripeIssuingCardCvcDisplayElementOptions {
15
+ /**
16
+ * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
+ */
18
+ issuingCard: string;
19
+
20
+ /**
21
+ * The secret component of the ephemeral key with which to authenticate this sensitive
22
+ * card details request
23
+ */
24
+ ephemeralKeySecret?: string;
25
+
26
+ /**
27
+ * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
+ */
29
+ nonce?: string;
30
+
31
+ style?: StripeElementStyle;
32
+ }
@@ -0,0 +1,32 @@
1
+ import {StripeElementBase, StripeElementStyle} from '../base';
2
+
3
+ export type StripeIssuingCardExpiryDisplayElement = StripeElementBase & {
4
+ /**
5
+ * Updates the options the `IssuingCardExpiryDisplayElement` was initialized with.
6
+ * Updates are merged into the existing configuration.
7
+ *
8
+ * The styles of an `IssuingCardExpiryDisplayElement` can be dynamically changed using `element.update`.
9
+ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
+ */
11
+ update(options: Partial<StripeIssuingCardExpiryDisplayElementOptions>): void;
12
+ };
13
+
14
+ export interface StripeIssuingCardExpiryDisplayElementOptions {
15
+ /**
16
+ * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
+ */
18
+ issuingCard: string;
19
+
20
+ /**
21
+ * The secret component of the ephemeral key with which to authenticate this sensitive
22
+ * card details request
23
+ */
24
+ ephemeralKeySecret?: string;
25
+
26
+ /**
27
+ * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
+ */
29
+ nonce?: string;
30
+
31
+ style?: StripeElementStyle;
32
+ }
@@ -0,0 +1,32 @@
1
+ import {StripeElementBase, StripeElementStyle} from '../base';
2
+
3
+ export type StripeIssuingCardNumberDisplayElement = StripeElementBase & {
4
+ /**
5
+ * Updates the options the `IssuingCardNumberDisplayElement` was initialized with.
6
+ * Updates are merged into the existing configuration.
7
+ *
8
+ * The styles of an `IssuingCardNumberDisplayElement` can be dynamically changed using `element.update`.
9
+ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
+ */
11
+ update(options: Partial<StripeIssuingCardNumberDisplayElementOptions>): void;
12
+ };
13
+
14
+ export interface StripeIssuingCardNumberDisplayElementOptions {
15
+ /**
16
+ * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
+ */
18
+ issuingCard: string;
19
+
20
+ /**
21
+ * The secret component of the ephemeral key with which to authenticate this sensitive
22
+ * card details request
23
+ */
24
+ ephemeralKeySecret?: string;
25
+
26
+ /**
27
+ * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
+ */
29
+ nonce?: string;
30
+
31
+ style?: StripeElementStyle;
32
+ }
@@ -0,0 +1,32 @@
1
+ import {StripeElementBase, StripeElementStyle} from '../base';
2
+
3
+ export type StripeIssuingCardPinDisplayElement = StripeElementBase & {
4
+ /**
5
+ * Updates the options the `IssuingCardPinDisplayElement` was initialized with.
6
+ * Updates are merged into the existing configuration.
7
+ *
8
+ * The styles of an `IssuingCardPinDisplayElement` can be dynamically changed using `element.update`.
9
+ * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
10
+ */
11
+ update(options: Partial<StripeIssuingCardPinDisplayElementOptions>): void;
12
+ };
13
+
14
+ export interface StripeIssuingCardPinDisplayElementOptions {
15
+ /**
16
+ * The token (e.g. `ic_abc123`) of the issued card to display in this Element
17
+ */
18
+ issuingCard: string;
19
+
20
+ /**
21
+ * The secret component of the ephemeral key with which to authenticate this sensitive
22
+ * card details request
23
+ */
24
+ ephemeralKeySecret?: string;
25
+
26
+ /**
27
+ * The nonce used to mint the ephemeral key provided in `ephemeralKeySecret`
28
+ */
29
+ nonce?: string;
30
+
31
+ style?: StripeElementStyle;
32
+ }
@@ -1,4 +1,4 @@
1
- import {StripeElementBase, StripeElementChangeEvent} from './base';
1
+ import {StripeElementBase} from './base';
2
2
  import {StripeError} from '../stripe';
3
3
 
4
4
  export type StripeLinkAuthenticationElement = StripeElementBase & {
@@ -133,8 +133,7 @@ export interface StripeLinkAuthenticationElementOptions {
133
133
  };
134
134
  }
135
135
 
136
- export interface StripeLinkAuthenticationElementChangeEvent
137
- extends StripeElementChangeEvent {
136
+ export interface StripeLinkAuthenticationElementChangeEvent {
138
137
  /**
139
138
  * The type of element that emitted this event.
140
139
  */
@@ -1,4 +1,4 @@
1
- import {StripeElementBase, StripeElementChangeEvent} from './base';
1
+ import {StripeElementBase} from './base';
2
2
  import {StripeError} from '../stripe';
3
3
 
4
4
  export type StripeShippingAddressElement = StripeElementBase & {
@@ -176,8 +176,7 @@ export interface StripeShippingAddressElementOptions {
176
176
  };
177
177
  }
178
178
 
179
- export interface StripeShippingAddressElementChangeEvent
180
- extends StripeElementChangeEvent {
179
+ export interface StripeShippingAddressElementChangeEvent {
181
180
  /**
182
181
  * The type of element that emitted this event.
183
182
  */
@@ -27,6 +27,8 @@ import {
27
27
  StripeCardNumberElementOptions,
28
28
  StripeCardElement,
29
29
  StripeCardElementOptions,
30
+ StripeCartElement,
31
+ StripeCartElementOptions,
30
32
  StripeAuBankAccountElement,
31
33
  StripeAfterpayClearpayMessageElementOptions,
32
34
  StripeAffirmMessageElement,
@@ -35,6 +37,16 @@ import {
35
37
  StripePaymentMethodMessagingElement,
36
38
  StripeAfterpayClearpayMessageElement,
37
39
  StripeAuBankAccountElementOptions,
40
+ StripeIssuingCardNumberDisplayElement,
41
+ StripeIssuingCardNumberDisplayElementOptions,
42
+ StripeIssuingCardCvcDisplayElement,
43
+ StripeIssuingCardCvcDisplayElementOptions,
44
+ StripeIssuingCardExpiryDisplayElement,
45
+ StripeIssuingCardExpiryDisplayElementOptions,
46
+ StripeIssuingCardPinDisplayElement,
47
+ StripeIssuingCardPinDisplayElementOptions,
48
+ StripeIssuingCardCopyButtonElement,
49
+ StripeIssuingCardCopyButtonElementOptions,
38
50
  } from './elements';
39
51
 
40
52
  export interface StripeElements {
@@ -219,6 +231,29 @@ export interface StripeElements {
219
231
  */
220
232
  getElement(elementType: 'cardCvc'): StripeCardCvcElement | null;
221
233
 
234
+ /////////////////////////////
235
+ /// cart
236
+ /////////////////////////////
237
+
238
+ /**
239
+ * Requires beta access:
240
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
241
+ *
242
+ * Creates a `CartElement`.
243
+ */
244
+ create(
245
+ elementType: 'cart',
246
+ options: StripeCartElementOptions
247
+ ): StripeCartElement;
248
+
249
+ /**
250
+ * Requires beta access:
251
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
252
+ *
253
+ * Looks up a previously created `Element` by its type.
254
+ */
255
+ getElement(elementType: 'cart'): StripeCartElement | null;
256
+
222
257
  /////////////////////////////
223
258
  /// fpxBank
224
259
  /////////////////////////////
@@ -399,6 +434,60 @@ export interface StripeElements {
399
434
  getElement(
400
435
  elementType: 'shippingAddress'
401
436
  ): StripeShippingAddressElement | null;
437
+
438
+ /////////////////////////////
439
+ /// issuing
440
+ /////////////////////////////
441
+
442
+ /**
443
+ * Creates an `issuingCardNumberDisplay` Element
444
+ *
445
+ * @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardNumberDisplay
446
+ */
447
+ create(
448
+ elementType: 'issuingCardNumberDisplay',
449
+ options: StripeIssuingCardNumberDisplayElementOptions
450
+ ): StripeIssuingCardNumberDisplayElement;
451
+
452
+ /**
453
+ * Creates an `issuingCardCvcDisplay` Element
454
+ *
455
+ * @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardCvcDisplay
456
+ */
457
+ create(
458
+ elementType: 'issuingCardCvcDisplay',
459
+ options: StripeIssuingCardCvcDisplayElementOptions
460
+ ): StripeIssuingCardCvcDisplayElement;
461
+
462
+ /**
463
+ * Creates an `issuingCardExpiryDisplay` Element
464
+ *
465
+ * @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardExpiryDisplay
466
+ */
467
+ create(
468
+ elementType: 'issuingCardExpiryDisplay',
469
+ options: StripeIssuingCardExpiryDisplayElementOptions
470
+ ): StripeIssuingCardExpiryDisplayElement;
471
+
472
+ /**
473
+ * Creates an `issuingCardPinDisplay` Element
474
+ *
475
+ * @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardPinDisplay
476
+ */
477
+ create(
478
+ elementType: 'issuingCardPinDisplay',
479
+ options: StripeIssuingCardPinDisplayElementOptions
480
+ ): StripeIssuingCardPinDisplayElement;
481
+
482
+ /**
483
+ * Creates an `issuingCardCopyButton` Element
484
+ *
485
+ * @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardCopyButton
486
+ */
487
+ create(
488
+ elementType: 'issuingCardCopyButton',
489
+ options: StripeIssuingCardCopyButtonElementOptions
490
+ ): StripeIssuingCardCopyButtonElement;
402
491
  }
403
492
 
404
493
  export type StripeElementType =
@@ -410,6 +499,7 @@ export type StripeElementType =
410
499
  | 'cardNumber'
411
500
  | 'cardExpiry'
412
501
  | 'cardCvc'
502
+ | 'cart'
413
503
  | 'epsBank'
414
504
  | 'fpxBank'
415
505
  | 'iban'
@@ -419,9 +509,15 @@ export type StripeElementType =
419
509
  | 'paymentMethodMessaging'
420
510
  | 'paymentRequestButton'
421
511
  | 'linkAuthentication'
422
- | 'shippingAddress';
512
+ | 'shippingAddress'
513
+ | 'issuingCardNumberDisplay'
514
+ | 'issuingCardCvcDisplay'
515
+ | 'issuingCardExpiryDisplay'
516
+ | 'issuingCardPinDisplay'
517
+ | 'issuingCardCopyButton';
423
518
 
424
519
  export type StripeElement =
520
+ | StripeAddressElement
425
521
  | StripeAffirmMessageElement
426
522
  | StripeAfterpayClearpayMessageElement
427
523
  | StripeAuBankAccountElement
@@ -429,6 +525,7 @@ export type StripeElement =
429
525
  | StripeCardNumberElement
430
526
  | StripeCardExpiryElement
431
527
  | StripeCardCvcElement
528
+ | StripeCartElement
432
529
  | StripeEpsBankElement
433
530
  | StripeFpxBankElement
434
531
  | StripeIbanElement
@@ -436,7 +533,14 @@ export type StripeElement =
436
533
  | StripeP24BankElement
437
534
  | StripePaymentElement
438
535
  | StripePaymentMethodMessagingElement
439
- | StripePaymentRequestButtonElement;
536
+ | StripePaymentRequestButtonElement
537
+ | StripeIssuingCardNumberDisplayElement
538
+ | StripeIssuingCardCvcDisplayElement
539
+ | StripeIssuingCardExpiryDisplayElement
540
+ | StripeIssuingCardPinDisplayElement
541
+ | StripeIssuingCardCopyButtonElement
542
+ | StripeLinkAuthenticationElement
543
+ | StripeShippingAddressElement;
440
544
 
441
545
  export type StripeElementLocale =
442
546
  | 'auto'
@@ -0,0 +1,3 @@
1
+ export interface EphemeralKeyNonceOptions {
2
+ issuingCard: string;
3
+ }
@@ -32,6 +32,7 @@ export type CreatePaymentMethodData =
32
32
  | CreatePaymentMethodP24Data
33
33
  | CreatePaymentMethodPayPalData
34
34
  | CreatePaymentMethodPayNowData
35
+ | CreatePaymentMethodPixData
35
36
  | CreatePaymentMethodPromptPayData
36
37
  | CreatePaymentMethodFpxData
37
38
  | CreatePaymentMethodUsBankAccountData
@@ -289,6 +290,10 @@ export interface CreatePaymentMethodPayPalData
289
290
  type: 'paypal';
290
291
  }
291
292
 
293
+ export interface CreatePaymentMethodPixData extends PaymentMethodCreateParams {
294
+ type: 'pix';
295
+ }
296
+
292
297
  export interface CreatePaymentMethodPromptPayData
293
298
  extends PaymentMethodCreateParams {
294
299
  type: 'promptpay';
@@ -1057,6 +1062,31 @@ export interface ConfirmP24PaymentOptions {
1057
1062
  handleActions?: boolean;
1058
1063
  }
1059
1064
 
1065
+ /**
1066
+ * Data to be sent with a `stripe.confirmPixPayment` request.
1067
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1068
+ */
1069
+ export interface ConfirmPixPaymentData extends PaymentIntentConfirmParams {
1070
+ /**
1071
+ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
1072
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
1073
+ *
1074
+ * @recommended
1075
+ */
1076
+ payment_method?: string | Omit<CreatePaymentMethodPixData, 'type'>;
1077
+ }
1078
+
1079
+ /**
1080
+ * An options object to control the behavior of `stripe.confirmPayNowPayment`.
1081
+ */
1082
+ export interface ConfirmPixPaymentOptions {
1083
+ /**
1084
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
1085
+ * Default is `true`.
1086
+ */
1087
+ handleActions?: boolean;
1088
+ }
1089
+
1060
1090
  /**
1061
1091
  * Data to be sent with a `stripe.confirmPayNowPayment` request.
1062
1092
  * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
@@ -5,6 +5,7 @@ import * as orders from './orders';
5
5
  import * as tokens from './token-and-sources';
6
6
  import * as elements from './elements';
7
7
  import * as financialConnections from './financial-connections';
8
+ import * as ephemeralKeys from './ephemeral-keys';
8
9
 
9
10
  import {StripeElements, StripeElementsOptions} from './elements-group';
10
11
  import {CheckoutLocale, RedirectToCheckoutOptions} from './checkout';
@@ -408,6 +409,24 @@ export interface Stripe {
408
409
  data?: paymentIntents.ConfirmPayPalPaymentData
409
410
  ): Promise<PaymentIntentResult>;
410
411
 
412
+ /**
413
+
414
+ * Use `stripe.confirmPixPayment` in the [Pix Payments](https://stripe.com/docs/payments/pix) with Payment Methods flow when the customer submits your payment form.
415
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
416
+ * Refer to our [integration guide](https://stripe.com/docs/payments/pix) for more details.
417
+ *
418
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
419
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
420
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
421
+ *
422
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_pix_payment
423
+ */
424
+ confirmPixPayment(
425
+ clientSecret: string,
426
+ data?: paymentIntents.ConfirmPixPaymentData,
427
+ options?: paymentIntents.ConfirmPixPaymentOptions
428
+ ): Promise<PaymentIntentResult>;
429
+
411
430
  /**
412
431
  * Requires beta access:
413
432
  * Contact [Stripe support](https://support.stripe.com/) for more information.
@@ -1006,6 +1025,15 @@ export interface Stripe {
1006
1025
  collectBankAccountToken(
1007
1026
  options: financialConnections.CollectBankAccountTokenOptions
1008
1027
  ): Promise<CollectBankAccountTokenResult>;
1028
+
1029
+ /**
1030
+ * Use `stripe.createEphemeralKeyNonce` to create an ephemeral key nonce that lets you securely create ephemeral keys
1031
+ *
1032
+ * * @docs https://stripe.com/docs/js/issuing/create_ephemeral_key_nonce
1033
+ */
1034
+ createEphemeralKeyNonce(
1035
+ options: ephemeralKeys.EphemeralKeyNonceOptions
1036
+ ): Promise<EphemeralKeyNonceResult>;
1009
1037
  }
1010
1038
 
1011
1039
  export type PaymentIntentResult =
@@ -1060,6 +1088,10 @@ export type CollectBankAccountTokenResult =
1060
1088
  error: StripeError;
1061
1089
  };
1062
1090
 
1091
+ export type EphemeralKeyNonceResult =
1092
+ | {nonce: string; error?: undefined}
1093
+ | {nonce?: undefined; error: StripeError};
1094
+
1063
1095
  /* A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
1064
1096
  This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
1065
1097
  You can find more details about how Radar uses this data by reading about how Radar performs [advanced fraud detection](https://stripe.com/docs/disputes/prevention/advanced-fraud-detection).