@getivy/node-sdk 0.1.0-alpha.9 → 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 (150) hide show
  1. package/CHANGELOG.md +326 -0
  2. package/README.md +16 -26
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +25 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +26 -16
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +30 -18
  13. package/index.d.ts +30 -18
  14. package/index.d.ts.map +1 -1
  15. package/index.js +21 -8
  16. package/index.js.map +1 -1
  17. package/index.mjs +21 -8
  18. package/index.mjs.map +1 -1
  19. package/package.json +11 -33
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/balance.d.ts +8 -5
  25. package/resources/balance.d.ts.map +1 -1
  26. package/resources/banks.d.ts +82 -67
  27. package/resources/banks.d.ts.map +1 -1
  28. package/resources/beneficiary-payouts.d.ts +61 -0
  29. package/resources/beneficiary-payouts.d.ts.map +1 -0
  30. package/resources/beneficiary-payouts.js +16 -0
  31. package/resources/beneficiary-payouts.js.map +1 -0
  32. package/resources/beneficiary-payouts.mjs +12 -0
  33. package/resources/beneficiary-payouts.mjs.map +1 -0
  34. package/resources/capabilities.d.ts +1 -10
  35. package/resources/capabilities.d.ts.map +1 -1
  36. package/resources/charges.d.ts +28 -19
  37. package/resources/charges.d.ts.map +1 -1
  38. package/resources/checkoutsession.d.ts +275 -1360
  39. package/resources/checkoutsession.d.ts.map +1 -1
  40. package/resources/customers.d.ts +140 -10
  41. package/resources/customers.d.ts.map +1 -1
  42. package/resources/customers.js +9 -2
  43. package/resources/customers.js.map +1 -1
  44. package/resources/customers.mjs +9 -2
  45. package/resources/customers.mjs.map +1 -1
  46. package/resources/deposits.d.ts +165 -0
  47. package/resources/deposits.d.ts.map +1 -0
  48. package/resources/deposits.js +15 -0
  49. package/resources/deposits.js.map +1 -0
  50. package/resources/deposits.mjs +11 -0
  51. package/resources/deposits.mjs.map +1 -0
  52. package/resources/fx.d.ts +90 -0
  53. package/resources/fx.d.ts.map +1 -0
  54. package/resources/fx.js +22 -0
  55. package/resources/fx.js.map +1 -0
  56. package/resources/fx.mjs +18 -0
  57. package/resources/fx.mjs.map +1 -0
  58. package/resources/index.d.ts +11 -8
  59. package/resources/index.d.ts.map +1 -1
  60. package/resources/index.js +11 -5
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs +5 -2
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/mandates.d.ts +55 -17
  65. package/resources/mandates.d.ts.map +1 -1
  66. package/resources/orders.d.ts +720 -743
  67. package/resources/orders.d.ts.map +1 -1
  68. package/resources/orders.js +13 -3
  69. package/resources/orders.js.map +1 -1
  70. package/resources/orders.mjs +13 -3
  71. package/resources/orders.mjs.map +1 -1
  72. package/resources/payouts.d.ts +219 -103
  73. package/resources/payouts.d.ts.map +1 -1
  74. package/resources/payouts.js +3 -4
  75. package/resources/payouts.js.map +1 -1
  76. package/resources/payouts.mjs +3 -4
  77. package/resources/payouts.mjs.map +1 -1
  78. package/resources/refunds.d.ts +53 -97
  79. package/resources/refunds.d.ts.map +1 -1
  80. package/resources/refunds.js +8 -12
  81. package/resources/refunds.js.map +1 -1
  82. package/resources/refunds.mjs +8 -12
  83. package/resources/refunds.mjs.map +1 -1
  84. package/resources/returns.d.ts +104 -0
  85. package/resources/returns.d.ts.map +1 -0
  86. package/resources/returns.js +21 -0
  87. package/resources/returns.js.map +1 -0
  88. package/resources/returns.mjs +17 -0
  89. package/resources/returns.mjs.map +1 -0
  90. package/resources/subaccounts.d.ts +15 -5
  91. package/resources/subaccounts.d.ts.map +1 -1
  92. package/resources/subaccounts.js.map +1 -1
  93. package/resources/subaccounts.mjs.map +1 -1
  94. package/resources/transactions.d.ts +174 -0
  95. package/resources/transactions.d.ts.map +1 -0
  96. package/resources/transactions.js +15 -0
  97. package/resources/transactions.js.map +1 -0
  98. package/resources/transactions.mjs +11 -0
  99. package/resources/transactions.mjs.map +1 -0
  100. package/resources.d.ts +2 -0
  101. package/resources.d.ts.map +1 -0
  102. package/resources.js +18 -0
  103. package/resources.js.map +1 -0
  104. package/resources.mjs +2 -0
  105. package/resources.mjs.map +1 -0
  106. package/src/_shims/index.d.ts +2 -0
  107. package/src/_shims/index.js +5 -1
  108. package/src/_shims/index.mjs +5 -1
  109. package/src/core.ts +44 -16
  110. package/src/index.ts +100 -63
  111. package/src/resource.ts +1 -1
  112. package/src/resources/balance.ts +8 -5
  113. package/src/resources/banks.ts +130 -67
  114. package/src/resources/beneficiary-payouts.ts +78 -0
  115. package/src/resources/capabilities.ts +1 -10
  116. package/src/resources/charges.ts +30 -21
  117. package/src/resources/checkoutsession.ts +1224 -3096
  118. package/src/resources/customers.ts +164 -9
  119. package/src/resources/deposits.ts +231 -0
  120. package/src/resources/fx.ts +119 -0
  121. package/src/resources/index.ts +31 -28
  122. package/src/resources/mandates.ts +79 -17
  123. package/src/resources/orders.ts +1449 -1075
  124. package/src/resources/payouts.ts +273 -103
  125. package/src/resources/refunds.ts +70 -111
  126. package/src/resources/returns.ts +140 -0
  127. package/src/resources/subaccounts.ts +26 -4
  128. package/src/resources/transactions.ts +234 -0
  129. package/src/resources.ts +1 -0
  130. package/src/version.ts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.d.ts.map +1 -1
  133. package/version.js +1 -1
  134. package/version.js.map +1 -1
  135. package/version.mjs +1 -1
  136. package/version.mjs.map +1 -1
  137. package/resources/reports.d.ts +0 -120
  138. package/resources/reports.d.ts.map +0 -1
  139. package/resources/reports.js +0 -31
  140. package/resources/reports.js.map +0 -1
  141. package/resources/reports.mjs +0 -27
  142. package/resources/reports.mjs.map +0 -1
  143. package/resources/webhooksubscription.d.ts +0 -155
  144. package/resources/webhooksubscription.d.ts.map +0 -1
  145. package/resources/webhooksubscription.js +0 -42
  146. package/resources/webhooksubscription.js.map +0 -1
  147. package/resources/webhooksubscription.mjs +0 -38
  148. package/resources/webhooksubscription.mjs.map +0 -1
  149. package/src/resources/reports.ts +0 -172
  150. package/src/resources/webhooksubscription.ts +0 -353
