@wix/auto_sdk_payments_payouts 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.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +44 -0
  2. package/build/cjs/index.js +397 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +633 -0
  5. package/build/cjs/index.typings.js +331 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +522 -0
  8. package/build/cjs/meta.js +302 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +111 -0
  11. package/build/cjs/schemas.js +229 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +44 -0
  14. package/build/es/index.mjs +366 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +633 -0
  17. package/build/es/index.typings.mjs +302 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +522 -0
  20. package/build/es/meta.mjs +270 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +111 -0
  24. package/build/es/schemas.mjs +189 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +44 -0
  27. package/build/internal/cjs/index.js +397 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +633 -0
  30. package/build/internal/cjs/index.typings.js +331 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +522 -0
  33. package/build/internal/cjs/meta.js +302 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +111 -0
  36. package/build/internal/cjs/schemas.js +229 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +44 -0
  39. package/build/internal/es/index.mjs +366 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +633 -0
  42. package/build/internal/es/index.typings.mjs +302 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +522 -0
  45. package/build/internal/es/meta.mjs +270 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +111 -0
  48. package/build/internal/es/schemas.mjs +189 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,633 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /**
4
+ * A payout is one outgoing transfer of funds from a Wix Payments merchant account
5
+ * to the merchant's bank account. The entity carries the amount, lifecycle status,
6
+ * estimated arrival date, and (when applicable) failure information.
7
+ */
8
+ interface Payout {
9
+ /**
10
+ * Unique identifier of the payout. Immutable.
11
+ * @format GUID
12
+ */
13
+ _id?: string;
14
+ /**
15
+ * ID of the Wix Payments account that owns this payout.
16
+ * @format GUID
17
+ */
18
+ accountId?: string;
19
+ /**
20
+ * ID of the Wix Payments account profile this payout belongs to.
21
+ * A Wix Payments account has one or more profiles; each profile has its own
22
+ * balance and its own payouts. Most merchants have a single profile.
23
+ * @format GUID
24
+ */
25
+ accountProfileId?: string;
26
+ /**
27
+ * Date the payout was created, in advance of the underlying transfer being
28
+ * initiated at the bank rail. Once initiated, the funds typically reach the
29
+ * merchant's bank account within 3-5 business days, depending on the receiving bank.
30
+ */
31
+ _createdDate?: Date | null;
32
+ /** Amount of funds transferred to the merchant's bank account. */
33
+ amount?: Money;
34
+ /**
35
+ * Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer
36
+ * for delivery; `FAILED` means the receiving bank rejected the transfer. The rail
37
+ * does not provide a delivery acknowledgement, so `SENT` is not the same as
38
+ * "delivered to the merchant" — see the per-value documentation on `PayoutStatus`.
39
+ */
40
+ status?: PayoutStatusWithLiterals;
41
+ /**
42
+ * Estimated date for when the funds should arrive at the merchant's bank, returned
43
+ * by the underlying bank rail when available. This is a prediction, not a guarantee —
44
+ * actual arrival depends on the receiving bank's processing and may be later.
45
+ * @format LOCAL_DATE
46
+ */
47
+ estimatedArrivalDateV2?: string | null;
48
+ /**
49
+ * Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.
50
+ * The codes are a Wix Payments unified set; the original provider-specific reason is not exposed.
51
+ */
52
+ failureReason?: PayoutFailureReason;
53
+ /**
54
+ * Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once
55
+ * the transfer is initiated. Use it for reconciliation against the merchant's bank
56
+ * statement. Empty when the rail has not yet returned a reference.
57
+ * @maxLength 500
58
+ */
59
+ bankTransferReference?: string | null;
60
+ /**
61
+ * `true` if the payout's `amount` includes funds that originate from a Wix Capital
62
+ * advance the merchant has taken out. `false` if the amount is composed only of
63
+ * regular sales proceeds.
64
+ */
65
+ cashAdvanceIncluded?: boolean;
66
+ }
67
+ /**
68
+ * Money.
69
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
70
+ */
71
+ interface Money {
72
+ /**
73
+ * Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.
74
+ * @format DECIMAL_VALUE
75
+ */
76
+ value?: string;
77
+ /**
78
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
79
+ * @format CURRENCY
80
+ */
81
+ currency?: string;
82
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
83
+ formattedValue?: string | null;
84
+ }
85
+ /** Lifecycle status of a payout. */
86
+ declare enum PayoutStatus {
87
+ /** Default value. Not returned by the API. */
88
+ UNKNOWN = "UNKNOWN",
89
+ /**
90
+ * The bank rail accepted the transfer. Funds are en route to the merchant's bank,
91
+ * but acceptance is not the same as delivery — a `SENT` payout can still flip to
92
+ * `FAILED` if the receiving bank rejects the transfer (the rail's return window
93
+ * is up to 60 days for ACH and up to 13 months for SEPA).
94
+ */
95
+ SENT = "SENT",
96
+ /**
97
+ * The transfer was rejected by the receiving bank. See `failure_reason` for the cause;
98
+ * the funds remain in the merchant's Wix Payments balance.
99
+ */
100
+ FAILED = "FAILED"
101
+ }
102
+ /** @enumType */
103
+ 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
+ */
109
+ interface PayoutFailureReason {
110
+ /** Why the bank rail rejected the transfer. */
111
+ code?: PayoutFailureCodeWithLiterals;
112
+ }
113
+ /**
114
+ * Reasons a payout can fail. Values describe real-world bank-rail conditions and
115
+ * are mapped from the underlying provider into a Wix Payments unified vocabulary.
116
+ */
117
+ declare enum PayoutFailureCode {
118
+ /**
119
+ * Generic failure with no more specific reason available from the bank rail.
120
+ * Note: this value is also returned when no failure reason is known — clients
121
+ * cannot distinguish "unknown" from "generic" using this code alone.
122
+ */
123
+ GENERIC_PAYOUT_FAILURE = "GENERIC_PAYOUT_FAILURE",
124
+ /**
125
+ * The merchant's bank account is closed. The merchant must provide new bank
126
+ * account details before further payouts can succeed.
127
+ */
128
+ ACCOUNT_CLOSED = "ACCOUNT_CLOSED",
129
+ /**
130
+ * The merchant's bank account is frozen (e.g. due to a hold placed by the bank).
131
+ * The merchant must resolve the hold with their bank before further payouts can succeed.
132
+ */
133
+ ACCOUNT_FROZEN = "ACCOUNT_FROZEN",
134
+ /**
135
+ * The merchant's bank account is restricted from receiving the transfer
136
+ * (e.g. account type or status does not permit incoming credits).
137
+ */
138
+ BANK_ACCOUNT_RESTRICTED = "BANK_ACCOUNT_RESTRICTED",
139
+ /**
140
+ * Ownership of the merchant's bank account changed and the rail no longer
141
+ * recognises the previously-recorded owner. New bank details are required.
142
+ */
143
+ BANK_OWNERSHIP_CHANGED = "BANK_OWNERSHIP_CHANGED",
144
+ /**
145
+ * The receiving bank could not process the transfer for an unspecified reason.
146
+ * A subsequent payout attempt may succeed.
147
+ */
148
+ COULD_NOT_PROCESS = "COULD_NOT_PROCESS",
149
+ /**
150
+ * The merchant's bank declined the debit authorisation associated with the transfer.
151
+ * The merchant must contact their bank to authorise Wix Payments payouts.
152
+ */
153
+ DEBIT_NOT_AUTHORIZED = "DEBIT_NOT_AUTHORIZED",
154
+ /**
155
+ * The account holder name on file does not match what the receiving bank has on record.
156
+ * The merchant must correct the account holder name.
157
+ */
158
+ INCORRECT_ACCOUNT_HOLDER_NAME = "INCORRECT_ACCOUNT_HOLDER_NAME",
159
+ /** The city in the bank account details is invalid for the receiving bank. */
160
+ INVALID_ACCOUNT_DETAILS_CITY = "INVALID_ACCOUNT_DETAILS_CITY",
161
+ /** The bank account number is invalid (wrong format or does not exist). */
162
+ INVALID_ACCOUNT_NUMBER = "INVALID_ACCOUNT_NUMBER",
163
+ /** The payout currency is not supported by the receiving bank account. */
164
+ INVALID_CURRENCY = "INVALID_CURRENCY",
165
+ /** The routing number (US) is invalid or does not match the receiving bank. */
166
+ INVALID_ROUTING_NUMBER = "INVALID_ROUTING_NUMBER",
167
+ /** The sort code (UK) is invalid or does not match the receiving bank. */
168
+ INVALID_SORT_CODE = "INVALID_SORT_CODE",
169
+ /**
170
+ * No bank account is on file for the merchant.
171
+ * The merchant must add bank details before payouts can succeed.
172
+ */
173
+ NO_ACCOUNT = "NO_ACCOUNT",
174
+ /**
175
+ * A technical error at the bank rail prevented the transfer.
176
+ * A subsequent payout attempt may succeed.
177
+ */
178
+ TECHNICAL_ERROR = "TECHNICAL_ERROR"
179
+ }
180
+ /** @enumType */
181
+ 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
+ interface ListPayoutsRequest {
183
+ /**
184
+ * ID of the Wix Payments account whose payouts to list.
185
+ * @format GUID
186
+ */
187
+ accountId: string;
188
+ /**
189
+ * Optional. When omitted, payouts across all profiles of the account are returned.
190
+ * When set, only payouts belonging to the specified account profile are returned.
191
+ * @format GUID
192
+ */
193
+ accountProfileId?: string | null;
194
+ /** Optional. Returns only payouts created before this timestamp. */
195
+ createdBefore?: Date | null;
196
+ /** Optional. Returns only payouts created after this timestamp. */
197
+ createdAfter?: Date | null;
198
+ /** Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT. */
199
+ sort?: Sorting;
200
+ /** Optional paging. Offset-based. */
201
+ paging?: Paging;
202
+ }
203
+ interface Sorting {
204
+ /**
205
+ * Name of the field to sort by.
206
+ * @maxLength 512
207
+ */
208
+ fieldName?: string;
209
+ /** Sort order. */
210
+ order?: SortOrderWithLiterals;
211
+ }
212
+ declare enum SortOrder {
213
+ ASC = "ASC",
214
+ DESC = "DESC"
215
+ }
216
+ /** @enumType */
217
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
218
+ interface Paging {
219
+ /** Number of items to load. */
220
+ limit?: number | null;
221
+ /** Number of items to skip in the current sort order. */
222
+ offset?: number | null;
223
+ }
224
+ interface ListPayoutsResponse {
225
+ /** List of payouts. */
226
+ payouts?: Payout[];
227
+ /** Paging metadata. */
228
+ metadata?: PagingMetadata;
229
+ }
230
+ interface PagingMetadata {
231
+ /** Number of items returned in the response. */
232
+ count?: number | null;
233
+ /** Offset that was requested. */
234
+ offset?: number | null;
235
+ /** Total number of items that match the query. */
236
+ total?: number | null;
237
+ /** Flag that indicates the server failed to calculate the `total` field. */
238
+ tooManyToCount?: boolean | null;
239
+ }
240
+ interface CreatePayoutRequest {
241
+ /** Payout. */
242
+ payout?: Payout;
243
+ }
244
+ interface CreatePayoutResponse {
245
+ /** Payout. */
246
+ payout?: Payout;
247
+ }
248
+ interface GetPayoutRequest {
249
+ /**
250
+ * ID of the Wix Payments account the payout belongs to.
251
+ * @format GUID
252
+ */
253
+ accountId: string;
254
+ /**
255
+ * ID of the payout to retrieve.
256
+ * @format GUID
257
+ */
258
+ payoutId: string;
259
+ }
260
+ interface GetPayoutResponse {
261
+ /** Payout. */
262
+ payout?: Payout;
263
+ }
264
+ interface ListPayoutGroupsRequest {
265
+ /**
266
+ * Wix Payments account identifier.
267
+ * @format GUID
268
+ */
269
+ accountId?: string;
270
+ /**
271
+ * Optional filter by payout date. Use it to return payouts before specific date.
272
+ * @format LOCAL_DATE
273
+ */
274
+ payoutDateBefore?: string | null;
275
+ /**
276
+ * Optional filter by payout date. Use it to return payouts after specific date.
277
+ * @format LOCAL_DATE
278
+ */
279
+ payoutDateAfter?: string | null;
280
+ /** Optional sorting. Supported fields: "payout_date". */
281
+ sort?: Sorting;
282
+ /** Optional paging. */
283
+ paging?: Paging;
284
+ }
285
+ interface ListPayoutGroupsResponse {
286
+ /** List of payout groups. */
287
+ groups?: PayoutGroup[];
288
+ /** Paging metadata. */
289
+ metadata?: PagingMetadata;
290
+ }
291
+ /** Payout group */
292
+ interface PayoutGroup {
293
+ /**
294
+ * Payout date.
295
+ * @format LOCAL_DATE
296
+ */
297
+ payoutDate?: string;
298
+ /**
299
+ * Payout number within the same date, is absent if there's only one group
300
+ * @min 1
301
+ * @max 99
302
+ */
303
+ payoutNumber?: number | null;
304
+ /** Payout group amount */
305
+ amount?: Money;
306
+ /**
307
+ * Payouts associated with the group
308
+ * @maxSize 10
309
+ */
310
+ payouts?: Payout[];
311
+ }
312
+ interface GetPayoutGroupRequest {
313
+ /**
314
+ * Wix Payments account identifier.
315
+ * @format GUID
316
+ */
317
+ accountId?: string;
318
+ /**
319
+ * Payout date.
320
+ * @format LOCAL_DATE
321
+ */
322
+ payoutDate?: string;
323
+ /**
324
+ * Optional payout number within the same date
325
+ * @min 1
326
+ * @max 99
327
+ */
328
+ payoutNumber?: number | null;
329
+ }
330
+ interface GetPayoutGroupResponse {
331
+ /** Payout group. */
332
+ group?: PayoutGroup;
333
+ }
334
+ interface GetPayoutGroupByPayoutIdRequest {
335
+ /**
336
+ * Wix Payments account identifier.
337
+ * @format GUID
338
+ */
339
+ accountId?: string;
340
+ /**
341
+ * Payout identifier.
342
+ * @format GUID
343
+ */
344
+ payoutId?: string;
345
+ }
346
+ interface GetPayoutGroupByPayoutIdResponse {
347
+ /** Payout group. */
348
+ group?: PayoutGroup;
349
+ }
350
+ interface DomainEvent extends DomainEventBodyOneOf {
351
+ createdEvent?: EntityCreatedEvent;
352
+ updatedEvent?: EntityUpdatedEvent;
353
+ deletedEvent?: EntityDeletedEvent;
354
+ actionEvent?: ActionEvent;
355
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
356
+ _id?: string;
357
+ /**
358
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
359
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
360
+ */
361
+ entityFqdn?: string;
362
+ /**
363
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
364
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
365
+ */
366
+ slug?: string;
367
+ /** ID of the entity associated with the event. */
368
+ entityId?: string;
369
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
370
+ eventTime?: Date | null;
371
+ /**
372
+ * Whether the event was triggered as a result of a privacy regulation application
373
+ * (for example, GDPR).
374
+ */
375
+ triggeredByAnonymizeRequest?: boolean | null;
376
+ /** If present, indicates the action that triggered the event. */
377
+ originatedFrom?: string | null;
378
+ /**
379
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
380
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
381
+ */
382
+ entityEventSequence?: string | null;
383
+ }
384
+ /** @oneof */
385
+ interface DomainEventBodyOneOf {
386
+ createdEvent?: EntityCreatedEvent;
387
+ updatedEvent?: EntityUpdatedEvent;
388
+ deletedEvent?: EntityDeletedEvent;
389
+ actionEvent?: ActionEvent;
390
+ }
391
+ interface EntityCreatedEvent {
392
+ entity?: string;
393
+ }
394
+ interface RestoreInfo {
395
+ deletedDate?: Date | null;
396
+ }
397
+ interface EntityUpdatedEvent {
398
+ /**
399
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
400
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
401
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
402
+ */
403
+ currentEntity?: string;
404
+ }
405
+ interface EntityDeletedEvent {
406
+ /** Entity that was deleted. */
407
+ deletedEntity?: string | null;
408
+ }
409
+ interface ActionEvent {
410
+ body?: string;
411
+ }
412
+ interface MessageEnvelope {
413
+ /**
414
+ * App instance ID.
415
+ * @format GUID
416
+ */
417
+ instanceId?: string | null;
418
+ /**
419
+ * Event type.
420
+ * @maxLength 150
421
+ */
422
+ eventType?: string;
423
+ /** The identification type and identity data. */
424
+ identity?: IdentificationData;
425
+ /** Stringify payload. */
426
+ data?: string;
427
+ /** Details related to the account */
428
+ accountInfo?: AccountInfo;
429
+ }
430
+ interface IdentificationData extends IdentificationDataIdOneOf {
431
+ /**
432
+ * ID of a site visitor that has not logged in to the site.
433
+ * @format GUID
434
+ */
435
+ anonymousVisitorId?: string;
436
+ /**
437
+ * ID of a site visitor that has logged in to the site.
438
+ * @format GUID
439
+ */
440
+ memberId?: string;
441
+ /**
442
+ * ID of a Wix user (site owner, contributor, etc.).
443
+ * @format GUID
444
+ */
445
+ wixUserId?: string;
446
+ /**
447
+ * ID of an app.
448
+ * @format GUID
449
+ */
450
+ appId?: string;
451
+ /** @readonly */
452
+ identityType?: WebhookIdentityTypeWithLiterals;
453
+ }
454
+ /** @oneof */
455
+ interface IdentificationDataIdOneOf {
456
+ /**
457
+ * ID of a site visitor that has not logged in to the site.
458
+ * @format GUID
459
+ */
460
+ anonymousVisitorId?: string;
461
+ /**
462
+ * ID of a site visitor that has logged in to the site.
463
+ * @format GUID
464
+ */
465
+ memberId?: string;
466
+ /**
467
+ * ID of a Wix user (site owner, contributor, etc.).
468
+ * @format GUID
469
+ */
470
+ wixUserId?: string;
471
+ /**
472
+ * ID of an app.
473
+ * @format GUID
474
+ */
475
+ appId?: string;
476
+ }
477
+ declare enum WebhookIdentityType {
478
+ UNKNOWN = "UNKNOWN",
479
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
480
+ MEMBER = "MEMBER",
481
+ WIX_USER = "WIX_USER",
482
+ APP = "APP"
483
+ }
484
+ /** @enumType */
485
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
486
+ interface AccountInfo {
487
+ /**
488
+ * ID of the Wix account associated with the event.
489
+ * @format GUID
490
+ */
491
+ accountId?: string | null;
492
+ /**
493
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
494
+ * @format GUID
495
+ */
496
+ parentAccountId?: string | null;
497
+ /**
498
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
499
+ * @format GUID
500
+ */
501
+ siteId?: string | null;
502
+ }
503
+ interface BaseEventMetadata {
504
+ /**
505
+ * App instance ID.
506
+ * @format GUID
507
+ */
508
+ instanceId?: string | null;
509
+ /**
510
+ * Event type.
511
+ * @maxLength 150
512
+ */
513
+ eventType?: string;
514
+ /** The identification type and identity data. */
515
+ identity?: IdentificationData;
516
+ /** Details related to the account */
517
+ accountInfo?: AccountInfo;
518
+ }
519
+ interface EventMetadata extends BaseEventMetadata {
520
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
521
+ _id?: string;
522
+ /**
523
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
524
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
525
+ */
526
+ entityFqdn?: string;
527
+ /**
528
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
529
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
530
+ */
531
+ slug?: string;
532
+ /** ID of the entity associated with the event. */
533
+ entityId?: string;
534
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
535
+ eventTime?: Date | null;
536
+ /**
537
+ * Whether the event was triggered as a result of a privacy regulation application
538
+ * (for example, GDPR).
539
+ */
540
+ triggeredByAnonymizeRequest?: boolean | null;
541
+ /** If present, indicates the action that triggered the event. */
542
+ originatedFrom?: string | null;
543
+ /**
544
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
545
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
546
+ */
547
+ entityEventSequence?: string | null;
548
+ accountInfo?: AccountInfoMetadata;
549
+ }
550
+ interface AccountInfoMetadata {
551
+ /** ID of the Wix account associated with the event */
552
+ accountId: string;
553
+ /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
554
+ siteId?: string;
555
+ /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
556
+ parentAccountId?: string;
557
+ }
558
+ interface PayoutCreatedEnvelope {
559
+ entity: Payout;
560
+ metadata: EventMetadata;
561
+ }
562
+ /**
563
+ * Emitted once when the payout is first persisted, before the underlying transfer
564
+ * is initiated at the bank. At this point `status` is SENT and `estimated_arrival_date`
565
+ * is set if the bank rail returned one; `failure_reason` and `bank_transfer_reference`
566
+ * are not yet populated.
567
+ * @permissionId PAYMENTS.PAYOUT_READ
568
+ * @webhook
569
+ * @eventType wix.payments.payouts.v4.payout_created
570
+ * @serviceIdentifier wix.payments.v4.payouts.PayoutsService
571
+ * @slug created
572
+ * @documentationMaturity preview
573
+ */
574
+ declare function onPayoutCreated(handler: (event: PayoutCreatedEnvelope) => void | Promise<void>): void;
575
+ interface PayoutUpdatedEnvelope {
576
+ entity: Payout;
577
+ metadata: EventMetadata;
578
+ }
579
+ /**
580
+ * Emitted on every change to a persisted payout. Typical transitions include:
581
+ * status moving from SENT to FAILED (and the corresponding `failure_reason` being set),
582
+ * `estimated_arrival_date` being updated by the bank rail, and `bank_transfer_reference`
583
+ * being populated once the rail returns it.
584
+ * @permissionId PAYMENTS.PAYOUT_READ
585
+ * @webhook
586
+ * @eventType wix.payments.payouts.v4.payout_updated
587
+ * @serviceIdentifier wix.payments.v4.payouts.PayoutsService
588
+ * @slug updated
589
+ * @documentationMaturity preview
590
+ */
591
+ declare function onPayoutUpdated(handler: (event: PayoutUpdatedEnvelope) => void | Promise<void>): void;
592
+ /**
593
+ * Retrieves a paginated list of payouts for the specified Wix Payments account,
594
+ * with optional filters by profile and creation date.
595
+ * @param accountId - ID of the Wix Payments account whose payouts to list.
596
+ * @public
597
+ * @documentationMaturity preview
598
+ * @requiredField accountId
599
+ * @permissionId PAYMENTS.PAYOUT_READ
600
+ * @fqn wix.payments.v4.payouts.PayoutsService.ListPayouts
601
+ */
602
+ 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
+ interface ListPayoutsOptions {
604
+ /**
605
+ * Optional. When omitted, payouts across all profiles of the account are returned.
606
+ * When set, only payouts belonging to the specified account profile are returned.
607
+ * @format GUID
608
+ */
609
+ accountProfileId?: string | null;
610
+ /** Optional. Returns only payouts created before this timestamp. */
611
+ createdBefore?: Date | null;
612
+ /** Optional. Returns only payouts created after this timestamp. */
613
+ createdAfter?: Date | null;
614
+ /** Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT. */
615
+ sort?: Sorting;
616
+ /** Optional paging. Offset-based. */
617
+ paging?: Paging;
618
+ }
619
+ /**
620
+ * Retrieves a single payout by id.
621
+ * @param payoutId - ID of the payout to retrieve.
622
+ * @param accountId - ID of the Wix Payments account the payout belongs to.
623
+ * @public
624
+ * @documentationMaturity preview
625
+ * @requiredField accountId
626
+ * @requiredField payoutId
627
+ * @permissionId PAYMENTS.PAYOUT_READ
628
+ * @returns Payout.
629
+ * @fqn wix.payments.v4.payouts.PayoutsService.GetPayout
630
+ */
631
+ declare function getPayout(payoutId: string, accountId: string): Promise<NonNullablePaths<Payout, `_id` | `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `status` | `failureReason.code` | `cashAdvanceIncluded`, 3>>;
632
+
633
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type CreatePayoutRequest, type CreatePayoutResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetPayoutGroupByPayoutIdRequest, type GetPayoutGroupByPayoutIdResponse, type GetPayoutGroupRequest, type GetPayoutGroupResponse, type GetPayoutRequest, type GetPayoutResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListPayoutGroupsRequest, type ListPayoutGroupsResponse, type ListPayoutsOptions, type ListPayoutsRequest, type ListPayoutsResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadata, type Payout, type PayoutCreatedEnvelope, PayoutFailureCode, type PayoutFailureCodeWithLiterals, type PayoutFailureReason, type PayoutGroup, PayoutStatus, type PayoutStatusWithLiterals, type PayoutUpdatedEnvelope, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };