@getivy/node-sdk 0.1.0-alpha.9 → 1.0.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 +326 -0
- package/README.md +16 -26
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +25 -15
- package/core.js.map +1 -1
- package/core.mjs +26 -16
- package/core.mjs.map +1 -1
- package/index.d.mts +30 -18
- package/index.d.ts +30 -18
- package/index.d.ts.map +1 -1
- package/index.js +21 -8
- package/index.js.map +1 -1
- package/index.mjs +21 -8
- package/index.mjs.map +1 -1
- package/package.json +11 -33
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/balance.d.ts +8 -5
- package/resources/balance.d.ts.map +1 -1
- package/resources/banks.d.ts +82 -67
- package/resources/banks.d.ts.map +1 -1
- package/resources/beneficiary-payouts.d.ts +61 -0
- package/resources/beneficiary-payouts.d.ts.map +1 -0
- package/resources/beneficiary-payouts.js +16 -0
- package/resources/beneficiary-payouts.js.map +1 -0
- package/resources/beneficiary-payouts.mjs +12 -0
- package/resources/beneficiary-payouts.mjs.map +1 -0
- package/resources/capabilities.d.ts +1 -10
- package/resources/capabilities.d.ts.map +1 -1
- package/resources/charges.d.ts +28 -19
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +275 -1360
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +140 -10
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +9 -2
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +9 -2
- package/resources/customers.mjs.map +1 -1
- package/resources/deposits.d.ts +165 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +15 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +11 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/fx.d.ts +90 -0
- package/resources/fx.d.ts.map +1 -0
- package/resources/fx.js +22 -0
- package/resources/fx.js.map +1 -0
- package/resources/fx.mjs +18 -0
- package/resources/fx.mjs.map +1 -0
- package/resources/index.d.ts +11 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -2
- package/resources/index.mjs.map +1 -1
- package/resources/mandates.d.ts +55 -17
- package/resources/mandates.d.ts.map +1 -1
- package/resources/orders.d.ts +720 -743
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +13 -3
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +13 -3
- package/resources/orders.mjs.map +1 -1
- package/resources/payouts.d.ts +219 -103
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +3 -4
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +3 -4
- package/resources/payouts.mjs.map +1 -1
- package/resources/refunds.d.ts +53 -97
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +8 -12
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +8 -12
- package/resources/refunds.mjs.map +1 -1
- package/resources/returns.d.ts +104 -0
- package/resources/returns.d.ts.map +1 -0
- package/resources/returns.js +21 -0
- package/resources/returns.js.map +1 -0
- package/resources/returns.mjs +17 -0
- package/resources/returns.mjs.map +1 -0
- package/resources/subaccounts.d.ts +15 -5
- package/resources/subaccounts.d.ts.map +1 -1
- package/resources/subaccounts.js.map +1 -1
- package/resources/subaccounts.mjs.map +1 -1
- package/resources/transactions.d.ts +174 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +15 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +11 -0
- package/resources/transactions.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +44 -16
- package/src/index.ts +100 -63
- package/src/resource.ts +1 -1
- package/src/resources/balance.ts +8 -5
- package/src/resources/banks.ts +130 -67
- package/src/resources/beneficiary-payouts.ts +78 -0
- package/src/resources/capabilities.ts +1 -10
- package/src/resources/charges.ts +30 -21
- package/src/resources/checkoutsession.ts +1224 -3096
- package/src/resources/customers.ts +164 -9
- package/src/resources/deposits.ts +231 -0
- package/src/resources/fx.ts +119 -0
- package/src/resources/index.ts +31 -28
- package/src/resources/mandates.ts +79 -17
- package/src/resources/orders.ts +1449 -1075
- package/src/resources/payouts.ts +273 -103
- package/src/resources/refunds.ts +70 -111
- package/src/resources/returns.ts +140 -0
- package/src/resources/subaccounts.ts +26 -4
- package/src/resources/transactions.ts +234 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/reports.d.ts +0 -120
- package/resources/reports.d.ts.map +0 -1
- package/resources/reports.js +0 -31
- package/resources/reports.js.map +0 -1
- package/resources/reports.mjs +0 -27
- package/resources/reports.mjs.map +0 -1
- package/resources/webhooksubscription.d.ts +0 -155
- package/resources/webhooksubscription.d.ts.map +0 -1
- package/resources/webhooksubscription.js +0 -42
- package/resources/webhooksubscription.js.map +0 -1
- package/resources/webhooksubscription.mjs +0 -38
- package/resources/webhooksubscription.mjs.map +0 -1
- package/src/resources/reports.ts +0 -172
- package/src/resources/webhooksubscription.ts +0 -353
package/src/resources/payouts.ts
CHANGED
|
@@ -5,72 +5,88 @@ import * as Core from '../core';
|
|
|
5
5
|
|
|
6
6
|
export class Payouts extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create a
|
|
9
|
-
* purposes.
|
|
8
|
+
* Create a payout for a merchant.
|
|
10
9
|
*/
|
|
11
|
-
create(body: PayoutCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
10
|
+
create(body: PayoutCreateParams, options?: Core.RequestOptions): Core.APIPromise<Payout> {
|
|
12
11
|
return this._client.post('/api/service/payout/create', { body, ...options });
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
|
-
* Retrieve a
|
|
15
|
+
* Retrieve a payout object by id.
|
|
17
16
|
*/
|
|
18
|
-
retrieve(
|
|
17
|
+
retrieve(
|
|
18
|
+
body: PayoutRetrieveParams,
|
|
19
|
+
options?: Core.RequestOptions,
|
|
20
|
+
): Core.APIPromise<PayoutRetrieveResponse> {
|
|
19
21
|
return this._client.post('/api/service/payout/retrieve', { body, ...options });
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
|
-
* List
|
|
25
|
+
* List payouts for a merchant.
|
|
24
26
|
*/
|
|
25
27
|
list(body: PayoutListParams, options?: Core.RequestOptions): Core.APIPromise<PayoutListResponse> {
|
|
26
28
|
return this._client.post('/api/service/payout/list', { body, ...options });
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
export interface
|
|
32
|
+
export interface Payout {
|
|
33
|
+
/**
|
|
34
|
+
* The payout ID
|
|
35
|
+
*/
|
|
31
36
|
id: string;
|
|
32
37
|
|
|
38
|
+
/**
|
|
39
|
+
* The payout amount
|
|
40
|
+
*/
|
|
33
41
|
amount: number;
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* The payout created at
|
|
45
|
+
*/
|
|
46
|
+
createdAt: unknown;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The payout currency
|
|
50
|
+
*/
|
|
51
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The payout destination
|
|
55
|
+
*/
|
|
56
|
+
destination: Payout.Destination;
|
|
36
57
|
|
|
37
58
|
/**
|
|
38
|
-
* The
|
|
39
|
-
* to "iban", the "iban" object must be filled out.
|
|
59
|
+
* The payout status
|
|
40
60
|
*/
|
|
41
|
-
|
|
61
|
+
status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'canceled';
|
|
42
62
|
|
|
43
|
-
|
|
63
|
+
/**
|
|
64
|
+
* The payout type
|
|
65
|
+
*/
|
|
66
|
+
type: 'beneficiary' | 'customer';
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
/**
|
|
69
|
+
* The payout updated at
|
|
70
|
+
*/
|
|
71
|
+
updatedAt: unknown;
|
|
46
72
|
|
|
47
73
|
/**
|
|
48
|
-
*
|
|
49
|
-
* [here](https://docs.getivy.de/reference/metadata) for more info.
|
|
74
|
+
* The payout metadata
|
|
50
75
|
*/
|
|
51
|
-
metadata?:
|
|
76
|
+
metadata?: { [key: string]: unknown };
|
|
52
77
|
|
|
53
|
-
|
|
78
|
+
/**
|
|
79
|
+
* The payout payment reference
|
|
80
|
+
*/
|
|
81
|
+
paymentReference?: string;
|
|
54
82
|
}
|
|
55
83
|
|
|
56
|
-
export namespace
|
|
84
|
+
export namespace Payout {
|
|
57
85
|
/**
|
|
58
|
-
* The
|
|
59
|
-
* to "iban", the "iban" object must be filled out.
|
|
86
|
+
* The payout destination
|
|
60
87
|
*/
|
|
61
88
|
export interface Destination {
|
|
62
|
-
|
|
63
|
-
* The type of the financial address. The actual destination is determined by this
|
|
64
|
-
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
65
|
-
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
66
|
-
* in the "iban" object.
|
|
67
|
-
*
|
|
68
|
-
* - iban: The IBAN of the account
|
|
69
|
-
* - sort_code: The sort code of the account
|
|
70
|
-
* - bank_code: The bank code of the account
|
|
71
|
-
* - bban: The BBAN of the account
|
|
72
|
-
*/
|
|
73
|
-
type: string;
|
|
89
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
74
90
|
|
|
75
91
|
bankCode?: Destination.BankCode;
|
|
76
92
|
|
|
@@ -83,9 +99,6 @@ export namespace PublicUserPayout {
|
|
|
83
99
|
|
|
84
100
|
export namespace Destination {
|
|
85
101
|
export interface BankCode {
|
|
86
|
-
/**
|
|
87
|
-
* The name of the account holder.
|
|
88
|
-
*/
|
|
89
102
|
accountHolderName: string;
|
|
90
103
|
|
|
91
104
|
accountNumber: string;
|
|
@@ -94,9 +107,6 @@ export namespace PublicUserPayout {
|
|
|
94
107
|
}
|
|
95
108
|
|
|
96
109
|
export interface Bban {
|
|
97
|
-
/**
|
|
98
|
-
* The name of the account holder.
|
|
99
|
-
*/
|
|
100
110
|
accountHolderName: string;
|
|
101
111
|
|
|
102
112
|
bban: string;
|
|
@@ -105,9 +115,6 @@ export namespace PublicUserPayout {
|
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
export interface Iban {
|
|
108
|
-
/**
|
|
109
|
-
* The name of the account holder.
|
|
110
|
-
*/
|
|
111
118
|
accountHolderName: string;
|
|
112
119
|
|
|
113
120
|
iban: string;
|
|
@@ -116,9 +123,6 @@ export namespace PublicUserPayout {
|
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
export interface SortCode {
|
|
119
|
-
/**
|
|
120
|
-
* The name of the account holder.
|
|
121
|
-
*/
|
|
122
126
|
accountHolderName: string;
|
|
123
127
|
|
|
124
128
|
accountNumber: string;
|
|
@@ -128,87 +132,268 @@ export namespace PublicUserPayout {
|
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
|
|
131
|
-
export interface
|
|
135
|
+
export interface PayoutRetrieveResponse {
|
|
132
136
|
/**
|
|
133
|
-
* The
|
|
137
|
+
* The payout ID
|
|
134
138
|
*/
|
|
135
|
-
|
|
139
|
+
id: string;
|
|
136
140
|
|
|
137
141
|
/**
|
|
138
|
-
*
|
|
142
|
+
* The payout amount
|
|
139
143
|
*/
|
|
140
|
-
|
|
144
|
+
amount: number;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The payout created at
|
|
148
|
+
*/
|
|
149
|
+
createdAt: unknown;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The payout currency
|
|
153
|
+
*/
|
|
154
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The payout destination
|
|
158
|
+
*/
|
|
159
|
+
destination: PayoutRetrieveResponse.Destination;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The payout status
|
|
163
|
+
*/
|
|
164
|
+
status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'canceled';
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The payout type
|
|
168
|
+
*/
|
|
169
|
+
type: 'beneficiary' | 'customer';
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The payout updated at
|
|
173
|
+
*/
|
|
174
|
+
updatedAt: unknown;
|
|
141
175
|
|
|
142
|
-
|
|
176
|
+
/**
|
|
177
|
+
* The payout metadata
|
|
178
|
+
*/
|
|
179
|
+
metadata?: { [key: string]: unknown };
|
|
143
180
|
|
|
144
181
|
/**
|
|
145
|
-
* The
|
|
182
|
+
* The payout payment reference
|
|
146
183
|
*/
|
|
184
|
+
paymentReference?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export namespace PayoutRetrieveResponse {
|
|
188
|
+
/**
|
|
189
|
+
* The payout destination
|
|
190
|
+
*/
|
|
191
|
+
export interface Destination {
|
|
192
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
193
|
+
|
|
194
|
+
bankCode?: Destination.BankCode;
|
|
195
|
+
|
|
196
|
+
bban?: Destination.Bban;
|
|
197
|
+
|
|
198
|
+
iban?: Destination.Iban;
|
|
199
|
+
|
|
200
|
+
sortCode?: Destination.SortCode;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export namespace Destination {
|
|
204
|
+
export interface BankCode {
|
|
205
|
+
accountHolderName: string;
|
|
206
|
+
|
|
207
|
+
accountNumber: string;
|
|
208
|
+
|
|
209
|
+
code: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface Bban {
|
|
213
|
+
accountHolderName: string;
|
|
214
|
+
|
|
215
|
+
bban: string;
|
|
216
|
+
|
|
217
|
+
bic?: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface Iban {
|
|
221
|
+
accountHolderName: string;
|
|
222
|
+
|
|
223
|
+
iban: string;
|
|
224
|
+
|
|
225
|
+
bic?: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface SortCode {
|
|
229
|
+
accountHolderName: string;
|
|
230
|
+
|
|
231
|
+
accountNumber: string;
|
|
232
|
+
|
|
233
|
+
sortCode: string;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface PayoutListResponse {
|
|
239
|
+
count: number;
|
|
240
|
+
|
|
241
|
+
hasNext: boolean;
|
|
242
|
+
|
|
243
|
+
items: Array<PayoutListResponse.Item>;
|
|
244
|
+
|
|
147
245
|
skip: number;
|
|
148
246
|
}
|
|
149
247
|
|
|
248
|
+
export namespace PayoutListResponse {
|
|
249
|
+
export interface Item {
|
|
250
|
+
/**
|
|
251
|
+
* The payout ID
|
|
252
|
+
*/
|
|
253
|
+
id: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The payout amount
|
|
257
|
+
*/
|
|
258
|
+
amount: number;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The payout created at
|
|
262
|
+
*/
|
|
263
|
+
createdAt: unknown;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The payout currency
|
|
267
|
+
*/
|
|
268
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The payout destination
|
|
272
|
+
*/
|
|
273
|
+
destination: Item.Destination;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The payout status
|
|
277
|
+
*/
|
|
278
|
+
status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'canceled';
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* The payout type
|
|
282
|
+
*/
|
|
283
|
+
type: 'beneficiary' | 'customer';
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* The payout updated at
|
|
287
|
+
*/
|
|
288
|
+
updatedAt: unknown;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The payout metadata
|
|
292
|
+
*/
|
|
293
|
+
metadata?: { [key: string]: unknown };
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The payout payment reference
|
|
297
|
+
*/
|
|
298
|
+
paymentReference?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export namespace Item {
|
|
302
|
+
/**
|
|
303
|
+
* The payout destination
|
|
304
|
+
*/
|
|
305
|
+
export interface Destination {
|
|
306
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
307
|
+
|
|
308
|
+
bankCode?: Destination.BankCode;
|
|
309
|
+
|
|
310
|
+
bban?: Destination.Bban;
|
|
311
|
+
|
|
312
|
+
iban?: Destination.Iban;
|
|
313
|
+
|
|
314
|
+
sortCode?: Destination.SortCode;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export namespace Destination {
|
|
318
|
+
export interface BankCode {
|
|
319
|
+
accountHolderName: string;
|
|
320
|
+
|
|
321
|
+
accountNumber: string;
|
|
322
|
+
|
|
323
|
+
code: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface Bban {
|
|
327
|
+
accountHolderName: string;
|
|
328
|
+
|
|
329
|
+
bban: string;
|
|
330
|
+
|
|
331
|
+
bic?: string;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface Iban {
|
|
335
|
+
accountHolderName: string;
|
|
336
|
+
|
|
337
|
+
iban: string;
|
|
338
|
+
|
|
339
|
+
bic?: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface SortCode {
|
|
343
|
+
accountHolderName: string;
|
|
344
|
+
|
|
345
|
+
accountNumber: string;
|
|
346
|
+
|
|
347
|
+
sortCode: string;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
150
353
|
export interface PayoutCreateParams {
|
|
151
354
|
/**
|
|
152
|
-
* The amount
|
|
355
|
+
* The payout amount in decimal format. The minimum amount is 0.01.
|
|
153
356
|
*/
|
|
154
357
|
amount: number;
|
|
155
358
|
|
|
156
359
|
/**
|
|
157
|
-
* The currency
|
|
360
|
+
* The payout currency
|
|
158
361
|
*/
|
|
159
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
362
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
160
363
|
|
|
161
364
|
/**
|
|
162
|
-
* The destination
|
|
365
|
+
* The payout destination
|
|
163
366
|
*/
|
|
164
367
|
destination: PayoutCreateParams.Destination;
|
|
165
368
|
|
|
166
369
|
/**
|
|
167
|
-
*
|
|
370
|
+
* This can be used to store any additional information you need to associate with
|
|
371
|
+
* this payout.
|
|
168
372
|
*/
|
|
169
|
-
metadata?:
|
|
373
|
+
metadata?: { [key: string]: unknown };
|
|
170
374
|
|
|
171
375
|
/**
|
|
172
|
-
* The payment reference
|
|
173
|
-
*
|
|
376
|
+
* The payout payment reference. This is visible to the receiving party, if
|
|
377
|
+
* possible.
|
|
174
378
|
*/
|
|
175
379
|
paymentReference?: string;
|
|
176
380
|
}
|
|
177
381
|
|
|
178
382
|
export namespace PayoutCreateParams {
|
|
179
383
|
/**
|
|
180
|
-
* The destination
|
|
384
|
+
* The payout destination
|
|
181
385
|
*/
|
|
182
386
|
export interface Destination {
|
|
183
|
-
|
|
184
|
-
* Used for open-loop customer payouts. Disabled by default for merchants.
|
|
185
|
-
*/
|
|
186
|
-
financialAddress?: Destination.FinancialAddress;
|
|
387
|
+
financialAddress?: Destination.FinancialAddress | null;
|
|
187
388
|
|
|
188
|
-
/**
|
|
189
|
-
* For closed-loop customer payouts. The destination account will be taken from the
|
|
190
|
-
* payer of this order.
|
|
191
|
-
*/
|
|
192
389
|
orderId?: string;
|
|
390
|
+
|
|
391
|
+
type?: 'beneficiary';
|
|
193
392
|
}
|
|
194
393
|
|
|
195
394
|
export namespace Destination {
|
|
196
|
-
/**
|
|
197
|
-
* Used for open-loop customer payouts. Disabled by default for merchants.
|
|
198
|
-
*/
|
|
199
395
|
export interface FinancialAddress {
|
|
200
|
-
|
|
201
|
-
* The type of the financial address. The actual destination is determined by this
|
|
202
|
-
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
203
|
-
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
204
|
-
* in the "iban" object.
|
|
205
|
-
*
|
|
206
|
-
* - iban: The IBAN of the account
|
|
207
|
-
* - sort_code: The sort code of the account
|
|
208
|
-
* - bank_code: The bank code of the account
|
|
209
|
-
* - bban: The BBAN of the account
|
|
210
|
-
*/
|
|
211
|
-
type: string;
|
|
396
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
212
397
|
|
|
213
398
|
bankCode?: FinancialAddress.BankCode;
|
|
214
399
|
|
|
@@ -221,9 +406,6 @@ export namespace PayoutCreateParams {
|
|
|
221
406
|
|
|
222
407
|
export namespace FinancialAddress {
|
|
223
408
|
export interface BankCode {
|
|
224
|
-
/**
|
|
225
|
-
* The name of the account holder.
|
|
226
|
-
*/
|
|
227
409
|
accountHolderName: string;
|
|
228
410
|
|
|
229
411
|
accountNumber: string;
|
|
@@ -232,9 +414,6 @@ export namespace PayoutCreateParams {
|
|
|
232
414
|
}
|
|
233
415
|
|
|
234
416
|
export interface Bban {
|
|
235
|
-
/**
|
|
236
|
-
* The name of the account holder.
|
|
237
|
-
*/
|
|
238
417
|
accountHolderName: string;
|
|
239
418
|
|
|
240
419
|
bban: string;
|
|
@@ -243,9 +422,6 @@ export namespace PayoutCreateParams {
|
|
|
243
422
|
}
|
|
244
423
|
|
|
245
424
|
export interface Iban {
|
|
246
|
-
/**
|
|
247
|
-
* The name of the account holder.
|
|
248
|
-
*/
|
|
249
425
|
accountHolderName: string;
|
|
250
426
|
|
|
251
427
|
iban: string;
|
|
@@ -254,9 +430,6 @@ export namespace PayoutCreateParams {
|
|
|
254
430
|
}
|
|
255
431
|
|
|
256
432
|
export interface SortCode {
|
|
257
|
-
/**
|
|
258
|
-
* The name of the account holder.
|
|
259
|
-
*/
|
|
260
433
|
accountHolderName: string;
|
|
261
434
|
|
|
262
435
|
accountNumber: string;
|
|
@@ -269,26 +442,23 @@ export namespace PayoutCreateParams {
|
|
|
269
442
|
|
|
270
443
|
export interface PayoutRetrieveParams {
|
|
271
444
|
/**
|
|
272
|
-
* The
|
|
445
|
+
* The payout ID
|
|
273
446
|
*/
|
|
274
447
|
id: string;
|
|
275
448
|
}
|
|
276
449
|
|
|
277
450
|
export interface PayoutListParams {
|
|
278
|
-
/**
|
|
279
|
-
* The number of items to retrieve
|
|
280
|
-
*/
|
|
281
451
|
limit?: number;
|
|
282
452
|
|
|
283
|
-
/**
|
|
284
|
-
* The number of items to skip
|
|
285
|
-
*/
|
|
286
453
|
skip?: number;
|
|
454
|
+
|
|
455
|
+
type?: 'customer-payout' | 'beneficiary-payout';
|
|
287
456
|
}
|
|
288
457
|
|
|
289
458
|
export declare namespace Payouts {
|
|
290
459
|
export {
|
|
291
|
-
type
|
|
460
|
+
type Payout as Payout,
|
|
461
|
+
type PayoutRetrieveResponse as PayoutRetrieveResponse,
|
|
292
462
|
type PayoutListResponse as PayoutListResponse,
|
|
293
463
|
type PayoutCreateParams as PayoutCreateParams,
|
|
294
464
|
type PayoutRetrieveParams as PayoutRetrieveParams,
|