@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
@@ -18,183 +18,168 @@ export declare class Orders extends APIResource {
18
18
  }
19
19
  export interface OrderCreateResponse {
20
20
  /**
21
- * The Ivy unique identifier for the order.
21
+ * The unique id for the order.
22
22
  */
23
23
  id: string;
24
24
  /**
25
- * @deprecated The unique identifier for the merchantApp which initiated the order
26
- * / payment attempt.
25
+ * The unique id for the merchantApp which initiated the order.
27
26
  */
28
27
  appId: string;
29
28
  /**
30
- * The Ivy fee for the payment.
29
+ * The amount of application fee collected with the order.
31
30
  */
32
31
  applicationFeeAmount: number;
33
- createdAt: string;
32
+ createdAt: unknown;
34
33
  instantPaymentScheme: boolean;
35
34
  /**
36
- * @deprecated Deprecated in favor of `appId`.
35
+ * Same as appId
37
36
  */
38
37
  merchantAppId: string;
39
- /**
40
- * The unique identifier for the merchant which initiated the order / payment
41
- * attempt.
42
- */
43
38
  merchantId: string;
44
39
  /**
45
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
46
- * represents EUR 10.23. Any amount of decimal places can be provided on
47
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
48
- * as this is the format accepted by most banks.
40
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
49
41
  */
50
42
  price: OrderCreateResponse.Price;
51
43
  /**
52
- * An internal reference id which will be stored with the checkout & corresponding
53
- * order. Needs to be unique per shop per order and can be up to 200 characters.
44
+ * A unique id for the order which can be set when creating the checkoutSession.
54
45
  */
55
46
  referenceId: string;
56
47
  /**
57
- * The name of the merchant which initiated the order.
48
+ * The legal name of the merchant which initiated the order.
58
49
  */
59
50
  shopName: string;
60
51
  /**
61
- * The order status. This status symbolises the state of the user's payment
62
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
63
- * information.
52
+ * The status of the order. As soon as this value is 'paid', you can ship the
53
+ * order.
64
54
  */
65
55
  status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
66
- updatedAt: string;
56
+ updatedAt: unknown;
67
57
  /**
68
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
69
- * if no payment was made.
58
+ * The unique identifier of the customer's bank.
70
59
  */
71
60
  bankId?: string;
72
61
  /**
73
- * @deprecated The bank statement reference of the payment for the order. This is
74
- * the reference that will be visible on the bank statement.
62
+ * The reference that will be shown on the bank statement of the customer. Only
63
+ * available after a successful DirectDebit initiation.
75
64
  */
76
65
  bankStatementReference?: string;
77
- /**
78
- * The billing address of the customer.
79
- */
80
66
  billingAddress?: OrderCreateResponse.BillingAddress;
81
67
  /**
82
- * The merchant category code or
83
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
68
+ * The merchant category code for the account. MCCs are used to classify businesses
69
+ * based on the goods or services they provide.
84
70
  */
85
71
  category?: string;
72
+ climateActionMode?: OrderCreateResponse.ClimateActionMode;
73
+ co2Grams?: number;
86
74
  /**
87
75
  * The unique identifier of the customer who placed the order.
88
76
  */
89
77
  customerId?: string;
78
+ /**
79
+ * The destination bank account and statement reference for the order.
80
+ */
90
81
  destination?: OrderCreateResponse.Destination;
91
82
  /**
92
- * @deprecated Currently only visible in the merchant dashboard. This id used to be
93
- * displayed to the user during the checkout.
83
+ * The customer-facing id of the order.
94
84
  */
95
85
  displayId?: string;
86
+ guest?: boolean;
87
+ impactOffsetProjects?: Array<unknown>;
96
88
  /**
97
- * @deprecated The list of line items for the order.
89
+ * The list of line items sold with the order.
98
90
  */
99
91
  lineItems?: Array<OrderCreateResponse.LineItem>;
100
92
  mandate?: OrderCreateResponse.Mandate;
101
93
  /**
102
- * @deprecated
94
+ * The financial address of the merchant associated with the order. Only available
95
+ * when requested via order/details and therefore requires authentication.
103
96
  */
104
97
  merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
105
98
  /**
106
- * Any data which will be stored and returned for this checkout session and
107
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
108
- * more info.
99
+ * Set of key-value pairs that you can attach to an object. This can be useful for
100
+ * storing additional information about the object in a structured format.
109
101
  */
110
102
  metadata?: Record<string, unknown>;
111
103
  /**
112
- * The source bank account where the money is send from.
104
+ * The project related to the order.
105
+ */
106
+ offsetProject?: string;
107
+ /**
108
+ * The financial address of the payer associated with the order. Only available
109
+ * after successful PIS flow.
113
110
  */
114
111
  payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
115
112
  paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
116
113
  /**
117
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
114
+ * The payment mode of the order. Can be either settlement or direct.
118
115
  */
119
- paymentMode?: 'settlement' | 'direct';
116
+ paymentMode?: 'direct' | 'settlement';
120
117
  /**
121
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
122
- * actions in your system.
118
+ * Deprecated. The status of the payment.
123
119
  */
124
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
120
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
125
121
  /**
126
122
  * The total amount in the currency of all successful refunds for this order
127
123
  */
128
124
  refundAmount?: number;
129
125
  /**
130
- * The list of refunds connected to this order.
126
+ * All partial and total refunds of this order.
131
127
  */
132
128
  refunds?: Array<OrderCreateResponse.Refund>;
133
129
  /**
134
- * The shopper object. Contains information collected from the user during the
135
- * Checkout.
130
+ * If set to true, a payment mandate will be created for the user. This is
131
+ * currently in alpha and defaults to false.
132
+ */
133
+ setupPaymentMandate?: boolean;
134
+ shippingAddress?: OrderCreateResponse.ShippingAddress;
135
+ shopLogo?: string;
136
+ /**
137
+ * Information about the customer who finished the order.
136
138
  */
137
139
  shopper?: OrderCreateResponse.Shopper;
138
140
  /**
139
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
140
- * collected in the Checkout.
141
+ * Deprecated. The email of the customer who completed the order.
141
142
  */
142
143
  shopperEmail?: string;
143
144
  statusClassification?: OrderCreateResponse.StatusClassification;
144
- /**
145
- * List of status history items for the order, used for logging every update on
146
- * status.
147
- */
148
145
  statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
149
146
  /**
150
- * The subaccount id of the order.
147
+ * The subaccount id of the merchant.
151
148
  */
152
149
  subaccountId?: string;
153
- /**
154
- * The legal name of the subaccount
155
- */
156
150
  subaccountLegalName?: string;
151
+ trees?: number;
157
152
  }
