@wix/auto_sdk_payments_balance-records 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 +48 -0
  2. package/build/cjs/index.js +495 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1081 -0
  5. package/build/cjs/index.typings.js +472 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1021 -0
  8. package/build/cjs/meta.js +444 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +334 -0
  11. package/build/cjs/schemas.js +643 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +48 -0
  14. package/build/es/index.mjs +462 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1081 -0
  17. package/build/es/index.typings.mjs +439 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +1021 -0
  20. package/build/es/meta.mjs +408 -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 +334 -0
  24. package/build/es/schemas.mjs +603 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +48 -0
  27. package/build/internal/cjs/index.js +495 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1081 -0
  30. package/build/internal/cjs/index.typings.js +472 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +1021 -0
  33. package/build/internal/cjs/meta.js +444 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +334 -0
  36. package/build/internal/cjs/schemas.js +643 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +48 -0
  39. package/build/internal/es/index.mjs +462 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1081 -0
  42. package/build/internal/es/index.typings.mjs +439 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +1021 -0
  45. package/build/internal/es/meta.mjs +408 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +334 -0
  48. package/build/internal/es/schemas.mjs +603 -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,1081 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /**
4
+ * A balance record is 1 entry on a Wix Payments account ledger, representing 1 financial
5
+ * operation on the account: a payment, a refund, a chargeback, a refund or chargeback
6
+ * reversal, a reserve hold or release, a top-up, a Wix Capital cash advance, a Wix Capital
7
+ * remittance, or an adjustment.
8
+ *
9
+ * Each record belongs to an account and to one of the account's profiles. Reserve, payment,
10
+ * payout, and book transfer details are populated based on the record's type. On every
11
+ * record, `net` equals `amount − fee`. Records are immutable: `amount`, `fee`, and `net`
12
+ * never change after creation.
13
+ *
14
+ * In certain cases a balance record can be virtual: a record that hasn't been persisted but
15
+ * is projected to occur in the future. Virtual records are returned only for the
16
+ * `ESTIMATED_RESERVE_HOLD` and `ESTIMATED_RESERVE_RELEASE` tags and have no `id` and no
17
+ * `appliedDate`.
18
+ */
19
+ interface BalanceRecord {
20
+ /**
21
+ * Balance record ID.
22
+ *
23
+ * Not returned for virtual records produced by `ESTIMATED_RESERVE_HOLD` or
24
+ * `ESTIMATED_RESERVE_RELEASE` tags.
25
+ * @format GUID
26
+ */
27
+ _id?: string | null;
28
+ /**
29
+ * ID of the Wix Payments account this balance record belongs to.
30
+ * @format GUID
31
+ */
32
+ accountId?: string;
33
+ /**
34
+ * ID of the Wix Payments account profile this balance record belongs to.
35
+ * @format GUID
36
+ */
37
+ accountProfileId?: string;
38
+ /**
39
+ * Gross amount of the balance record, including fees.
40
+ *
41
+ * Positive for credits to the account, negative for deductions.
42
+ */
43
+ amount?: Money;
44
+ /** Fee that Wix Payments collected on this balance record. */
45
+ fee?: Money;
46
+ /** Net amount of the balance record after subtracting `fee`. */
47
+ net?: Money;
48
+ /** Type of the balance record. Describes what kind of money movement this record represents. */
49
+ recordType?: BalanceRecordTypeWithLiterals;
50
+ /**
51
+ * Current effect of this record on the account balance.
52
+ *
53
+ * The value depends on the record's `recordType`, whether it has a `payoutInfo` or
54
+ * `bookTransferInfo`, and its `payoutAvailabilityDate`. This field is returned on
55
+ * responses only and can't be passed as a filter on list or query requests. To filter by
56
+ * effect on the balance, use `tags` instead.
57
+ */
58
+ recordStatus?: BalanceRecordStatusWithLiterals;
59
+ /**
60
+ * Date and time the balance record was applied to the account balance.
61
+ *
62
+ * Not returned for virtual records.
63
+ */
64
+ appliedDate?: Date | null;
65
+ /**
66
+ * Date the balance record becomes available for payout, in `YYYY-MM-DD` format.
67
+ * @format LOCAL_DATE
68
+ */
69
+ payoutAvailabilityDate?: string | null;
70
+ /** Date and time the balance record was created. */
71
+ _createdDate?: Date | null;
72
+ /** Date and time the balance record was last updated. */
73
+ _updatedDate?: Date | null;
74
+ /**
75
+ * Information about the payment that produced this balance record.
76
+ *
77
+ * Returned for records related to a payment, refund, or chargeback.
78
+ */
79
+ paymentInfo?: PaymentInfo;
80
+ /**
81
+ * Information about the payout that includes this balance record.
82
+ *
83
+ * Returned only after the record has been included in a payout. The presence of
84
+ * `payoutInfo` (versus `bookTransferInfo`) distinguishes a regular payout from an Instant
85
+ * Access book transfer.
86
+ */
87
+ payoutInfo?: PayoutInfo;
88
+ /**
89
+ * Reserve details for this balance record.
90
+ *
91
+ * Returned for records with `recordType` `RESERVE_HOLD` or `RESERVE_RELEASE`.
92
+ */
93
+ reserveInfo?: ReserveInfo;
94
+ /**
95
+ * Book transfer details for this balance record.
96
+ *
97
+ * Returned for records funded through a Wix Checking book transfer (Instant Access) rather
98
+ * than a payout. Funds backed by a book transfer are immediately available in the
99
+ * merchant's Wix Checking account.
100
+ */
101
+ bookTransferInfo?: BookTransferInfo;
102
+ }
103
+ declare enum PaymentMethodType {
104
+ UNKNOWN = "UNKNOWN",
105
+ CARD = "CARD",
106
+ CARD_READER = "CARD_READER",
107
+ ACH = "ACH",
108
+ APPLE_PAY = "APPLE_PAY",
109
+ BOLETO = "BOLETO",
110
+ GIROPAY = "GIROPAY",
111
+ IDEAL = "IDEAL",
112
+ PIX = "PIX",
113
+ SEPA = "SEPA",
114
+ SOFORT = "SOFORT",
115
+ PAY_PAL = "PAY_PAL",
116
+ TAP_TO_PAY = "TAP_TO_PAY",
117
+ GOOGLE_PAY = "GOOGLE_PAY",
118
+ AFFIRM = "AFFIRM",
119
+ AFTERPAY = "AFTERPAY",
120
+ KLARNA = "KLARNA",
121
+ RAZORPAY = "RAZORPAY",
122
+ ALIPAY = "ALIPAY",
123
+ BANCONTACT = "BANCONTACT",
124
+ US_BANK_ACCOUNT = "US_BANK_ACCOUNT",
125
+ BANKFUL_CRYPTO = "BANKFUL_CRYPTO",
126
+ BANKFUL = "BANKFUL",
127
+ TWINT = "TWINT"
128
+ }
129
+ /** @enumType */
130
+ type PaymentMethodTypeWithLiterals = PaymentMethodType | 'UNKNOWN' | 'CARD' | 'CARD_READER' | 'ACH' | 'APPLE_PAY' | 'BOLETO' | 'GIROPAY' | 'IDEAL' | 'PIX' | 'SEPA' | 'SOFORT' | 'PAY_PAL' | 'TAP_TO_PAY' | 'GOOGLE_PAY' | 'AFFIRM' | 'AFTERPAY' | 'KLARNA' | 'RAZORPAY' | 'ALIPAY' | 'BANCONTACT' | 'US_BANK_ACCOUNT' | 'BANKFUL_CRYPTO' | 'BANKFUL' | 'TWINT';
131
+ interface PayoutInfo {
132
+ /**
133
+ * ID of the payout that this balance record belongs to.
134
+ * @format GUID
135
+ */
136
+ payoutId?: string;
137
+ /**
138
+ * Date and time the payout was created.
139
+ *
140
+ * Returned only for payouts that have already occurred, not those that are scheduled.
141
+ */
142
+ _createdDate?: Date | null;
143
+ }
144
+ interface ReserveHistoryItem {
145
+ /**
146
+ * Date the reserve was scheduled to be released, in `YYYY-MM-DD` format.
147
+ * @format LOCAL_DATE
148
+ */
149
+ releaseDate?: string | null;
150
+ /** Date and time the reserve was created. */
151
+ _createdDate?: Date | null;
152
+ }
153
+ /** How the reserve was created. */
154
+ declare enum ReserveType {
155
+ /** Reserve that was created manually for a 1-time event. */
156
+ ONE_TIME = "ONE_TIME",
157
+ /** Reserve that was created automatically by an active reserve policy on the account. */
158
+ ROLLING = "ROLLING"
159
+ }
160
+ /** @enumType */
161
+ type ReserveTypeWithLiterals = ReserveType | 'ONE_TIME' | 'ROLLING';
162
+ /**
163
+ * Money.
164
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
165
+ */
166
+ interface Money {
167
+ /**
168
+ * 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.
169
+ * @format DECIMAL_VALUE
170
+ */
171
+ value?: string;
172
+ /**
173
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
174
+ * @format CURRENCY
175
+ */
176
+ currency?: string;
177
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
178
+ formattedValue?: string | null;
179
+ }
180
+ /** Type of financial operation that produced the balance record. */
181
+ declare enum BalanceRecordType {
182
+ UNKNOWN = "UNKNOWN",
183
+ /** Payment from a buyer for a sale, credited to the merchant's Wix Payments account. */
184
+ CREDIT = "CREDIT",
185
+ /** Refund issued back to a buyer. */
186
+ REFUND = "REFUND",
187
+ /** Chargeback initiated by a buyer against a previous payment. */
188
+ CHARGEBACK = "CHARGEBACK",
189
+ /** Reversal of a previously issued refund. */
190
+ REFUND_REVERSAL = "REFUND_REVERSAL",
191
+ /** Reversal of a previously issued chargeback. */
192
+ CHARGEBACK_REVERSAL = "CHARGEBACK_REVERSAL",
193
+ /** Funds withheld from the available balance as part of a reserve. */
194
+ RESERVE_HOLD = "RESERVE_HOLD",
195
+ /** Funds returned to the available balance from a previously held reserve. */
196
+ RESERVE_RELEASE = "RESERVE_RELEASE",
197
+ /** Transfer of funds from the merchant's external account into their Wix Payments account. */
198
+ TOPUP = "TOPUP",
199
+ /** Failure on a previously credited payment, resulting in a deduction from the balance. */
200
+ CREDIT_FAILED = "CREDIT_FAILED",
201
+ /** Fee charged for processing a chargeback. */
202
+ CHARGEBACK_FEE = "CHARGEBACK_FEE",
203
+ /** Reversal of a previously charged chargeback fee. */
204
+ CHARGEBACK_FEE_REVERSAL = "CHARGEBACK_FEE_REVERSAL",
205
+ /** Cash advance disbursed to the merchant from Wix Capital. */
206
+ CAPITAL_CASH_ADVANCE = "CAPITAL_CASH_ADVANCE",
207
+ /** Automatic remittance taken from sales to repay a Wix Capital cash advance. */
208
+ CAPITAL_AUTOMATIC_REMITTANCE = "CAPITAL_AUTOMATIC_REMITTANCE",
209
+ /** Adjustment applied to a Wix Capital cash advance balance. */
210
+ CAPITAL_ADJUSTMENT = "CAPITAL_ADJUSTMENT"
211
+ }
212
+ /** @enumType */
213
+ type BalanceRecordTypeWithLiterals = BalanceRecordType | 'UNKNOWN' | 'CREDIT' | 'REFUND' | 'CHARGEBACK' | 'REFUND_REVERSAL' | 'CHARGEBACK_REVERSAL' | 'RESERVE_HOLD' | 'RESERVE_RELEASE' | 'TOPUP' | 'CREDIT_FAILED' | 'CHARGEBACK_FEE' | 'CHARGEBACK_FEE_REVERSAL' | 'CAPITAL_CASH_ADVANCE' | 'CAPITAL_AUTOMATIC_REMITTANCE' | 'CAPITAL_ADJUSTMENT';
214
+ /**
215
+ * Current effect of a balance record on the account balance.
216
+ *
217
+ * Each record type takes its own path through the values below.
218
+ *
219
+ * Credits (`CREDIT`, `TOPUP`, `REFUND_REVERSAL`, `CHARGEBACK_REVERSAL`,
220
+ * `CHARGEBACK_FEE_REVERSAL`, `CAPITAL_CASH_ADVANCE`) start at `PENDING_CREDIT`, settle to
221
+ * `CREDITED`, and move to `PAID_OUT` once they have been included in a payout.
222
+ *
223
+ * Debits (`REFUND`, `CHARGEBACK`, `CHARGEBACK_FEE`, `CREDIT_FAILED`,
224
+ * `CAPITAL_AUTOMATIC_REMITTANCE`) are deducted from the available balance immediately on
225
+ * creation (`PENDING_DEBIT`), move to `DEBITED` once the operation finalizes, and move to
226
+ * `PAID_OUT` once they have been included in a payout (subtracted from the payout total).
227
+ *
228
+ * A reserve hold (`RESERVE_HOLD`) starts at `RESERVED` while the funds are held back, then
229
+ * moves to `DEDUCTED_FROM_PAYOUT` once the hold has been included in a payout. A reserve
230
+ * release (`RESERVE_RELEASE`) stays at `RESERVED` until its `payoutAvailabilityDate`
231
+ * passes, then moves to `CREDITED`, then `PAID_OUT` like any other credit.
232
+ *
233
+ * Records funded via a Wix Checking book transfer (Instant Access) skip the payout flow:
234
+ * they move directly to `PAID_OUT` because the funds are immediately available.
235
+ *
236
+ * If a payout that included a record is later reversed by the bank, the record's
237
+ * `recordStatus` moves to `PAYOUT_REVERSED` and the record re-enters the available balance.
238
+ */
239
+ declare enum BalanceRecordStatus {
240
+ UNKNOWN = "UNKNOWN",
241
+ /** Funds from this record are added to the available balance once they settle. They aren't yet part of the available balance. */
242
+ PENDING_CREDIT = "PENDING_CREDIT",
243
+ /** Funds from this record are part of the available balance. */
244
+ CREDITED = "CREDITED",
245
+ /**
246
+ * Funds from this record are held in reserve and aren't part of the available balance.
247
+ *
248
+ * Applied to `RESERVE_HOLD` records, and to `RESERVE_RELEASE` records whose `payoutAvailabilityDate` hasn't yet passed.
249
+ */
250
+ RESERVED = "RESERVED",
251
+ /** Funds from this record have already been deducted from the available balance. The status moves to `DEBITED` once the operation that produced the debit finalizes. */
252
+ PENDING_DEBIT = "PENDING_DEBIT",
253
+ /** Funds from this record have been deducted from the available balance. */
254
+ DEBITED = "DEBITED",
255
+ /**
256
+ * The record has been included in a payout (regular payout) or made instantly
257
+ * available via a Wix Checking book transfer (Instant Access). Applies to both credits
258
+ * and debits. The only record type bundled into a payout that ends at a different
259
+ * status is `RESERVE_HOLD` (see `DEDUCTED_FROM_PAYOUT`). Check `payoutInfo` versus
260
+ * `bookTransferInfo` to tell them apart.
261
+ */
262
+ PAID_OUT = "PAID_OUT",
263
+ /**
264
+ * A `RESERVE_HOLD` record that has been included in a payout. The held amount was
265
+ * subtracted from the payout total instead of being sent to the merchant. Only reserve
266
+ * hold records end at this status; refunds, chargebacks, and other debits in a payout
267
+ * end at `PAID_OUT`.
268
+ */
269
+ DEDUCTED_FROM_PAYOUT = "DEDUCTED_FROM_PAYOUT",
270
+ /** Funds from this record were in a payout that has since failed and been reversed. The reversal returns the funds to the available balance. */
271
+ PAYOUT_REVERSED = "PAYOUT_REVERSED"
272
+ }
273
+ /** @enumType */
274
+ type BalanceRecordStatusWithLiterals = BalanceRecordStatus | 'UNKNOWN' | 'PENDING_CREDIT' | 'CREDITED' | 'RESERVED' | 'PENDING_DEBIT' | 'DEBITED' | 'PAID_OUT' | 'DEDUCTED_FROM_PAYOUT' | 'PAYOUT_REVERSED';
275
+ interface PaymentInfo {
276
+ /**
277
+ * ID of the Wix Payments transaction that produced this balance record.
278
+ * @format GUID
279
+ */
280
+ transactionId?: string;
281
+ /** Date and time the underlying payment was created. */
282
+ _createdDate?: Date | null;
283
+ /**
284
+ * External transaction ID supplied by the merchant's order system, if any.
285
+ * @maxLength 100
286
+ */
287
+ externalTransactionId?: string | null;
288
+ /**
289
+ * External order ID supplied by the merchant's order system, if any.
290
+ * @maxLength 100
291
+ */
292
+ externalOrderId?: string | null;
293
+ /**
294
+ * Display-friendly external order ID, suitable for showing in a UI.
295
+ * @maxLength 100
296
+ */
297
+ externalDisplayOrderId?: string | null;
298
+ /**
299
+ * Link to the order in the merchant's external order management system.
300
+ * @maxLength 1000
301
+ */
302
+ externalOrderLink?: string | null;
303
+ /**
304
+ * Customer's name as captured by the payment flow.
305
+ * @maxLength 1000
306
+ */
307
+ customerName?: string | null;
308
+ /**
309
+ * Cardholder's name as captured at payment time.
310
+ * @maxLength 1000
311
+ */
312
+ cardHolderName?: string | null;
313
+ /**
314
+ * Payment method used for the underlying transaction.
315
+ *
316
+ * Deprecated. Use `paymentMethodTypeId` instead.
317
+ * @deprecated Payment method used for the underlying transaction.
318
+ *
319
+ * Deprecated. Use `paymentMethodTypeId` instead.
320
+ * @replacedBy balance_record.payment_info.payment_method_type_id
321
+ * @targetRemovalDate 2027-05-31
322
+ */
323
+ paymentMethodType?: PaymentMethodTypeWithLiterals;
324
+ }
325
+ interface ReserveInfo {
326
+ /** Payout details for the hold portion of the reserve, where funds are removed from the available balance. */
327
+ hold?: PayoutInfo;
328
+ /** Payout details for the release portion of the reserve, where funds are returned to the available balance. */
329
+ release?: PayoutInfo;
330
+ /**
331
+ * History of changes applied to this reserve, ordered by event time.
332
+ * @maxSize 100
333
+ */
334
+ reserveHistoryItems?: ReserveHistoryItem[];
335
+ /** Reserve type that determines how the reserve was created. */
336
+ reserveType?: ReserveTypeWithLiterals;
337
+ }
338
+ interface BookTransferInfo {
339
+ /**
340
+ * ID of the book transfer that funded this balance record.
341
+ * @format GUID
342
+ */
343
+ bookTransferId?: string;
344
+ /**
345
+ * External reference for the book transfer transaction.
346
+ * @maxLength 100
347
+ */
348
+ transactionReference?: string;
349
+ /** Date and time the funds became instantly available through the book transfer. */
350
+ _createdDate?: Date | null;
351
+ }
352
+ interface ListBalanceRecordsRequest {
353
+ /**
354
+ * ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.
355
+ * @format GUID
356
+ */
357
+ accountId?: string;
358
+ /**
359
+ * Returns records that belong to the specified Wix Payments account profile.
360
+ * @format GUID
361
+ */
362
+ accountProfileId?: string | null;
363
+ /**
364
+ * One or more tag filter values to apply.
365
+ *
366
+ * Each tag is a named shortcut that the server expands into a composite filter on `recordStatus`, type, `payoutAvailabilityDate`, and `payoutInfo.payoutId`. Tags aren't stored on records. See `BalanceRecordTag` for supported values.
367
+ *
368
+ * When `tags` includes `ESTIMATED_RESERVE_HOLD` or `ESTIMATED_RESERVE_RELEASE`, the first
369
+ * record in the response is virtual: it's calculated on the fly from the current account
370
+ * balance and has no `id` and no `appliedDate`.
371
+ * @maxSize 100
372
+ */
373
+ tags?: BalanceRecordTagWithLiterals[];
374
+ /**
375
+ * Returns records included in the specified payout.
376
+ * @format GUID
377
+ */
378
+ payoutId?: string | null;
379
+ /**
380
+ * Returns records linked to the specified transaction.
381
+ * @format GUID
382
+ */
383
+ transactionId?: string | null;
384
+ /** Returns records whose `paymentInfo.createdDate` is before this date. */
385
+ paymentCreatedBefore?: Date | null;
386
+ /** Returns records whose `paymentInfo.createdDate` is after this date. */
387
+ paymentCreatedAfter?: Date | null;
388
+ /** Returns records whose `appliedDate` is before this date. */
389
+ appliedBefore?: Date | null;
390
+ /** Returns records whose `appliedDate` is after this date. */
391
+ appliedAfter?: Date | null;
392
+ /** Returns records whose `createdDate` is before this date. */
393
+ createdBefore?: Date | null;
394
+ /** Returns records whose `createdDate` is after this date. */
395
+ createdAfter?: Date | null;
396
+ /**
397
+ * Filter by balance record types. Returns records that match any of the listed values.
398
+ * @maxSize 100
399
+ */
400
+ types?: BalanceRecordTypeWithLiterals[];
401
+ /**
402
+ * Sort options for the result list.
403
+ *
404
+ * `fieldName` accepts `applied_date`, `payment_info.created_date`, or `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.
405
+ *
406
+ * `order` controls direction: `ASC` for ascending (oldest first, since all sortable fields are dates); `DESC` for descending (newest first).
407
+ *
408
+ * Default: `applied_date` in `ASC` order.
409
+ */
410
+ sort?: Sorting;
411
+ /**
412
+ * Paging options.
413
+ *
414
+ * Set `paging.limit` to `0` to retrieve only metadata and summary without records.
415
+ */
416
+ paging?: Paging;
417
+ /**
418
+ * Whether to include the aggregated `summary` in the response.
419
+ *
420
+ * When `true`, totals are computed across the records that matched the filter (not across
421
+ * the whole account) and returned in `summary`.
422
+ *
423
+ * Default: `false`
424
+ */
425
+ includeSummary?: boolean;
426
+ /**
427
+ * Whether to omit the total record count from `metadata.total`.
428
+ *
429
+ * Omitting the total can improve performance on large result sets.
430
+ *
431
+ * Default: `false`
432
+ */
433
+ excludeTotal?: boolean;
434
+ }
435
+ /**
436
+ * Predefined filter value you can pass to List Balance Records and Query Balance Records.
437
+ *
438
+ * Tags aren't stored on balance records, and you can't apply them yourself. Each tag is a named shortcut that the server expands at query time into a composite filter on `recordStatus`, type, `payoutAvailabilityDate`, and `payoutInfo.payoutId`. You can pass multiple tags in a single request.
439
+ */
440
+ declare enum BalanceRecordTag {
441
+ UNKNOWN = "UNKNOWN",
442
+ /** Settled credits and debits not yet paid out (`recordStatus` is `CREDITED` or `DEBITED`). */
443
+ AVAILABLE = "AVAILABLE",
444
+ /** Credits still in their pending period (`recordStatus` is `PENDING_CREDIT`). */
445
+ PENDING = "PENDING",
446
+ /** `RESERVE_HOLD` and `RESERVE_RELEASE` records currently at `recordStatus` `RESERVED`. */
447
+ RESERVE = "RESERVE",
448
+ /**
449
+ * `RESERVE_HOLD` records, with a virtual record (a projection of the next hold) as the first result.
450
+ *
451
+ * The virtual record is calculated on the fly from the current available balance and has no `id` or `appliedDate`.
452
+ */
453
+ ESTIMATED_RESERVE_HOLD = "ESTIMATED_RESERVE_HOLD",
454
+ /**
455
+ * `RESERVE_RELEASE` records, with a virtual record (a projection of the next release) as the first result.
456
+ *
457
+ * The virtual record is calculated on the fly from the current available balance and has no `id` or `appliedDate`.
458
+ */
459
+ ESTIMATED_RESERVE_RELEASE = "ESTIMATED_RESERVE_RELEASE",
460
+ /** `RESERVE_RELEASE` records past their `payoutAvailabilityDate`. */
461
+ RESERVE_RELEASED = "RESERVE_RELEASED",
462
+ /** `TOPUP` records at `recordStatus` `PENDING_CREDIT`. */
463
+ PENDING_TOPUP = "PENDING_TOPUP",
464
+ /** Any balance record already included in a payout (`recordStatus` is `PAID_OUT` or `DEDUCTED_FROM_PAYOUT`). */
465
+ PAID_OUT = "PAID_OUT",
466
+ /** Any balance record not yet included in any payout. */
467
+ NOT_PAID_OUT = "NOT_PAID_OUT"
468
+ }
469
+ /** @enumType */
470
+ type BalanceRecordTagWithLiterals = BalanceRecordTag | 'UNKNOWN' | 'AVAILABLE' | 'PENDING' | 'RESERVE' | 'ESTIMATED_RESERVE_HOLD' | 'ESTIMATED_RESERVE_RELEASE' | 'RESERVE_RELEASED' | 'PENDING_TOPUP' | 'PAID_OUT' | 'NOT_PAID_OUT';
471
+ interface Sorting {
472
+ /**
473
+ * Name of the field to sort by.
474
+ * @maxLength 512
475
+ */
476
+ fieldName?: string;
477
+ /** Sort order. */
478
+ order?: SortOrderWithLiterals;
479
+ /**
480
+ * Origin point for geo-distance sorting on a GEO field
481
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
482
+ */
483
+ origin?: AddressLocation;
484
+ }
485
+ declare enum SortOrder {
486
+ ASC = "ASC",
487
+ DESC = "DESC"
488
+ }
489
+ /** @enumType */
490
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
491
+ interface AddressLocation {
492
+ /** Address latitude. */
493
+ latitude?: number | null;
494
+ /** Address longitude. */
495
+ longitude?: number | null;
496
+ }
497
+ interface Paging {
498
+ /** Number of items to load. */
499
+ limit?: number | null;
500
+ /** Number of items to skip in the current sort order. */
501
+ offset?: number | null;
502
+ }
503
+ interface ListBalanceRecordsResponse {
504
+ /**
505
+ * Retrieved balance records.
506
+ * @maxSize 1000
507
+ */
508
+ records?: BalanceRecord[];
509
+ /** Paging metadata for the response. */
510
+ metadata?: PagingMetadata;
511
+ /**
512
+ * Aggregated summary across the records that matched the filter.
513
+ *
514
+ * Returned only when `includeSummary` is `true`.
515
+ */
516
+ summary?: BalanceRecordsSummary;
517
+ }
518
+ interface PagingMetadata {
519
+ /** Number of items returned in the response. */
520
+ count?: number | null;
521
+ /** Offset that was requested. */
522
+ offset?: number | null;
523
+ /** Total number of items that match the query. */
524
+ total?: number | null;
525
+ /** Flag that indicates the server failed to calculate the `total` field. */
526
+ tooManyToCount?: boolean | null;
527
+ }
528
+ /**
529
+ * Aggregated summary of balance records, grouped by category.
530
+ *
531
+ * Returned in List Balance Records and Query Balance Records responses when `includeSummary`
532
+ * is `true`. The category-level breakdown is in `items`. The `total*` fields aggregate across
533
+ * all matched records.
534
+ */
535
+ interface BalanceRecordsSummary {
536
+ /** Net total across all matched records. */
537
+ total?: Money;
538
+ /** Gross total across all matched records, before fees. */
539
+ totalAmount?: Money;
540
+ /** Total fees across all matched records. */
541
+ totalFees?: Money;
542
+ /** Total net amount across all matched records, equivalent to `total`. */
543
+ totalNet?: Money;
544
+ /**
545
+ * Per-category breakdown of the aggregated records.
546
+ * @maxSize 100
547
+ */
548
+ items?: BalanceRecordsSummaryItem[];
549
+ }
550
+ interface BalanceRecordsSummaryItem {
551
+ /**
552
+ * Category of records aggregated by this item.
553
+ *
554
+ * Deprecated. Use `summaryItemType` instead.
555
+ * @deprecated Category of records aggregated by this item.
556
+ *
557
+ * Deprecated. Use `summaryItemType` instead.
558
+ * @replacedBy balance_records_summary_item.summary_item_type
559
+ * @targetRemovalDate 2027-05-31
560
+ */
561
+ summaryType?: BalanceRecordsSummaryItemTypeWithLiterals;
562
+ /** Category of records aggregated by this item. */
563
+ summaryItemType?: BalanceRecordsSummaryItemTypeWithLiterals;
564
+ /** Gross amount for this category, before fees. */
565
+ amount?: Money;
566
+ /** Total fees for this category. */
567
+ fees?: Money;
568
+ /** Net amount for this category, after fees. */
569
+ net?: Money;
570
+ }
571
+ /** Category used to group balance records in a summary. */
572
+ declare enum BalanceRecordsSummaryItemType {
573
+ UNKNOWN = "UNKNOWN",
574
+ /** All payments from buyers to the account. */
575
+ CREDITS = "CREDITS",
576
+ /** All refunds issued to buyers. */
577
+ REFUNDS = "REFUNDS",
578
+ /** All chargebacks and chargeback fees. */
579
+ CHARGEBACKS = "CHARGEBACKS",
580
+ /** All reserve holds. */
581
+ RESERVE_HOLDS = "RESERVE_HOLDS",
582
+ /** All reserve releases. */
583
+ RESERVE_RELEASES = "RESERVE_RELEASES",
584
+ /** All top-ups into the account. */
585
+ FUNDS_ADDED = "FUNDS_ADDED",
586
+ /** All transfers between accounts. */
587
+ FUNDS_TRANSFERRED = "FUNDS_TRANSFERRED",
588
+ /** All Wix Capital movements, including cash advances, automatic remittances, and adjustments. */
589
+ CAPITAL = "CAPITAL"
590
+ }
591
+ /** @enumType */
592
+ type BalanceRecordsSummaryItemTypeWithLiterals = BalanceRecordsSummaryItemType | 'UNKNOWN' | 'CREDITS' | 'REFUNDS' | 'CHARGEBACKS' | 'RESERVE_HOLDS' | 'RESERVE_RELEASES' | 'FUNDS_ADDED' | 'FUNDS_TRANSFERRED' | 'CAPITAL';
593
+ interface GetBalanceRecordRequest {
594
+ /**
595
+ * ID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account IDs from the Accounts API.
596
+ * @format GUID
597
+ */
598
+ accountId: string;
599
+ /**
600
+ * Balance record ID.
601
+ * @format GUID
602
+ */
603
+ balanceRecordId: string;
604
+ }
605
+ interface GetBalanceRecordResponse {
606
+ /** Retrieved balance record. */
607
+ record?: BalanceRecord;
608
+ }
609
+ interface QueryBalanceRecordsRequest {
610
+ /**
611
+ * ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.
612
+ * @format GUID
613
+ */
614
+ accountId: string;
615
+ /**
616
+ * Query object that supports filtering, sorting, and paging.
617
+ *
618
+ * Filter and sort field names must be **snake_case**. They're read from the `filter`
619
+ * object and aren't auto-converted. Supported filter fields: `account_profile_id`,
620
+ * `tags`, `payout_id`, `transaction_id`, `types`, and the date ranges
621
+ * `transaction_creation_date`, `paid`, and `created_date`. Any other field returns
622
+ * `unknown parameter <field>`. Supported `sort[i].fieldName` values: `applied_date`,
623
+ * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.
624
+ */
625
+ query?: Query;
626
+ /**
627
+ * Whether to include the aggregated `summary` in the response.
628
+ *
629
+ * When `true`, totals are computed across the records that matched the query (not across
630
+ * the whole account) and returned in `summary`.
631
+ *
632
+ * Default: `false`
633
+ */
634
+ includeSummary?: boolean;
635
+ /**
636
+ * Whether to omit the total record count from `metadata.total`.
637
+ *
638
+ * Omitting the total can improve performance on large result sets.
639
+ *
640
+ * Default: `false`
641
+ */
642
+ excludeTotal?: boolean;
643
+ }
644
+ interface Query {
645
+ /**
646
+ * Filter object in the following format:
647
+ * `"filter" : {
648
+ * "fieldName1": "value1",
649
+ * "fieldName2":{"$operator":"value2"}
650
+ * }`
651
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
652
+ */
653
+ filter?: any;
654
+ /**
655
+ * Sort object in the following format:
656
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
657
+ */
658
+ sort?: Sorting[];
659
+ /** Paging options to limit and skip the number of items. */
660
+ paging?: Paging;
661
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
662
+ fields?: string[];
663
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
664
+ fieldsets?: string[];
665
+ }
666
+ interface QueryBalanceRecordsResponse {
667
+ /**
668
+ * Retrieved balance records.
669
+ * @maxSize 1000
670
+ */
671
+ records?: BalanceRecord[];
672
+ /** Paging metadata for the response. */
673
+ metadata?: PagingMetadata;
674
+ /**
675
+ * Aggregated summary across the records that matched the query.
676
+ *
677
+ * Returned only when `includeSummary` is `true`.
678
+ */
679
+ summary?: BalanceRecordsSummary;
680
+ }
681
+ interface GetBalanceSummaryRequest {
682
+ /**
683
+ * ID of the Wix Payments account to summarize. Retrieve account IDs from the Accounts API.
684
+ * @format GUID
685
+ */
686
+ accountId?: string;
687
+ /**
688
+ * Field mask of summary categories to include in the response.
689
+ *
690
+ * Supported paths: `scheduled`, `processing`, `funds_on_hold`, `payouts_being_verified`,
691
+ * `payouts_under_minimum_amount`, `negative`, `reserve`, `blocked`, `modal`. Any other
692
+ * path is rejected.
693
+ *
694
+ * When omitted, all applicable categories are returned. When sent with one or more paths,
695
+ * only the listed categories are populated. When sent as an empty mask, no categories are
696
+ * populated.
697
+ */
698
+ fields?: string[];
699
+ }
700
+ interface GetBalanceSummaryResponse {
701
+ /**
702
+ * Retrieved balance summary.
703
+ *
704
+ * Only the categories requested through `fields` are populated.
705
+ */
706
+ summary?: BalanceSummary;
707
+ }
708
+ /**
709
+ * Aggregated balance summary for a Wix Payments account.
710
+ *
711
+ * Each top-level field represents a balance category. Categories are populated based on the
712
+ * `fields` mask sent in the Get Balance Summary request, and on the account's current state:
713
+ * categories are returned conditionally so the set returned is itself a signal about the
714
+ * account.
715
+ */
716
+ interface BalanceSummary {
717
+ /** Funds scheduled for an upcoming payout, with profile-level breakdown. */
718
+ scheduled?: ScheduledBalance;
719
+ /** Funds currently being processed and not yet available, with profile-level breakdown. */
720
+ processing?: ProcessingBalance;
721
+ /** Funds on hold that can't currently move to a payout, for example because of a failed payout, with profile-level breakdown. */
722
+ fundsOnHold?: FundsOnHoldBalance;
723
+ /** Funds held in payouts that are undergoing verification before they can be released, with profile-level breakdown. */
724
+ payoutsBeingVerified?: PayoutsBeingVerifiedBalance;
725
+ /** Funds that are ready but haven't reached the minimum payout amount, with profile-level breakdown. */
726
+ payoutsUnderMinimumAmount?: PayoutsUnderMinimumAmountBalance;
727
+ /** Negative balance owed by the merchant, with profile-level breakdown and suggested top-up amounts. */
728
+ negative?: NegativeBalance;
729
+ /** Funds held in reserve, with profile-level breakdown and reserve motivation. */
730
+ reserve?: ReserveBalance;
731
+ /** Funds blocked from payout by an internal operational hold, with profile-level breakdown. */
732
+ blocked?: BlockedBalance;
733
+ /** Additional account-level data used to render reserve and pending-period explanatory views in client UIs. */
734
+ modal?: ModalData;
735
+ }
736
+ interface ScheduledBalance {
737
+ /** Total amount scheduled for the next payout across all profiles. */
738
+ amount?: Money;
739
+ /**
740
+ * Per-profile breakdown of the scheduled balance.
741
+ * @maxSize 100
742
+ */
743
+ profiles?: ScheduledProfileBalance[];
744
+ }
745
+ interface ScheduledProfileBalance {
746
+ /**
747
+ * ID of the Wix Payments account profile.
748
+ * @format GUID
749
+ */
750
+ accountProfileId?: string;
751
+ /** Amount scheduled for the next payout for this profile. */
752
+ amount?: Money;
753
+ /**
754
+ * Tags associated with the records aggregated into this balance.
755
+ * @maxSize 100
756
+ */
757
+ tags?: BalanceRecordTagWithLiterals[];
758
+ /**
759
+ * Date the payout is scheduled to be sent, in `YYYY-MM-DD` format.
760
+ * @format LOCAL_DATE
761
+ */
762
+ scheduledDate?: string | null;
763
+ /** Whether the amount includes a Wix Capital cash advance component. */
764
+ cashAdvanceIncluded?: boolean;
765
+ }
766
+ interface ProcessingBalance {
767
+ /** Total amount currently being processed across all profiles. */
768
+ amount?: Money;
769
+ /**
770
+ * Per-profile breakdown of the processing balance.
771
+ * @maxSize 100
772
+ */
773
+ profiles?: ProcessingProfileBalance[];
774
+ /** Start of the date range covered by the processing aggregation. */
775
+ aggregatedFromDate?: Date | null;
776
+ /** End of the date range covered by the processing aggregation. */
777
+ aggregatedToDate?: Date | null;
778
+ /** Length of the pending period during which each payment waits before becoming available. */
779
+ paymentPendingPeriod?: Period;
780
+ }
781
+ interface ProcessingProfileBalance {
782
+ /**
783
+ * ID of the Wix Payments account profile.
784
+ * @format GUID
785
+ */
786
+ accountProfileId?: string;
787
+ /** Amount currently being processed for this profile. */
788
+ amount?: Money;
789
+ /**
790
+ * Tags associated with the records aggregated into this balance.
791
+ * @maxSize 100
792
+ */
793
+ tags?: BalanceRecordTagWithLiterals[];
794
+ /** Whether the amount includes a Wix Capital cash advance component. */
795
+ cashAdvanceIncluded?: boolean;
796
+ }
797
+ interface Period {
798
+ /** The number of units */
799
+ value?: number;
800
+ /** The unit type */
801
+ unit?: PeriodUnitWithLiterals;
802
+ }
803
+ declare enum PeriodUnit {
804
+ UNKNOWN = "UNKNOWN",
805
+ DAY = "DAY",
806
+ BUSINESS_DAY = "BUSINESS_DAY"
807
+ }
808
+ /** @enumType */
809
+ type PeriodUnitWithLiterals = PeriodUnit | 'UNKNOWN' | 'DAY' | 'BUSINESS_DAY';
810
+ interface FundsOnHoldBalance {
811
+ /** Total amount on hold across all profiles. */
812
+ amount?: Money;
813
+ /**
814
+ * Per-profile breakdown of funds on hold.
815
+ * @maxSize 100
816
+ */
817
+ profiles?: FundsOnHoldProfileBalance[];
818
+ }
819
+ interface FundsOnHoldProfileBalance {
820
+ /**
821
+ * ID of the Wix Payments account profile.
822
+ * @format GUID
823
+ */
824
+ accountProfileId?: string;
825
+ /** Amount on hold for this profile. */
826
+ amount?: Money;
827
+ /**
828
+ * Tags associated with the records aggregated into this balance.
829
+ * @maxSize 100
830
+ */
831
+ tags?: BalanceRecordTagWithLiterals[];
832
+ /**
833
+ * ID of the most recent payout that failed for the current bank details and caused funds to be placed on hold.
834
+ * @format GUID
835
+ */
836
+ problematicPayoutId?: string | null;
837
+ /** Whether the amount includes a Wix Capital cash advance component. */
838
+ cashAdvanceIncluded?: boolean;
839
+ }
840
+ interface PayoutsBeingVerifiedBalance {
841
+ /** Total amount held in payouts being verified across all profiles. */
842
+ amount?: Money;
843
+ /**
844
+ * Per-profile breakdown of payouts being verified.
845
+ * @maxSize 100
846
+ */
847
+ profiles?: PayoutsBeingVerifiedProfileBalance[];
848
+ }
849
+ interface PayoutsBeingVerifiedProfileBalance {
850
+ /**
851
+ * ID of the Wix Payments account profile.
852
+ * @format GUID
853
+ */
854
+ accountProfileId?: string;
855
+ /** Amount being verified for this profile. */
856
+ amount?: Money;
857
+ /**
858
+ * Tags associated with the records aggregated into this balance.
859
+ * @maxSize 100
860
+ */
861
+ tags?: BalanceRecordTagWithLiterals[];
862
+ /** Whether the amount includes a Wix Capital cash advance component. */
863
+ cashAdvanceIncluded?: boolean;
864
+ }
865
+ interface PayoutsUnderMinimumAmountBalance {
866
+ /** Total amount below the minimum payout threshold across all profiles. */
867
+ amount?: Money;
868
+ /**
869
+ * Per-profile breakdown of balances that are below the minimum payout threshold.
870
+ * @maxSize 100
871
+ */
872
+ profiles?: PayoutsUnderMinimumAmountProfileBalance[];
873
+ /** Minimum payout amount configured for the account. */
874
+ minPayoutAmount?: Money;
875
+ }
876
+ interface PayoutsUnderMinimumAmountProfileBalance {
877
+ /**
878
+ * ID of the Wix Payments account profile.
879
+ * @format GUID
880
+ */
881
+ accountProfileId?: string;
882
+ /** Amount available for this profile that doesn't yet meet the minimum payout threshold. */
883
+ amount?: Money;
884
+ /**
885
+ * Tags associated with the records aggregated into this balance.
886
+ * @maxSize 100
887
+ */
888
+ tags?: BalanceRecordTagWithLiterals[];
889
+ /** Whether the amount includes a Wix Capital cash advance component. */
890
+ cashAdvanceIncluded?: boolean;
891
+ }
892
+ interface NegativeBalance {
893
+ /** Total negative balance owed across all profiles. Returned as a negative or zero amount. */
894
+ amount?: Money;
895
+ /**
896
+ * Per-profile breakdown of the negative balance.
897
+ * @maxSize 100
898
+ */
899
+ profiles?: NegativeProfileBalance[];
900
+ /** Suggested top-up amount that would clear the negative balance. */
901
+ suggestedTopupAmount?: Money;
902
+ }
903
+ interface NegativeProfileBalance {
904
+ /**
905
+ * ID of the Wix Payments account profile.
906
+ * @format GUID
907
+ */
908
+ accountProfileId?: string;
909
+ /** Negative amount owed for this profile. */
910
+ amount?: Money;
911
+ /**
912
+ * Tags associated with the records aggregated into this balance.
913
+ * @maxSize 100
914
+ */
915
+ tags?: BalanceRecordTagWithLiterals[];
916
+ /** Smallest top-up amount that the merchant is allowed to submit for this profile. */
917
+ minTopupAmount?: Money;
918
+ /** Largest top-up amount that the merchant is allowed to submit for this profile. */
919
+ maxTopupAmount?: Money;
920
+ /** Recommended top-up amount for this profile that brings the balance non-negative. */
921
+ suggestedTopupAmount?: Money;
922
+ /** Whether the amount includes a Wix Capital cash advance component. */
923
+ cashAdvanceIncluded?: boolean;
924
+ }
925
+ interface ReserveBalance extends ReserveBalanceMotivationOneOf {
926
+ /** Reserve policy that automatically generates the reserve. */
927
+ reservePolicy?: ReservePolicy;
928
+ /** Reserve that was created explicitly for a 1-time event. */
929
+ explicitReserve?: ExplicitReserve;
930
+ /** Total amount currently held in reserve across all profiles. */
931
+ amount?: Money;
932
+ /**
933
+ * Per-profile breakdown of the reserve balance.
934
+ * @maxSize 100
935
+ */
936
+ profiles?: ReserveProfileBalance[];
937
+ }
938
+ /** @oneof */
939
+ interface ReserveBalanceMotivationOneOf {
940
+ /** Reserve policy that automatically generates the reserve. */
941
+ reservePolicy?: ReservePolicy;
942
+ /** Reserve that was created explicitly for a 1-time event. */
943
+ explicitReserve?: ExplicitReserve;
944
+ }
945
+ interface ReserveProfileBalance {
946
+ /**
947
+ * ID of the Wix Payments account profile.
948
+ * @format GUID
949
+ */
950
+ accountProfileId?: string;
951
+ /** Amount currently held in reserve for this profile. */
952
+ amount?: Money;
953
+ /**
954
+ * Tags associated with the records aggregated into this balance.
955
+ * @maxSize 100
956
+ */
957
+ tags?: BalanceRecordTagWithLiterals[];
958
+ }
959
+ interface ReservePolicy {
960
+ /**
961
+ * Percentage of the available balance that's held in reserve.
962
+ * @min 1
963
+ * @max 99
964
+ */
965
+ percentage?: number;
966
+ /** Length of time each portion of the reserve is held before it's released. */
967
+ period?: Period;
968
+ }
969
+ /** Indicates a reserve that was created explicitly for a specific event, with no further configuration. */
970
+ interface ExplicitReserve {
971
+ }
972
+ interface BlockedBalance {
973
+ /** Total amount blocked from payout across all profiles. */
974
+ amount?: Money;
975
+ /**
976
+ * Per-profile breakdown of the blocked balance.
977
+ * @maxSize 100
978
+ */
979
+ profiles?: BlockedProfileBalance[];
980
+ }
981
+ interface BlockedProfileBalance {
982
+ /**
983
+ * ID of the Wix Payments account profile.
984
+ * @format GUID
985
+ */
986
+ accountProfileId?: string;
987
+ /** Amount blocked from payout for this profile. */
988
+ amount?: Money;
989
+ /**
990
+ * Tags associated with the records aggregated into this balance.
991
+ * @maxSize 100
992
+ */
993
+ tags?: BalanceRecordTagWithLiterals[];
994
+ /** Whether the amount includes a Wix Capital cash advance component. */
995
+ cashAdvanceIncluded?: boolean;
996
+ }
997
+ /** Account-level metadata used by clients to render reserve and pending-period explanatory views. */
998
+ interface ModalData {
999
+ /** Merchant's active reserve policy, if any. */
1000
+ reservePolicy?: ReservePolicy;
1001
+ /** Merchant's configured pending period. */
1002
+ paymentPendingPeriod?: Period;
1003
+ }
1004
+ /**
1005
+ * Retrieves a single balance record by ID for the specified account.
1006
+ *
1007
+ * Returns an error if the record doesn't exist or doesn't belong to the specified account.
1008
+ * @param balanceRecordId - Balance record ID.
1009
+ * @param accountId - ID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account IDs from the Accounts API.
1010
+ * @public
1011
+ * @documentationMaturity preview
1012
+ * @requiredField accountId
1013
+ * @requiredField balanceRecordId
1014
+ * @permissionId PAYMENTS.BALANCE_READ
1015
+ * @applicableIdentity APP
1016
+ * @returns Retrieved balance record.
1017
+ * @fqn wix.payments.v5.balances.BalanceRecordsService.GetBalanceRecord
1018
+ */
1019
+ declare function getBalanceRecord(balanceRecordId: string, accountId: string): Promise<NonNullablePaths<BalanceRecord, `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `recordType` | `recordStatus` | `paymentInfo.transactionId` | `paymentInfo.paymentMethodType` | `payoutInfo.payoutId` | `reserveInfo.reserveHistoryItems` | `reserveInfo.reserveType` | `bookTransferInfo.bookTransferId` | `bookTransferInfo.transactionReference`, 3>>;
1020
+ /**
1021
+ * Retrieves a list of up to 1000 balance records, given the provided paging, filtering, and sorting.
1022
+ *
1023
+ * Query Balance Records runs with these defaults, which you can override:
1024
+ *
1025
+ * - `query.sort[0].fieldName` is `applied_date` in `ASC` order
1026
+ * - `query.paging.limit` is `20`
1027
+ * - `query.paging.offset` is `0` (and `offset` is required when `paging` is set)
1028
+ *
1029
+ * Filter and sort field names inside `query` must be **snake_case**. They're read from
1030
+ * the `query.filter` object and aren't auto-converted. Supported filter fields:
1031
+ * `account_profile_id`, `tags`, `payout_id`, `transaction_id`, `types`, and the date
1032
+ * ranges `transaction_creation_date`, `paid`, and `created_date`. Any other field returns
1033
+ * `unknown parameter <field>`. Supported `sort[i].fieldName` values: `applied_date`,
1034
+ * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.
1035
+ *
1036
+ * To list every balance record in a payout, filter by `payout_id`.
1037
+ *
1038
+ * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language),
1039
+ * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging),
1040
+ * and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).
1041
+ * @param accountId - ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.
1042
+ * @public
1043
+ * @documentationMaturity preview
1044
+ * @requiredField accountId
1045
+ * @permissionId PAYMENTS.BALANCE_READ
1046
+ * @applicableIdentity APP
1047
+ * @fqn wix.payments.v5.balances.BalanceRecordsService.QueryBalanceRecords
1048
+ */
1049
+ declare function queryBalanceRecords(accountId: string, options?: QueryBalanceRecordsOptions): Promise<NonNullablePaths<QueryBalanceRecordsResponse, `records` | `records.${number}.accountId` | `records.${number}.accountProfileId` | `records.${number}.amount.value` | `records.${number}.amount.currency` | `records.${number}.recordType` | `records.${number}.recordStatus` | `records.${number}.paymentInfo.transactionId` | `records.${number}.paymentInfo.paymentMethodType` | `records.${number}.payoutInfo.payoutId` | `records.${number}.reserveInfo.reserveType` | `records.${number}.bookTransferInfo.bookTransferId` | `records.${number}.bookTransferInfo.transactionReference` | `summary.total.value` | `summary.total.currency` | `summary.items` | `summary.items.${number}.summaryType` | `summary.items.${number}.summaryItemType`, 5>>;
1050
+ interface QueryBalanceRecordsOptions {
1051
+ /**
1052
+ * Query object that supports filtering, sorting, and paging.
1053
+ *
1054
+ * Filter and sort field names must be **snake_case**. They're read from the `filter`
1055
+ * object and aren't auto-converted. Supported filter fields: `account_profile_id`,
1056
+ * `tags`, `payout_id`, `transaction_id`, `types`, and the date ranges
1057
+ * `transaction_creation_date`, `paid`, and `created_date`. Any other field returns
1058
+ * `unknown parameter <field>`. Supported `sort[i].fieldName` values: `applied_date`,
1059
+ * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.
1060
+ */
1061
+ query?: Query;
1062
+ /**
1063
+ * Whether to include the aggregated `summary` in the response.
1064
+ *
1065
+ * When `true`, totals are computed across the records that matched the query (not across
1066
+ * the whole account) and returned in `summary`.
1067
+ *
1068
+ * Default: `false`
1069
+ */
1070
+ includeSummary?: boolean;
1071
+ /**
1072
+ * Whether to omit the total record count from `metadata.total`.
1073
+ *
1074
+ * Omitting the total can improve performance on large result sets.
1075
+ *
1076
+ * Default: `false`
1077
+ */
1078
+ excludeTotal?: boolean;
1079
+ }
1080
+
1081
+ export { type AddressLocation, type BalanceRecord, BalanceRecordStatus, type BalanceRecordStatusWithLiterals, BalanceRecordTag, type BalanceRecordTagWithLiterals, BalanceRecordType, type BalanceRecordTypeWithLiterals, type BalanceRecordsSummary, type BalanceRecordsSummaryItem, BalanceRecordsSummaryItemType, type BalanceRecordsSummaryItemTypeWithLiterals, type BalanceSummary, type BlockedBalance, type BlockedProfileBalance, type BookTransferInfo, type ExplicitReserve, type FundsOnHoldBalance, type FundsOnHoldProfileBalance, type GetBalanceRecordRequest, type GetBalanceRecordResponse, type GetBalanceSummaryRequest, type GetBalanceSummaryResponse, type ListBalanceRecordsRequest, type ListBalanceRecordsResponse, type ModalData, type Money, type NegativeBalance, type NegativeProfileBalance, type Paging, type PagingMetadata, type PaymentInfo, PaymentMethodType, type PaymentMethodTypeWithLiterals, type PayoutInfo, type PayoutsBeingVerifiedBalance, type PayoutsBeingVerifiedProfileBalance, type PayoutsUnderMinimumAmountBalance, type PayoutsUnderMinimumAmountProfileBalance, type Period, PeriodUnit, type PeriodUnitWithLiterals, type ProcessingBalance, type ProcessingProfileBalance, type Query, type QueryBalanceRecordsOptions, type QueryBalanceRecordsRequest, type QueryBalanceRecordsResponse, type ReserveBalance, type ReserveBalanceMotivationOneOf, type ReserveHistoryItem, type ReserveInfo, type ReservePolicy, type ReserveProfileBalance, ReserveType, type ReserveTypeWithLiterals, type ScheduledBalance, type ScheduledProfileBalance, SortOrder, type SortOrderWithLiterals, type Sorting, getBalanceRecord, queryBalanceRecords };