@getivy/node-sdk 0.1.0-alpha.32 → 0.1.0-alpha.34

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 (128) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +14 -14
  3. package/index.d.ts +14 -14
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs +1 -1
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resource.d.ts +1 -1
  10. package/resource.d.ts.map +1 -1
  11. package/resource.js.map +1 -1
  12. package/resource.mjs.map +1 -1
  13. package/resources/balance.d.ts +6 -3
  14. package/resources/balance.d.ts.map +1 -1
  15. package/resources/banks.d.ts +38 -59
  16. package/resources/banks.d.ts.map +1 -1
  17. package/resources/capabilities.d.ts +1 -10
  18. package/resources/capabilities.d.ts.map +1 -1
  19. package/resources/charges.d.ts +30 -21
  20. package/resources/charges.d.ts.map +1 -1
  21. package/resources/checkoutsession.d.ts +311 -803
  22. package/resources/checkoutsession.d.ts.map +1 -1
  23. package/resources/customers.d.ts +9 -12
  24. package/resources/customers.d.ts.map +1 -1
  25. package/resources/data/accounts.d.ts +0 -100
  26. package/resources/data/accounts.d.ts.map +1 -1
  27. package/resources/data/accounts.js +0 -6
  28. package/resources/data/accounts.js.map +1 -1
  29. package/resources/data/accounts.mjs +0 -6
  30. package/resources/data/accounts.mjs.map +1 -1
  31. package/resources/data/balances.d.ts +0 -41
  32. package/resources/data/balances.d.ts.map +1 -1
  33. package/resources/data/balances.js +0 -6
  34. package/resources/data/balances.js.map +1 -1
  35. package/resources/data/balances.mjs +0 -6
  36. package/resources/data/balances.mjs.map +1 -1
  37. package/resources/data/consent.d.ts +0 -76
  38. package/resources/data/consent.d.ts.map +1 -1
  39. package/resources/data/consent.js +0 -12
  40. package/resources/data/consent.js.map +1 -1
  41. package/resources/data/consent.mjs +0 -12
  42. package/resources/data/consent.mjs.map +1 -1
  43. package/resources/data/data.d.ts +10 -10
  44. package/resources/data/data.d.ts.map +1 -1
  45. package/resources/data/data.js.map +1 -1
  46. package/resources/data/data.mjs +2 -2
  47. package/resources/data/data.mjs.map +1 -1
  48. package/resources/data/index.d.ts +5 -5
  49. package/resources/data/index.d.ts.map +1 -1
  50. package/resources/data/index.js.map +1 -1
  51. package/resources/data/index.mjs +2 -2
  52. package/resources/data/index.mjs.map +1 -1
  53. package/resources/data/session.d.ts +0 -230
  54. package/resources/data/session.d.ts.map +1 -1
  55. package/resources/data/session.js +0 -12
  56. package/resources/data/session.js.map +1 -1
  57. package/resources/data/session.mjs +0 -12
  58. package/resources/data/session.mjs.map +1 -1
  59. package/resources/data/transactions.d.ts +0 -50
  60. package/resources/data/transactions.d.ts.map +1 -1
  61. package/resources/data/transactions.js +0 -7
  62. package/resources/data/transactions.js.map +1 -1
  63. package/resources/data/transactions.mjs +0 -7
  64. package/resources/data/transactions.mjs.map +1 -1
  65. package/resources/index.d.ts +7 -7
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js.map +1 -1
  68. package/resources/index.mjs +1 -1
  69. package/resources/index.mjs.map +1 -1
  70. package/resources/mandates.d.ts +55 -17
  71. package/resources/mandates.d.ts.map +1 -1
  72. package/resources/mandates.js.map +1 -1
  73. package/resources/mandates.mjs.map +1 -1
  74. package/resources/orders.d.ts +242 -524
  75. package/resources/orders.d.ts.map +1 -1
  76. package/resources/payouts.d.ts +146 -70
  77. package/resources/payouts.d.ts.map +1 -1
  78. package/resources/payouts.js.map +1 -1
  79. package/resources/payouts.mjs.map +1 -1
  80. package/resources/refunds.d.ts +16 -92
  81. package/resources/refunds.d.ts.map +1 -1
  82. package/resources/refunds.js +4 -4
  83. package/resources/refunds.js.map +1 -1
  84. package/resources/refunds.mjs +4 -4
  85. package/resources/refunds.mjs.map +1 -1
  86. package/resources/reports.d.ts +4 -78
  87. package/resources/reports.d.ts.map +1 -1
  88. package/resources/reports.js +5 -1
  89. package/resources/reports.js.map +1 -1
  90. package/resources/reports.mjs +5 -1
  91. package/resources/reports.mjs.map +1 -1
  92. package/resources/subaccounts.d.ts +19 -7
  93. package/resources/subaccounts.d.ts.map +1 -1
  94. package/resources/subaccounts.js.map +1 -1
  95. package/resources/subaccounts.mjs.map +1 -1
  96. package/resources/webhooksubscription.d.ts +0 -151
  97. package/resources/webhooksubscription.d.ts.map +1 -1
  98. package/resources/webhooksubscription.js +0 -33
  99. package/resources/webhooksubscription.js.map +1 -1
  100. package/resources/webhooksubscription.mjs +0 -33
  101. package/resources/webhooksubscription.mjs.map +1 -1
  102. package/src/index.ts +22 -38
  103. package/src/resource.ts +1 -1
  104. package/src/resources/balance.ts +6 -3
  105. package/src/resources/banks.ts +41 -59
  106. package/src/resources/capabilities.ts +1 -10
  107. package/src/resources/charges.ts +32 -23
  108. package/src/resources/checkoutsession.ts +1395 -999
  109. package/src/resources/customers.ts +9 -12
  110. package/src/resources/data/accounts.ts +1 -130
  111. package/src/resources/data/balances.ts +1 -53
  112. package/src/resources/data/consent.ts +1 -106
  113. package/src/resources/data/data.ts +10 -46
  114. package/src/resources/data/index.ts +5 -17
  115. package/src/resources/data/session.ts +1 -1295
  116. package/src/resources/data/transactions.ts +1 -67
  117. package/src/resources/index.ts +9 -19
  118. package/src/resources/mandates.ts +82 -17
  119. package/src/resources/orders.ts +1149 -805
  120. package/src/resources/payouts.ts +239 -70
  121. package/src/resources/refunds.ts +33 -94
  122. package/src/resources/reports.ts +8 -98
  123. package/src/resources/subaccounts.ts +36 -7
  124. package/src/resources/webhooksubscription.ts +1 -349
  125. package/src/version.ts +1 -1
  126. package/version.d.ts +1 -1
  127. package/version.js +1 -1
  128. package/version.mjs +1 -1
