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,550 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Treasury {
|
|
6
|
+
/**
|
|
7
|
+
* The OutboundPayment object.
|
|
8
|
+
*/
|
|
9
|
+
interface OutboundPayment {
|
|
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.outbound_payment';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Amount (in cents) transferred.
|
|
22
|
+
*/
|
|
23
|
+
amount: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns `true` if the object can be canceled, and `false` otherwise.
|
|
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
|
+
* ID of the customer to whom an OutboundPayment is sent.
|
|
42
|
+
*/
|
|
43
|
+
customer: string | null;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
47
|
+
*/
|
|
48
|
+
description: string | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
|
|
52
|
+
*/
|
|
53
|
+
destination_payment_method: string | null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Details about the PaymentMethod for an OutboundPayment.
|
|
57
|
+
*/
|
|
58
|
+
destination_payment_method_details: OutboundPayment.DestinationPaymentMethodDetails | null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Details about the end user.
|
|
62
|
+
*/
|
|
63
|
+
end_user_details: OutboundPayment.EndUserDetails | null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The date when funds are expected to arrive in the destination account.
|
|
67
|
+
*/
|
|
68
|
+
expected_arrival_date: number;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The FinancialAccount that funds were pulled from.
|
|
72
|
+
*/
|
|
73
|
+
financial_account: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
|
|
77
|
+
*/
|
|
78
|
+
hosted_regulatory_receipt_url: string | null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
82
|
+
*/
|
|
83
|
+
livemode: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 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.
|
|
87
|
+
*/
|
|
88
|
+
metadata: Stripe.Metadata;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Details about a returned OutboundPayment. Only set when the status is `returned`.
|
|
92
|
+
*/
|
|
93
|
+
returned_details: OutboundPayment.ReturnedDetails | null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
|
|
97
|
+
*/
|
|
98
|
+
statement_descriptor: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
|
|
102
|
+
*/
|
|
103
|
+
status: OutboundPayment.Status;
|
|
104
|
+
|
|
105
|
+
status_transitions: OutboundPayment.StatusTransitions;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The Transaction associated with this object.
|
|
109
|
+
*/
|
|
110
|
+
transaction: string | Stripe.Treasury.Transaction;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
namespace OutboundPayment {
|
|
114
|
+
interface DestinationPaymentMethodDetails {
|
|
115
|
+
billing_details: DestinationPaymentMethodDetails.BillingDetails;
|
|
116
|
+
|
|
117
|
+
financial_account?: DestinationPaymentMethodDetails.FinancialAccount;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The type of the payment method used in the OutboundPayment.
|
|
121
|
+
*/
|
|
122
|
+
type: DestinationPaymentMethodDetails.Type;
|
|
123
|
+
|
|
124
|
+
us_bank_account?: DestinationPaymentMethodDetails.UsBankAccount;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
namespace DestinationPaymentMethodDetails {
|
|
128
|
+
interface BillingDetails {
|
|
129
|
+
address: Stripe.Address;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Email address.
|
|
133
|
+
*/
|
|
134
|
+
email: string | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Full name.
|
|
138
|
+
*/
|
|
139
|
+
name: string | null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface FinancialAccount {
|
|
143
|
+
/**
|
|
144
|
+
* Token of the FinancialAccount.
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The rails used to send funds.
|
|
150
|
+
*/
|
|
151
|
+
network: 'stripe';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
type Type = 'financial_account' | 'us_bank_account';
|
|
155
|
+
|
|
156
|
+
interface UsBankAccount {
|
|
157
|
+
/**
|
|
158
|
+
* Account holder type: individual or company.
|
|
159
|
+
*/
|
|
160
|
+
account_holder_type: UsBankAccount.AccountHolderType | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Account type: checkings or savings. Defaults to checking if omitted.
|
|
164
|
+
*/
|
|
165
|
+
account_type: UsBankAccount.AccountType | null;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Name of the bank associated with the bank account.
|
|
169
|
+
*/
|
|
170
|
+
bank_name: string | null;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
|
|
174
|
+
*/
|
|
175
|
+
fingerprint: string | null;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Last four digits of the bank account number.
|
|
179
|
+
*/
|
|
180
|
+
last4: string | null;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The US bank account network used to send funds.
|
|
184
|
+
*/
|
|
185
|
+
network: UsBankAccount.Network;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Routing number of the bank account.
|
|
189
|
+
*/
|
|
190
|
+
routing_number: string | null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
namespace UsBankAccount {
|
|
194
|
+
type AccountHolderType = 'company' | 'individual';
|
|
195
|
+
|
|
196
|
+
type AccountType = 'checking' | 'savings';
|
|
197
|
+
|
|
198
|
+
type Network = 'ach' | 'us_domestic_wire';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
interface EndUserDetails {
|
|
203
|
+
/**
|
|
204
|
+
* IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.
|
|
205
|
+
*/
|
|
206
|
+
ip_address: string | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
|
|
210
|
+
*/
|
|
211
|
+
present: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
interface ReturnedDetails {
|
|
215
|
+
/**
|
|
216
|
+
* Reason for the return.
|
|
217
|
+
*/
|
|
218
|
+
code: ReturnedDetails.Code;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The Transaction associated with this object.
|
|
222
|
+
*/
|
|
223
|
+
transaction: string | Stripe.Treasury.Transaction;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
namespace ReturnedDetails {
|
|
227
|
+
type Code =
|
|
228
|
+
| 'account_closed'
|
|
229
|
+
| 'account_frozen'
|
|
230
|
+
| 'bank_account_restricted'
|
|
231
|
+
| 'bank_ownership_changed'
|
|
232
|
+
| 'declined'
|
|
233
|
+
| 'incorrect_account_holder_name'
|
|
234
|
+
| 'invalid_account_number'
|
|
235
|
+
| 'invalid_currency'
|
|
236
|
+
| 'no_account'
|
|
237
|
+
| 'other';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
type Status =
|
|
241
|
+
| 'canceled'
|
|
242
|
+
| 'failed'
|
|
243
|
+
| 'posted'
|
|
244
|
+
| 'processing'
|
|
245
|
+
| 'returned';
|
|
246
|
+
|
|
247
|
+
interface StatusTransitions {
|
|
248
|
+
/**
|
|
249
|
+
* Timestamp describing when an OutboundPayment changed status to `canceled`.
|
|
250
|
+
*/
|
|
251
|
+
canceled_at: number | null;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Timestamp describing when an OutboundPayment changed status to `failed`.
|
|
255
|
+
*/
|
|
256
|
+
failed_at: number | null;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Timestamp describing when an OutboundPayment changed status to `posted`.
|
|
260
|
+
*/
|
|
261
|
+
posted_at: number | null;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Timestamp describing when an OutboundPayment changed status to `returned`.
|
|
265
|
+
*/
|
|
266
|
+
returned_at: number | null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
interface OutboundPaymentCreateParams {
|
|
271
|
+
/**
|
|
272
|
+
* Amount (in cents) to be transferred.
|
|
273
|
+
*/
|
|
274
|
+
amount: number;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* 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).
|
|
278
|
+
*/
|
|
279
|
+
currency: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* The FinancialAccount to pull funds from.
|
|
283
|
+
*/
|
|
284
|
+
financial_account: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
|
|
288
|
+
*/
|
|
289
|
+
customer?: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* An arbitrary string attached to the object. Often useful for displaying to users.
|
|
293
|
+
*/
|
|
294
|
+
description?: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
|
|
298
|
+
*/
|
|
299
|
+
destination_payment_method?: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
|
|
303
|
+
*/
|
|
304
|
+
destination_payment_method_data?: OutboundPaymentCreateParams.DestinationPaymentMethodData;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Payment method-specific configuration for this OutboundPayment.
|
|
308
|
+
*/
|
|
309
|
+
destination_payment_method_options?: OutboundPaymentCreateParams.DestinationPaymentMethodOptions;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* End user details.
|
|
313
|
+
*/
|
|
314
|
+
end_user_details?: OutboundPaymentCreateParams.EndUserDetails;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Specifies which fields in the response should be expanded.
|
|
318
|
+
*/
|
|
319
|
+
expand?: Array<string>;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* 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`.
|
|
323
|
+
*/
|
|
324
|
+
metadata?: Stripe.MetadataParam;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`.
|
|
328
|
+
*/
|
|
329
|
+
statement_descriptor?: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
namespace OutboundPaymentCreateParams {
|
|
333
|
+
interface DestinationPaymentMethodData {
|
|
334
|
+
/**
|
|
335
|
+
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
|
336
|
+
*/
|
|
337
|
+
billing_details?: DestinationPaymentMethodData.BillingDetails;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
|
|
341
|
+
*/
|
|
342
|
+
financial_account?: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* 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`.
|
|
346
|
+
*/
|
|
347
|
+
metadata?: Stripe.MetadataParam;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
|
|
351
|
+
*/
|
|
352
|
+
type: DestinationPaymentMethodData.Type;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Required hash if type is set to `us_bank_account`.
|
|
356
|
+
*/
|
|
357
|
+
us_bank_account?: DestinationPaymentMethodData.UsBankAccount;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
namespace DestinationPaymentMethodData {
|
|
361
|
+
interface BillingDetails {
|
|
362
|
+
/**
|
|
363
|
+
* Billing address.
|
|
364
|
+
*/
|
|
365
|
+
address?: Stripe.Emptyable<BillingDetails.Address>;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Email address.
|
|
369
|
+
*/
|
|
370
|
+
email?: Stripe.Emptyable<string>;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Full name.
|
|
374
|
+
*/
|
|
375
|
+
name?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Billing phone number (including extension).
|
|
379
|
+
*/
|
|
380
|
+
phone?: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
namespace BillingDetails {
|
|
384
|
+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
|
|
385
|
+
line1?: string;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
type Type = 'financial_account' | 'us_bank_account';
|
|
390
|
+
|
|
391
|
+
interface UsBankAccount {
|
|
392
|
+
/**
|
|
393
|
+
* Account holder type: individual or company.
|
|
394
|
+
*/
|
|
395
|
+
account_holder_type?: UsBankAccount.AccountHolderType;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Account number of the bank account.
|
|
399
|
+
*/
|
|
400
|
+
account_number?: string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Account type: checkings or savings. Defaults to checking if omitted.
|
|
404
|
+
*/
|
|
405
|
+
account_type?: UsBankAccount.AccountType;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The ID of a Financial Connections Account to use as a payment method.
|
|
409
|
+
*/
|
|
410
|
+
financial_connections_account?: string;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Routing number of the bank account.
|
|
414
|
+
*/
|
|
415
|
+
routing_number?: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
namespace UsBankAccount {
|
|
419
|
+
type AccountHolderType = 'company' | 'individual';
|
|
420
|
+
|
|
421
|
+
type AccountType = 'checking' | 'savings';
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
interface DestinationPaymentMethodOptions {
|
|
426
|
+
/**
|
|
427
|
+
* Optional fields for `us_bank_account`.
|
|
428
|
+
*/
|
|
429
|
+
us_bank_account?: Stripe.Emptyable<
|
|
430
|
+
DestinationPaymentMethodOptions.UsBankAccount
|
|
431
|
+
>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
namespace DestinationPaymentMethodOptions {
|
|
435
|
+
interface UsBankAccount {
|
|
436
|
+
/**
|
|
437
|
+
* The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network.
|
|
438
|
+
*/
|
|
439
|
+
network?: UsBankAccount.Network;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
namespace UsBankAccount {
|
|
443
|
+
type Network = 'ach' | 'us_domestic_wire';
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
interface EndUserDetails {
|
|
448
|
+
/**
|
|
449
|
+
* IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
|
|
450
|
+
*/
|
|
451
|
+
ip_address?: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
|
|
455
|
+
*/
|
|
456
|
+
present: boolean;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
interface OutboundPaymentRetrieveParams {
|
|
461
|
+
/**
|
|
462
|
+
* Specifies which fields in the response should be expanded.
|
|
463
|
+
*/
|
|
464
|
+
expand?: Array<string>;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
interface OutboundPaymentListParams extends PaginationParams {
|
|
468
|
+
/**
|
|
469
|
+
* Returns objects associated with this FinancialAccount.
|
|
470
|
+
*/
|
|
471
|
+
financial_account: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Only return OutboundPayments sent to this customer.
|
|
475
|
+
*/
|
|
476
|
+
customer?: string;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Specifies which fields in the response should be expanded.
|
|
480
|
+
*/
|
|
481
|
+
expand?: Array<string>;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
|
|
485
|
+
*/
|
|
486
|
+
status?: OutboundPaymentListParams.Status;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
namespace OutboundPaymentListParams {
|
|
490
|
+
type Status =
|
|
491
|
+
| 'canceled'
|
|
492
|
+
| 'failed'
|
|
493
|
+
| 'posted'
|
|
494
|
+
| 'processing'
|
|
495
|
+
| 'returned';
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
interface OutboundPaymentCancelParams {
|
|
499
|
+
/**
|
|
500
|
+
* Specifies which fields in the response should be expanded.
|
|
501
|
+
*/
|
|
502
|
+
expand?: Array<string>;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
class OutboundPaymentsResource {
|
|
506
|
+
/**
|
|
507
|
+
* Creates an OutboundPayment.
|
|
508
|
+
*/
|
|
509
|
+
create(
|
|
510
|
+
params: OutboundPaymentCreateParams,
|
|
511
|
+
options?: RequestOptions
|
|
512
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
|
|
516
|
+
*/
|
|
517
|
+
retrieve(
|
|
518
|
+
id: string,
|
|
519
|
+
params?: OutboundPaymentRetrieveParams,
|
|
520
|
+
options?: RequestOptions
|
|
521
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
522
|
+
retrieve(
|
|
523
|
+
id: string,
|
|
524
|
+
options?: RequestOptions
|
|
525
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Returns a list of OutboundPayments sent from the specified FinancialAccount.
|
|
529
|
+
*/
|
|
530
|
+
list(
|
|
531
|
+
params: OutboundPaymentListParams,
|
|
532
|
+
options?: RequestOptions
|
|
533
|
+
): ApiListPromise<Stripe.Treasury.OutboundPayment>;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Cancel an OutboundPayment.
|
|
537
|
+
*/
|
|
538
|
+
cancel(
|
|
539
|
+
id: string,
|
|
540
|
+
params?: OutboundPaymentCancelParams,
|
|
541
|
+
options?: RequestOptions
|
|
542
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
543
|
+
cancel(
|
|
544
|
+
id: string,
|
|
545
|
+
options?: RequestOptions
|
|
546
|
+
): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|