@@ -1,6 +1,14 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
3
  export declare class Orders extends APIResource {
4
+ /**
5
+ * Create a new order. By creating a new order, you will create a new settlement
6
+ * destination which you can use to settle expected incoming payments efficiently.
7
+ * After creating the order, Ivy provides you with a destination for the expected
8
+ * incoming payment. As soon as a payment with the same details arrives, Ivy will
9
+ * update the status of the order.
10
+ */
11
+ create(body: OrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<OrderCreateResponse>;
4
12
  /**
5
13
  * Retrieve details of an order. You can retrieve the order by passing either the
6
14
  * internal Ivy order id or the `referenceId` you specified when creating a
@@ -8,421 +16,308 @@ export declare class Orders extends APIResource {
8
16
  */
9
17
  retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
10
18
  /**
11
- * Update certain fields of the specified order.
19
+ * Manually expire an order before its natural expiration time.
12
20
  */
13
- update(body: OrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<OrderUpdateResponse>;
21
+ expire(body: OrderExpireParams, options?: Core.RequestOptions): Core.APIPromise<OrderExpireResponse>;
14
22
  }
15
- export interface OrderRetrieveResponse {
23
+ export interface OrderCreateResponse {
16
24
  /**
17
- * The Ivy unique identifier for the order.
25
+ * The unique id for the order.
18
26
  */
19
27
  id: string;
20
28
  /**
21
- * @deprecated The unique identifier for the merchantApp which initiated the order
22
- * / payment attempt.
29
+ * The unique id for the merchantApp which initiated the order.
23
30
  */
24
31
  appId: string;
25
32
  /**
26
- * The Ivy fee for the payment.
33
+ * The amount of application fee collected with the order.
27
34
  */
28
35
  applicationFeeAmount: number;
29
- createdAt: string;
36
+ createdAt: unknown;
30
37
  instantPaymentScheme: boolean;
31
38
  /**
32
- * @deprecated Deprecated in favor of `appId`.
39
+ * Same as appId
33
40
  */
34
41
  merchantAppId: string;
35
- /**
36
- * The unique identifier for the merchant which initiated the order / payment
37
- * attempt.
38
- */
39
42
  merchantId: string;
40
43
  /**
41
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
42
- * represents EUR 10.23. Any amount of decimal places can be provided on
43
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
44
- * as this is the format accepted by most banks.
44
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
45
45
  */
46
- price: OrderRetrieveResponse.Price;
46
+ price: OrderCreateResponse.Price;
47
47
  /**
48
- * An internal reference id which will be stored with the checkout & corresponding
49
- * order. Needs to be unique per shop per order and can be up to 200 characters.
48
+ * A unique id for the order which can be set when creating the checkoutSession.
50
49
  */
51
50
  referenceId: string;
52
51
  /**
53
- * The name of the merchant which initiated the order.
52
+ * The legal name of the merchant which initiated the order.
54
53
  */
55
54
  shopName: string;
56
55
  /**
57
- * The order status. This status symbolises the state of the user's payment
58
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
59
- * information.
56
+ * The status of the order. As soon as this value is 'paid', you can ship the
57
+ * order.
60
58
  */
61
59
  status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
62
- updatedAt: string;
60
+ updatedAt: unknown;
63
61
  /**
64
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
65
- * if no payment was made.
62
+ * The unique identifier of the customer's bank.
66
63
  */
67
64
  bankId?: string;
68
65
  /**
69
- * The bank statement reference of the payment for the order. This is the reference
70
- * that will be visible on the bank statement.
66
+ * The reference that will be shown on the bank statement of the customer. Only
67
+ * available after a successful DirectDebit initiation.
71
68
  */
72
69
  bankStatementReference?: string;
70
+ billingAddress?: OrderCreateResponse.BillingAddress;
73
71
  /**
74
- * The billing address of the user. Required when handshake=true.
75
- */
76
- billingAddress?: OrderRetrieveResponse.BillingAddress;
77
- /**
78
- * The merchant category code or
79
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
72
+ * The merchant category code for the account. MCCs are used to classify businesses
73
+ * based on the goods or services they provide.
80
74
  */
81
75
  category?: string;
82
- /**
83
- * @deprecated
84
- */
85
- climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
86
- /**
87
- * @deprecated
88
- */
76
+ climateActionMode?: OrderCreateResponse.ClimateActionMode;
89
77
  co2Grams?: number;
90
78
  /**
91
79
  * The unique identifier of the customer who placed the order.
92
80
  */
93
81
  customerId?: string;
94
82
  /**
95
- * The customer facing id. This id is displayed to the user during the checkout and
96
- * in the merchant dashboard.
83
+ * The destination bank account and statement reference for the order.
97
84
  */
98
- displayId?: string;
85
+ destination?: OrderCreateResponse.Destination;
99
86
  /**
100
- * False by default. If set to true, customers skip email input and jump directly
101
- * to their bank login. For express Checkout Sessions this is always false.
87
+ * The customer-facing id of the order.
102
88
  */
89
+ displayId?: string;
103
90
  guest?: boolean;
91
+ impactOffsetProjects?: Array<unknown>;
104
92
  /**
105
- * Only valid for sustainable incentive mode. The social / sustainable projects
106
- * available to the user during Checkout.
93
+ * The list of line items sold with the order.
107
94
  */
108
- impactOffsetProjects?: Array<string>;
95
+ lineItems?: Array<OrderCreateResponse.LineItem>;
96
+ mandate?: OrderCreateResponse.Mandate;
109
97
  /**
110
- * The incentive mode of the checkout session. For any use-case apart from
111
- * e-commerce, please use `white_label` as the value. If set to `white_label`, the
112
- * checkout session will be white labeled. If set to `sustainable`, the checkout
113
- * session will contain sustainable incentives for users.
98
+ * The financial address of the merchant associated with the order. Only available
99
+ * when requested via order/details and therefore requires authentication.
114
100
  */
115
- incentiveMode?: 'white_label' | 'sustainable';
101
+ merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
116
102
  /**
117
- * The line items of the Checkout.
103
+ * Set of key-value pairs that you can attach to an object. This can be useful for
104
+ * storing additional information about the object in a structured format.
118
105
  */
119
- lineItems?: Array<OrderRetrieveResponse.LineItem>;
120
- mandate?: OrderRetrieveResponse.Mandate;
121
- /**
122
- * The destination bank account where the money will be sent to.
123
- */
124
- merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
125
- /**
126
- * Any data which will be stored and returned for this checkout session and
127
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
128
- * more info.
129
- */
130
- metadata?: Record<string, unknown>;
106
+ metadata?: {
107
+ [key: string]: unknown;
108
+ };
131
109
  /**
132
- * Only valid for sustainable incentive mode. The social / sustainability project
133
- * chosen by the user during Checkout.
110
+ * The project related to the order.
134
111
  */
135
112
  offsetProject?: string;
136
113
  /**
137
- * The source bank account where the money is send from.
114
+ * The financial address of the payer associated with the order. Only available
115
+ * after successful PIS flow.
138
116
  */
139
- payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
140
- paymentMethodType?: 'sepa_debit' | 'customer_balance';
117
+ payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
118
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
141
119
  /**
142
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
120
+ * The payment mode of the order. Can be either settlement or direct.
143
121
  */
144
- paymentMode?: 'settlement' | 'direct';
122
+ paymentMode?: 'direct' | 'settlement';
145
123
  /**
146
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
147
- * actions in your system.
124
+ * Deprecated. The status of the payment.
148
125
  */
149
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
126
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
150
127
  /**
151
128
  * The total amount in the currency of all successful refunds for this order
152
129
  */
153
130
  refundAmount?: number;
154
131
  /**
155
- * The list of refunds connected to this order.
132
+ * All partial and total refunds of this order.
156
133
  */
157
- refunds?: Array<OrderRetrieveResponse.Refund>;
158
- /**
159
- * The shipping address of the user. This is only collected in express Checkouts.
160
- */
161
- shippingAddress?: OrderRetrieveResponse.ShippingAddress;
134
+ refunds?: Array<OrderCreateResponse.Refund>;
162
135
  /**
163
- * The selected shipping method by the user. Can either be selected during an
164
- * express Checkout Session or passed during Checkout Session creation.
165
- */
166
- shippingMethod?: OrderRetrieveResponse.ShippingMethod;
167
- /**
168
- * The logo of the shop provided as a URL.
136
+ * If set to true, a payment mandate will be created for the user. This is
137
+ * currently in alpha and defaults to false.
169
138
  */
139
+ setupPaymentMandate?: boolean;
140
+ shippingAddress?: OrderCreateResponse.ShippingAddress;
170
141
  shopLogo?: string;
171
142
  /**
172
- * The shopper object. Contains information collected from the user during the
173
- * Checkout.
143
+ * Information about the customer who finished the order.
174
144
  */
175
- shopper?: OrderRetrieveResponse.Shopper;
145
+ shopper?: OrderCreateResponse.Shopper;
176
146
  /**
177
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
178
- * collected in the Checkout.
147
+ * Deprecated. The email of the customer who completed the order.
179
148
  */
180
149
  shopperEmail?: string;
181
- statusClassification?: OrderRetrieveResponse.StatusClassification;
150
+ statusClassification?: OrderCreateResponse.StatusClassification;
151
+ statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
182
152
  /**
183
- * List of status history items for the order, used for logging every update on
184
- * status.
185
- */
186
- statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
187
- /**
188
- * The subaccount id of the order.
153
+ * The subaccount id of the merchant.
189
154
  */
190
155
  subaccountId?: string;
191
- /**
192
- * The legal name of the subaccount
193
- */
194
156
  subaccountLegalName?: string;
195
- /**
196
- * @deprecated
197
- */
198
157
  trees?: number;
199
158
  }
200
- export declare namespace OrderRetrieveResponse {
159
+ export declare namespace OrderCreateResponse {
201
160
  /**
202
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
203
- * represents EUR 10.23. Any amount of decimal places can be provided on
204
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
205
- * as this is the format accepted by most banks.
161
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
206
162
  */
207
163
  interface Price {
208
- currency: 'EUR' | 'GBP' | 'PLN';
209
- /**
210
- * The total amount to be paid.
211
- */
164
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
212
165
  total: number;
213
166
  shipping?: number;
214
167
  subTotal?: number;
215
168
  totalNet?: number;
216
169
  vat?: number;
217
170
  }
218
- /**
219
- * The billing address of the user. Required when handshake=true.
220
- */
221
171
  interface BillingAddress {
222
172
  city: string;
223
- /**
224
- * The country code in
225
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
226
- */
227
173
  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';
174
+ firstName: string;
175
+ lastName: string;
228
176
  line1: string;
177
+ line2: string;
178
+ region: string;
229
179
  zipCode: string;
230
- firstName?: string;
231
- lastName?: string;
232
- line2?: string;
233
- region?: string;
234
180
  }
235
- /**
236
- * @deprecated
237
- */
238
181
  interface ClimateActionMode {
239
182
  amount: number;
240
183
  type: 'transaction' | 'amount';
241
184
  }
185
+ /**
186
+ * The destination bank account and statement reference for the order.
187
+ */
188
+ interface Destination {
189
+ bankAccount: Destination.BankAccount;
190
+ /**
191
+ * The bank statement reference of the payment for the order. This is the reference
192
+ * that will be visible on the bank statement.
193
+ */
194
+ bankStatementReference: string;
195
+ }
196
+ namespace Destination {
197
+ interface BankAccount {
198
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
199
+ bankCode?: BankAccount.BankCode;
200
+ bban?: BankAccount.Bban;
201
+ iban?: BankAccount.Iban;
202
+ paymentReference?: string;
203
+ sortCode?: BankAccount.SortCode;
204
+ }
205
+ namespace BankAccount {
206
+ interface BankCode {
207
+ accountHolderName: string;
208
+ accountNumber: string;
209
+ code: string;
210
+ }
211
+ interface Bban {
212
+ accountHolderName: string;
213
+ bban: string;
214
+ bic?: string;
215
+ }
216
+ interface Iban {
217
+ accountHolderName: string;
218
+ iban: string;
219
+ bic?: string;
220
+ }
221
+ interface SortCode {
222
+ accountHolderName: string;
223
+ accountNumber: string;
224
+ sortCode: string;
225
+ }
226
+ }
227
+ }
242
228
  interface LineItem {
243
229
  /**
244
- * The total amount of all line items, i.e. single amount \* quantity. Given in
245
- * decimals, i.e. 10.23 represents EUR 10.23.
230
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
231
+ * and quantity 4, amount would be equal to 12.00.
246
232
  */
247
233
  amount: number;
248
234
  /**
249
- * The name of the line item.
235
+ * Customer-facing name of the line item.
250
236
  */
251
237
  name: string;
252
- /**
253
- * The quantity of the line item.
254
- */
255
- quantity: number;
256
- /**
257
- * The net amount of a single item.
258
- */
259
238
  singleNet: number;
260
- /**
261
- * The VAT amount of a single item.
262
- */
263
239
  singleVat: number;
264
- /**
265
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
266
- * the line item.
267
- */
268
- category?: string;
269
- /**
270
- * The
271
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
272
- * of the line item.
273
- */
240
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
241
+ co2Grams?: number;
274
242
  EAN?: string;
275
243
  /**
276
- * The image of the line item as a URL.
244
+ * An image of the line item. Valid URLs are accepted only.
277
245
  */
278
246
  image?: string;
279
247
  /**
280
- * The internal unique identifier of the line item.
248
+ * Quantity of this lineItem.
249
+ */
250
+ quantity?: number;
251
+ /**
252
+ * An internal unique id stored to this line item.
281
253
  */
282
254
  referenceId?: string;
283
255
  }
284
256
  interface Mandate {
285
- /**
286
- * The name of the account holder who signs the mandate.
287
- */
288
- accountHolderName?: string;
289
- /**
290
- * Additional information to display to the user during the mandate setup. This
291
- * information is not used to setup any recurrence on the mandate. It is only
292
- * displayed to the user during checkout.
293
- */
257
+ accountHolderName: string;
294
258
  additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
295
- /**
296
- * Mandate creditor data
297
- */
298
259
  creditor?: Mandate.Creditor;
299
- /**
300
- * The reference of the mandate going to be setup
301
- */
302
260
  reference?: string;
303
- /**
304
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
305
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
306
- * mandate setup request.
307
- */
308
261
  referenceId?: string;
309
- /**
310
- * If true, a ready to use mandate will be set up after the payment flow.
311
- */
312
262
  setup?: boolean;
313
- /**
314
- * The email of the user who signs the mandate.
315
- */
316
263
  userNotificationEmail?: string;
317
264
  }
318
265
  namespace Mandate {
319
- /**
320
- * Additional information to display to the user during the mandate setup. This
321
- * information is not used to setup any recurrence on the mandate. It is only
322
- * displayed to the user during checkout.
323
- */
324
266
  interface AdditionalDisplayInformation {
325
- /**
326
- * The intended cadence of charges used for displaying purpose only. On demand
327
- * would be used for unscheduled charges.
328
- */
329
267
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
330
268
  price?: AdditionalDisplayInformation.Price;
331
269
  }
332
270
  namespace AdditionalDisplayInformation {
333
271
  interface Price {
334
- /**
335
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
336
- * 10.23 EUR.
337
- */
338
- amount?: number;
339
- currency?: 'EUR' | 'GBP' | 'PLN';
272
+ amount: number;
273
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
340
274
  }
341
275
  }
342
- /**
343
- * Mandate creditor data
344
- */
345
276
  interface Creditor {
346
277
  id?: string;
347
278
  name?: string;
348
279
  }
349
280
  }
350
281
  /**
351
- * The destination bank account where the money will be sent to.
282
+ * The financial address of the merchant associated with the order. Only available
283
+ * when requested via order/details and therefore requires authentication.
352
284
  */
353
285
  interface MerchantFinancialAddress {
286
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
354
287
  bankCode?: MerchantFinancialAddress.BankCode;
355
288
  bban?: MerchantFinancialAddress.Bban;
356
289
  iban?: MerchantFinancialAddress.Iban;
357
- /**
358
- * The payment reference for the order. This is the reference that will be visible
359
- * on the bank statement.
360
- */
361
290
  paymentReference?: string;
362
291
  sortCode?: MerchantFinancialAddress.SortCode;
363
- /**
364
- * The type of the financial address. The actual destination is determined by this
365
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
366
- * validation will fail if you set e.g. type="iban", but then not fill any values
367
- * in the "iban" object.
368
- *
369
- * - iban: The IBAN of the account
370
- * - sort_code: The sort code of the account
371
- * - bank_code: The bank code of the account
372
- * - bban: The BBAN of the account
373
- */
374
- type?: string;
375
292
  }
376
293
  namespace MerchantFinancialAddress {
377
294
  interface BankCode {
378
- /**
379
- * The name of the account holder.
380
- */
381
295
  accountHolderName: string;
382
296
  accountNumber: string;
383
297
  code: string;
384
298
  }
385
299
  interface Bban {
386
- /**
387
- * The name of the account holder.
388
- */
389
300
  accountHolderName: string;
390
301
  bban: string;
391
302
  bic?: string;
392
303
  }
393
304
  interface Iban {
394
- /**
395
- * The name of the account holder.
396
- */
397
305
  accountHolderName: string;
398
306
  iban: string;
399
307
  bic?: string;
400
308
  }
401
309
  interface SortCode {
402
- /**
403
- * The name of the account holder.
404
- */
405
310
  accountHolderName: string;
406
311
  accountNumber: string;
407
312
  sortCode: string;
408
313
  }
409
314
  }
410
315
  /**
411
- * The source bank account where the money is send from.
316
+ * The financial address of the payer associated with the order. Only available
317
+ * after successful PIS flow.
412
318
  */
413
319
  interface PayerFinancialAddress {
414
- /**
415
- * The type of the financial address. The actual destination is determined by this
416
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
417
- * validation will fail if you set e.g. type="iban", but then not fill any values
418
- * in the "iban" object.
419
- *
420
- * - iban: The IBAN of the account
421
- * - sort_code: The sort code of the account
422
- * - bank_code: The bank code of the account
423
- * - bban: The BBAN of the account
424
- */
425
- type: string;
320
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
426
321
  bankCode?: PayerFinancialAddress.BankCode;
427
322
  bban?: PayerFinancialAddress.Bban;
428
323
  iban?: PayerFinancialAddress.Iban;
@@ -432,594 +327,376 @@ export declare namespace OrderRetrieveResponse {
432
327
  interface BankCode {
433
328
  accountNumber: string;
434
329
  code: string;
435
- /**
436
- * The name of the account holder.
437
- */
438
330
  accountHolderName?: string;
439
331
  }
440
332
  interface Bban {
441
333
  bban: string;
442
- /**
443
- * The name of the account holder.
444
- */
445
334
  accountHolderName?: string;
446
335
  bic?: string;
447
336
  }
448
337
  interface Iban {
449
338
  iban: string;
450
- /**
451
- * The name of the account holder.
452
- */
453
339
  accountHolderName?: string;
454
340
  bic?: string;
455
341
  }
456
342
  interface SortCode {
457
343
  accountNumber: string;
458
344
  sortCode: string;
459
- /**
460
- * The name of the account holder.
461
- */
462
345
  accountHolderName?: string;
463
346
  }
464
347
  }
465
- /**
466
- * A Refund object. This corresponds to one Refund request.
467
- */
468
348
  interface Refund {
349
+ /**
350
+ * The unique id of this refund request.
351
+ */
469
352
  id: string;
353
+ /**
354
+ * The amount of the refund in decimals.
355
+ */
470
356
  amount: number;
471
- createdAt: string;
357
+ createdAt: unknown;
358
+ /**
359
+ * The unique id of this refund request. This can be set when requesting the
360
+ * refund.
361
+ */
472
362
  referenceId: string;
473
363
  /**
474
- * The status of the refund. Always use the status of the order as your source of
475
- * truth to trigger actions in your dashboard.
364
+ * The current status of this refund.
476
365
  */
477
366
  status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
478
- updatedAt: string;
367
+ updatedAt: unknown;
368
+ /**
369
+ * The description of the refund.
370
+ */
479
371
  description?: string;
480
372
  }
481
- /**
482
- * The shipping address of the user. This is only collected in express Checkouts.
483
- */
484
373
  interface ShippingAddress {
485
374
  city: string;
486
- /**
487
- * The country code in
488
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
489
- */
490
375
  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';
376
+ firstName: string;
377
+ lastName: string;
491
378
  line1: string;
379
+ line2: string;
380
+ region: string;
492
381
  zipCode: string;
493
- firstName?: string;
494
- lastName?: string;
495
- line2?: string;
496
- region?: string;
497
- }
498
- /**
499
- * The selected shipping method by the user. Can either be selected during an
500
- * express Checkout Session or passed during Checkout Session creation.
501
- */
502
- interface ShippingMethod {
503
- /**
504
- * The customer-facing name of the shipping method.
505
- */
506
- name: string;
507
- /**
508
- * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
509
- */
510
- price: number;
511
- /**
512
- * The unique identifier of the shipping method within Ivy.
513
- */
514
- id?: string;
515
- /**
516
- * The list of countries where the shipping method is available.
517
- */
518
- countries?: Array<'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'>;
519
- /**
520
- * The delivery estimate of the shipping method.
521
- */
522
- deliveryEstimate?: ShippingMethod.DeliveryEstimate;
523
- /**
524
- * The unique identifier within your system of the shipping method.
525
- */
526
- reference?: string;
527
- /**
528
- * @deprecated Deprecated in favor of deliveryEstimate
529
- */
530
- timeFrame?: string;
531
- }
532
- namespace ShippingMethod {
533
- /**
534
- * The delivery estimate of the shipping method.
535
- */
536
- interface DeliveryEstimate {
537
- /**
538
- * The maximum delivery time.
539
- */
540
- maximum?: DeliveryEstimate.Maximum;
541
- /**
542
- * The minimum delivery time.
543
- */
544
- minimum?: DeliveryEstimate.Minimum;
545
- }
546
- namespace DeliveryEstimate {
547
- /**
548
- * The maximum delivery time.
549
- */
550
- interface Maximum {
551
- /**
552
- * The unit of the time duration.
553
- */
554
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
555
- /**
556
- * The value of the time duration.
557
- */
558
- value: number;
559
- }
560
- /**
561
- * The minimum delivery time.
562
- */
563
- interface Minimum {
564
- /**
565
- * The unit of the time duration.
566
- */
567
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
568
- /**
569
- * The value of the time duration.
570
- */
571
- value: number;
572
- }
573
- }
574
382
  }
575
383
  /**
576
- * The shopper object. Contains information collected from the user during the
577
- * Checkout.
384
+ * Information about the customer who finished the order.
578
385
  */
579
386
  interface Shopper {
580
387
  email?: string;
581
388
  phoneNumber?: string;
582
389
  }
583
390
  interface StatusClassification {
584
- /**
585
- * Populated with the primary payment initiation failure classsification if
586
- * available.
587
- */
588
- primary?: string;
589
- /**
590
- * Populated with the secondary payment initiation failure classsification if
591
- * available.
592
- */
593
- secondary?: string;
391
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
392
+ 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' | 'unsupported_bank_account';
594
393
  }
595
394
  interface StatusHistoryList {
596
- /**
597
- * The order status. This status symbolises the state of the user's payment
598
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
599
- * information.
600
- */
395
+ createdAt: unknown;
601
396
  currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
602
- reason: string;
603
- updatedAt: string;
604
- /**
605
- * The order status. This status symbolises the state of the user's payment
606
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
607
- * information.
608
- */
397
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | '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';
398
+ updatedAt: unknown;
609
399
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
610
400
  }
611
401
  }
612
- export interface OrderUpdateResponse {
402
+ export interface OrderRetrieveResponse {
613
403
  /**
614
- * The Ivy unique identifier for the order.
404
+ * The unique id for the order.
615
405
  */
616
406
  id: string;
617
407
  /**
618
- * @deprecated The unique identifier for the merchantApp which initiated the order
619
- * / payment attempt.
408
+ * The unique id for the merchantApp which initiated the order.
620
409
  */
621
410
  appId: string;
622
411
  /**
623
- * The Ivy fee for the payment.
412
+ * The amount of application fee collected with the order.
624
413
  */
625
414
  applicationFeeAmount: number;
626
- createdAt: string;
415
+ createdAt: unknown;
627
416
  instantPaymentScheme: boolean;
628
417
  /**
629
- * @deprecated Deprecated in favor of `appId`.
418
+ * Same as appId
630
419
  */
631
420
  merchantAppId: string;
632
- /**
633
- * The unique identifier for the merchant which initiated the order / payment
634
- * attempt.
635
- */
636
421
  merchantId: string;
637
422
  /**
638
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
639
- * represents EUR 10.23. Any amount of decimal places can be provided on
640
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
641
- * as this is the format accepted by most banks.
423
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
642
424
  */
643
- price: OrderUpdateResponse.Price;
425
+ price: OrderRetrieveResponse.Price;
644
426
  /**
645
- * An internal reference id which will be stored with the checkout & corresponding
646
- * order. Needs to be unique per shop per order and can be up to 200 characters.
427
+ * A unique id for the order which can be set when creating the checkoutSession.
647
428
  */
648
429
  referenceId: string;
649
430
  /**
650
- * The name of the merchant which initiated the order.
431
+ * The legal name of the merchant which initiated the order.
651
432
  */
652
433
  shopName: string;
653
434
  /**
654
- * The order status. This status symbolises the state of the user's payment
655
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
656
- * information.
435
+ * The status of the order. As soon as this value is 'paid', you can ship the
436
+ * order.
657
437
  */
658
438
  status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
659
- updatedAt: string;
439
+ updatedAt: unknown;
660
440
  /**
661
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
662
- * if no payment was made.
441
+ * The unique identifier of the customer's bank.
663
442
  */
664
443
  bankId?: string;
665
444
  /**
666
- * The bank statement reference of the payment for the order. This is the reference
667
- * that will be visible on the bank statement.
445
+ * The reference that will be shown on the bank statement of the customer. Only
446
+ * available after a successful DirectDebit initiation.
668
447
  */
669
448
  bankStatementReference?: string;
449
+ billingAddress?: OrderRetrieveResponse.BillingAddress;
670
450
  /**
671
- * The billing address of the user. Required when handshake=true.
672
- */
673
- billingAddress?: OrderUpdateResponse.BillingAddress;
674
- /**
675
- * The merchant category code or
676
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
451
+ * The merchant category code for the account. MCCs are used to classify businesses
452
+ * based on the goods or services they provide.
677
453
  */
678
454
  category?: string;
679
- /**
680
- * @deprecated
681
- */
682
- climateActionMode?: OrderUpdateResponse.ClimateActionMode;
683
- /**
684
- * @deprecated
685
- */
455
+ climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
686
456
  co2Grams?: number;
687
457
  /**
688
458
  * The unique identifier of the customer who placed the order.
689
459
  */
690
460
  customerId?: string;
691
461
  /**
692
- * The customer facing id. This id is displayed to the user during the checkout and
693
- * in the merchant dashboard.
462
+ * The destination bank account and statement reference for the order.
694
463
  */
695
- displayId?: string;
464
+ destination?: OrderRetrieveResponse.Destination;
696
465
  /**
697
- * False by default. If set to true, customers skip email input and jump directly
698
- * to their bank login. For express Checkout Sessions this is always false.
466
+ * The customer-facing id of the order.
699
467
  */
468
+ displayId?: string;
700
469
  guest?: boolean;
470
+ impactOffsetProjects?: Array<unknown>;
701
471
  /**
702
- * Only valid for sustainable incentive mode. The social / sustainable projects
703
- * available to the user during Checkout.
704
- */
705
- impactOffsetProjects?: Array<string>;
706
- /**
707
- * The incentive mode of the checkout session. For any use-case apart from
708
- * e-commerce, please use `white_label` as the value. If set to `white_label`, the
709
- * checkout session will be white labeled. If set to `sustainable`, the checkout
710
- * session will contain sustainable incentives for users.
711
- */
712
- incentiveMode?: 'white_label' | 'sustainable';
713
- /**
714
- * The line items of the Checkout.
472
+ * The list of line items sold with the order.
715
473
  */
716
- lineItems?: Array<OrderUpdateResponse.LineItem>;
717
- mandate?: OrderUpdateResponse.Mandate;
474
+ lineItems?: Array<OrderRetrieveResponse.LineItem>;
475
+ mandate?: OrderRetrieveResponse.Mandate;
718
476
  /**
719
- * The destination bank account where the money will be sent to.
477
+ * The financial address of the merchant associated with the order. Only available
478
+ * when requested via order/details and therefore requires authentication.
720
479
  */
721
- merchantFinancialAddress?: OrderUpdateResponse.MerchantFinancialAddress;
480
+ merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
722
481
  /**
723
- * Any data which will be stored and returned for this checkout session and
724
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
725
- * more info.
482
+ * Set of key-value pairs that you can attach to an object. This can be useful for
483
+ * storing additional information about the object in a structured format.
726
484
  */
727
- metadata?: Record<string, unknown>;
485
+ metadata?: {
486
+ [key: string]: unknown;
487
+ };
728
488
  /**
729
- * Only valid for sustainable incentive mode. The social / sustainability project
730
- * chosen by the user during Checkout.
489
+ * The project related to the order.
731
490
  */
732
491
  offsetProject?: string;
733
492
  /**
734
- * The source bank account where the money is send from.
493
+ * The financial address of the payer associated with the order. Only available
494
+ * after successful PIS flow.
735
495
  */
736
- payerFinancialAddress?: OrderUpdateResponse.PayerFinancialAddress;
737
- paymentMethodType?: 'sepa_debit' | 'customer_balance';
496
+ payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
497
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
738
498
  /**
739
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
499
+ * The payment mode of the order. Can be either settlement or direct.
740
500
  */
741
- paymentMode?: 'settlement' | 'direct';
501
+ paymentMode?: 'direct' | 'settlement';
742
502
  /**
743
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
744
- * actions in your system.
503
+ * Deprecated. The status of the payment.
745
504
  */
746
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
505
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
747
506
  /**
748
507
  * The total amount in the currency of all successful refunds for this order
749
508
  */
750
509
  refundAmount?: number;
751
510
  /**
752
- * The list of refunds connected to this order.
753
- */
754
- refunds?: Array<OrderUpdateResponse.Refund>;
755
- /**
756
- * The shipping address of the user. This is only collected in express Checkouts.
757
- */
758
- shippingAddress?: OrderUpdateResponse.ShippingAddress;
759
- /**
760
- * The selected shipping method by the user. Can either be selected during an
761
- * express Checkout Session or passed during Checkout Session creation.
511
+ * All partial and total refunds of this order.
762
512
  */
763
- shippingMethod?: OrderUpdateResponse.ShippingMethod;
513
+ refunds?: Array<OrderRetrieveResponse.Refund>;
764
514
  /**
765
- * The logo of the shop provided as a URL.
515
+ * If set to true, a payment mandate will be created for the user. This is
516
+ * currently in alpha and defaults to false.
766
517
  */
518
+ setupPaymentMandate?: boolean;
519
+ shippingAddress?: OrderRetrieveResponse.ShippingAddress;
767
520
  shopLogo?: string;
768
521
  /**
769
- * The shopper object. Contains information collected from the user during the
770
- * Checkout.
522
+ * Information about the customer who finished the order.
771
523
  */
772
- shopper?: OrderUpdateResponse.Shopper;
524
+ shopper?: OrderRetrieveResponse.Shopper;
773
525
  /**
774
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
775
- * collected in the Checkout.
526
+ * Deprecated. The email of the customer who completed the order.
776
527
  */
777
528
  shopperEmail?: string;
778
- statusClassification?: OrderUpdateResponse.StatusClassification;
779
- /**
780
- * List of status history items for the order, used for logging every update on
781
- * status.
782
- */
783
- statusHistoryList?: Array<OrderUpdateResponse.StatusHistoryList>;
529
+ statusClassification?: OrderRetrieveResponse.StatusClassification;
530
+ statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
784
531
  /**
785
- * The subaccount id of the order.
532
+ * The subaccount id of the merchant.
786
533
  */
787
534
  subaccountId?: string;
788
- /**
789
- * The legal name of the subaccount
790
- */
791
535
  subaccountLegalName?: string;
792
- /**
793
- * @deprecated
794
- */
795
536
  trees?: number;
796
537
  }
797
- export declare namespace OrderUpdateResponse {
538
+ export declare namespace OrderRetrieveResponse {
798
539
  /**
799
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
800
- * represents EUR 10.23. Any amount of decimal places can be provided on
801
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
802
- * as this is the format accepted by most banks.
540
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
803
541
  */
804
542
  interface Price {
805
- currency: 'EUR' | 'GBP' | 'PLN';
806
- /**
807
- * The total amount to be paid.
808
- */
543
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
809
544
  total: number;
810
545
  shipping?: number;
811
546
  subTotal?: number;
812
547
  totalNet?: number;
813
548
  vat?: number;
814
549
  }
815
- /**
816
- * The billing address of the user. Required when handshake=true.
817
- */
818
550
  interface BillingAddress {
819
551
  city: string;
820
- /**
821
- * The country code in
822
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
823
- */
824
552
  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';
553
+ firstName: string;
554
+ lastName: string;
825
555
  line1: string;
556
+ line2: string;
557
+ region: string;
826
558
  zipCode: string;
827
- firstName?: string;
828
- lastName?: string;
829
- line2?: string;
830
- region?: string;
831
559
  }
832
- /**
833
- * @deprecated
834
- */
835
560
  interface ClimateActionMode {
836
561
  amount: number;
837
562
  type: 'transaction' | 'amount';
838
563
  }
564
+ /**
565
+ * The destination bank account and statement reference for the order.
566
+ */
567
+ interface Destination {
568
+ bankAccount: Destination.BankAccount;
569
+ /**
570
+ * The bank statement reference of the payment for the order. This is the reference
571
+ * that will be visible on the bank statement.
572
+ */
573
+ bankStatementReference: string;
574
+ }
575
+ namespace Destination {
576
+ interface BankAccount {
577
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
578
+ bankCode?: BankAccount.BankCode;
579
+ bban?: BankAccount.Bban;
580
+ iban?: BankAccount.Iban;
581
+ paymentReference?: string;
582
+ sortCode?: BankAccount.SortCode;
583
+ }
584
+ namespace BankAccount {
585
+ interface BankCode {
586
+ accountHolderName: string;
587
+ accountNumber: string;
588
+ code: string;
589
+ }
590
+ interface Bban {
591
+ accountHolderName: string;
592
+ bban: string;
593
+ bic?: string;
594
+ }
595
+ interface Iban {
596
+ accountHolderName: string;
597
+ iban: string;
598
+ bic?: string;
599
+ }
600
+ interface SortCode {
601
+ accountHolderName: string;
602
+ accountNumber: string;
603
+ sortCode: string;
604
+ }
605
+ }
606
+ }
839
607
  interface LineItem {
840
608
  /**
841
- * The total amount of all line items, i.e. single amount \* quantity. Given in
842
- * decimals, i.e. 10.23 represents EUR 10.23.
609
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
610
+ * and quantity 4, amount would be equal to 12.00.
843
611
  */
844
612
  amount: number;
845
613
  /**
846
- * The name of the line item.
614
+ * Customer-facing name of the line item.
847
615
  */
848
616
  name: string;
849
- /**
850
- * The quantity of the line item.
851
- */
852
- quantity: number;
853
- /**
854
- * The net amount of a single item.
855
- */
856
617
  singleNet: number;
857
- /**
858
- * The VAT amount of a single item.
859
- */
860
618
  singleVat: number;
861
- /**
862
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
863
- * the line item.
864
- */
865
- category?: string;
866
- /**
867
- * The
868
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
869
- * of the line item.
870
- */
619
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
620
+ co2Grams?: number;
871
621
  EAN?: string;
872
622
  /**
873
- * The image of the line item as a URL.
623
+ * An image of the line item. Valid URLs are accepted only.
874
624
  */
875
625
  image?: string;
876
626
  /**
877
- * The internal unique identifier of the line item.
627
+ * Quantity of this lineItem.
628
+ */
629
+ quantity?: number;
630
+ /**
631
+ * An internal unique id stored to this line item.
878
632
  */
879
633
  referenceId?: string;
880
634
  }
881
635
  interface Mandate {
882
- /**
883
- * The name of the account holder who signs the mandate.
884
- */
885
- accountHolderName?: string;
886
- /**
887
- * Additional information to display to the user during the mandate setup. This
888
- * information is not used to setup any recurrence on the mandate. It is only
889
- * displayed to the user during checkout.
890
- */
636
+ accountHolderName: string;
891
637
  additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
892
- /**
893
- * Mandate creditor data
894
- */
895
638
  creditor?: Mandate.Creditor;
896
- /**
897
- * The reference of the mandate going to be setup
898
- */
899
639
  reference?: string;
900
- /**
901
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
902
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
903
- * mandate setup request.
904
- */
905
640
  referenceId?: string;
906
- /**
907
- * If true, a ready to use mandate will be set up after the payment flow.
908
- */
909
641
  setup?: boolean;
910
- /**
911
- * The email of the user who signs the mandate.
912
- */
913
642
  userNotificationEmail?: string;
914
643
  }
915
644
  namespace Mandate {
916
- /**
917
- * Additional information to display to the user during the mandate setup. This
918
- * information is not used to setup any recurrence on the mandate. It is only
919
- * displayed to the user during checkout.
920
- */
921
645
  interface AdditionalDisplayInformation {
922
- /**
923
- * The intended cadence of charges used for displaying purpose only. On demand
924
- * would be used for unscheduled charges.
925
- */
926
646
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
927
647
  price?: AdditionalDisplayInformation.Price;
928
648
  }
929
649
  namespace AdditionalDisplayInformation {
930
650
  interface Price {
931
- /**
932
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
933
- * 10.23 EUR.
934
- */
935
- amount?: number;
936
- currency?: 'EUR' | 'GBP' | 'PLN';
651
+ amount: number;
652
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
937
653
  }
938
654
  }
939
- /**
940
- * Mandate creditor data
941
- */
942
655
  interface Creditor {
943
656
  id?: string;
944
657
  name?: string;
945
658
  }
946
659
  }
947
660
  /**
948
- * The destination bank account where the money will be sent to.
661
+ * The financial address of the merchant associated with the order. Only available
662
+ * when requested via order/details and therefore requires authentication.
949
663
  */
950
664
  interface MerchantFinancialAddress {
665
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
951
666
  bankCode?: MerchantFinancialAddress.BankCode;
952
667
  bban?: MerchantFinancialAddress.Bban;
953
668
  iban?: MerchantFinancialAddress.Iban;
954
- /**
955
- * The payment reference for the order. This is the reference that will be visible
956
- * on the bank statement.
957
- */
958
669
  paymentReference?: string;
959
670
  sortCode?: MerchantFinancialAddress.SortCode;
960
- /**
961
- * The type of the financial address. The actual destination is determined by this
962
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
963
- * validation will fail if you set e.g. type="iban", but then not fill any values
964
- * in the "iban" object.
965
- *
966
- * - iban: The IBAN of the account
967
- * - sort_code: The sort code of the account
968
- * - bank_code: The bank code of the account
969
- * - bban: The BBAN of the account
970
- */
971
- type?: string;
972
671
  }
973
672
  namespace MerchantFinancialAddress {
974
673
  interface BankCode {
975
- /**
976
- * The name of the account holder.
977
- */
978
674
  accountHolderName: string;
979
675
  accountNumber: string;
980
676
  code: string;
981
677
  }
982
678
  interface Bban {
983
- /**
984
- * The name of the account holder.
985
- */
986
679
  accountHolderName: string;
987
680
  bban: string;
988
681
  bic?: string;
989
682
  }
990
683
  interface Iban {
991
- /**
992
- * The name of the account holder.
993
- */
994
684
  accountHolderName: string;
995
685
  iban: string;
996
686
  bic?: string;
997
687
  }
998
688
  interface SortCode {
999
- /**
1000
- * The name of the account holder.
1001
- */
1002
689
  accountHolderName: string;
1003
690
  accountNumber: string;
1004
691
  sortCode: string;
1005
692
  }
1006
693
  }
1007
694
  /**
1008
- * The source bank account where the money is send from.
695
+ * The financial address of the payer associated with the order. Only available
696
+ * after successful PIS flow.
1009
697
  */
1010
698
  interface PayerFinancialAddress {
1011
- /**
1012
- * The type of the financial address. The actual destination is determined by this
1013
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1014
- * validation will fail if you set e.g. type="iban", but then not fill any values
1015
- * in the "iban" object.
1016
- *
1017
- * - iban: The IBAN of the account
1018
- * - sort_code: The sort code of the account
1019
- * - bank_code: The bank code of the account
1020
- * - bban: The BBAN of the account
1021
- */
1022
- type: string;
699
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1023
700
  bankCode?: PayerFinancialAddress.BankCode;
1024
701
  bban?: PayerFinancialAddress.Bban;
1025
702
  iban?: PayerFinancialAddress.Iban;
@@ -1029,211 +706,511 @@ export declare namespace OrderUpdateResponse {
1029
706
  interface BankCode {
1030
707
  accountNumber: string;
1031
708
  code: string;
1032
- /**
1033
- * The name of the account holder.
1034
- */
1035
709
  accountHolderName?: string;
1036
710
  }
1037
711
  interface Bban {
1038
712
  bban: string;
1039
- /**
1040
- * The name of the account holder.
1041
- */
1042
713
  accountHolderName?: string;
1043
714
  bic?: string;
1044
715
  }
1045
716
  interface Iban {
1046
717
  iban: string;
1047
- /**
1048
- * The name of the account holder.
1049
- */
1050
718
  accountHolderName?: string;
1051
719
  bic?: string;
1052
720
  }
1053
721
  interface SortCode {
1054
722
  accountNumber: string;
1055
723
  sortCode: string;
1056
- /**
1057
- * The name of the account holder.
1058
- */
1059
724
  accountHolderName?: string;
1060
725
  }
1061
726
  }
1062
- /**
1063
- * A Refund object. This corresponds to one Refund request.
1064
- */
1065
727
  interface Refund {
728
+ /**
729
+ * The unique id of this refund request.
730
+ */
1066
731
  id: string;
732
+ /**
733
+ * The amount of the refund in decimals.
734
+ */
1067
735
  amount: number;
1068
- createdAt: string;
736
+ createdAt: unknown;
737
+ /**
738
+ * The unique id of this refund request. This can be set when requesting the
739
+ * refund.
740
+ */
1069
741
  referenceId: string;
1070
742
  /**
1071
- * The status of the refund. Always use the status of the order as your source of
1072
- * truth to trigger actions in your dashboard.
743
+ * The current status of this refund.
1073
744
  */
1074
745
  status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1075
- updatedAt: string;
746
+ updatedAt: unknown;
747
+ /**
748
+ * The description of the refund.
749
+ */
1076
750
  description?: string;
1077
751
  }
1078
- /**
1079
- * The shipping address of the user. This is only collected in express Checkouts.
1080
- */
1081
752
  interface ShippingAddress {
1082
753
  city: string;
1083
- /**
1084
- * The country code in
1085
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1086
- */
1087
754
  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';
755
+ firstName: string;
756
+ lastName: string;
1088
757
  line1: string;
758
+ line2: string;
759
+ region: string;
1089
760
  zipCode: string;
1090
- firstName?: string;
1091
- lastName?: string;
1092
- line2?: string;
1093
- region?: string;
1094
761
  }
1095
762
  /**
1096
- * The selected shipping method by the user. Can either be selected during an
1097
- * express Checkout Session or passed during Checkout Session creation.
763
+ * Information about the customer who finished the order.
1098
764
  */
1099
- interface ShippingMethod {
1100
- /**
1101
- * The customer-facing name of the shipping method.
1102
- */
1103
- name: string;
765
+ interface Shopper {
766
+ email?: string;
767
+ phoneNumber?: string;
768
+ }
769
+ interface StatusClassification {
770
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
771
+ 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' | 'unsupported_bank_account';
772
+ }
773
+ interface StatusHistoryList {
774
+ createdAt: unknown;
775
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
776
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | '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';
777
+ updatedAt: unknown;
778
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
779
+ }
780
+ }
781
+ export interface OrderExpireResponse {
782
+ /**
783
+ * The unique id for the order.
784
+ */
785
+ id: string;
786
+ /**
787
+ * The unique id for the merchantApp which initiated the order.
788
+ */
789
+ appId: string;
790
+ /**
791
+ * The amount of application fee collected with the order.
792
+ */
793
+ applicationFeeAmount: number;
794
+ createdAt: unknown;
795
+ instantPaymentScheme: boolean;
796
+ /**
797
+ * Same as appId
798
+ */
799
+ merchantAppId: string;
800
+ merchantId: string;
801
+ /**
802
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
803
+ */
804
+ price: OrderExpireResponse.Price;
805
+ /**
806
+ * A unique id for the order which can be set when creating the checkoutSession.
807
+ */
808
+ referenceId: string;
809
+ /**
810
+ * The legal name of the merchant which initiated the order.
811
+ */
812
+ shopName: string;
813
+ /**
814
+ * The status of the order. As soon as this value is 'paid', you can ship the
815
+ * order.
816
+ */
817
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
818
+ updatedAt: unknown;
819
+ /**
820
+ * The unique identifier of the customer's bank.
821
+ */
822
+ bankId?: string;
823
+ /**
824
+ * The reference that will be shown on the bank statement of the customer. Only
825
+ * available after a successful DirectDebit initiation.
826
+ */
827
+ bankStatementReference?: string;
828
+ billingAddress?: OrderExpireResponse.BillingAddress;
829
+ /**
830
+ * The merchant category code for the account. MCCs are used to classify businesses
831
+ * based on the goods or services they provide.
832
+ */
833
+ category?: string;
834
+ climateActionMode?: OrderExpireResponse.ClimateActionMode;
835
+ co2Grams?: number;
836
+ /**
837
+ * The unique identifier of the customer who placed the order.
838
+ */
839
+ customerId?: string;
840
+ /**
841
+ * The destination bank account and statement reference for the order.
842
+ */
843
+ destination?: OrderExpireResponse.Destination;
844
+ /**
845
+ * The customer-facing id of the order.
846
+ */
847
+ displayId?: string;
848
+ guest?: boolean;
849
+ impactOffsetProjects?: Array<unknown>;
850
+ /**
851
+ * The list of line items sold with the order.
852
+ */
853
+ lineItems?: Array<OrderExpireResponse.LineItem>;
854
+ mandate?: OrderExpireResponse.Mandate;
855
+ /**
856
+ * The financial address of the merchant associated with the order. Only available
857
+ * when requested via order/details and therefore requires authentication.
858
+ */
859
+ merchantFinancialAddress?: OrderExpireResponse.MerchantFinancialAddress;
860
+ /**
861
+ * Set of key-value pairs that you can attach to an object. This can be useful for
862
+ * storing additional information about the object in a structured format.
863
+ */
864
+ metadata?: {
865
+ [key: string]: unknown;
866
+ };
867
+ /**
868
+ * The project related to the order.
869
+ */
870
+ offsetProject?: string;
871
+ /**
872
+ * The financial address of the payer associated with the order. Only available
873
+ * after successful PIS flow.
874
+ */
875
+ payerFinancialAddress?: OrderExpireResponse.PayerFinancialAddress;
876
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
877
+ /**
878
+ * The payment mode of the order. Can be either settlement or direct.
879
+ */
880
+ paymentMode?: 'direct' | 'settlement';
881
+ /**
882
+ * Deprecated. The status of the payment.
883
+ */
884
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
885
+ /**
886
+ * The total amount in the currency of all successful refunds for this order
887
+ */
888
+ refundAmount?: number;
889
+ /**
890
+ * All partial and total refunds of this order.
891
+ */
892
+ refunds?: Array<OrderExpireResponse.Refund>;
893
+ /**
894
+ * If set to true, a payment mandate will be created for the user. This is
895
+ * currently in alpha and defaults to false.
896
+ */
897
+ setupPaymentMandate?: boolean;
898
+ shippingAddress?: OrderExpireResponse.ShippingAddress;
899
+ shopLogo?: string;
900
+ /**
901
+ * Information about the customer who finished the order.
902
+ */
903
+ shopper?: OrderExpireResponse.Shopper;
904
+ /**
905
+ * Deprecated. The email of the customer who completed the order.
906
+ */
907
+ shopperEmail?: string;
908
+ statusClassification?: OrderExpireResponse.StatusClassification;
909
+ statusHistoryList?: Array<OrderExpireResponse.StatusHistoryList>;
910
+ /**
911
+ * The subaccount id of the merchant.
912
+ */
913
+ subaccountId?: string;
914
+ subaccountLegalName?: string;
915
+ trees?: number;
916
+ }
917
+ export declare namespace OrderExpireResponse {
918
+ /**
919
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
920
+ */
921
+ interface Price {
922
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
923
+ total: number;
924
+ shipping?: number;
925
+ subTotal?: number;
926
+ totalNet?: number;
927
+ vat?: number;
928
+ }
929
+ interface BillingAddress {
930
+ city: string;
931
+ 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';
932
+ firstName: string;
933
+ lastName: string;
934
+ line1: string;
935
+ line2: string;
936
+ region: string;
937
+ zipCode: string;
938
+ }
939
+ interface ClimateActionMode {
940
+ amount: number;
941
+ type: 'transaction' | 'amount';
942
+ }
943
+ /**
944
+ * The destination bank account and statement reference for the order.
945
+ */
946
+ interface Destination {
947
+ bankAccount: Destination.BankAccount;
1104
948
  /**
1105
- * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
949
+ * The bank statement reference of the payment for the order. This is the reference
950
+ * that will be visible on the bank statement.
1106
951
  */
1107
- price: number;
952
+ bankStatementReference: string;
953
+ }
954
+ namespace Destination {
955
+ interface BankAccount {
956
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
957
+ bankCode?: BankAccount.BankCode;
958
+ bban?: BankAccount.Bban;
959
+ iban?: BankAccount.Iban;
960
+ paymentReference?: string;
961
+ sortCode?: BankAccount.SortCode;
962
+ }
963
+ namespace BankAccount {
964
+ interface BankCode {
965
+ accountHolderName: string;
966
+ accountNumber: string;
967
+ code: string;
968
+ }
969
+ interface Bban {
970
+ accountHolderName: string;
971
+ bban: string;
972
+ bic?: string;
973
+ }
974
+ interface Iban {
975
+ accountHolderName: string;
976
+ iban: string;
977
+ bic?: string;
978
+ }
979
+ interface SortCode {
980
+ accountHolderName: string;
981
+ accountNumber: string;
982
+ sortCode: string;
983
+ }
984
+ }
985
+ }
986
+ interface LineItem {
1108
987
  /**
1109
- * The unique identifier of the shipping method within Ivy.
988
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
989
+ * and quantity 4, amount would be equal to 12.00.
1110
990
  */
1111
- id?: string;
991
+ amount: number;
1112
992
  /**
1113
- * The list of countries where the shipping method is available.
993
+ * Customer-facing name of the line item.
1114
994
  */
1115
- countries?: Array<'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'>;
995
+ name: string;
996
+ singleNet: number;
997
+ singleVat: number;
998
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
999
+ co2Grams?: number;
1000
+ EAN?: string;
1116
1001
  /**
1117
- * The delivery estimate of the shipping method.
1002
+ * An image of the line item. Valid URLs are accepted only.
1118
1003
  */
1119
- deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1004
+ image?: string;
1120
1005
  /**
1121
- * The unique identifier within your system of the shipping method.
1006
+ * Quantity of this lineItem.
1122
1007
  */
1123
- reference?: string;
1008
+ quantity?: number;
1124
1009
  /**
1125
- * @deprecated Deprecated in favor of deliveryEstimate
1010
+ * An internal unique id stored to this line item.
1126
1011
  */
1127
- timeFrame?: string;
1012
+ referenceId?: string;
1128
1013
  }
1129
- namespace ShippingMethod {
1130
- /**
1131
- * The delivery estimate of the shipping method.
1132
- */
1133
- interface DeliveryEstimate {
1134
- /**
1135
- * The maximum delivery time.
1136
- */
1137
- maximum?: DeliveryEstimate.Maximum;
1138
- /**
1139
- * The minimum delivery time.
1140
- */
1141
- minimum?: DeliveryEstimate.Minimum;
1014
+ interface Mandate {
1015
+ accountHolderName: string;
1016
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1017
+ creditor?: Mandate.Creditor;
1018
+ reference?: string;
1019
+ referenceId?: string;
1020
+ setup?: boolean;
1021
+ userNotificationEmail?: string;
1022
+ }
1023
+ namespace Mandate {
1024
+ interface AdditionalDisplayInformation {
1025
+ cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1026
+ price?: AdditionalDisplayInformation.Price;
1142
1027
  }
1143
- namespace DeliveryEstimate {
1144
- /**
1145
- * The maximum delivery time.
1146
- */
1147
- interface Maximum {
1148
- /**
1149
- * The unit of the time duration.
1150
- */
1151
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1152
- /**
1153
- * The value of the time duration.
1154
- */
1155
- value: number;
1156
- }
1157
- /**
1158
- * The minimum delivery time.
1159
- */
1160
- interface Minimum {
1161
- /**
1162
- * The unit of the time duration.
1163
- */
1164
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1165
- /**
1166
- * The value of the time duration.
1167
- */
1168
- value: number;
1028
+ namespace AdditionalDisplayInformation {
1029
+ interface Price {
1030
+ amount: number;
1031
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1169
1032
  }
1170
1033
  }
1034
+ interface Creditor {
1035
+ id?: string;
1036
+ name?: string;
1037
+ }
1171
1038
  }
1172
1039
  /**
1173
- * The shopper object. Contains information collected from the user during the
1174
- * Checkout.
1040
+ * The financial address of the merchant associated with the order. Only available
1041
+ * when requested via order/details and therefore requires authentication.
1175
1042
  */
1176
- interface Shopper {
1177
- email?: string;
1178
- phoneNumber?: string;
1043
+ interface MerchantFinancialAddress {
1044
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1045
+ bankCode?: MerchantFinancialAddress.BankCode;
1046
+ bban?: MerchantFinancialAddress.Bban;
1047
+ iban?: MerchantFinancialAddress.Iban;
1048
+ paymentReference?: string;
1049
+ sortCode?: MerchantFinancialAddress.SortCode;
1179
1050
  }
1180
- interface StatusClassification {
1051
+ namespace MerchantFinancialAddress {
1052
+ interface BankCode {
1053
+ accountHolderName: string;
1054
+ accountNumber: string;
1055
+ code: string;
1056
+ }
1057
+ interface Bban {
1058
+ accountHolderName: string;
1059
+ bban: string;
1060
+ bic?: string;
1061
+ }
1062
+ interface Iban {
1063
+ accountHolderName: string;
1064
+ iban: string;
1065
+ bic?: string;
1066
+ }
1067
+ interface SortCode {
1068
+ accountHolderName: string;
1069
+ accountNumber: string;
1070
+ sortCode: string;
1071
+ }
1072
+ }
1073
+ /**
1074
+ * The financial address of the payer associated with the order. Only available
1075
+ * after successful PIS flow.
1076
+ */
1077
+ interface PayerFinancialAddress {
1078
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1079
+ bankCode?: PayerFinancialAddress.BankCode;
1080
+ bban?: PayerFinancialAddress.Bban;
1081
+ iban?: PayerFinancialAddress.Iban;
1082
+ sortCode?: PayerFinancialAddress.SortCode;
1083
+ }
1084
+ namespace PayerFinancialAddress {
1085
+ interface BankCode {
1086
+ accountNumber: string;
1087
+ code: string;
1088
+ accountHolderName?: string;
1089
+ }
1090
+ interface Bban {
1091
+ bban: string;
1092
+ accountHolderName?: string;
1093
+ bic?: string;
1094
+ }
1095
+ interface Iban {
1096
+ iban: string;
1097
+ accountHolderName?: string;
1098
+ bic?: string;
1099
+ }
1100
+ interface SortCode {
1101
+ accountNumber: string;
1102
+ sortCode: string;
1103
+ accountHolderName?: string;
1104
+ }
1105
+ }
1106
+ interface Refund {
1181
1107
  /**
1182
- * Populated with the primary payment initiation failure classsification if
1183
- * available.
1108
+ * The unique id of this refund request.
1184
1109
  */
1185
- primary?: string;
1110
+ id: string;
1186
1111
  /**
1187
- * Populated with the secondary payment initiation failure classsification if
1188
- * available.
1112
+ * The amount of the refund in decimals.
1189
1113
  */
1190
- secondary?: string;
1191
- }
1192
- interface StatusHistoryList {
1114
+ amount: number;
1115
+ createdAt: unknown;
1193
1116
  /**
1194
- * The order status. This status symbolises the state of the user's payment
1195
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1196
- * information.
1117
+ * The unique id of this refund request. This can be set when requesting the
1118
+ * refund.
1197
1119
  */
1198
- currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1199
- reason: string;
1200
- updatedAt: string;
1120
+ referenceId: string;
1121
+ /**
1122
+ * The current status of this refund.
1123
+ */
1124
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1125
+ updatedAt: unknown;
1201
1126
  /**
1202
- * The order status. This status symbolises the state of the user's payment
1203
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1204
- * information.
1127
+ * The description of the refund.
1205
1128
  */
1129
+ description?: string;
1130
+ }
1131
+ interface ShippingAddress {
1132
+ city: string;
1133
+ 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';
1134
+ firstName: string;
1135
+ lastName: string;
1136
+ line1: string;
1137
+ line2: string;
1138
+ region: string;
1139
+ zipCode: string;
1140
+ }
1141
+ /**
1142
+ * Information about the customer who finished the order.
1143
+ */
1144
+ interface Shopper {
1145
+ email?: string;
1146
+ phoneNumber?: string;
1147
+ }
1148
+ interface StatusClassification {
1149
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1150
+ 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' | 'unsupported_bank_account';
1151
+ }
1152
+ interface StatusHistoryList {
1153
+ createdAt: unknown;
1154
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1155
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | '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';
1156
+ updatedAt: unknown;
1206
1157
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
1207
1158
  }
1208
1159
  }
1209
- export interface OrderRetrieveParams {
1210
- id: string;
1211
- }
1212
- export interface OrderUpdateParams {
1213
- id: string;
1160
+ export interface OrderCreateParams {
1214
1161
  /**
1215
- * The customer-facing id of the order. This id will also be shown next to the
1216
- * orders in the Ivy Dashboard.
1162
+ * The total amount of the order
1217
1163
  */
1218
- displayId?: string;
1164
+ amount: number;
1219
1165
  /**
1220
- * An internal reference id which will be stored with the checkout & corresponding
1221
- * order. Needs to be unique per shop per order and can be up to 200 characters. We
1222
- * recommend to use your internal order id here.
1166
+ * The currency code of the order
1223
1167
  */
1224
- referenceId?: string;
1168
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1225
1169
  /**
1226
- * The customer-facing name of the shop.
1170
+ * The merchant's unique reference ID for the order
1227
1171
  */
1228
- shopName?: string;
1172
+ referenceId: string;
1173
+ /**
1174
+ * The customer of the merchant.
1175
+ */
1176
+ customer?: OrderCreateParams.Customer;
1177
+ /**
1178
+ * Optional expiration timestamp in seconds
1179
+ */
1180
+ expiresAt?: string;
1181
+ /**
1182
+ * The subaccount id of the merchant.
1183
+ */
1184
+ subaccountId?: string;
1185
+ }
1186
+ export declare namespace OrderCreateParams {
1229
1187
  /**
1230
- * The order status. This status symbolises the state of the user's payment
1231
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1232
- * information.
1188
+ * The customer of the merchant.
1233
1189
  */
1234
- status?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1190
+ interface Customer {
1191
+ /**
1192
+ * The Ivy id of the customer.
1193
+ */
1194
+ id?: string;
1195
+ /**
1196
+ * The email of the customer.
1197
+ */
1198
+ email?: string;
1199
+ }
1200
+ }
1201
+ export interface OrderRetrieveParams {
1202
+ /**
1203
+ * You can put in either the Ivy id OR the referenceId of the order
1204
+ */
1205
+ id: string;
1206
+ }
1207
+ export interface OrderExpireParams {
1208
+ /**
1209
+ * You can put in either the Ivy id OR the referenceId of the order
1210
+ */
1211
+ id: string;
1235
1212
  }
1236
1213
  export declare namespace Orders {
1237
- export { type OrderRetrieveResponse as OrderRetrieveResponse, type OrderUpdateResponse as OrderUpdateResponse, type OrderRetrieveParams as OrderRetrieveParams, type OrderUpdateParams as OrderUpdateParams, };
1214
+ export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderExpireResponse as OrderExpireResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, type OrderExpireParams as OrderExpireParams, };
1238
1215
  }
1239
1216
  //# sourceMappingURL=orders.d.ts.map