@stripe/stripe-js 9.14.0 → 9.16.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/api/confirmation-tokens.d.mts +10 -1
- package/dist/api/confirmation-tokens.d.ts +10 -1
- 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 +28 -0
- package/dist/stripe-js/elements-group.d.ts +28 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {StripeElements} from '../stripe-js';
|
|
2
|
-
import {Address} from './shared';
|
|
2
|
+
import {Address, MetadataParam} from './shared';
|
|
3
3
|
import {PaymentMethod, PaymentMethodCreateParams} from './payment-methods';
|
|
4
4
|
import {PaymentIntent} from './payment-intents';
|
|
5
5
|
|
|
@@ -105,6 +105,15 @@ export interface ConfirmationTokenCreateParams {
|
|
|
105
105
|
* The url your customer will be directed to after they complete authentication.
|
|
106
106
|
*/
|
|
107
107
|
return_url?: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
111
|
+
*
|
|
112
|
+
* This can be a maximum of 50 keys.
|
|
113
|
+
*
|
|
114
|
+
* @docs https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token#create_confirmation_token-options-params-metadata
|
|
115
|
+
*/
|
|
116
|
+
metadata?: MetadataParam;
|
|
108
117
|
}
|
|
109
118
|
|
|
110
119
|
export interface CreateConfirmationToken {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {StripeElements} from '../stripe-js';
|
|
2
|
-
import {Address} from './shared';
|
|
2
|
+
import {Address, MetadataParam} from './shared';
|
|
3
3
|
import {PaymentMethod, PaymentMethodCreateParams} from './payment-methods';
|
|
4
4
|
import {PaymentIntent} from './payment-intents';
|
|
5
5
|
|
|
@@ -105,6 +105,15 @@ export interface ConfirmationTokenCreateParams {
|
|
|
105
105
|
* The url your customer will be directed to after they complete authentication.
|
|
106
106
|
*/
|
|
107
107
|
return_url?: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
111
|
+
*
|
|
112
|
+
* This can be a maximum of 50 keys.
|
|
113
|
+
*
|
|
114
|
+
* @docs https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token#create_confirmation_token-options-params-metadata
|
|
115
|
+
*/
|
|
116
|
+
metadata?: MetadataParam;
|
|
108
117
|
}
|
|
109
118
|
|
|
110
119
|
export interface CreateConfirmationToken {
|
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.16.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.16.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.16.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.16.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.16.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.16.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.16.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.16.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
|
|
@@ -1247,6 +1274,7 @@ export interface Appearance {
|
|
|
1247
1274
|
colorWarning?: string;
|
|
1248
1275
|
|
|
1249
1276
|
// Buttons
|
|
1277
|
+
buttonBoxShadow?: string;
|
|
1250
1278
|
buttonColorBackground?: string;
|
|
1251
1279
|
buttonColorText?: string;
|
|
1252
1280
|
buttonFontSize?: string;
|
|
@@ -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
|
|
@@ -1247,6 +1274,7 @@ export interface Appearance {
|
|
|
1247
1274
|
colorWarning?: string;
|
|
1248
1275
|
|
|
1249
1276
|
// Buttons
|
|
1277
|
+
buttonBoxShadow?: string;
|
|
1250
1278
|
buttonColorBackground?: string;
|
|
1251
1279
|
buttonColorText?: string;
|
|
1252
1280
|
buttonFontSize?: string;
|