@@ -8,14 +8,17 @@ export class Payouts extends APIResource {
8
8
  * Create a Customer Payout to a customer's bank account for withdrawals or similar
9
9
  * purposes.
10
10
  */
11
- create(body: PayoutCreateParams, options?: Core.RequestOptions): Core.APIPromise<PublicUserPayout> {
11
+ create(body: PayoutCreateParams, options?: Core.RequestOptions): Core.APIPromise<PayoutCreateResponse> {
12
12
  return this._client.post('/api/service/payout/create', { body, ...options });
13
13
  }
14
14
 
15
15
  /**
16
16
  * Retrieve a Customer Payout by id
17
17
  */
18
- retrieve(body: PayoutRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<PublicUserPayout> {
18
+ retrieve(
19
+ body: PayoutRetrieveParams,
20
+ options?: Core.RequestOptions,
21
+ ): Core.APIPromise<PayoutRetrieveResponse> {
19
22
  return this._client.post('/api/service/payout/retrieve', { body, ...options });
20
23
  }
21
24
 
@@ -27,50 +30,119 @@ export class Payouts extends APIResource {
27
30
  }
28
31
  }
29
32
 
30
- export interface PublicUserPayout {
33
+ export interface PayoutCreateResponse {
31
34
  id: string;
32
35
 
33
36
  amount: number;
34
37
 
38
+ createdAt: unknown;
39
+
35
40
  currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
36
41
 
37
- /**
38
- * The validation logic is based on the "type" field. For example, if "type" is set
39
- * to "iban", the "iban" object must be filled out.
40
- */
41
- destination: PublicUserPayout.Destination;
42
+ destination: PayoutCreateResponse.Destination;
42
43
 
43
- status: 'paid' | 'pending' | 'failed';
44
+ status: 'pending' | 'paid' | 'failed';
44
45
 
45
- createdAt?: string;
46
+ updatedAt: unknown;
46
47
 
47
- /**
48
- * Any key-value pairs, which will be stored to the object. See
49
- * [here](https://docs.getivy.de/reference/metadata) for more info.
50
- */
51
48
  metadata?: Record<string, unknown>;
52
49
 
53
- updatedAt?: string;
50
+ paymentReference?: string;
54
51
  }
55
52
 
56
- export namespace PublicUserPayout {
57
- /**
58
- * The validation logic is based on the "type" field. For example, if "type" is set
59
- * to "iban", the "iban" object must be filled out.
60
- */
53
+ export namespace PayoutCreateResponse {
61
54
  export interface Destination {
62
- /**
63
- * The type of the financial address. The actual destination is determined by this
64
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
65
- * validation will fail if you set e.g. type="iban", but then not fill any values
66
- * in the "iban" object.
67
- *
68
- * - iban: The IBAN of the account
69
- * - sort_code: The sort code of the account
70
- * - bank_code: The bank code of the account
71
- * - bban: The BBAN of the account
72
- */
73
- type: string;
55
+ psuData: Destination.PsuData | null;
56
+
57
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
58
+
59
+ bankCode?: Destination.BankCode;
60
+
61
+ bban?: Destination.Bban;
62
+
63
+ iban?: Destination.Iban;
64
+
65
+ paymentReference?: string;
66
+
67
+ sortCode?: Destination.SortCode;
68
+ }
69
+
70
+ export namespace Destination {
71
+ export interface PsuData {
72
+ branchNumber?: string;
73
+
74
+ clientId?: string;
75
+
76
+ ipAddress?: string;
77
+
78
+ oib?: string;
79
+
80
+ psuId?: string;
81
+
82
+ ssn?: string;
83
+
84
+ username?: string;
85
+ }
86
+
87
+ export interface BankCode {
88
+ accountHolderName: string;
89
+
90
+ accountNumber: string;
91
+
92
+ code: string;
93
+ }
94
+
95
+ export interface Bban {
96
+ accountHolderName: string;
97
+
98
+ bban: string;
99
+
100
+ bic?: string;
101
+ }
102
+
103
+ export interface Iban {
104
+ accountHolderName: string;
105
+
106
+ iban: string;
107
+
108
+ bic?: string;
109
+ }
110
+
111
+ export interface SortCode {
112
+ accountHolderName: string;
113
+
114
+ accountNumber: string;
115
+
116
+ sortCode: string;
117
+ }
118
+ }
119
+ }
120
+
121
+ export interface PayoutRetrieveResponse {
122
+ id: string;
123
+
124
+ amount: number;
125
+
126
+ createdAt: unknown;
127
+
128
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
129
+
130
+ destination: PayoutRetrieveResponse.Destination;
131
+
132
+ status: 'pending' | 'paid' | 'failed';
133
+
134
+ updatedAt: unknown;
135
+
136
+ metadata?: Record<string, unknown>;
137
+
138
+ paymentReference?: string;
139
+ }
140
+
141
+ export namespace PayoutRetrieveResponse {
142
+ export interface Destination {
143
+ psuData: Destination.PsuData | null;
144
+
145
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
74
146
 
75
147
  bankCode?: Destination.BankCode;
76
148
 
@@ -78,14 +150,29 @@ export namespace PublicUserPayout {
78
150
 
79
151
  iban?: Destination.Iban;
80
152
 
153
+ paymentReference?: string;
154
+
81
155
  sortCode?: Destination.SortCode;
82
156
  }
83
157
 
84
158
  export namespace Destination {
159
+ export interface PsuData {
160
+ branchNumber?: string;
161
+
162
+ clientId?: string;
163
+
164
+ ipAddress?: string;
165
+
166
+ oib?: string;
167
+
168
+ psuId?: string;
169
+
170
+ ssn?: string;
171
+
172
+ username?: string;
173
+ }
174
+
85
175
  export interface BankCode {
86
- /**
87
- * The name of the account holder.
88
- */
89
176
  accountHolderName: string;
90
177
 
91
178
  accountNumber: string;
@@ -94,9 +181,6 @@ export namespace PublicUserPayout {
94
181
  }
95
182
 
96
183
  export interface Bban {
97
- /**
98
- * The name of the account holder.
99
- */
100
184
  accountHolderName: string;
101
185
 
102
186
  bban: string;
@@ -105,9 +189,6 @@ export namespace PublicUserPayout {
105
189
  }
106
190
 
107
191
  export interface Iban {
108
- /**
109
- * The name of the account holder.
110
- */
111
192
  accountHolderName: string;
112
193
 
113
194
  iban: string;
@@ -116,9 +197,6 @@ export namespace PublicUserPayout {
116
197
  }
117
198
 
118
199
  export interface SortCode {
119
- /**
120
- * The name of the account holder.
121
- */
122
200
  accountHolderName: string;
123
201
 
124
202
  accountNumber: string;
@@ -139,7 +217,10 @@ export interface PayoutListResponse {
139
217
  */
140
218
  hasNext: boolean;
141
219
 
142
- items: Array<PublicUserPayout>;
220
+ /**
221
+ * Array of Customer Payout objects
222
+ */
223
+ items: Array<PayoutListResponse.Item>;
143
224
 
144
225
  /**
145
226
  * The number of items skipped
@@ -147,6 +228,96 @@ export interface PayoutListResponse {
147
228
  skip: number;
148
229
  }
149
230
 
231
+ export namespace PayoutListResponse {
232
+ export interface Item {
233
+ id: string;
234
+
235
+ amount: number;
236
+
237
+ createdAt: unknown;
238
+
239
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
240
+
241
+ destination: Item.Destination;
242
+
243
+ status: 'pending' | 'paid' | 'failed';
244
+
245
+ updatedAt: unknown;
246
+
247
+ metadata?: Record<string, unknown>;
248
+
249
+ paymentReference?: string;
250
+ }
251
+
252
+ export namespace Item {
253
+ export interface Destination {
254
+ psuData: Destination.PsuData | null;
255
+
256
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
257
+
258
+ bankCode?: Destination.BankCode;
259
+
260
+ bban?: Destination.Bban;
261
+
262
+ iban?: Destination.Iban;
263
+
264
+ paymentReference?: string;
265
+
266
+ sortCode?: Destination.SortCode;
267
+ }
268
+
269
+ export namespace Destination {
270
+ export interface PsuData {
271
+ branchNumber?: string;
272
+
273
+ clientId?: string;
274
+
275
+ ipAddress?: string;
276
+
277
+ oib?: string;
278
+
279
+ psuId?: string;
280
+
281
+ ssn?: string;
282
+
283
+ username?: string;
284
+ }
285
+
286
+ export interface BankCode {
287
+ accountHolderName: string;
288
+
289
+ accountNumber: string;
290
+
291
+ code: string;
292
+ }
293
+
294
+ export interface Bban {
295
+ accountHolderName: string;
296
+
297
+ bban: string;
298
+
299
+ bic?: string;
300
+ }
301
+
302
+ export interface Iban {
303
+ accountHolderName: string;
304
+
305
+ iban: string;
306
+
307
+ bic?: string;
308
+ }
309
+
310
+ export interface SortCode {
311
+ accountHolderName: string;
312
+
313
+ accountNumber: string;
314
+
315
+ sortCode: string;
316
+ }
317
+ }
318
+ }
319
+ }
320
+
150
321
  export interface PayoutCreateParams {
151
322
  /**
152
323
  * The amount of the customer payout
@@ -197,18 +368,9 @@ export namespace PayoutCreateParams {
197
368
  * Used for open-loop customer payouts. Disabled by default for merchants.
198
369
  */
199
370
  export interface FinancialAddress {
200
- /**
201
- * The type of the financial address. The actual destination is determined by this
202
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
203
- * validation will fail if you set e.g. type="iban", but then not fill any values
204
- * in the "iban" object.
205
- *
206
- * - iban: The IBAN of the account
207
- * - sort_code: The sort code of the account
208
- * - bank_code: The bank code of the account
209
- * - bban: The BBAN of the account
210
- */
211
- type: string;
371
+ psuData: FinancialAddress.PsuData | null;
372
+
373
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
212
374
 
213
375
  bankCode?: FinancialAddress.BankCode;
214
376
 
@@ -216,14 +378,29 @@ export namespace PayoutCreateParams {
216
378
 
217
379
  iban?: FinancialAddress.Iban;
218
380
 
381
+ paymentReference?: string;
382
+
219
383
  sortCode?: FinancialAddress.SortCode;
220
384
  }
221
385
 
222
386
  export namespace FinancialAddress {
387
+ export interface PsuData {
388
+ branchNumber?: string;
389
+
390
+ clientId?: string;
391
+
392
+ ipAddress?: string;
393
+
394
+ oib?: string;
395
+
396
+ psuId?: string;
397
+
398
+ ssn?: string;
399
+
400
+ username?: string;
401
+ }
402
+
223
403
  export interface BankCode {
224
- /**
225
- * The name of the account holder.
226
- */
227
404
  accountHolderName: string;
228
405
 
229
406
  accountNumber: string;
@@ -232,9 +409,6 @@ export namespace PayoutCreateParams {
232
409
  }
233
410
 
234
411
  export interface Bban {
235
- /**
236
- * The name of the account holder.
237
- */
238
412
  accountHolderName: string;
239
413
 
240
414
  bban: string;
@@ -243,9 +417,6 @@ export namespace PayoutCreateParams {
243
417
  }
244
418
 
245
419
  export interface Iban {
246
- /**
247
- * The name of the account holder.
248
- */
249
420
  accountHolderName: string;
250
421
 
251
422
  iban: string;
@@ -254,9 +425,6 @@ export namespace PayoutCreateParams {
254
425
  }
255
426
 
256
427
  export interface SortCode {
257
- /**
258
- * The name of the account holder.
259
- */
260
428
  accountHolderName: string;
261
429
 
262
430
  accountNumber: string;
@@ -288,7 +456,8 @@ export interface PayoutListParams {
288
456
 
289
457
  export declare namespace Payouts {
290
458
  export {
291
- type PublicUserPayout as PublicUserPayout,
459
+ type PayoutCreateResponse as PayoutCreateResponse,
460
+ type PayoutRetrieveResponse as PayoutRetrieveResponse,
292
461
  type PayoutListResponse as PayoutListResponse,
293
462
  type PayoutCreateParams as PayoutCreateParams,
294
463
  type PayoutRetrieveParams as PayoutRetrieveParams,
@@ -2,22 +2,21 @@
2
2
 
3
3
  import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
- import * as RefundsAPI from './refunds';
6
5
 
7
6
  export class Refunds extends APIResource {
8
7
  /**
9
8
  * Initiates a refund for the specified order. The order can be specified either by
10
- * Ivy\'s internal `orderId` or by the `referenceId` provided by the merchant
11
- * during checkout creation. If the refund should only be partial, you can specifiy
12
- * this with the `amount` parameter.
9
+ * Ivy's internal `orderId` or by the `referenceId` provided by the merchant during
10
+ * checkout creation. If the refund should only be partial, you can specifiy this
11
+ * with the `amount` parameter.
13
12
  */
14
- create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<RefundResponse> {
13
+ create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<RefundCreateResponse> {
15
14
  return this._client.post('/api/service/merchant/payment/refund', { body, ...options });
16
15
  }
17
16
 
18
17
  /**
19
18
  * Initiates a batch refund for all provided orders. The orders can be specified
20
- * either by Ivy\'s internal id ("orderId") or by id provided by the merchant
19
+ * either by Ivy's internal id ("orderId") or by id provided by the merchant
21
20
  * ("referenceId"). If only a partial amount should be refunded the desired amount
22
21
  * can be set with the "amount" parameter. Additional information regarding the
23
22
  * refund can be provided through the "description" parameter.
@@ -27,17 +26,9 @@ export class Refunds extends APIResource {
27
26
  }
28
27
  }
29
28
 
30
- export interface RefundResponse {
31
- /**
32
- * The internal Ivy id of the order.
33
- */
29
+ export interface RefundCreateResponse {
34
30
  orderId: string;
35
31
 
36
- /**
37
- * The order status. This status symbolises the state of the user's payment
38
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
39
- * information.
40
- */
41
32
  orderStatus:
42
33
  | 'failed'
43
34
  | 'canceled'
@@ -52,130 +43,78 @@ export interface RefundResponse {
52
43
  | 'disputed'
53
44
  | 'refused';
54
45
 
55
- /**
56
- * A unique identifier for the newly created refund. You can use this id to
57
- * retrieve the refund from the order object.
58
- */
59
46
  referenceId: string;
60
47
 
61
- /**
62
- * The status of the refund. Always use the status of the order as your source of
63
- * truth to trigger actions in your dashboard.
64
- */
65
48
  refundStatus: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
66
49
  }
67
50
 
68
51
  export interface RefundBatchResponse {
69
- /**
70
- * An array of refund responses.
71
- */
72
52
  requestedRefunds: Array<RefundBatchResponse.RequestedRefund>;
73
53
  }
74
54
 
75
55
  export namespace RefundBatchResponse {
76
- export interface RequestedRefund extends RefundsAPI.RefundResponse {
77
- /**
78
- * The Ivy id of the corresponding order.
79
- */
80
- orderId: string;
81
-
82
- /**
83
- * The error message why the refund failed.
84
- */
56
+ export interface RequestedRefund {
57
+ orderId: unknown;
58
+
85
59
  error?: string;
60
+
61
+ orderStatus?:
62
+ | 'failed'
63
+ | 'canceled'
64
+ | 'processing'
65
+ | 'waiting_for_payment'
66
+ | 'paid'
67
+ | 'in_refund'
68
+ | 'refunded'
69
+ | 'refund_failed'
70
+ | 'partially_refunded'
71
+ | 'in_dispute'
72
+ | 'disputed'
73
+ | 'refused';
74
+
75
+ referenceId?: string;
76
+
77
+ refundStatus?: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
86
78
  }
87
79
  }
88
80
 
89
81
  export interface RefundCreateParams {
90
- /**
91
- * The amount to refund in decimals, e.g. 10.23 for EUR 10.23. If not specified,
92
- * the full order amount will be refunded.
93
- */
94
- amount?: number;
82
+ amount: number;
95
83
 
96
- /**
97
- * A description for the refund. This will be retrievable in the API and in the Ivy
98
- * dashboard.
99
- */
100
84
  description?: string;
101
85
 
102
- /**
103
- * An optional custom text that will be shown on the customer's payment reference.
104
- * Input has to be maximum 16 alpha-numeric characters. If not provided, a default
105
- * Ivy refund referenceId will be shown.
106
- */
107
86
  displayedPaymentReference?: string;
108
87
 
109
- /**
110
- * The email of the customer. If provided, Ivy may use this email to contact the
111
- * customer directly in case of issues or need for clarification regarding the
112
- * refund. If not provided, Ivy will contact the merchant in such cases. However,
113
- * this is a rare occurrence.
114
- */
115
88
  email?: string;
116
89
 
117
- /**
118
- * The internal Ivy id of the order.
119
- */
120
- orderId?: string;
90
+ orderId?: unknown;
121
91
 
122
- /**
123
- * The external id set by the merchant during checkout creation.
124
- */
125
92
  referenceId?: string;
126
93
  }
127
94
 
128
95
  export interface RefundBatchParams {
129
- /**
130
- * An array of refunds to be triggered.
131
- */
132
96
  requestedRefunds: Array<RefundBatchParams.RequestedRefund>;
133
97
  }
134
98
 
135
99
  export namespace RefundBatchParams {
136
100
  export interface RequestedRefund {
137
- /**
138
- * The amount to refund in decimals, e.g. 10.23 for EUR 10.23. If not specified,
139
- * the full order amount will be refunded.
140
- */
141
- amount?: number;
142
-
143
- /**
144
- * A description for the refund. This will be retrievable in the API and in the Ivy
145
- * dashboard.
146
- */
101
+ amount: number;
102
+
147
103
  description?: string;
148
104
 
149
- /**
150
- * An optional custom text that will be shown on the customer's payment reference.
151
- * Input has to be maximum 16 alpha-numeric characters. If not provided, a default
152
- * Ivy refund referenceId will be shown.
153
- */
154
105
  displayedPaymentReference?: string;
155
106
 
156
- /**
157
- * The email of the customer. If provided, Ivy may use this email to contact the
158
- * customer directly in case of issues or need for clarification regarding the
159
- * refund. If not provided, Ivy will contact the merchant in such cases. However,
160
- * this is a rare occurrence.
161
- */
162
107
  email?: string;
163
108
 
164
- /**
165
- * The internal Ivy id of the order.
166
- */
167
- orderId?: string;
109
+ orderId?: unknown;
168
110
 
169
- /**
170
- * The external id set by the merchant during checkout creation.
171
- */
172
111
  referenceId?: string;
173
112
  }
174
113
  }
175
114
 
176
115
  export declare namespace Refunds {
177
116
  export {
178
- type RefundResponse as RefundResponse,
117
+ type RefundCreateResponse as RefundCreateResponse,
179
118
  type RefundBatchResponse as RefundBatchResponse,
180
119
  type RefundCreateParams as RefundCreateParams,
181
120
  type RefundBatchParams as RefundBatchParams,