@stripe/stripe-js 3.0.8 → 3.0.9
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/bank-accounts.d.mts +61 -0
- package/dist/api/bank-accounts.d.ts +61 -0
- package/dist/api/cards.d.mts +130 -0
- package/dist/api/cards.d.ts +130 -0
- package/dist/api/financial-connections.d.mts +232 -0
- package/dist/api/financial-connections.d.ts +232 -0
- package/dist/api/index.d.mts +11 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/orders.d.mts +122 -0
- package/dist/api/orders.d.ts +122 -0
- package/dist/api/payment-intents.d.mts +330 -0
- package/dist/api/payment-intents.d.ts +330 -0
- package/dist/api/payment-methods.d.mts +452 -0
- package/dist/api/payment-methods.d.ts +452 -0
- package/dist/api/setup-intents.d.mts +184 -0
- package/dist/api/setup-intents.d.ts +184 -0
- package/dist/api/shared.d.mts +125 -0
- package/dist/api/shared.d.ts +125 -0
- package/dist/api/sources.d.mts +1045 -0
- package/dist/api/sources.d.ts +1045 -0
- package/dist/api/tokens.d.mts +639 -0
- package/dist/api/tokens.d.ts +639 -0
- package/dist/api/verification-sessions.d.mts +9 -0
- package/dist/api/verification-sessions.d.ts +9 -0
- package/dist/index.d.mts +4 -12792
- package/dist/index.d.ts +4 -12792
- package/dist/{stripe.js → index.js} +1 -1
- package/dist/{stripe.mjs → index.mjs} +1 -1
- package/dist/pure.d.mts +5 -0
- package/dist/pure.d.ts +5 -0
- package/dist/pure.js +204 -0
- package/dist/pure.mjs +200 -0
- package/dist/shared.d.mts +6 -0
- package/dist/shared.d.ts +6 -0
- package/dist/stripe-js/checkout.d.mts +153 -0
- package/dist/stripe-js/checkout.d.ts +153 -0
- package/dist/stripe-js/custom-checkout.d.mts +402 -0
- package/dist/stripe-js/custom-checkout.d.ts +402 -0
- package/dist/stripe-js/elements/address.d.mts +261 -0
- package/dist/stripe-js/elements/address.d.ts +261 -0
- package/dist/stripe-js/elements/affirm-message.d.mts +65 -0
- package/dist/stripe-js/elements/affirm-message.d.ts +65 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +119 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +119 -0
- package/dist/stripe-js/elements/apple-pay.d.mts +156 -0
- package/dist/stripe-js/elements/apple-pay.d.ts +156 -0
- package/dist/stripe-js/elements/au-bank-account.d.mts +138 -0
- package/dist/stripe-js/elements/au-bank-account.d.ts +138 -0
- package/dist/stripe-js/elements/base.d.mts +264 -0
- package/dist/stripe-js/elements/base.d.ts +264 -0
- package/dist/stripe-js/elements/card-cvc.d.mts +119 -0
- package/dist/stripe-js/elements/card-cvc.d.ts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.mts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.ts +119 -0
- package/dist/stripe-js/elements/card-number.d.mts +200 -0
- package/dist/stripe-js/elements/card-number.d.ts +200 -0
- package/dist/stripe-js/elements/card.d.mts +226 -0
- package/dist/stripe-js/elements/card.d.ts +226 -0
- package/dist/stripe-js/elements/cart.d.mts +224 -0
- package/dist/stripe-js/elements/cart.d.ts +224 -0
- package/dist/stripe-js/elements/eps-bank.d.mts +140 -0
- package/dist/stripe-js/elements/eps-bank.d.ts +140 -0
- package/dist/stripe-js/elements/express-checkout.d.mts +446 -0
- package/dist/stripe-js/elements/express-checkout.d.ts +446 -0
- package/dist/stripe-js/elements/fpx-bank.d.mts +134 -0
- package/dist/stripe-js/elements/fpx-bank.d.ts +134 -0
- package/dist/stripe-js/elements/iban.d.mts +135 -0
- package/dist/stripe-js/elements/iban.d.ts +135 -0
- package/dist/stripe-js/elements/ideal-bank.d.mts +140 -0
- package/dist/stripe-js/elements/ideal-bank.d.ts +140 -0
- package/dist/stripe-js/elements/index.d.mts +22 -0
- package/dist/stripe-js/elements/index.d.ts +22 -0
- package/dist/stripe-js/elements/issuing/index.d.mts +5 -0
- package/dist/stripe-js/elements/issuing/index.d.ts +5 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +32 -0
- package/dist/stripe-js/elements/link-authentication.d.mts +158 -0
- package/dist/stripe-js/elements/link-authentication.d.ts +158 -0
- package/dist/stripe-js/elements/p24-bank.d.mts +140 -0
- package/dist/stripe-js/elements/p24-bank.d.ts +140 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.mts +98 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.ts +98 -0
- package/dist/stripe-js/elements/payment-request-button.d.mts +151 -0
- package/dist/stripe-js/elements/payment-request-button.d.ts +151 -0
- package/dist/stripe-js/elements/payment.d.mts +275 -0
- package/dist/stripe-js/elements/payment.d.ts +275 -0
- package/dist/stripe-js/elements/shipping-address.d.mts +215 -0
- package/dist/stripe-js/elements/shipping-address.d.ts +215 -0
- package/dist/stripe-js/elements-group.d.mts +1129 -0
- package/dist/stripe-js/elements-group.d.ts +1129 -0
- package/dist/stripe-js/embedded-checkout.d.mts +35 -0
- package/dist/stripe-js/embedded-checkout.d.ts +35 -0
- package/dist/stripe-js/ephemeral-keys.d.mts +3 -0
- package/dist/stripe-js/ephemeral-keys.d.ts +3 -0
- package/dist/stripe-js/financial-connections.d.mts +19 -0
- package/dist/stripe-js/financial-connections.d.ts +19 -0
- package/dist/stripe-js/index.d.mts +13 -0
- package/dist/stripe-js/index.d.ts +13 -0
- package/dist/stripe-js/orders.d.mts +9 -0
- package/dist/stripe-js/orders.d.ts +9 -0
- package/dist/stripe-js/payment-intents.d.mts +1470 -0
- package/dist/stripe-js/payment-intents.d.ts +1470 -0
- package/dist/stripe-js/payment-request.d.mts +529 -0
- package/dist/stripe-js/payment-request.d.ts +529 -0
- package/dist/stripe-js/setup-intents.d.mts +250 -0
- package/dist/stripe-js/setup-intents.d.ts +250 -0
- package/dist/stripe-js/stripe.d.mts +1472 -0
- package/dist/stripe-js/stripe.d.ts +1472 -0
- package/dist/stripe-js/token-and-sources.d.mts +110 -0
- package/dist/stripe-js/token-and-sources.d.ts +110 -0
- package/dist/utils.d.mts +2 -0
- package/dist/utils.d.ts +2 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +1 -0
- package/package.json +11 -10
- package/pure/index.d.mts +1 -12771
- package/pure/index.d.ts +1 -12771
- package/pure/index.js +1 -204
- package/pure/index.mjs +1 -200
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The Financial Connections Session object
|
|
93
|
+
*/
|
|
94
|
+
export interface FinancialConnectionsSession {
|
|
95
|
+
/**
|
|
96
|
+
* Unique identifier for the object.
|
|
97
|
+
*/
|
|
98
|
+
id: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* List of accounts collected by the Session
|
|
102
|
+
*/
|
|
103
|
+
accounts: FinancialConnectionsSession.Account[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Filters applied to the Session
|
|
107
|
+
*/
|
|
108
|
+
filters?: FinancialConnectionsSession.Filters;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* List of data permissions requested in the Session
|
|
112
|
+
*/
|
|
113
|
+
permissions?: FinancialConnectionsSession.Permission[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* For webview integrations only. The user will be redirected to this URL to return to your app.
|
|
117
|
+
*/
|
|
118
|
+
return_url?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace FinancialConnectionsSession {
|
|
122
|
+
/**
|
|
123
|
+
* The Financial Connections Account object
|
|
124
|
+
*/
|
|
125
|
+
export interface Account {
|
|
126
|
+
/**
|
|
127
|
+
* Unique identifier for the object.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* String representing the object's type. `'linked_account'` is present for backwards-compatibility.
|
|
133
|
+
*/
|
|
134
|
+
object: 'linked_account' | 'financial_connections.account';
|
|
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
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The type of the account.
|
|
148
|
+
*/
|
|
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;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
|
158
|
+
*/
|
|
159
|
+
display_name: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The name of the institution that holds this account.
|
|
163
|
+
*/
|
|
164
|
+
institution_name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
|
168
|
+
*/
|
|
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[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Filters to restrict the kinds of accounts to collect.
|
|
215
|
+
*/
|
|
216
|
+
export interface Filters {
|
|
217
|
+
/**
|
|
218
|
+
* List of countries from which to collect accounts.
|
|
219
|
+
*/
|
|
220
|
+
countries?: string[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Data features to which access can be requested
|
|
225
|
+
*/
|
|
226
|
+
export type Permission =
|
|
227
|
+
| 'payment_method'
|
|
228
|
+
| 'balances'
|
|
229
|
+
| 'transactions'
|
|
230
|
+
| 'ownership'
|
|
231
|
+
| 'account_numbers';
|
|
232
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './shared';
|
|
2
|
+
export * from './payment-methods';
|
|
3
|
+
export * from './payment-intents';
|
|
4
|
+
export * from './orders';
|
|
5
|
+
export * from './setup-intents';
|
|
6
|
+
export * from './sources';
|
|
7
|
+
export * from './tokens';
|
|
8
|
+
export * from './bank-accounts';
|
|
9
|
+
export * from './cards';
|
|
10
|
+
export * from './verification-sessions';
|
|
11
|
+
export * from './financial-connections';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './shared';
|
|
2
|
+
export * from './payment-methods';
|
|
3
|
+
export * from './payment-intents';
|
|
4
|
+
export * from './orders';
|
|
5
|
+
export * from './setup-intents';
|
|
6
|
+
export * from './sources';
|
|
7
|
+
export * from './tokens';
|
|
8
|
+
export * from './bank-accounts';
|
|
9
|
+
export * from './cards';
|
|
10
|
+
export * from './verification-sessions';
|
|
11
|
+
export * from './financial-connections';
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {Address} from './shared';
|
|
2
|
+
import {PaymentIntent} from './payment-intents';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Order object.
|
|
6
|
+
*/
|
|
7
|
+
export interface Order {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the object.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
15
|
+
*/
|
|
16
|
+
object: 'order';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Total order cost after discounts and taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
|
|
20
|
+
*/
|
|
21
|
+
amount_total: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Order cost before any discounts or taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
|
|
25
|
+
*/
|
|
26
|
+
amount_subtotal: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Customer billing details associated with the order.
|
|
30
|
+
*/
|
|
31
|
+
billing_details: Order.Billing | null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
35
|
+
*/
|
|
36
|
+
currency: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
40
|
+
*/
|
|
41
|
+
created: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
45
|
+
*/
|
|
46
|
+
livemode: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Customer shipping information associated with the order.
|
|
50
|
+
*/
|
|
51
|
+
shipping_details: Order.Shipping | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Payment information associated with the order.
|
|
55
|
+
*/
|
|
56
|
+
payment: Order.Payment;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The overall status of the order.
|
|
60
|
+
*/
|
|
61
|
+
status: Order.Status;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace Order {
|
|
65
|
+
export interface Billing {
|
|
66
|
+
/**
|
|
67
|
+
* Billing address for the order.
|
|
68
|
+
*/
|
|
69
|
+
address?: Address;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Email address for the order.
|
|
73
|
+
*/
|
|
74
|
+
email?: string | null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Full name for the order.
|
|
78
|
+
*/
|
|
79
|
+
name?: string | null;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Billing phone number for the order (including extension).
|
|
83
|
+
*/
|
|
84
|
+
phone?: string | null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Shipping {
|
|
88
|
+
/**
|
|
89
|
+
* Recipient shipping address. Required if the order includes products that are shippable.
|
|
90
|
+
*/
|
|
91
|
+
address?: Address;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Recipient name.
|
|
95
|
+
*/
|
|
96
|
+
name?: string | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Recipient phone (including extension).
|
|
100
|
+
*/
|
|
101
|
+
phone?: string | null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface Payment {
|
|
105
|
+
/**
|
|
106
|
+
* Payment intent associated with this order. Null when the order is `open`.
|
|
107
|
+
*/
|
|
108
|
+
payment_intent?: PaymentIntent | null;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The status of the underlying payment associated with this order, if any. Null when the order is `open`.
|
|
112
|
+
*/
|
|
113
|
+
status?: PaymentIntent.Status | null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type Status =
|
|
117
|
+
| 'open'
|
|
118
|
+
| 'submitted'
|
|
119
|
+
| 'processing'
|
|
120
|
+
| 'complete'
|
|
121
|
+
| 'canceled';
|
|
122
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {Address} from './shared';
|
|
2
|
+
import {PaymentIntent} from './payment-intents';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Order object.
|
|
6
|
+
*/
|
|
7
|
+
export interface Order {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the object.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
15
|
+
*/
|
|
16
|
+
object: 'order';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Total order cost after discounts and taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
|
|
20
|
+
*/
|
|
21
|
+
amount_total: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Order cost before any discounts or taxes are applied. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
|
|
25
|
+
*/
|
|
26
|
+
amount_subtotal: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Customer billing details associated with the order.
|
|
30
|
+
*/
|
|
31
|
+
billing_details: Order.Billing | null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
35
|
+
*/
|
|
36
|
+
currency: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
40
|
+
*/
|
|
41
|
+
created: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
45
|
+
*/
|
|
46
|
+
livemode: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Customer shipping information associated with the order.
|
|
50
|
+
*/
|
|
51
|
+
shipping_details: Order.Shipping | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Payment information associated with the order.
|
|
55
|
+
*/
|
|
56
|
+
payment: Order.Payment;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The overall status of the order.
|
|
60
|
+
*/
|
|
61
|
+
status: Order.Status;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace Order {
|
|
65
|
+
export interface Billing {
|
|
66
|
+
/**
|
|
67
|
+
* Billing address for the order.
|
|
68
|
+
*/
|
|
69
|
+
address?: Address;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Email address for the order.
|
|
73
|
+
*/
|
|
74
|
+
email?: string | null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Full name for the order.
|
|
78
|
+
*/
|
|
79
|
+
name?: string | null;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Billing phone number for the order (including extension).
|
|
83
|
+
*/
|
|
84
|
+
phone?: string | null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Shipping {
|
|
88
|
+
/**
|
|
89
|
+
* Recipient shipping address. Required if the order includes products that are shippable.
|
|
90
|
+
*/
|
|
91
|
+
address?: Address;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Recipient name.
|
|
95
|
+
*/
|
|
96
|
+
name?: string | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Recipient phone (including extension).
|
|
100
|
+
*/
|
|
101
|
+
phone?: string | null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface Payment {
|
|
105
|
+
/**
|
|
106
|
+
* Payment intent associated with this order. Null when the order is `open`.
|
|
107
|
+
*/
|
|
108
|
+
payment_intent?: PaymentIntent | null;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The status of the underlying payment associated with this order, if any. Null when the order is `open`.
|
|
112
|
+
*/
|
|
113
|
+
status?: PaymentIntent.Status | null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type Status =
|
|
117
|
+
| 'open'
|
|
118
|
+
| 'submitted'
|
|
119
|
+
| 'processing'
|
|
120
|
+
| 'complete'
|
|
121
|
+
| 'canceled';
|
|
122
|
+
}
|