@stripe/stripe-js 9.15.0 → 9.17.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/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/pure.js +2 -2
- package/dist/pure.mjs +2 -2
- package/dist/stripe-js/checkout.d.mts +46 -0
- package/dist/stripe-js/checkout.d.ts +46 -0
- package/dist/stripe-js/elements/index.d.mts +1 -0
- package/dist/stripe-js/elements/index.d.ts +1 -0
- package/dist/stripe-js/elements/link-signup.d.mts +108 -0
- package/dist/stripe-js/elements/link-signup.d.ts +108 -0
- package/dist/stripe-js/elements-group.d.mts +27 -0
- package/dist/stripe-js/elements-group.d.ts +27 -0
- package/dist/stripe-js/financial-connections.d.mts +23 -0
- package/dist/stripe-js/financial-connections.d.ts +23 -0
- package/dist/stripe-js/payment-intents.d.mts +3 -0
- package/dist/stripe-js/payment-intents.d.ts +3 -0
- package/dist/stripe-js/setup-intents.d.mts +3 -0
- package/dist/stripe-js/setup-intents.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.17.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.17.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.js
CHANGED
|
@@ -71,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
71
71
|
|
|
72
72
|
stripe._registerWrapper({
|
|
73
73
|
name: 'stripe-js',
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.17.0",
|
|
75
75
|
startTime: startTime
|
|
76
76
|
});
|
|
77
77
|
};
|
|
@@ -172,7 +172,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
172
172
|
var expectedVersion = RELEASE_TRAIN;
|
|
173
173
|
|
|
174
174
|
if (isTestKey && version !== expectedVersion) {
|
|
175
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
175
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -67,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
67
67
|
|
|
68
68
|
stripe._registerWrapper({
|
|
69
69
|
name: 'stripe-js',
|
|
70
|
-
version: "9.
|
|
70
|
+
version: "9.17.0",
|
|
71
71
|
startTime: startTime
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -168,7 +168,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
168
168
|
var expectedVersion = RELEASE_TRAIN;
|
|
169
169
|
|
|
170
170
|
if (isTestKey && version !== expectedVersion) {
|
|
171
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.
|
|
171
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
var stripe = maybeStripe.apply(undefined, args);
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
StripeExpressCheckoutElementOptions,
|
|
18
18
|
StripeExpressCheckoutElementReadyEvent,
|
|
19
19
|
StripeCheckoutForm,
|
|
20
|
+
StripeLinkSignupElement,
|
|
20
21
|
StripeTaxIdElement,
|
|
21
22
|
StripeTaxIdElementOptions,
|
|
22
23
|
PaymentWalletsOption,
|
|
@@ -178,6 +179,36 @@ export type StripeCheckoutLineItem = {
|
|
|
178
179
|
images: string[];
|
|
179
180
|
priceId: string;
|
|
180
181
|
isRemovable: boolean;
|
|
182
|
+
pricing: StripeCheckoutGraduatedPricing | StripeCheckoutVolumePricing | null;
|
|
183
|
+
transformQuantity: StripeCheckoutTransformQuantity | null;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export type StripeCheckoutTransformQuantity = {
|
|
187
|
+
divideBy: number;
|
|
188
|
+
round: 'up' | 'down';
|
|
189
|
+
packageCount: number;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export type StripeCheckoutGraduatedPricing = {
|
|
193
|
+
tiersMode: 'graduated';
|
|
194
|
+
tiers: Array<StripeCheckoutTierBreakdown>;
|
|
195
|
+
recurringTiers: Array<StripeCheckoutTierBreakdown> | null;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type StripeCheckoutVolumePricing = {
|
|
199
|
+
tiersMode: 'volume';
|
|
200
|
+
tiers: Array<StripeCheckoutTierBreakdown>;
|
|
201
|
+
recurringTiers: Array<StripeCheckoutTierBreakdown> | null;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export type StripeCheckoutTierBreakdown = {
|
|
205
|
+
upTo: number | null;
|
|
206
|
+
unitAmount: StripeCheckoutAmount | null;
|
|
207
|
+
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
208
|
+
flatAmount: StripeCheckoutAmount | null;
|
|
209
|
+
flatAmountDecimal: StripeCheckoutAmount | null;
|
|
210
|
+
quantity: number;
|
|
211
|
+
total: StripeCheckoutAmount | null;
|
|
181
212
|
};
|
|
182
213
|
|
|
183
214
|
export type StripeCheckoutRecurring = {
|
|
@@ -431,6 +462,14 @@ export type StripeCheckoutContactDetailsElementOptions = Record<string, never>;
|
|
|
431
462
|
|
|
432
463
|
export type StripeCheckoutTermsElementOptions = Record<string, never>;
|
|
433
464
|
|
|
465
|
+
export type StripeCheckoutLinkSignupElementOptions = {
|
|
466
|
+
defaultValues?: {
|
|
467
|
+
email?: string;
|
|
468
|
+
name?: string;
|
|
469
|
+
phone?: string;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
|
|
434
473
|
/**
|
|
435
474
|
* Wallet button theme options for CheckoutForm.
|
|
436
475
|
*/
|
|
@@ -720,6 +759,7 @@ type ValidateElementsValidationError = {
|
|
|
720
759
|
| 'billingAddress'
|
|
721
760
|
| 'taxId'
|
|
722
761
|
| 'terms'
|
|
762
|
+
| 'linkSignup'
|
|
723
763
|
| 'linkAuthentication';
|
|
724
764
|
};
|
|
725
765
|
type ValidateElementsError = {
|
|
@@ -821,6 +861,8 @@ export interface StripeCheckoutElementsSdk {
|
|
|
821
861
|
getTaxIdElement(): StripeTaxIdElement | null;
|
|
822
862
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
823
863
|
getTermsElement(): StripeTermsElement | null;
|
|
864
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
865
|
+
getLinkSignupElement(): StripeLinkSignupElement | null;
|
|
824
866
|
|
|
825
867
|
createPaymentElement(
|
|
826
868
|
options?: StripeCheckoutPaymentElementOptions
|
|
@@ -844,6 +886,10 @@ export interface StripeCheckoutElementsSdk {
|
|
|
844
886
|
createTermsElement(
|
|
845
887
|
options?: StripeCheckoutTermsElementOptions
|
|
846
888
|
): StripeTermsElement;
|
|
889
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
890
|
+
createLinkSignupElement(
|
|
891
|
+
options?: StripeCheckoutLinkSignupElementOptions
|
|
892
|
+
): StripeLinkSignupElement;
|
|
847
893
|
}
|
|
848
894
|
|
|
849
895
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
StripeExpressCheckoutElementOptions,
|
|
18
18
|
StripeExpressCheckoutElementReadyEvent,
|
|
19
19
|
StripeCheckoutForm,
|
|
20
|
+
StripeLinkSignupElement,
|
|
20
21
|
StripeTaxIdElement,
|
|
21
22
|
StripeTaxIdElementOptions,
|
|
22
23
|
PaymentWalletsOption,
|
|
@@ -178,6 +179,36 @@ export type StripeCheckoutLineItem = {
|
|
|
178
179
|
images: string[];
|
|
179
180
|
priceId: string;
|
|
180
181
|
isRemovable: boolean;
|
|
182
|
+
pricing: StripeCheckoutGraduatedPricing | StripeCheckoutVolumePricing | null;
|
|
183
|
+
transformQuantity: StripeCheckoutTransformQuantity | null;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export type StripeCheckoutTransformQuantity = {
|
|
187
|
+
divideBy: number;
|
|
188
|
+
round: 'up' | 'down';
|
|
189
|
+
packageCount: number;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export type StripeCheckoutGraduatedPricing = {
|
|
193
|
+
tiersMode: 'graduated';
|
|
194
|
+
tiers: Array<StripeCheckoutTierBreakdown>;
|
|
195
|
+
recurringTiers: Array<StripeCheckoutTierBreakdown> | null;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type StripeCheckoutVolumePricing = {
|
|
199
|
+
tiersMode: 'volume';
|
|
200
|
+
tiers: Array<StripeCheckoutTierBreakdown>;
|
|
201
|
+
recurringTiers: Array<StripeCheckoutTierBreakdown> | null;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export type StripeCheckoutTierBreakdown = {
|
|
205
|
+
upTo: number | null;
|
|
206
|
+
unitAmount: StripeCheckoutAmount | null;
|
|
207
|
+
unitAmountDecimal: StripeCheckoutAmount | null;
|
|
208
|
+
flatAmount: StripeCheckoutAmount | null;
|
|
209
|
+
flatAmountDecimal: StripeCheckoutAmount | null;
|
|
210
|
+
quantity: number;
|
|
211
|
+
total: StripeCheckoutAmount | null;
|
|
181
212
|
};
|
|
182
213
|
|
|
183
214
|
export type StripeCheckoutRecurring = {
|
|
@@ -431,6 +462,14 @@ export type StripeCheckoutContactDetailsElementOptions = Record<string, never>;
|
|
|
431
462
|
|
|
432
463
|
export type StripeCheckoutTermsElementOptions = Record<string, never>;
|
|
433
464
|
|
|
465
|
+
export type StripeCheckoutLinkSignupElementOptions = {
|
|
466
|
+
defaultValues?: {
|
|
467
|
+
email?: string;
|
|
468
|
+
name?: string;
|
|
469
|
+
phone?: string;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
|
|
434
473
|
/**
|
|
435
474
|
* Wallet button theme options for CheckoutForm.
|
|
436
475
|
*/
|
|
@@ -720,6 +759,7 @@ type ValidateElementsValidationError = {
|
|
|
720
759
|
| 'billingAddress'
|
|
721
760
|
| 'taxId'
|
|
722
761
|
| 'terms'
|
|
762
|
+
| 'linkSignup'
|
|
723
763
|
| 'linkAuthentication';
|
|
724
764
|
};
|
|
725
765
|
type ValidateElementsError = {
|
|
@@ -821,6 +861,8 @@ export interface StripeCheckoutElementsSdk {
|
|
|
821
861
|
getTaxIdElement(): StripeTaxIdElement | null;
|
|
822
862
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
823
863
|
getTermsElement(): StripeTermsElement | null;
|
|
864
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
865
|
+
getLinkSignupElement(): StripeLinkSignupElement | null;
|
|
824
866
|
|
|
825
867
|
createPaymentElement(
|
|
826
868
|
options?: StripeCheckoutPaymentElementOptions
|
|
@@ -844,6 +886,10 @@ export interface StripeCheckoutElementsSdk {
|
|
|
844
886
|
createTermsElement(
|
|
845
887
|
options?: StripeCheckoutTermsElementOptions
|
|
846
888
|
): StripeTermsElement;
|
|
889
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
890
|
+
createLinkSignupElement(
|
|
891
|
+
options?: StripeCheckoutLinkSignupElementOptions
|
|
892
|
+
): StripeLinkSignupElement;
|
|
847
893
|
}
|
|
848
894
|
|
|
849
895
|
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
@@ -12,6 +12,7 @@ export * from './currency-selector';
|
|
|
12
12
|
export * from './express-checkout';
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
|
+
export * from './link-signup';
|
|
15
16
|
export * from './payment-request-button';
|
|
16
17
|
export * from './payment';
|
|
17
18
|
export * from './shipping-address';
|
|
@@ -12,6 +12,7 @@ export * from './currency-selector';
|
|
|
12
12
|
export * from './express-checkout';
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
|
+
export * from './link-signup';
|
|
15
16
|
export * from './payment-request-button';
|
|
16
17
|
export * from './payment';
|
|
17
18
|
export * from './shipping-address';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeLinkSignupElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'ready',
|
|
10
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
11
|
+
): StripeLinkSignupElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'ready',
|
|
14
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
15
|
+
): StripeLinkSignupElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'ready',
|
|
18
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
19
|
+
): StripeLinkSignupElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element gains focus.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'focus',
|
|
26
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
27
|
+
): StripeLinkSignupElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'focus',
|
|
30
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
31
|
+
): StripeLinkSignupElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'focus',
|
|
34
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
35
|
+
): StripeLinkSignupElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element loses focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'blur',
|
|
42
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
43
|
+
): StripeLinkSignupElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'blur',
|
|
46
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
47
|
+
): StripeLinkSignupElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'blur',
|
|
50
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
51
|
+
): StripeLinkSignupElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the escape key is pressed within the element.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'escape',
|
|
58
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
59
|
+
): StripeLinkSignupElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'escape',
|
|
62
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
63
|
+
): StripeLinkSignupElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'escape',
|
|
66
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
67
|
+
): StripeLinkSignupElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the loader UI is mounted to the DOM and ready to be displayed.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'loaderstart',
|
|
74
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
75
|
+
): StripeLinkSignupElement;
|
|
76
|
+
once(
|
|
77
|
+
eventType: 'loaderstart',
|
|
78
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
79
|
+
): StripeLinkSignupElement;
|
|
80
|
+
off(
|
|
81
|
+
eventType: 'loaderstart',
|
|
82
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
83
|
+
): StripeLinkSignupElement;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Triggered when the element fails to load.
|
|
87
|
+
*/
|
|
88
|
+
on(
|
|
89
|
+
eventType: 'loaderror',
|
|
90
|
+
handler: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
91
|
+
): StripeLinkSignupElement;
|
|
92
|
+
once(
|
|
93
|
+
eventType: 'loaderror',
|
|
94
|
+
handler: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
95
|
+
): StripeLinkSignupElement;
|
|
96
|
+
off(
|
|
97
|
+
eventType: 'loaderror',
|
|
98
|
+
handler?: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
99
|
+
): StripeLinkSignupElement;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export interface StripeLinkSignupElementOptions {
|
|
103
|
+
defaultValues?: {
|
|
104
|
+
email?: string;
|
|
105
|
+
name?: string;
|
|
106
|
+
phone?: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeLinkSignupElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'ready',
|
|
10
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
11
|
+
): StripeLinkSignupElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'ready',
|
|
14
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
15
|
+
): StripeLinkSignupElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'ready',
|
|
18
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
19
|
+
): StripeLinkSignupElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element gains focus.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'focus',
|
|
26
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
27
|
+
): StripeLinkSignupElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'focus',
|
|
30
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
31
|
+
): StripeLinkSignupElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'focus',
|
|
34
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
35
|
+
): StripeLinkSignupElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element loses focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'blur',
|
|
42
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
43
|
+
): StripeLinkSignupElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'blur',
|
|
46
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
47
|
+
): StripeLinkSignupElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'blur',
|
|
50
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
51
|
+
): StripeLinkSignupElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the escape key is pressed within the element.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'escape',
|
|
58
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
59
|
+
): StripeLinkSignupElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'escape',
|
|
62
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
63
|
+
): StripeLinkSignupElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'escape',
|
|
66
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
67
|
+
): StripeLinkSignupElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the loader UI is mounted to the DOM and ready to be displayed.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'loaderstart',
|
|
74
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
75
|
+
): StripeLinkSignupElement;
|
|
76
|
+
once(
|
|
77
|
+
eventType: 'loaderstart',
|
|
78
|
+
handler: (event: {elementType: 'linkSignup'}) => any
|
|
79
|
+
): StripeLinkSignupElement;
|
|
80
|
+
off(
|
|
81
|
+
eventType: 'loaderstart',
|
|
82
|
+
handler?: (event: {elementType: 'linkSignup'}) => any
|
|
83
|
+
): StripeLinkSignupElement;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Triggered when the element fails to load.
|
|
87
|
+
*/
|
|
88
|
+
on(
|
|
89
|
+
eventType: 'loaderror',
|
|
90
|
+
handler: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
91
|
+
): StripeLinkSignupElement;
|
|
92
|
+
once(
|
|
93
|
+
eventType: 'loaderror',
|
|
94
|
+
handler: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
95
|
+
): StripeLinkSignupElement;
|
|
96
|
+
off(
|
|
97
|
+
eventType: 'loaderror',
|
|
98
|
+
handler?: (event: {elementType: 'linkSignup'; error: StripeError}) => any
|
|
99
|
+
): StripeLinkSignupElement;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export interface StripeLinkSignupElementOptions {
|
|
103
|
+
defaultValues?: {
|
|
104
|
+
email?: string;
|
|
105
|
+
name?: string;
|
|
106
|
+
phone?: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
StripePaymentElementOptions,
|
|
12
12
|
StripeLinkAuthenticationElement,
|
|
13
13
|
StripeLinkAuthenticationElementOptions,
|
|
14
|
+
StripeLinkSignupElement,
|
|
15
|
+
StripeLinkSignupElementOptions,
|
|
14
16
|
StripeContactDetailsElement,
|
|
15
17
|
StripeContactDetailsElementOptions,
|
|
16
18
|
StripeIbanElement,
|
|
@@ -245,6 +247,29 @@ export interface StripeElements {
|
|
|
245
247
|
elementType: 'linkAuthentication'
|
|
246
248
|
): StripeLinkAuthenticationElement | null;
|
|
247
249
|
|
|
250
|
+
/////////////////////////////
|
|
251
|
+
/// linkSignup
|
|
252
|
+
/////////////////////////////
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Requires beta access:
|
|
256
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
257
|
+
*
|
|
258
|
+
* Creates a `LinkSignupElement`.
|
|
259
|
+
*/
|
|
260
|
+
create(
|
|
261
|
+
elementType: 'linkSignup',
|
|
262
|
+
options?: StripeLinkSignupElementOptions
|
|
263
|
+
): StripeLinkSignupElement;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Requires beta access:
|
|
267
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
268
|
+
*
|
|
269
|
+
* Looks up a previously created `Element` by its type.
|
|
270
|
+
*/
|
|
271
|
+
getElement(elementType: 'linkSignup'): StripeLinkSignupElement | null;
|
|
272
|
+
|
|
248
273
|
/////////////////////////////
|
|
249
274
|
/// contactDetails
|
|
250
275
|
/////////////////////////////
|
|
@@ -488,6 +513,7 @@ export type StripeElementType =
|
|
|
488
513
|
| 'paymentMethodMessaging'
|
|
489
514
|
| 'paymentRequestButton'
|
|
490
515
|
| 'linkAuthentication'
|
|
516
|
+
| 'linkSignup'
|
|
491
517
|
| 'shippingAddress'
|
|
492
518
|
| 'issuingCardNumberDisplay'
|
|
493
519
|
| 'issuingCardCvcDisplay'
|
|
@@ -506,6 +532,7 @@ export type StripeElement =
|
|
|
506
532
|
| StripeCardExpiryElement
|
|
507
533
|
| StripeCardCvcElement
|
|
508
534
|
| StripeIbanElement
|
|
535
|
+
| StripeLinkSignupElement
|
|
509
536
|
| StripeContactDetailsElement
|
|
510
537
|
| StripeCurrencySelectorElement
|
|
511
538
|
| StripeExpressCheckoutElement
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
StripePaymentElementOptions,
|
|
12
12
|
StripeLinkAuthenticationElement,
|
|
13
13
|
StripeLinkAuthenticationElementOptions,
|
|
14
|
+
StripeLinkSignupElement,
|
|
15
|
+
StripeLinkSignupElementOptions,
|
|
14
16
|
StripeContactDetailsElement,
|
|
15
17
|
StripeContactDetailsElementOptions,
|
|
16
18
|
StripeIbanElement,
|
|
@@ -245,6 +247,29 @@ export interface StripeElements {
|
|
|
245
247
|
elementType: 'linkAuthentication'
|
|
246
248
|
): StripeLinkAuthenticationElement | null;
|
|
247
249
|
|
|
250
|
+
/////////////////////////////
|
|
251
|
+
/// linkSignup
|
|
252
|
+
/////////////////////////////
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Requires beta access:
|
|
256
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
257
|
+
*
|
|
258
|
+
* Creates a `LinkSignupElement`.
|
|
259
|
+
*/
|
|
260
|
+
create(
|
|
261
|
+
elementType: 'linkSignup',
|
|
262
|
+
options?: StripeLinkSignupElementOptions
|
|
263
|
+
): StripeLinkSignupElement;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Requires beta access:
|
|
267
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
268
|
+
*
|
|
269
|
+
* Looks up a previously created `Element` by its type.
|
|
270
|
+
*/
|
|
271
|
+
getElement(elementType: 'linkSignup'): StripeLinkSignupElement | null;
|
|
272
|
+
|
|
248
273
|
/////////////////////////////
|
|
249
274
|
/// contactDetails
|
|
250
275
|
/////////////////////////////
|
|
@@ -488,6 +513,7 @@ export type StripeElementType =
|
|
|
488
513
|
| 'paymentMethodMessaging'
|
|
489
514
|
| 'paymentRequestButton'
|
|
490
515
|
| 'linkAuthentication'
|
|
516
|
+
| 'linkSignup'
|
|
491
517
|
| 'shippingAddress'
|
|
492
518
|
| 'issuingCardNumberDisplay'
|
|
493
519
|
| 'issuingCardCvcDisplay'
|
|
@@ -506,6 +532,7 @@ export type StripeElement =
|
|
|
506
532
|
| StripeCardExpiryElement
|
|
507
533
|
| StripeCardCvcElement
|
|
508
534
|
| StripeIbanElement
|
|
535
|
+
| StripeLinkSignupElement
|
|
509
536
|
| StripeContactDetailsElement
|
|
510
537
|
| StripeCurrencySelectorElement
|
|
511
538
|
| StripeExpressCheckoutElement
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requires beta access:
|
|
3
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
4
|
+
*
|
|
5
|
+
* Evidence is subject to server-side eligibility and validation. Providing it
|
|
6
|
+
* does not guarantee that Stripe.js will omit its consent pane.
|
|
7
|
+
*/
|
|
8
|
+
export interface PreCollectedConsent {
|
|
9
|
+
/**
|
|
10
|
+
* ID of a financial_connections.consent object returned by the merchant's server.
|
|
11
|
+
*/
|
|
12
|
+
consent: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unix timestamp in seconds when the customer affirmatively accepted the complete consent text.
|
|
16
|
+
*/
|
|
17
|
+
collectedAt: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
/**
|
|
2
21
|
* Data to be sent with a `stripe.collectFinancialConnectionsAccounts` request.
|
|
3
22
|
*/
|
|
@@ -6,6 +25,8 @@ export interface CollectFinancialConnectionsAccountsOptions {
|
|
|
6
25
|
* The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
|
|
7
26
|
*/
|
|
8
27
|
clientSecret: string;
|
|
28
|
+
|
|
29
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
9
30
|
}
|
|
10
31
|
|
|
11
32
|
/**
|
|
@@ -16,4 +37,6 @@ export interface CollectBankAccountTokenOptions {
|
|
|
16
37
|
* The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
|
|
17
38
|
*/
|
|
18
39
|
clientSecret: string;
|
|
40
|
+
|
|
41
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
19
42
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requires beta access:
|
|
3
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
4
|
+
*
|
|
5
|
+
* Evidence is subject to server-side eligibility and validation. Providing it
|
|
6
|
+
* does not guarantee that Stripe.js will omit its consent pane.
|
|
7
|
+
*/
|
|
8
|
+
export interface PreCollectedConsent {
|
|
9
|
+
/**
|
|
10
|
+
* ID of a financial_connections.consent object returned by the merchant's server.
|
|
11
|
+
*/
|
|
12
|
+
consent: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unix timestamp in seconds when the customer affirmatively accepted the complete consent text.
|
|
16
|
+
*/
|
|
17
|
+
collectedAt: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
/**
|
|
2
21
|
* Data to be sent with a `stripe.collectFinancialConnectionsAccounts` request.
|
|
3
22
|
*/
|
|
@@ -6,6 +25,8 @@ export interface CollectFinancialConnectionsAccountsOptions {
|
|
|
6
25
|
* The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
|
|
7
26
|
*/
|
|
8
27
|
clientSecret: string;
|
|
28
|
+
|
|
29
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
9
30
|
}
|
|
10
31
|
|
|
11
32
|
/**
|
|
@@ -16,4 +37,6 @@ export interface CollectBankAccountTokenOptions {
|
|
|
16
37
|
* The client secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).
|
|
17
38
|
*/
|
|
18
39
|
clientSecret: string;
|
|
40
|
+
|
|
41
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
19
42
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
StripeAuBankAccountElement,
|
|
7
7
|
} from './elements';
|
|
8
8
|
import {PaymentMethodCreateParams, PaymentIntentConfirmParams} from '../api';
|
|
9
|
+
import {PreCollectedConsent} from './financial-connections';
|
|
9
10
|
import {Omit} from '../utils';
|
|
10
11
|
|
|
11
12
|
export type CreatePaymentMethodData =
|
|
@@ -1638,6 +1639,8 @@ export interface CollectBankAccountForPaymentOptions {
|
|
|
1638
1639
|
*/
|
|
1639
1640
|
clientSecret: string;
|
|
1640
1641
|
|
|
1642
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
1643
|
+
|
|
1641
1644
|
params: CollectBankAccountParams;
|
|
1642
1645
|
|
|
1643
1646
|
/**
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
StripeAuBankAccountElement,
|
|
7
7
|
} from './elements';
|
|
8
8
|
import {PaymentMethodCreateParams, PaymentIntentConfirmParams} from '../api';
|
|
9
|
+
import {PreCollectedConsent} from './financial-connections';
|
|
9
10
|
import {Omit} from '../utils';
|
|
10
11
|
|
|
11
12
|
export type CreatePaymentMethodData =
|
|
@@ -1638,6 +1639,8 @@ export interface CollectBankAccountForPaymentOptions {
|
|
|
1638
1639
|
*/
|
|
1639
1640
|
clientSecret: string;
|
|
1640
1641
|
|
|
1642
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
1643
|
+
|
|
1641
1644
|
params: CollectBankAccountParams;
|
|
1642
1645
|
|
|
1643
1646
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {PaymentMethodCreateParams, SetupIntentConfirmParams} from '../api';
|
|
2
|
+
import {PreCollectedConsent} from './financial-connections';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
CreatePaymentMethodAcssDebitData,
|
|
@@ -323,6 +324,8 @@ export interface CollectBankAccountForSetupOptions {
|
|
|
323
324
|
*/
|
|
324
325
|
clientSecret: string;
|
|
325
326
|
|
|
327
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
328
|
+
|
|
326
329
|
params: CollectBankAccountParams;
|
|
327
330
|
|
|
328
331
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {PaymentMethodCreateParams, SetupIntentConfirmParams} from '../api';
|
|
2
|
+
import {PreCollectedConsent} from './financial-connections';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
CreatePaymentMethodAcssDebitData,
|
|
@@ -323,6 +324,8 @@ export interface CollectBankAccountForSetupOptions {
|
|
|
323
324
|
*/
|
|
324
325
|
clientSecret: string;
|
|
325
326
|
|
|
327
|
+
preCollectedConsent?: PreCollectedConsent;
|
|
328
|
+
|
|
326
329
|
params: CollectBankAccountParams;
|
|
327
330
|
|
|
328
331
|
/**
|