@wix/auto_sdk_payments_payouts 1.0.0 → 1.0.2
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/build/cjs/index.d.ts +20 -13
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +149 -99
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +111 -80
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +35 -33
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +20 -13
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +149 -99
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +111 -80
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +35 -33
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -13
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +149 -99
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +111 -80
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +35 -33
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +20 -13
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +149 -99
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +111 -80
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +35 -33
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,66 +1,82 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* A payout is
|
|
5
|
-
*
|
|
6
|
-
* estimated arrival date, and (when applicable) failure
|
|
4
|
+
* A payout is an outgoing transfer of funds from a Wix Payments account to the
|
|
5
|
+
* merchant's bank account. Each payout has an amount, a lifecycle status, an
|
|
6
|
+
* estimated arrival date, and (when applicable) a failure reason.
|
|
7
7
|
*/
|
|
8
8
|
interface Payout {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Payout ID.
|
|
11
11
|
* @format GUID
|
|
12
12
|
*/
|
|
13
13
|
_id?: string;
|
|
14
14
|
/**
|
|
15
|
-
* ID of the Wix Payments account that owns
|
|
15
|
+
* ID of the Wix Payments account that owns the payout. Retrieve account IDs
|
|
16
|
+
* from the Accounts API.
|
|
16
17
|
* @format GUID
|
|
17
18
|
*/
|
|
18
19
|
accountId?: string;
|
|
19
20
|
/**
|
|
20
|
-
* ID of the Wix Payments account profile
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* ID of the Wix Payments account profile that owns the payout.
|
|
22
|
+
*
|
|
23
|
+
* A Wix Payments account has 1 or more profiles. Each profile has its own
|
|
24
|
+
* balance and its own payouts. Most merchants have 1 profile. Retrieve
|
|
25
|
+
* profile IDs from the Accounts API.
|
|
23
26
|
* @format GUID
|
|
24
27
|
*/
|
|
25
28
|
accountProfileId?: string;
|
|
26
29
|
/**
|
|
27
|
-
* Date the payout was created
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
+
* Date and time the payout was created.
|
|
31
|
+
*
|
|
32
|
+
* The payout is created before the underlying transfer is initiated at the
|
|
33
|
+
* bank. Once initiated, the funds typically reach the merchant's bank account
|
|
34
|
+
* within 3 to 5 business days, depending on the receiving bank.
|
|
30
35
|
*/
|
|
31
36
|
_createdDate?: Date | null;
|
|
32
|
-
/** Amount of
|
|
37
|
+
/** Amount of the transfer to the merchant's bank account. */
|
|
33
38
|
amount?: Money;
|
|
34
39
|
/**
|
|
35
|
-
* Lifecycle status of the payout.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
40
|
+
* Lifecycle status of the payout.
|
|
41
|
+
*
|
|
42
|
+
* `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means
|
|
43
|
+
* the receiving bank rejected the transfer.
|
|
44
|
+
*
|
|
45
|
+
* A `SENT` status doesn't guarantee that the funds were delivered to the
|
|
46
|
+
* merchant. The bank rail doesn't provide a delivery acknowledgement, and a
|
|
47
|
+
* payout in `SENT` can later transition to `FAILED` if the receiving bank
|
|
48
|
+
* rejects the transfer. See the per-value documentation on `PayoutStatus` for
|
|
49
|
+
* details.
|
|
39
50
|
*/
|
|
40
51
|
status?: PayoutStatusWithLiterals;
|
|
41
52
|
/**
|
|
42
|
-
* Estimated date for when the funds should arrive at the merchant's bank
|
|
43
|
-
*
|
|
44
|
-
*
|
|
53
|
+
* Estimated date for when the funds should arrive at the merchant's bank
|
|
54
|
+
* account, in `YYYY-MM-DD` format.
|
|
55
|
+
*
|
|
56
|
+
* The estimated arrival date is a prediction, not a guarantee. Actual arrival
|
|
57
|
+
* depends on the receiving bank's processing and may be later.
|
|
45
58
|
* @format LOCAL_DATE
|
|
46
59
|
*/
|
|
47
60
|
estimatedArrivalDateV2?: string | null;
|
|
48
61
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
62
|
+
* Reason the bank rail rejected the transfer.
|
|
63
|
+
*
|
|
64
|
+
* Returned only when `status` is `FAILED`.
|
|
51
65
|
*/
|
|
52
66
|
failureReason?: PayoutFailureReason;
|
|
53
67
|
/**
|
|
54
|
-
* Reference returned by the bank rail
|
|
55
|
-
*
|
|
56
|
-
*
|
|
68
|
+
* Reference returned by the bank rail once the transfer is initiated. For
|
|
69
|
+
* example, an ACH trace number or a SEPA reference. Use this value to
|
|
70
|
+
* reconcile against the merchant's bank statement.
|
|
71
|
+
*
|
|
72
|
+
* Empty until the bank rail returns a reference.
|
|
57
73
|
* @maxLength 500
|
|
58
74
|
*/
|
|
59
75
|
bankTransferReference?: string | null;
|
|
60
76
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
77
|
+
* Whether the payout `amount` includes funds from a Wix Capital cash advance
|
|
78
|
+
* taken out by the merchant. If `false`, the amount comes only from the
|
|
79
|
+
* merchant's sales proceeds.
|
|
64
80
|
*/
|
|
65
81
|
cashAdvanceIncluded?: boolean;
|
|
66
82
|
}
|
|
@@ -84,56 +100,56 @@ interface Money {
|
|
|
84
100
|
}
|
|
85
101
|
/** Lifecycle status of a payout. */
|
|
86
102
|
declare enum PayoutStatus {
|
|
87
|
-
/**
|
|
103
|
+
/** Unknown payout status. Not returned by the API. */
|
|
88
104
|
UNKNOWN = "UNKNOWN",
|
|
89
105
|
/**
|
|
90
|
-
* The bank rail accepted the transfer. Funds are en route to the merchant's
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
106
|
+
* The bank rail accepted the transfer. Funds are en route to the merchant's
|
|
107
|
+
* bank account.
|
|
108
|
+
*
|
|
109
|
+
* Acceptance isn't the same as delivery. A `SENT` payout can still
|
|
110
|
+
* transition to `FAILED` if the receiving bank rejects the transfer. The
|
|
111
|
+
* bank rail's return window is up to 60 days for ACH and up to 13 months
|
|
112
|
+
* for SEPA.
|
|
94
113
|
*/
|
|
95
114
|
SENT = "SENT",
|
|
96
115
|
/**
|
|
97
|
-
* The
|
|
98
|
-
*
|
|
116
|
+
* The bank rail rejected the transfer. See `failureReason` for the cause.
|
|
117
|
+
* The funds remain in the merchant's Wix Payments balance.
|
|
99
118
|
*/
|
|
100
119
|
FAILED = "FAILED"
|
|
101
120
|
}
|
|
102
121
|
/** @enumType */
|
|
103
122
|
type PayoutStatusWithLiterals = PayoutStatus | 'UNKNOWN' | 'SENT' | 'FAILED';
|
|
104
|
-
/**
|
|
105
|
-
* Carries the reason a payout failed. Wraps the `PayoutFailureCode` enum to leave room
|
|
106
|
-
* for future fields (e.g. a human-readable message); new clients should still read
|
|
107
|
-
* `failure_reason.code` for the enum value.
|
|
108
|
-
*/
|
|
123
|
+
/** Reason a payout failed. */
|
|
109
124
|
interface PayoutFailureReason {
|
|
110
125
|
/** Why the bank rail rejected the transfer. */
|
|
111
126
|
code?: PayoutFailureCodeWithLiterals;
|
|
112
127
|
}
|
|
113
128
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
129
|
+
* Possible reasons for a payout failure. Each value describes a real-world
|
|
130
|
+
* bank-rail condition.
|
|
116
131
|
*/
|
|
117
132
|
declare enum PayoutFailureCode {
|
|
118
133
|
/**
|
|
119
|
-
* Generic failure with no more specific reason available from the bank
|
|
120
|
-
*
|
|
121
|
-
*
|
|
134
|
+
* Generic failure with no more specific reason available from the bank
|
|
135
|
+
* rail. This value is also returned when no failure reason is known.
|
|
136
|
+
* Clients can't distinguish "unknown" from "generic" using this code alone.
|
|
122
137
|
*/
|
|
123
138
|
GENERIC_PAYOUT_FAILURE = "GENERIC_PAYOUT_FAILURE",
|
|
124
139
|
/**
|
|
125
|
-
* The merchant's bank account is closed. The merchant must provide new
|
|
126
|
-
* account details before further payouts can succeed.
|
|
140
|
+
* The merchant's bank account is closed. The merchant must provide new
|
|
141
|
+
* bank account details before further payouts can succeed.
|
|
127
142
|
*/
|
|
128
143
|
ACCOUNT_CLOSED = "ACCOUNT_CLOSED",
|
|
129
144
|
/**
|
|
130
|
-
* The merchant's bank account is frozen
|
|
131
|
-
* The merchant must resolve the hold with their bank before
|
|
145
|
+
* The merchant's bank account is frozen, for example due to a hold placed
|
|
146
|
+
* by the bank. The merchant must resolve the hold with their bank before
|
|
147
|
+
* further payouts can succeed.
|
|
132
148
|
*/
|
|
133
149
|
ACCOUNT_FROZEN = "ACCOUNT_FROZEN",
|
|
134
150
|
/**
|
|
135
|
-
* The merchant's bank account is restricted from receiving the transfer
|
|
136
|
-
*
|
|
151
|
+
* The merchant's bank account is restricted from receiving the transfer.
|
|
152
|
+
* For example, the account type or status doesn't permit incoming credits.
|
|
137
153
|
*/
|
|
138
154
|
BANK_ACCOUNT_RESTRICTED = "BANK_ACCOUNT_RESTRICTED",
|
|
139
155
|
/**
|
|
@@ -142,38 +158,42 @@ declare enum PayoutFailureCode {
|
|
|
142
158
|
*/
|
|
143
159
|
BANK_OWNERSHIP_CHANGED = "BANK_OWNERSHIP_CHANGED",
|
|
144
160
|
/**
|
|
145
|
-
* The receiving bank
|
|
146
|
-
* A subsequent payout attempt may succeed.
|
|
161
|
+
* The receiving bank couldn't process the transfer for an unspecified
|
|
162
|
+
* reason. A subsequent payout attempt may succeed.
|
|
147
163
|
*/
|
|
148
164
|
COULD_NOT_PROCESS = "COULD_NOT_PROCESS",
|
|
149
165
|
/**
|
|
150
|
-
* The merchant's bank declined the debit authorisation associated with the
|
|
151
|
-
* The merchant must contact their bank to authorise Wix Payments
|
|
166
|
+
* The merchant's bank declined the debit authorisation associated with the
|
|
167
|
+
* transfer. The merchant must contact their bank to authorise Wix Payments
|
|
168
|
+
* payouts.
|
|
152
169
|
*/
|
|
153
170
|
DEBIT_NOT_AUTHORIZED = "DEBIT_NOT_AUTHORIZED",
|
|
154
171
|
/**
|
|
155
|
-
* The account holder name on file
|
|
156
|
-
* The merchant must correct the account holder name.
|
|
172
|
+
* The account holder name on file doesn't match the name the receiving
|
|
173
|
+
* bank has on record. The merchant must correct the account holder name.
|
|
157
174
|
*/
|
|
158
175
|
INCORRECT_ACCOUNT_HOLDER_NAME = "INCORRECT_ACCOUNT_HOLDER_NAME",
|
|
159
176
|
/** The city in the bank account details is invalid for the receiving bank. */
|
|
160
177
|
INVALID_ACCOUNT_DETAILS_CITY = "INVALID_ACCOUNT_DETAILS_CITY",
|
|
161
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* The bank account number is invalid. The format is wrong or the account
|
|
180
|
+
* doesn't exist.
|
|
181
|
+
*/
|
|
162
182
|
INVALID_ACCOUNT_NUMBER = "INVALID_ACCOUNT_NUMBER",
|
|
163
|
-
/** The payout currency
|
|
183
|
+
/** The payout currency isn't supported by the receiving bank account. */
|
|
164
184
|
INVALID_CURRENCY = "INVALID_CURRENCY",
|
|
165
|
-
/** The routing number (US) is invalid or
|
|
185
|
+
/** The routing number (US) is invalid or doesn't match the receiving bank. */
|
|
166
186
|
INVALID_ROUTING_NUMBER = "INVALID_ROUTING_NUMBER",
|
|
167
|
-
/** The sort code (UK) is invalid or
|
|
187
|
+
/** The sort code (UK) is invalid or doesn't match the receiving bank. */
|
|
168
188
|
INVALID_SORT_CODE = "INVALID_SORT_CODE",
|
|
169
189
|
/**
|
|
170
|
-
* No bank account is on file for the merchant.
|
|
171
|
-
*
|
|
190
|
+
* No bank account is on file for the merchant. The merchant must add bank
|
|
191
|
+
* details before payouts can succeed.
|
|
172
192
|
*/
|
|
173
193
|
NO_ACCOUNT = "NO_ACCOUNT",
|
|
174
194
|
/**
|
|
175
|
-
* A technical error at the bank rail prevented the transfer.
|
|
176
|
-
*
|
|
195
|
+
* A technical error at the bank rail prevented the transfer. A subsequent
|
|
196
|
+
* payout attempt may succeed.
|
|
177
197
|
*/
|
|
178
198
|
TECHNICAL_ERROR = "TECHNICAL_ERROR"
|
|
179
199
|
}
|
|
@@ -181,23 +201,30 @@ declare enum PayoutFailureCode {
|
|
|
181
201
|
type PayoutFailureCodeWithLiterals = PayoutFailureCode | 'GENERIC_PAYOUT_FAILURE' | 'ACCOUNT_CLOSED' | 'ACCOUNT_FROZEN' | 'BANK_ACCOUNT_RESTRICTED' | 'BANK_OWNERSHIP_CHANGED' | 'COULD_NOT_PROCESS' | 'DEBIT_NOT_AUTHORIZED' | 'INCORRECT_ACCOUNT_HOLDER_NAME' | 'INVALID_ACCOUNT_DETAILS_CITY' | 'INVALID_ACCOUNT_NUMBER' | 'INVALID_CURRENCY' | 'INVALID_ROUTING_NUMBER' | 'INVALID_SORT_CODE' | 'NO_ACCOUNT' | 'TECHNICAL_ERROR';
|
|
182
202
|
interface ListPayoutsRequest {
|
|
183
203
|
/**
|
|
184
|
-
* ID of the Wix Payments account whose payouts to list.
|
|
204
|
+
* ID of the Wix Payments account whose payouts to list. Retrieve account
|
|
205
|
+
* IDs from the Accounts API.
|
|
185
206
|
* @format GUID
|
|
186
207
|
*/
|
|
187
208
|
accountId: string;
|
|
188
209
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
210
|
+
* ID of the Wix Payments account profile to filter by.
|
|
211
|
+
*
|
|
212
|
+
* When omitted, payouts across all profiles of the account are returned.
|
|
213
|
+
* Retrieve profile IDs from the Accounts API.
|
|
191
214
|
* @format GUID
|
|
192
215
|
*/
|
|
193
216
|
accountProfileId?: string | null;
|
|
194
|
-
/**
|
|
217
|
+
/** Returns only payouts created before this date and time. */
|
|
195
218
|
createdBefore?: Date | null;
|
|
196
|
-
/**
|
|
219
|
+
/** Returns only payouts created after this date and time. */
|
|
197
220
|
createdAfter?: Date | null;
|
|
198
|
-
/**
|
|
221
|
+
/**
|
|
222
|
+
* Sort order for the result list.
|
|
223
|
+
*
|
|
224
|
+
* Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.
|
|
225
|
+
*/
|
|
199
226
|
sort?: Sorting;
|
|
200
|
-
/**
|
|
227
|
+
/** Offset-based paging. */
|
|
201
228
|
paging?: Paging;
|
|
202
229
|
}
|
|
203
230
|
interface Sorting {
|
|
@@ -222,7 +249,7 @@ interface Paging {
|
|
|
222
249
|
offset?: number | null;
|
|
223
250
|
}
|
|
224
251
|
interface ListPayoutsResponse {
|
|
225
|
-
/** List of payouts. */
|
|
252
|
+
/** List of retrieved payouts. */
|
|
226
253
|
payouts?: Payout[];
|
|
227
254
|
/** Paging metadata. */
|
|
228
255
|
metadata?: PagingMetadata;
|
|
@@ -238,16 +265,17 @@ interface PagingMetadata {
|
|
|
238
265
|
tooManyToCount?: boolean | null;
|
|
239
266
|
}
|
|
240
267
|
interface CreatePayoutRequest {
|
|
241
|
-
/** Payout. */
|
|
268
|
+
/** Payout to create. */
|
|
242
269
|
payout?: Payout;
|
|
243
270
|
}
|
|
244
271
|
interface CreatePayoutResponse {
|
|
245
|
-
/**
|
|
272
|
+
/** Created payout. */
|
|
246
273
|
payout?: Payout;
|
|
247
274
|
}
|
|
248
275
|
interface GetPayoutRequest {
|
|
249
276
|
/**
|
|
250
|
-
* ID of the Wix Payments account the payout
|
|
277
|
+
* ID of the Wix Payments account that owns the payout. The payout must
|
|
278
|
+
* belong to this account. Retrieve account IDs from the Accounts API.
|
|
251
279
|
* @format GUID
|
|
252
280
|
*/
|
|
253
281
|
accountId: string;
|
|
@@ -258,12 +286,13 @@ interface GetPayoutRequest {
|
|
|
258
286
|
payoutId: string;
|
|
259
287
|
}
|
|
260
288
|
interface GetPayoutResponse {
|
|
261
|
-
/**
|
|
289
|
+
/** Retrieved payout. */
|
|
262
290
|
payout?: Payout;
|
|
263
291
|
}
|
|
264
292
|
interface ListPayoutGroupsRequest {
|
|
265
293
|
/**
|
|
266
|
-
* Wix Payments account
|
|
294
|
+
* ID of the Wix Payments account whose payout groups to list. Retrieve
|
|
295
|
+
* account IDs from the Accounts API.
|
|
267
296
|
* @format GUID
|
|
268
297
|
*/
|
|
269
298
|
accountId?: string;
|
|
@@ -311,7 +340,8 @@ interface PayoutGroup {
|
|
|
311
340
|
}
|
|
312
341
|
interface GetPayoutGroupRequest {
|
|
313
342
|
/**
|
|
314
|
-
* Wix Payments account
|
|
343
|
+
* ID of the Wix Payments account that owns the payout group. Retrieve
|
|
344
|
+
* account IDs from the Accounts API.
|
|
315
345
|
* @format GUID
|
|
316
346
|
*/
|
|
317
347
|
accountId?: string;
|
|
@@ -333,12 +363,13 @@ interface GetPayoutGroupResponse {
|
|
|
333
363
|
}
|
|
334
364
|
interface GetPayoutGroupByPayoutIdRequest {
|
|
335
365
|
/**
|
|
336
|
-
* Wix Payments account
|
|
366
|
+
* ID of the Wix Payments account that owns the payout. Retrieve account IDs
|
|
367
|
+
* from the Accounts API.
|
|
337
368
|
* @format GUID
|
|
338
369
|
*/
|
|
339
370
|
accountId?: string;
|
|
340
371
|
/**
|
|
341
|
-
*
|
|
372
|
+
* ID of the payout whose group to retrieve.
|
|
342
373
|
* @format GUID
|
|
343
374
|
*/
|
|
344
375
|
payoutId?: string;
|
|
@@ -560,10 +591,14 @@ interface PayoutCreatedEnvelope {
|
|
|
560
591
|
metadata: EventMetadata;
|
|
561
592
|
}
|
|
562
593
|
/**
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
* is
|
|
594
|
+
* Triggered when a payout is created.
|
|
595
|
+
*
|
|
596
|
+
* The payout is created before the underlying transfer is initiated at the
|
|
597
|
+
* bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set
|
|
598
|
+
* if the bank rail returned one. `failureReason` and `bankTransferReference`
|
|
566
599
|
* are not yet populated.
|
|
600
|
+
* @permissionScope View settlement reports and payouts
|
|
601
|
+
* @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE
|
|
567
602
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
568
603
|
* @webhook
|
|
569
604
|
* @eventType wix.payments.payouts.v4.payout_created
|
|
@@ -577,10 +612,14 @@ interface PayoutUpdatedEnvelope {
|
|
|
577
612
|
metadata: EventMetadata;
|
|
578
613
|
}
|
|
579
614
|
/**
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* being
|
|
615
|
+
* Triggered when a payout is updated.
|
|
616
|
+
*
|
|
617
|
+
* Typical updates include `status` transitioning from `SENT` to `FAILED`
|
|
618
|
+
* (with `failureReason` being set), `estimatedArrivalDateV2` being refined by
|
|
619
|
+
* the bank rail, and `bankTransferReference` being populated once the rail
|
|
620
|
+
* returns it.
|
|
621
|
+
* @permissionScope View settlement reports and payouts
|
|
622
|
+
* @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE
|
|
584
623
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
585
624
|
* @webhook
|
|
586
625
|
* @eventType wix.payments.payouts.v4.payout_updated
|
|
@@ -590,42 +629,53 @@ interface PayoutUpdatedEnvelope {
|
|
|
590
629
|
*/
|
|
591
630
|
declare function onPayoutUpdated(handler: (event: PayoutUpdatedEnvelope) => void | Promise<void>): void;
|
|
592
631
|
/**
|
|
593
|
-
* Retrieves a paginated list of payouts for the specified Wix Payments account
|
|
594
|
-
*
|
|
595
|
-
*
|
|
632
|
+
* Retrieves a paginated list of payouts for the specified Wix Payments account.
|
|
633
|
+
*
|
|
634
|
+
* Supports optional filters by account profile and by creation date range.
|
|
635
|
+
* @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account
|
|
636
|
+
* IDs from the Accounts API.
|
|
596
637
|
* @public
|
|
597
638
|
* @documentationMaturity preview
|
|
598
639
|
* @requiredField accountId
|
|
599
640
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
641
|
+
* @applicableIdentity APP
|
|
600
642
|
* @fqn wix.payments.v4.payouts.PayoutsService.ListPayouts
|
|
601
643
|
*/
|
|
602
644
|
declare function listPayouts(accountId: string, options?: ListPayoutsOptions): Promise<NonNullablePaths<ListPayoutsResponse, `payouts` | `payouts.${number}._id` | `payouts.${number}.accountId` | `payouts.${number}.accountProfileId` | `payouts.${number}.amount.value` | `payouts.${number}.amount.currency` | `payouts.${number}.status` | `payouts.${number}.failureReason.code` | `payouts.${number}.cashAdvanceIncluded`, 5>>;
|
|
603
645
|
interface ListPayoutsOptions {
|
|
604
646
|
/**
|
|
605
|
-
*
|
|
606
|
-
*
|
|
647
|
+
* ID of the Wix Payments account profile to filter by.
|
|
648
|
+
*
|
|
649
|
+
* When omitted, payouts across all profiles of the account are returned.
|
|
650
|
+
* Retrieve profile IDs from the Accounts API.
|
|
607
651
|
* @format GUID
|
|
608
652
|
*/
|
|
609
653
|
accountProfileId?: string | null;
|
|
610
|
-
/**
|
|
654
|
+
/** Returns only payouts created before this date and time. */
|
|
611
655
|
createdBefore?: Date | null;
|
|
612
|
-
/**
|
|
656
|
+
/** Returns only payouts created after this date and time. */
|
|
613
657
|
createdAfter?: Date | null;
|
|
614
|
-
/**
|
|
658
|
+
/**
|
|
659
|
+
* Sort order for the result list.
|
|
660
|
+
*
|
|
661
|
+
* Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.
|
|
662
|
+
*/
|
|
615
663
|
sort?: Sorting;
|
|
616
|
-
/**
|
|
664
|
+
/** Offset-based paging. */
|
|
617
665
|
paging?: Paging;
|
|
618
666
|
}
|
|
619
667
|
/**
|
|
620
|
-
* Retrieves a single payout by
|
|
668
|
+
* Retrieves a single payout by ID.
|
|
621
669
|
* @param payoutId - ID of the payout to retrieve.
|
|
622
|
-
* @param accountId - ID of the Wix Payments account the payout
|
|
670
|
+
* @param accountId - ID of the Wix Payments account that owns the payout. The payout must
|
|
671
|
+
* belong to this account. Retrieve account IDs from the Accounts API.
|
|
623
672
|
* @public
|
|
624
673
|
* @documentationMaturity preview
|
|
625
674
|
* @requiredField accountId
|
|
626
675
|
* @requiredField payoutId
|
|
627
676
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
628
|
-
* @
|
|
677
|
+
* @applicableIdentity APP
|
|
678
|
+
* @returns Retrieved payout.
|
|
629
679
|
* @fqn wix.payments.v4.payouts.PayoutsService.GetPayout
|
|
630
680
|
*/
|
|
631
681
|
declare function getPayout(payoutId: string, accountId: string): Promise<NonNullablePaths<Payout, `_id` | `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `status` | `failureReason.code` | `cashAdvanceIncluded`, 3>>;
|