@stripe/stripe-js 2.1.4 → 2.1.6
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 +1 -1
- package/dist/pure.js +1 -1
- package/dist/stripe.esm.js +1 -1
- package/dist/stripe.js +1 -1
- package/package.json +1 -1
- package/types/stripe-js/custom-checkout.d.ts +26 -32
- package/types/stripe-js/payment-intents.d.ts +7 -0
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/dist/stripe.esm.js
CHANGED
package/dist/stripe.js
CHANGED
package/package.json
CHANGED
|
@@ -36,20 +36,19 @@ export interface StripeCustomCheckoutOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
export type StripeCustomCheckoutAddress = {
|
|
39
|
-
country: string
|
|
40
|
-
line1
|
|
39
|
+
country: string;
|
|
40
|
+
line1?: string | null;
|
|
41
41
|
line2?: string | null;
|
|
42
|
-
city
|
|
43
|
-
postal_code
|
|
44
|
-
state
|
|
42
|
+
city?: string | null;
|
|
43
|
+
postal_code?: string | null;
|
|
44
|
+
state?: string | null;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export type
|
|
47
|
+
export type StripeCustomCheckoutContact = {
|
|
48
48
|
name?: string | null;
|
|
49
49
|
address: StripeCustomCheckoutAddress;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
export type StripeCustomCheckoutBillingAddress = StripeCustomCheckoutShippingAddress;
|
|
53
52
|
export type StripeCustomCheckoutResult =
|
|
54
53
|
| {session: StripeCustomCheckoutSession; error?: undefined}
|
|
55
54
|
| {session?: undefined; error: StripeError};
|
|
@@ -60,10 +59,10 @@ export interface StripeCustomCheckoutActions {
|
|
|
60
59
|
) => Promise<StripeCustomCheckoutResult>;
|
|
61
60
|
removePromotionCode: () => Promise<StripeCustomCheckoutResult>;
|
|
62
61
|
updateShippingAddress: (
|
|
63
|
-
shippingAddress:
|
|
62
|
+
shippingAddress: StripeCustomCheckoutContact
|
|
64
63
|
) => Promise<StripeCustomCheckoutResult>;
|
|
65
64
|
updateBillingAddress: (
|
|
66
|
-
billingAddress:
|
|
65
|
+
billingAddress: StripeCustomCheckoutContact
|
|
67
66
|
) => Promise<StripeCustomCheckoutResult>;
|
|
68
67
|
updatePhoneNumber: (phoneNumber: string) => void;
|
|
69
68
|
updateEmail: (email: string) => void;
|
|
@@ -92,25 +91,25 @@ export type StripeCustomCheckoutTaxAmount = {
|
|
|
92
91
|
export type StripeCustomCheckoutDiscountAmount = {
|
|
93
92
|
amount: number;
|
|
94
93
|
displayName: string;
|
|
95
|
-
promotionCode
|
|
94
|
+
promotionCode: string | null;
|
|
96
95
|
};
|
|
97
96
|
|
|
98
97
|
export type StripeCustomCheckoutShipping = {
|
|
99
98
|
shippingOption: StripeCustomCheckoutShippingOption;
|
|
100
|
-
taxAmounts
|
|
99
|
+
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
101
100
|
};
|
|
102
101
|
|
|
103
102
|
export type StripeCustomCheckoutShippingOption = {
|
|
104
103
|
id: string;
|
|
105
104
|
amount: number;
|
|
106
105
|
currency: string;
|
|
107
|
-
displayName
|
|
108
|
-
deliveryEstimate
|
|
106
|
+
displayName: string | null;
|
|
107
|
+
deliveryEstimate: StripeCustomCheckoutDeliveryEstimate | null;
|
|
109
108
|
};
|
|
110
109
|
|
|
111
110
|
export type StripeCustomCheckoutDeliveryEstimate = {
|
|
112
|
-
maximum
|
|
113
|
-
minimum
|
|
111
|
+
maximum: StripeCustomCheckoutEstimate | null;
|
|
112
|
+
minimum: StripeCustomCheckoutEstimate | null;
|
|
114
113
|
};
|
|
115
114
|
|
|
116
115
|
export type StripeCustomCheckoutEstimate = {
|
|
@@ -118,11 +117,6 @@ export type StripeCustomCheckoutEstimate = {
|
|
|
118
117
|
value: number;
|
|
119
118
|
};
|
|
120
119
|
|
|
121
|
-
export type StripeCustomCheckoutLineItemDiscountAmount = {
|
|
122
|
-
amount: number;
|
|
123
|
-
promotionCode?: string | null;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
120
|
export type StripeCustomCheckoutBillingInterval =
|
|
127
121
|
| 'day'
|
|
128
122
|
| 'month'
|
|
@@ -134,13 +128,14 @@ export type StripeCustomCheckoutLineItem = {
|
|
|
134
128
|
name: string;
|
|
135
129
|
amount: number;
|
|
136
130
|
unitAmount: number;
|
|
137
|
-
description
|
|
131
|
+
description: string | null;
|
|
138
132
|
quantity: number;
|
|
139
|
-
discountAmounts
|
|
140
|
-
|
|
133
|
+
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
134
|
+
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
135
|
+
recurring: {
|
|
141
136
|
interval: StripeCustomCheckoutBillingInterval;
|
|
142
137
|
interval_count: number;
|
|
143
|
-
};
|
|
138
|
+
} | null;
|
|
144
139
|
};
|
|
145
140
|
|
|
146
141
|
export type StripeCustomCheckoutTotalSummary = {
|
|
@@ -161,15 +156,15 @@ export type StripeCustomCheckoutConfirmationRequirement =
|
|
|
161
156
|
|
|
162
157
|
export interface StripeCustomCheckoutSession {
|
|
163
158
|
lineItems: Array<StripeCustomCheckoutLineItem>;
|
|
164
|
-
taxAmounts
|
|
165
|
-
discountAmounts
|
|
159
|
+
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
160
|
+
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
166
161
|
currency: string;
|
|
167
|
-
shipping
|
|
162
|
+
shipping: StripeCustomCheckoutShipping | null;
|
|
168
163
|
shippingOptions: Array<StripeCustomCheckoutShippingOption>;
|
|
169
|
-
shippingAddress
|
|
170
|
-
billingAddress
|
|
171
|
-
phoneNumber
|
|
172
|
-
email
|
|
164
|
+
shippingAddress: StripeCustomCheckoutContact | null;
|
|
165
|
+
billingAddress: StripeCustomCheckoutContact | null;
|
|
166
|
+
phoneNumber: string | null;
|
|
167
|
+
email: string | null;
|
|
173
168
|
total: StripeCustomCheckoutTotalSummary;
|
|
174
169
|
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
175
170
|
canConfirm: boolean;
|
|
@@ -219,7 +214,6 @@ export type StripeCustomCheckoutUpdateHandler = (
|
|
|
219
214
|
|
|
220
215
|
export interface StripeCustomCheckout
|
|
221
216
|
extends StripeCustomCheckoutActions,
|
|
222
|
-
StripeCustomCheckoutSession,
|
|
223
217
|
StripeCustomCheckoutElementsActions {
|
|
224
218
|
session: () => StripeCustomCheckoutSession;
|
|
225
219
|
on: (event: 'change', handler: StripeCustomCheckoutUpdateHandler) => void;
|
|
@@ -1424,6 +1424,13 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1424
1424
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1425
1425
|
};
|
|
1426
1426
|
|
|
1427
|
+
/**
|
|
1428
|
+
* Optional `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
1429
|
+
*
|
|
1430
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method
|
|
1431
|
+
*/
|
|
1432
|
+
payment_method?: string;
|
|
1433
|
+
|
|
1427
1434
|
/**
|
|
1428
1435
|
* Specifies which fields in the response should be expanded.
|
|
1429
1436
|
*/
|