stripe 9.0.0 → 9.3.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/CHANGELOG.md +35 -0
- package/VERSION +1 -1
- package/lib/resources/Apps/Secrets.js +31 -0
- package/lib/resources/Customers.js +5 -0
- package/lib/resources/FinancialConnections/Accounts.js +12 -0
- package/lib/resources/TestHelpers/Treasury/InboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundPayments.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +15 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +15 -0
- package/lib/resources/Treasury/CreditReversals.js +26 -0
- package/lib/resources/Treasury/DebitReversals.js +26 -0
- package/lib/resources/Treasury/FinancialAccounts.js +41 -0
- package/lib/resources/Treasury/InboundTransfers.js +31 -0
- package/lib/resources/Treasury/OutboundPayments.js +31 -0
- package/lib/resources/Treasury/OutboundTransfers.js +31 -0
- package/lib/resources/Treasury/ReceivedCredits.js +21 -0
- package/lib/resources/Treasury/ReceivedDebits.js +21 -0
- package/lib/resources/Treasury/TransactionEntries.js +21 -0
- package/lib/resources/Treasury/Transactions.js +21 -0
- package/lib/resources.js +22 -0
- package/package.json +1 -1
- package/types/2020-08-27/Accounts.d.ts +5 -5
- package/types/2020-08-27/Apps/Secrets.d.ts +241 -0
- package/types/2020-08-27/BillingPortal/Configurations.d.ts +1 -1
- package/types/2020-08-27/BillingPortal/Sessions.d.ts +1 -1
- package/types/2020-08-27/Charges.d.ts +8 -0
- package/types/2020-08-27/Checkout/Sessions.d.ts +51 -3
- package/types/2020-08-27/Customers.d.ts +24 -0
- package/types/2020-08-27/Discounts.d.ts +4 -4
- package/types/2020-08-27/FinancialConnections/Accounts.d.ts +63 -0
- package/types/2020-08-27/Invoices.d.ts +3 -0
- package/types/2020-08-27/Issuing/Authorizations.d.ts +22 -0
- package/types/2020-08-27/Issuing/Cards.d.ts +7 -0
- package/types/2020-08-27/Issuing/Disputes.d.ts +29 -0
- package/types/2020-08-27/Issuing/Transactions.d.ts +17 -0
- package/types/2020-08-27/LineItems.d.ts +2 -3
- package/types/2020-08-27/Mandates.d.ts +4 -0
- package/types/2020-08-27/Orders.d.ts +84 -4
- package/types/2020-08-27/PaymentIntents.d.ts +332 -2
- package/types/2020-08-27/PaymentLinks.d.ts +167 -0
- package/types/2020-08-27/PaymentMethods.d.ts +73 -0
- package/types/2020-08-27/PromotionCodes.d.ts +2 -2
- package/types/2020-08-27/Quotes.d.ts +6 -9
- package/types/2020-08-27/Refunds.d.ts +1 -1
- package/types/2020-08-27/SetupAttempts.d.ts +4 -0
- package/types/2020-08-27/SetupIntents.d.ts +157 -0
- package/types/2020-08-27/SubscriptionSchedules.d.ts +15 -0
- package/types/2020-08-27/Subscriptions.d.ts +41 -2
- package/types/2020-08-27/Terminal/Configurations.d.ts +63 -0
- package/types/2020-08-27/TestHelpers/Treasury/InboundTransfers.d.ts +108 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundPayments.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundTransfers.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +93 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +91 -0
- package/types/2020-08-27/Tokens.d.ts +2 -2
- package/types/2020-08-27/Treasury/CreditReversals.d.ts +168 -0
- package/types/2020-08-27/Treasury/DebitReversals.d.ts +187 -0
- package/types/2020-08-27/Treasury/FinancialAccountFeatures.d.ts +622 -0
- package/types/2020-08-27/Treasury/FinancialAccounts.d.ts +833 -0
- package/types/2020-08-27/Treasury/InboundTransfers.d.ts +349 -0
- package/types/2020-08-27/Treasury/OutboundPayments.d.ts +550 -0
- package/types/2020-08-27/Treasury/OutboundTransfers.d.ts +385 -0
- package/types/2020-08-27/Treasury/ReceivedCredits.d.ts +303 -0
- package/types/2020-08-27/Treasury/ReceivedDebits.d.ts +231 -0
- package/types/2020-08-27/Treasury/TransactionEntries.d.ts +257 -0
- package/types/2020-08-27/Treasury/Transactions.d.ts +268 -0
- package/types/2020-08-27/WebhookEndpoints.d.ts +62 -2
- package/types/2020-08-27/index.d.ts +39 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Treasury {
|
|
6
|
+
/**
|
|
7
|
+
* The InboundTransfer object.
|
|
8
|
+
*/
|
|
9
|
+
interface InboundTransfer {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'treasury.inbound_transfer';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Amount (in cents) transferred.
|
|
22
|
+
*/
|
|
23
|
+
amount: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns `true` if the InboundTransfer is able to be canceled.
|
|
27
|
+
*/
|
|
28
|
+
cancelable: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
32
|
+
*/
|
|
33
|
+
created: number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 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).
|
|
37
|
+
*/
|
|
38
|
+
currency: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
42
|
+
*/
|
|
43
|
+
description: string | null;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Details about this InboundTransfer's failure. Only set when status is `failed`.
|
|
47
|
+
*/
|
|
48
|
+
failure_details: InboundTransfer.FailureDetails | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The FinancialAccount that received the funds.
|
|
52
|
+
*/
|
|
53
|
+
financial_account: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
|
|
57
|
+
*/
|
|
58
|
+
hosted_regulatory_receipt_url: string | null;
|
|
59
|
+
|
|
60
|
+
linked_flows: InboundTransfer.LinkedFlows;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
64
|
+
*/
|
|
65
|
+
livemode: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
69
|
+
*/
|
|
70
|
+
metadata: Stripe.Metadata;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The origin payment method to be debited for an InboundTransfer.
|
|
74
|
+
*/
|
|
75
|
+
origin_payment_method: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Details about the PaymentMethod for an InboundTransfer.
|
|
79
|
+
*/
|
|
80
|
+
origin_payment_method_details: InboundTransfer.OriginPaymentMethodDetails | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
|
|
84
|
+
*/
|
|
85
|
+
returned: boolean | null;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
|
|
89
|
+
*/
|
|
90
|
+
statement_descriptor: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
|
|
94
|
+
*/
|
|
95
|
+
status: InboundTransfer.Status;
|
|
96
|
+
|
|
97
|
+
status_transitions: InboundTransfer.StatusTransitions;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The Transaction associated with this object.
|
|
101
|
+
*/
|
|
102
|
+
transaction: string | Stripe.Treasury.Transaction | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
namespace InboundTransfer {
|
|
106
|
+
interface FailureDetails {
|
|
107
|
+
/**
|
|
108
|
+
* Reason for the failure.
|
|
109
|
+
*/
|
|
110
|
+
code: FailureDetails.Code;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
namespace FailureDetails {
|
|
114
|
+
type Code =
|
|
115
|
+
| 'account_closed'
|
|
116
|
+
| 'account_frozen'
|
|
117
|
+
| 'bank_account_restricted'
|
|
118
|
+
| 'bank_ownership_changed'
|
|
119
|
+
| 'debit_not_authorized'
|
|
120
|
+
| 'incorrect_account_holder_address'
|
|
121
|
+
| 'incorrect_account_holder_name'
|
|
122
|
+
| 'incorrect_account_holder_tax_id'
|
|
123
|
+
| 'insufficient_funds'
|
|
124
|
+
| 'invalid_account_number'
|
|
125
|
+
| 'invalid_currency'
|
|
126
|
+
| 'no_account'
|
|
127
|
+
| 'other';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface LinkedFlows {
|
|
131
|
+
/**
|
|
132
|
+
* If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
|
|
133
|
+
*/
|
|
134
|
+
received_debit: string | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface OriginPaymentMethodDetails {
|
|
138
|
+
billing_details: OriginPaymentMethodDetails.BillingDetails;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The type of the payment method used in the InboundTransfer.
|
|
142
|
+
*/
|
|
143
|
+
type: 'us_bank_account';
|
|
144
|
+
|
|
145
|
+
us_bank_account?: OriginPaymentMethodDetails.UsBankAccount;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
namespace OriginPaymentMethodDetails {
|
|
149
|
+
interface BillingDetails {
|
|
150
|
+
address: Stripe.Address;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Email address.
|
|
154
|
+
*/
|
|
155
|
+
email: string | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Full name.
|
|
159
|
+
*/
|
|
160
|
+
name: string | null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface UsBankAccount {
|
|
164
|
+
/**
|
|
165
|
+
* Account holder type: individual or company.
|
|
166
|
+
*/
|
|
167
|
+
account_holder_type: UsBankAccount.AccountHolderType | null;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Account type: checkings or savings. Defaults to checking if omitted.
|
|
171
|
+
*/
|
|
172
|
+
account_type: UsBankAccount.AccountType | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Name of the bank associated with the bank account.
|
|
176
|
+
*/
|
|
177
|
+
bank_name: string | null;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
|
|
181
|
+
*/
|
|
182
|
+
fingerprint: string | null;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Last four digits of the bank account number.
|
|
186
|
+
*/
|
|
187
|
+
last4: string | null;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The US bank account network used to debit funds.
|
|
191
|
+
*/
|
|
192
|
+
network: 'ach';
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Routing number of the bank account.
|
|
196
|
+
*/
|
|
197
|
+
routing_number: string | null;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
namespace UsBankAccount {
|
|
201
|
+
type AccountHolderType = 'company' | 'individual';
|
|
202
|
+
|
|
203
|
+
type AccountType = 'checking' | 'savings';
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
type Status = 'canceled' | 'failed' | 'processing' | 'succeeded';
|
|
208
|
+
|
|
209
|
+
interface StatusTransitions {
|
|
210
|
+
/**
|
|
211
|
+
* Timestamp describing when an InboundTransfer changed status to `canceled`.
|
|
212
|
+
*/
|
|
213
|
+
canceled_at?: number | null;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Timestamp describing when an InboundTransfer changed status to `failed`.
|
|
217
|
+
*/
|
|
218
|
+
failed_at: number | null;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Timestamp describing when an InboundTransfer changed status to `succeeded`.
|
|
222
|
+
*/
|
|
223
|
+
succeeded_at: number | null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface InboundTransferCreateParams {
|
|
228
|
+
/**
|
|
229
|
+
* Amount (in cents) to be transferred.
|
|
230
|
+
*/
|
|
231
|
+
amount: number;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 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).
|
|
235
|
+
*/
|
|
236
|
+
currency: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* The FinancialAccount to send funds to.
|
|
240
|
+
*/
|
|
241
|
+
financial_account: string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The origin payment method to be debited for the InboundTransfer.
|
|
245
|
+
*/
|
|
246
|
+
origin_payment_method: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
250
|
+
*/
|
|
251
|
+
description?: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Specifies which fields in the response should be expanded.
|
|
255
|
+
*/
|
|
256
|
+
expand?: Array<string>;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`.
|
|
260
|
+
*/
|
|
261
|
+
metadata?: Stripe.MetadataParam;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The complete description that appears on your customers' statements. Maximum 10 characters.
|
|
265
|
+
*/
|
|
266
|
+
statement_descriptor?: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
interface InboundTransferRetrieveParams {
|
|
270
|
+
/**
|
|
271
|
+
* Specifies which fields in the response should be expanded.
|
|
272
|
+
*/
|
|
273
|
+
expand?: Array<string>;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
interface InboundTransferListParams extends PaginationParams {
|
|
277
|
+
/**
|
|
278
|
+
* Returns objects associated with this FinancialAccount.
|
|
279
|
+
*/
|
|
280
|
+
financial_account: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Specifies which fields in the response should be expanded.
|
|
284
|
+
*/
|
|
285
|
+
expand?: Array<string>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
|
|
289
|
+
*/
|
|
290
|
+
status?: InboundTransferListParams.Status;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
namespace InboundTransferListParams {
|
|
294
|
+
type Status = 'canceled' | 'failed' | 'processing' | 'succeeded';
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface InboundTransferCancelParams {
|
|
298
|
+
/**
|
|
299
|
+
* Specifies which fields in the response should be expanded.
|
|
300
|
+
*/
|
|
301
|
+
expand?: Array<string>;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
class InboundTransfersResource {
|
|
305
|
+
/**
|
|
306
|
+
* Creates an InboundTransfer.
|
|
307
|
+
*/
|
|
308
|
+
create(
|
|
309
|
+
params: InboundTransferCreateParams,
|
|
310
|
+
options?: RequestOptions
|
|
311
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Retrieves the details of an existing InboundTransfer.
|
|
315
|
+
*/
|
|
316
|
+
retrieve(
|
|
317
|
+
id: string,
|
|
318
|
+
params?: InboundTransferRetrieveParams,
|
|
319
|
+
options?: RequestOptions
|
|
320
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
321
|
+
retrieve(
|
|
322
|
+
id: string,
|
|
323
|
+
options?: RequestOptions
|
|
324
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Returns a list of InboundTransfers sent from the specified FinancialAccount.
|
|
328
|
+
*/
|
|
329
|
+
list(
|
|
330
|
+
params: InboundTransferListParams,
|
|
331
|
+
options?: RequestOptions
|
|
332
|
+
): ApiListPromise<Stripe.Treasury.InboundTransfer>;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Cancels an InboundTransfer.
|
|
336
|
+
*/
|
|
337
|
+
cancel(
|
|
338
|
+
id: string,
|
|
339
|
+
params?: InboundTransferCancelParams,
|
|
340
|
+
options?: RequestOptions
|
|
341
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
342
|
+
cancel(
|
|
343
|
+
id: string,
|
|
344
|
+
options?: RequestOptions
|
|
345
|
+
): Promise<Stripe.Response<Stripe.Treasury.InboundTransfer>>;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|