158
153
  export declare namespace OrderCreateResponse {
159
154
  /**
160
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
161
- * represents EUR 10.23. Any amount of decimal places can be provided on
162
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
163
- * as this is the format accepted by most banks.
155
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
164
156
  */
165
157
  interface Price {
166
158
  currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
167
- /**
168
- * The total amount to be paid.
169
- */
170
159
  total: number;
171
160
  shipping?: number;
172
161
  subTotal?: number;
173
162
  totalNet?: number;
174
163
  vat?: number;
175
164
  }
176
- /**
177
- * The billing address of the customer.
178
- */
179
165
  interface BillingAddress {
180
166
  city: string;
181
- /**
182
- * The country code in
183
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
184
- */
185
167
  country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
168
+ firstName: string;
169
+ lastName: string;
186
170
  line1: string;
171
+ line2: string;
172
+ region: string;
187
173
  zipCode: string;
188
- firstName?: string;
189
- lastName?: string;
190
- line2?: string;
191
- region?: string;
192
174
  }
175
+ interface ClimateActionMode {
176
+ amount: number;
177
+ type: 'transaction' | 'amount';
178
+ }
179
+ /**
180
+ * The destination bank account and statement reference for the order.
181
+ */
193
182
  interface Destination {
194
- /**
195
- * The validation logic is based on the "type" field. For example, if "type" is set
196
- * to "iban", the "iban" object must be filled out.
197
- */
198
183
  bankAccount: Destination.BankAccount;
199
184
  /**
200
185
  * The bank statement reference of the payment for the order. This is the reference
@@ -203,57 +188,31 @@ export declare namespace OrderCreateResponse {
203
188
  bankStatementReference: string;
204
189
  }
205
190
  namespace Destination {
206
- /**
207
- * The validation logic is based on the "type" field. For example, if "type" is set
208
- * to "iban", the "iban" object must be filled out.
209
- */
210
191
  interface BankAccount {
211
- /**
212
- * The type of the financial address. The actual destination is determined by this
213
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
214
- * validation will fail if you set e.g. type="iban", but then not fill any values
215
- * in the "iban" object.
216
- *
217
- * - iban: The IBAN of the account
218
- * - sort_code: The sort code of the account
219
- * - bank_code: The bank code of the account
220
- * - bban: The BBAN of the account
221
- */
222
- type: string;
192
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
223
193
  bankCode?: BankAccount.BankCode;
224
194
  bban?: BankAccount.Bban;
225
195
  iban?: BankAccount.Iban;
196
+ paymentReference?: string;
226
197
  sortCode?: BankAccount.SortCode;
227
198
  }
228
199
  namespace BankAccount {
229
200
  interface BankCode {
230
- /**
231
- * The name of the account holder.
232
- */
233
201
  accountHolderName: string;
234
202
  accountNumber: string;
235
203
  code: string;
236
204
  }
237
205
  interface Bban {
238
- /**
239
- * The name of the account holder.
240
- */
241
206
  accountHolderName: string;
242
207
  bban: string;
243
208
  bic?: string;
244
209
  }
245
210
  interface Iban {
246
- /**
247
- * The name of the account holder.
248
- */
249
211
  accountHolderName: string;
250
212
  iban: string;
251
213
  bic?: string;
252
214
  }
253
215
  interface SortCode {
254
- /**
255
- * The name of the account holder.
256
- */
257
216
  accountHolderName: string;
258
217
  accountNumber: string;
259
218
  sortCode: string;
@@ -262,188 +221,97 @@ export declare namespace OrderCreateResponse {
262
221
  }
263
222
  interface LineItem {
264
223
  /**
265
- * The total amount of all line items, i.e. single amount \* quantity. Given in
266
- * decimals, i.e. 10.23 represents EUR 10.23.
224
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
225
+ * and quantity 4, amount would be equal to 12.00.
267
226
  */
268
227
  amount: number;
269
228
  /**
270
- * The name of the line item.
229
+ * Customer-facing name of the line item.
271
230
  */
272
231
  name: string;
273
- /**
274
- * The quantity of the line item.
275
- */
276
- quantity: number;
277
- /**
278
- * The net amount of a single item.
279
- */
280
232
  singleNet: number;
281
- /**
282
- * The VAT amount of a single item.
283
- */
284
233
  singleVat: number;
285
- /**
286
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
287
- * the line item.
288
- */
289
- category?: string;
290
- /**
291
- * The
292
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
293
- * of the line item.
294
- */
234
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
235
+ co2Grams?: number;
295
236
  EAN?: string;
296
237
  /**
297
- * The image of the line item as a URL.
238
+ * An image of the line item. Valid URLs are accepted only.
298
239
  */
299
240
  image?: string;
300
241
  /**
301
- * The internal unique identifier of the line item.
242
+ * Quantity of this lineItem.
243
+ */
244
+ quantity?: number;
245
+ /**
246
+ * An internal unique id stored to this line item.
302
247
  */
303
248
  referenceId?: string;
304
249
  }
305
250
  interface Mandate {
306
- /**
307
- * The name of the account holder who signs the mandate.
308
- */
309
- accountHolderName?: string;
310
- /**
311
- * Additional information to display to the user during the mandate setup. This
312
- * information is not used to setup any recurrence on the mandate. It is only
313
- * displayed to the user during checkout.
314
- */
251
+ accountHolderName: string;
315
252
  additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
316
- /**
317
- * Mandate creditor data
318
- */
319
253
  creditor?: Mandate.Creditor;
320
- /**
321
- * The reference of the mandate going to be setup
322
- */
323
254
  reference?: string;
324
- /**
325
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
326
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
327
- * mandate setup request.
328
- */
329
255
  referenceId?: string;
330
- /**
331
- * If true, a ready to use mandate will be set up after the payment flow.
332
- */
333
256
  setup?: boolean;
334
- /**
335
- * The email of the user who signs the mandate.
336
- */
337
257
  userNotificationEmail?: string;
338
258
  }
339
259
  namespace Mandate {
340
- /**
341
- * Additional information to display to the user during the mandate setup. This
342
- * information is not used to setup any recurrence on the mandate. It is only
343
- * displayed to the user during checkout.
344
- */
345
260
  interface AdditionalDisplayInformation {
346
- /**
347
- * The intended cadence of charges used for displaying purpose only. On demand
348
- * would be used for unscheduled charges.
349
- */
350
261
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
351
262
  price?: AdditionalDisplayInformation.Price;
352
263
  }
353
264
  namespace AdditionalDisplayInformation {
354
265
  interface Price {
355
- /**
356
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
357
- * 10.23 EUR.
358
- */
359
- amount?: number;
360
- currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
266
+ amount: number;
267
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
361
268
  }
362
269
  }
363
- /**
364
- * Mandate creditor data
365
- */
366
270
  interface Creditor {
367
271
  id?: string;
368
272
  name?: string;
369
273
  }
370
274
  }
371
275
  /**
372
- * @deprecated
276
+ * The financial address of the merchant associated with the order. Only available
277
+ * when requested via order/details and therefore requires authentication.
373
278
  */
374
279
  interface MerchantFinancialAddress {
280
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
375
281
  bankCode?: MerchantFinancialAddress.BankCode;
376
282
  bban?: MerchantFinancialAddress.Bban;
377
283
  iban?: MerchantFinancialAddress.Iban;
378
- /**
379
- * The payment reference for the order. This is the reference that will be visible
380
- * on the bank statement.
381
- */
382
284
  paymentReference?: string;
383
285
  sortCode?: MerchantFinancialAddress.SortCode;
384
- /**
385
- * The type of the financial address. The actual destination is determined by this
386
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
387
- * validation will fail if you set e.g. type="iban", but then not fill any values
388
- * in the "iban" object.
389
- *
390
- * - iban: The IBAN of the account
391
- * - sort_code: The sort code of the account
392
- * - bank_code: The bank code of the account
393
- * - bban: The BBAN of the account
394
- */
395
- type?: string;
396
286
  }
397
287
  namespace MerchantFinancialAddress {
398
288
  interface BankCode {
399
- /**
400
- * The name of the account holder.
401
- */
402
289
  accountHolderName: string;
403
290
  accountNumber: string;
404
291
  code: string;
405
292
  }
406
293
  interface Bban {
407
- /**
408
- * The name of the account holder.
409
- */
410
294
  accountHolderName: string;
411
295
  bban: string;
412
296
  bic?: string;
413
297
  }
414
298
  interface Iban {
415
- /**
416
- * The name of the account holder.
417
- */
418
299
  accountHolderName: string;
419
300
  iban: string;
420
301
  bic?: string;
421
302
  }
422
303
  interface SortCode {
423
- /**
424
- * The name of the account holder.
425
- */
426
304
  accountHolderName: string;
427
305
  accountNumber: string;
428
306
  sortCode: string;
429
307
  }
430
308
  }
431
309
  /**
432
- * The source bank account where the money is send from.
310
+ * The financial address of the payer associated with the order. Only available
311
+ * after successful PIS flow.
433
312
  */
434
313
  interface PayerFinancialAddress {
435
- /**
436
- * The type of the financial address. The actual destination is determined by this
437
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
438
- * validation will fail if you set e.g. type="iban", but then not fill any values
439
- * in the "iban" object.
440
- *
441
- * - iban: The IBAN of the account
442
- * - sort_code: The sort code of the account
443
- * - bank_code: The bank code of the account
444
- * - bban: The BBAN of the account
445
- */
446
- type: string;
314
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
447
315
  bankCode?: PayerFinancialAddress.BankCode;
448
316
  bban?: PayerFinancialAddress.Bban;
449
317
  iban?: PayerFinancialAddress.Iban;
@@ -453,268 +321,242 @@ export declare namespace OrderCreateResponse {
453
321
  interface BankCode {
454
322
  accountNumber: string;
455
323
  code: string;
456
- /**
457
- * The name of the account holder.
458
- */
459
324
  accountHolderName?: string;
460
325
  }
461
326
  interface Bban {
462
327
  bban: string;
463
- /**
464
- * The name of the account holder.
465
- */
466
328
  accountHolderName?: string;
467
329
  bic?: string;
468
330
  }
469
331
  interface Iban {
470
332
  iban: string;
471
- /**
472
- * The name of the account holder.
473
- */
474
333
  accountHolderName?: string;
475
334
  bic?: string;
476
335
  }
477
336
  interface SortCode {
478
337
  accountNumber: string;
479
338
  sortCode: string;
480
- /**
481
- * The name of the account holder.
482
- */
483
339
  accountHolderName?: string;
484
340
  }
485
341
  }
486
- /**
487
- * A Refund object. This corresponds to one Refund request.
488
- */
489
342
  interface Refund {
343
+ /**
344
+ * The unique id of this refund request.
345
+ */
490
346
  id: string;
347
+ /**
348
+ * The amount of the refund in decimals.
349
+ */
491
350
  amount: number;
492
- createdAt: string;
351
+ createdAt: unknown;
352
+ /**
353
+ * The unique id of this refund request. This can be set when requesting the
354
+ * refund.
355
+ */
493
356
  referenceId: string;
494
357
  /**
495
- * The status of the refund. Always use the status of the order as your source of
496
- * truth to trigger actions in your dashboard.
358
+ * The current status of this refund.
497
359
  */
498
360
  status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
499
- updatedAt: string;
361
+ updatedAt: unknown;
362
+ /**
363
+ * The description of the refund.
364
+ */
500
365
  description?: string;
501
366
  }
367
+ interface ShippingAddress {
368
+ city: string;
369
+ country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
370
+ firstName: string;
371
+ lastName: string;
372
+ line1: string;
373
+ line2: string;
374
+ region: string;
375
+ zipCode: string;
376
+ }
502
377
  /**
503
- * The shopper object. Contains information collected from the user during the
504
- * Checkout.
378
+ * Information about the customer who finished the order.
505
379
  */
506
380
  interface Shopper {
507
381
  email?: string;
508
382
  phoneNumber?: string;
509
383
  }
510
384
  interface StatusClassification {
511
- /**
512
- * Populated with the primary payment initiation failure classsification if
513
- * available.
514
- */
515
385
  primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
516
- /**
517
- * Populated with the secondary payment initiation failure classsification if
518
- * available.
519
- */
520
386
  secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled';
521
387
  }
522
388
  interface StatusHistoryList {
523
- /**
524
- * The order status. This status symbolises the state of the user's payment
525
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
526
- * information.
527
- */
389
+ createdAt: unknown;
528
390
  currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
529
- reason: string;
530
- updatedAt: string;
531
- /**
532
- * The order status. This status symbolises the state of the user's payment
533
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
534
- * information.
535
- */
391
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_REFUND_INITIATED' | 'ORDER_REFUNDED' | 'REFUND_CHARGE_SUCCEEDED' | 'REFUND_UPDATED' | 'CHECKOUT_COMPLETED' | 'PIS_PAYMENT_INITIATED' | 'PIS_PAYMENT_UPDATED' | 'PIS_PAYMENT_SUCCEEDED' | 'PAYMENT_NOT_SETTLED' | 'PAYMENT_INITIATION_FAILED' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILED' | 'CHECKOUT_SESSION_CREATED' | 'EXPIRED_CHECKOUT_SESSION_ABORTED' | 'DISPUTE' | 'PENDING_PAYMENT_ATTEMPTS_FOUND' | 'AML_FREEZE' | 'MANUAL_FREEZE' | 'MANUAL_UNFREEZE' | 'ORDER_MANUALLY_REOPENED';
392
+ updatedAt: unknown;
536
393
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
537
394
  }
538
395
  }
539
396
  export interface OrderRetrieveResponse {
540
397
  /**
541
- * The Ivy unique identifier for the order.
398
+ * The unique id for the order.
542
399
  */
543
400
  id: string;
544
401
  /**
545
- * @deprecated The unique identifier for the merchantApp which initiated the order
546
- * / payment attempt.
402
+ * The unique id for the merchantApp which initiated the order.
547
403
  */
548
404
  appId: string;
549
405
  /**
550
- * The Ivy fee for the payment.
406
+ * The amount of application fee collected with the order.
551
407
  */
552
408
  applicationFeeAmount: number;
553
- createdAt: string;
409
+ createdAt: unknown;
554
410
  instantPaymentScheme: boolean;
555
411
  /**
556
- * @deprecated Deprecated in favor of `appId`.
412
+ * Same as appId
557
413
  */
558
414
  merchantAppId: string;
559
- /**
560
- * The unique identifier for the merchant which initiated the order / payment
561
- * attempt.
562
- */
563
415
  merchantId: string;
564
416
  /**
565
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
566
- * represents EUR 10.23. Any amount of decimal places can be provided on
567
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
568
- * as this is the format accepted by most banks.
417
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
569
418
  */
570
419
  price: OrderRetrieveResponse.Price;
571
420
  /**
572
- * An internal reference id which will be stored with the checkout & corresponding
573
- * order. Needs to be unique per shop per order and can be up to 200 characters.
421
+ * A unique id for the order which can be set when creating the checkoutSession.
574
422
  */
575
423
  referenceId: string;
576
424
  /**
577
- * The name of the merchant which initiated the order.
425
+ * The legal name of the merchant which initiated the order.
578
426
  */
579
427
  shopName: string;
580
428
  /**
581
- * The order status. This status symbolises the state of the user's payment
582
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
583
- * information.
429
+ * The status of the order. As soon as this value is 'paid', you can ship the
430
+ * order.
584
431
  */
585
432
  status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
586
- updatedAt: string;
433
+ updatedAt: unknown;
587
434
  /**
588
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
589
- * if no payment was made.
435
+ * The unique identifier of the customer's bank.
590
436
  */
591
437
  bankId?: string;
592
438
  /**
593
- * @deprecated The bank statement reference of the payment for the order. This is
594
- * the reference that will be visible on the bank statement.
439
+ * The reference that will be shown on the bank statement of the customer. Only
440
+ * available after a successful DirectDebit initiation.
595
441
  */
596
442
  bankStatementReference?: string;
597
- /**
598
- * The billing address of the customer.
599
- */
600
443
  billingAddress?: OrderRetrieveResponse.BillingAddress;
601
444
  /**
602
- * The merchant category code or
603
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
445
+ * The merchant category code for the account. MCCs are used to classify businesses
446
+ * based on the goods or services they provide.
604
447
  */
605
448
  category?: string;
449
+ climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
450
+ co2Grams?: number;
606
451
  /**
607
452
  * The unique identifier of the customer who placed the order.
608
453
  */
609
454
  customerId?: string;
455
+ /**
456
+ * The destination bank account and statement reference for the order.
457
+ */
610
458
  destination?: OrderRetrieveResponse.Destination;
611
459
  /**
612
- * @deprecated Currently only visible in the merchant dashboard. This id used to be
613
- * displayed to the user during the checkout.
460
+ * The customer-facing id of the order.
614
461
  */
615
462
  displayId?: string;
463
+ guest?: boolean;
464
+ impactOffsetProjects?: Array<unknown>;
616
465
  /**
617
- * @deprecated The list of line items for the order.
466
+ * The list of line items sold with the order.
618
467
  */
619
468
  lineItems?: Array<OrderRetrieveResponse.LineItem>;
620
469
  mandate?: OrderRetrieveResponse.Mandate;
621
470
  /**
622
- * @deprecated
471
+ * The financial address of the merchant associated with the order. Only available
472
+ * when requested via order/details and therefore requires authentication.
623
473
  */
624
474
  merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
625
475
  /**
626
- * Any data which will be stored and returned for this checkout session and
627
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
628
- * more info.
476
+ * Set of key-value pairs that you can attach to an object. This can be useful for
477
+ * storing additional information about the object in a structured format.
629
478
  */
630
479
  metadata?: Record<string, unknown>;
631
480
  /**
632
- * The source bank account where the money is send from.
481
+ * The project related to the order.
482
+ */
483
+ offsetProject?: string;
484
+ /**
485
+ * The financial address of the payer associated with the order. Only available
486
+ * after successful PIS flow.
633
487
  */
634
488
  payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
635
489
  paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
636
490
  /**
637
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
491
+ * The payment mode of the order. Can be either settlement or direct.
638
492
  */
639
- paymentMode?: 'settlement' | 'direct';
493
+ paymentMode?: 'direct' | 'settlement';
640
494
  /**
641
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
642
- * actions in your system.
495
+ * Deprecated. The status of the payment.
643
496
  */
644
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
497
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
645
498
  /**
646
499
  * The total amount in the currency of all successful refunds for this order
647
500
  */
648
501
  refundAmount?: number;
649
502
  /**
650
- * The list of refunds connected to this order.
503
+ * All partial and total refunds of this order.
651
504
  */
652
505
  refunds?: Array<OrderRetrieveResponse.Refund>;
653
506
  /**
654
- * The shopper object. Contains information collected from the user during the
655
- * Checkout.
507
+ * If set to true, a payment mandate will be created for the user. This is
508
+ * currently in alpha and defaults to false.
509
+ */
510
+ setupPaymentMandate?: boolean;
511
+ shippingAddress?: OrderRetrieveResponse.ShippingAddress;
512
+ shopLogo?: string;
513
+ /**
514
+ * Information about the customer who finished the order.
656
515
  */
657
516
  shopper?: OrderRetrieveResponse.Shopper;
658
517
  /**
659
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
660
- * collected in the Checkout.
518
+ * Deprecated. The email of the customer who completed the order.
661
519
  */
662
520
  shopperEmail?: string;
663
521
  statusClassification?: OrderRetrieveResponse.StatusClassification;
664
- /**
665
- * List of status history items for the order, used for logging every update on
666
- * status.
667
- */
668
522
  statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
669
523
  /**
670
- * The subaccount id of the order.
524
+ * The subaccount id of the merchant.
671
525
  */
672
526
  subaccountId?: string;
673
- /**
674
- * The legal name of the subaccount
675
- */
676
527
  subaccountLegalName?: string;
528
+ trees?: number;
677
529
  }
678
530
  export declare namespace OrderRetrieveResponse {
679
531
  /**
680
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
681
- * represents EUR 10.23. Any amount of decimal places can be provided on
682
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
683
- * as this is the format accepted by most banks.
532
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
684
533
  */
685
534
  interface Price {
686
535
  currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
687
- /**
688
- * The total amount to be paid.
689
- */
690
536
  total: number;
691
537
  shipping?: number;
692
538
  subTotal?: number;
693
539
  totalNet?: number;
694
540
  vat?: number;
695
541
  }
696
- /**
697
- * The billing address of the customer.
698
- */
699
542
  interface BillingAddress {
700
543
  city: string;
701
- /**
702
- * The country code in
703
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
704
- */
705
544
  country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
545
+ firstName: string;
546
+ lastName: string;
706
547
  line1: string;
548
+ line2: string;
549
+ region: string;
707
550
  zipCode: string;
708
- firstName?: string;
709
- lastName?: string;
710
- line2?: string;
711
- region?: string;
712
551
  }
552
+ interface ClimateActionMode {
553
+ amount: number;
554
+ type: 'transaction' | 'amount';
555
+ }
556
+ /**
557
+ * The destination bank account and statement reference for the order.
558
+ */
713
559
  interface Destination {
714
- /**
715
- * The validation logic is based on the "type" field. For example, if "type" is set
716
- * to "iban", the "iban" object must be filled out.
717
- */
718
560
  bankAccount: Destination.BankAccount;
719
561
  /**
720
562
  * The bank statement reference of the payment for the order. This is the reference
@@ -723,57 +565,31 @@ export declare namespace OrderRetrieveResponse {
723
565
  bankStatementReference: string;
724
566
  }
725
567
  namespace Destination {
726
- /**
727
- * The validation logic is based on the "type" field. For example, if "type" is set
728
- * to "iban", the "iban" object must be filled out.
729
- */
730
568
  interface BankAccount {
731
- /**
732
- * The type of the financial address. The actual destination is determined by this
733
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
734
- * validation will fail if you set e.g. type="iban", but then not fill any values
735
- * in the "iban" object.
736
- *
737
- * - iban: The IBAN of the account
738
- * - sort_code: The sort code of the account
739
- * - bank_code: The bank code of the account
740
- * - bban: The BBAN of the account
741
- */
742
- type: string;
569
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
743
570
  bankCode?: BankAccount.BankCode;
744
571
  bban?: BankAccount.Bban;
745
572
  iban?: BankAccount.Iban;
573
+ paymentReference?: string;
746
574
  sortCode?: BankAccount.SortCode;
747
575
  }
748
576
  namespace BankAccount {
749
577
  interface BankCode {
750
- /**
751
- * The name of the account holder.
752
- */
753
578
  accountHolderName: string;
754
579
  accountNumber: string;
755
580
  code: string;
756
581
  }
757
582
  interface Bban {
758
- /**
759
- * The name of the account holder.
760
- */
761
583
  accountHolderName: string;
762
584
  bban: string;
763
585
  bic?: string;
764
586
  }
765
587
  interface Iban {
766
- /**
767
- * The name of the account holder.
768
- */
769
588
  accountHolderName: string;
770
589
  iban: string;
771
590
  bic?: string;
772
591
  }
773
592
  interface SortCode {
774
- /**
775
- * The name of the account holder.
776
- */
777
593
  accountHolderName: string;
778
594
  accountNumber: string;
779
595
  sortCode: string;
@@ -782,188 +598,97 @@ export declare namespace OrderRetrieveResponse {
782
598
  }
783
599
  interface LineItem {
784
600
  /**
785
- * The total amount of all line items, i.e. single amount \* quantity. Given in
786
- * decimals, i.e. 10.23 represents EUR 10.23.
601
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
602
+ * and quantity 4, amount would be equal to 12.00.
787
603
  */
788
604
  amount: number;
789
605
  /**
790
- * The name of the line item.
606
+ * Customer-facing name of the line item.
791
607
  */
792
608
  name: string;
793
- /**
794
- * The quantity of the line item.
795
- */
796
- quantity: number;
797
- /**
798
- * The net amount of a single item.
799
- */
800
609
  singleNet: number;
801
- /**
802
- * The VAT amount of a single item.
803
- */
804
610
  singleVat: number;
805
- /**
806
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
807
- * the line item.
808
- */
809
- category?: string;
810
- /**
811
- * The
812
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
813
- * of the line item.
814
- */
611
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
612
+ co2Grams?: number;
815
613
  EAN?: string;
816
614
  /**
817
- * The image of the line item as a URL.
615
+ * An image of the line item. Valid URLs are accepted only.
818
616
  */
819
617
  image?: string;
820
618
  /**
821
- * The internal unique identifier of the line item.
619
+ * Quantity of this lineItem.
620
+ */
621
+ quantity?: number;
622
+ /**
623
+ * An internal unique id stored to this line item.
822
624
  */
823
625
  referenceId?: string;
824
626
  }
825
627
  interface Mandate {
826
- /**
827
- * The name of the account holder who signs the mandate.
828
- */
829
- accountHolderName?: string;
830
- /**
831
- * Additional information to display to the user during the mandate setup. This
832
- * information is not used to setup any recurrence on the mandate. It is only
833
- * displayed to the user during checkout.
834
- */
628
+ accountHolderName: string;
835
629
  additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
836
- /**
837
- * Mandate creditor data
838
- */
839
630
  creditor?: Mandate.Creditor;
840
- /**
841
- * The reference of the mandate going to be setup
842
- */
843
631
  reference?: string;
844
- /**
845
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
846
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
847
- * mandate setup request.
848
- */
849
632
  referenceId?: string;
850
- /**
851
- * If true, a ready to use mandate will be set up after the payment flow.
852
- */
853
633
  setup?: boolean;
854
- /**
855
- * The email of the user who signs the mandate.
856
- */
857
634
  userNotificationEmail?: string;
858
635
  }
859
636
  namespace Mandate {
860
- /**
861
- * Additional information to display to the user during the mandate setup. This
862
- * information is not used to setup any recurrence on the mandate. It is only
863
- * displayed to the user during checkout.
864
- */
865
637
  interface AdditionalDisplayInformation {
866
- /**
867
- * The intended cadence of charges used for displaying purpose only. On demand
868
- * would be used for unscheduled charges.
869
- */
870
638
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
871
639
  price?: AdditionalDisplayInformation.Price;
872
640
  }
873
641
  namespace AdditionalDisplayInformation {
874
642
  interface Price {
875
- /**
876
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
877
- * 10.23 EUR.
878
- */
879
- amount?: number;
880
- currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
643
+ amount: number;
644
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
881
645
  }
882
646
  }
883
- /**
884
- * Mandate creditor data
885
- */
886
647
  interface Creditor {
887
648
  id?: string;
888
649
  name?: string;
889
650
  }
890
651
  }
891
652
  /**
892
- * @deprecated
653
+ * The financial address of the merchant associated with the order. Only available
654
+ * when requested via order/details and therefore requires authentication.
893
655
  */
894
656
  interface MerchantFinancialAddress {
657
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
895
658
  bankCode?: MerchantFinancialAddress.BankCode;
896
659
  bban?: MerchantFinancialAddress.Bban;
897
660
  iban?: MerchantFinancialAddress.Iban;
898
- /**
899
- * The payment reference for the order. This is the reference that will be visible
900
- * on the bank statement.
901
- */
902
661
  paymentReference?: string;
903
662
  sortCode?: MerchantFinancialAddress.SortCode;
904
- /**
905
- * The type of the financial address. The actual destination is determined by this
906
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
907
- * validation will fail if you set e.g. type="iban", but then not fill any values
908
- * in the "iban" object.
909
- *
910
- * - iban: The IBAN of the account
911
- * - sort_code: The sort code of the account
912
- * - bank_code: The bank code of the account
913
- * - bban: The BBAN of the account
914
- */
915
- type?: string;
916
663
  }
917
664
  namespace MerchantFinancialAddress {
918
665
  interface BankCode {
919
- /**
920
- * The name of the account holder.
921
- */
922
666
  accountHolderName: string;
923
667
  accountNumber: string;
924
668
  code: string;
925
669
  }
926
670
  interface Bban {
927
- /**
928
- * The name of the account holder.
929
- */
930
671
  accountHolderName: string;
931
672
  bban: string;
932
673
  bic?: string;
933
674
  }
934
675
  interface Iban {
935
- /**
936
- * The name of the account holder.
937
- */
938
676
  accountHolderName: string;
939
677
  iban: string;
940
678
  bic?: string;
941
679
  }
942
680
  interface SortCode {
943
- /**
944
- * The name of the account holder.
945
- */
946
681
  accountHolderName: string;
947
682
  accountNumber: string;
948
683
  sortCode: string;
949
684
  }
950
685
  }
951
686
  /**
952
- * The source bank account where the money is send from.
687
+ * The financial address of the payer associated with the order. Only available
688
+ * after successful PIS flow.
953
689
  */
954
690
  interface PayerFinancialAddress {
955
- /**
956
- * The type of the financial address. The actual destination is determined by this
957
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
958
- * validation will fail if you set e.g. type="iban", but then not fill any values
959
- * in the "iban" object.
960
- *
961
- * - iban: The IBAN of the account
962
- * - sort_code: The sort code of the account
963
- * - bank_code: The bank code of the account
964
- * - bban: The BBAN of the account
965
- */
966
- type: string;
691
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
967
692
  bankCode?: PayerFinancialAddress.BankCode;
968
693
  bban?: PayerFinancialAddress.Bban;
969
694
  iban?: PayerFinancialAddress.Iban;
@@ -973,86 +698,75 @@ export declare namespace OrderRetrieveResponse {
973
698
  interface BankCode {
974
699
  accountNumber: string;
975
700
  code: string;
976
- /**
977
- * The name of the account holder.
978
- */
979
701
  accountHolderName?: string;
980
702
  }
981
703
  interface Bban {
982
704
  bban: string;
983
- /**
984
- * The name of the account holder.
985
- */
986
705
  accountHolderName?: string;
987
706
  bic?: string;
988
707
  }
989
708
  interface Iban {
990
709
  iban: string;
991
- /**
992
- * The name of the account holder.
993
- */
994
710
  accountHolderName?: string;
995
711
  bic?: string;
996
712
  }
997
713
  interface SortCode {
998
714
  accountNumber: string;
999
715
  sortCode: string;
1000
- /**
1001
- * The name of the account holder.
1002
- */
1003
716
  accountHolderName?: string;
1004
717
  }
1005
718
  }
1006
- /**
1007
- * A Refund object. This corresponds to one Refund request.
1008
- */
1009
719
  interface Refund {
720
+ /**
721
+ * The unique id of this refund request.
722
+ */
1010
723
  id: string;
724
+ /**
725
+ * The amount of the refund in decimals.
726
+ */
1011
727
  amount: number;
1012
- createdAt: string;
728
+ createdAt: unknown;
729
+ /**
730
+ * The unique id of this refund request. This can be set when requesting the
731
+ * refund.
732
+ */
1013
733
  referenceId: string;
1014
734
  /**
1015
- * The status of the refund. Always use the status of the order as your source of
1016
- * truth to trigger actions in your dashboard.
735
+ * The current status of this refund.
1017
736
  */
1018
737
  status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1019
- updatedAt: string;
738
+ updatedAt: unknown;
739
+ /**
740
+ * The description of the refund.
741
+ */
1020
742
  description?: string;
1021
743
  }
744
+ interface ShippingAddress {
745
+ city: string;
746
+ country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
747
+ firstName: string;
748
+ lastName: string;
749
+ line1: string;
750
+ line2: string;
751
+ region: string;
752
+ zipCode: string;
753
+ }
1022
754
  /**
1023
- * The shopper object. Contains information collected from the user during the
1024
- * Checkout.
755
+ * Information about the customer who finished the order.
1025
756
  */
1026
757
  interface Shopper {
1027
758
  email?: string;
1028
759
  phoneNumber?: string;
1029
760
  }
1030
761
  interface StatusClassification {
1031
- /**
1032
- * Populated with the primary payment initiation failure classsification if
1033
- * available.
1034
- */
1035
762
  primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1036
- /**
1037
- * Populated with the secondary payment initiation failure classsification if
1038
- * available.
1039
- */
1040
763
  secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled';
1041
764
  }
1042
765
  interface StatusHistoryList {
1043
- /**
1044
- * The order status. This status symbolises the state of the user's payment
1045
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1046
- * information.
1047
- */
766
+ createdAt: unknown;
1048
767
  currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1049
- reason: string;
1050
- updatedAt: string;
1051
- /**
1052
- * The order status. This status symbolises the state of the user's payment
1053
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1054
- * information.
1055
- */
768
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_REFUND_INITIATED' | 'ORDER_REFUNDED' | 'REFUND_CHARGE_SUCCEEDED' | 'REFUND_UPDATED' | 'CHECKOUT_COMPLETED' | 'PIS_PAYMENT_INITIATED' | 'PIS_PAYMENT_UPDATED' | 'PIS_PAYMENT_SUCCEEDED' | 'PAYMENT_NOT_SETTLED' | 'PAYMENT_INITIATION_FAILED' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILED' | 'CHECKOUT_SESSION_CREATED' | 'EXPIRED_CHECKOUT_SESSION_ABORTED' | 'DISPUTE' | 'PENDING_PAYMENT_ATTEMPTS_FOUND' | 'AML_FREEZE' | 'MANUAL_FREEZE' | 'MANUAL_UNFREEZE' | 'ORDER_MANUALLY_REOPENED';
769
+ updatedAt: unknown;
1056
770
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
1057
771
  }
1058
772
  }
@@ -1072,7 +786,7 @@ export interface OrderCreateParams {
1072
786
  /**
1073
787
  * The customer of the merchant.
1074
788
  */
1075
- customer?: OrderCreateParams.Email | OrderCreateParams.ID;
789
+ customer?: OrderCreateParams.Customer;
1076
790
  /**
1077
791
  * Optional expiration timestamp in seconds
1078
792
  */
@@ -1083,20 +797,24 @@ export interface OrderCreateParams {
1083
797
  subaccountId?: string;
1084
798
  }
1085
799
  export declare namespace OrderCreateParams {
1086
- interface Email {
800
+ /**
801
+ * The customer of the merchant.
802
+ */
803
+ interface Customer {
1087
804
  /**
1088
- * The email of the customer.
805
+ * The Ivy id of the customer.
1089
806
  */
1090
- email: string;
1091
- }
1092
- interface ID {
807
+ id?: string;
1093
808
  /**
1094
- * The Ivy id of the customer.
809
+ * The email of the customer.
1095
810
  */
1096
- id: string;
811
+ email?: string;
1097
812
  }
1098
813
  }
1099
814
  export interface OrderRetrieveParams {
815
+ /**
816
+ * You can put in either the Ivy id OR the referenceId of the order
817
+ */
1100
818
  id: string;
1101
819
  }
1102
820
  export declare namespace Orders {