@getivy/node-sdk 0.1.0-alpha.3 → 0.1.0-alpha.30
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.
- package/CHANGELOG.md +310 -0
- package/README.md +2 -2
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +12 -1
- package/core.d.ts.map +1 -1
- package/core.js +20 -11
- package/core.js.map +1 -1
- package/core.mjs +21 -12
- package/core.mjs.map +1 -1
- package/index.d.mts +8 -2
- package/index.d.ts +8 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balance.d.ts +2 -2
- package/resources/balance.d.ts.map +1 -1
- package/resources/banks.d.ts +53 -5
- package/resources/banks.d.ts.map +1 -1
- package/resources/charges.d.ts +1 -14
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +451 -1312
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +56 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +3 -2
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +3 -2
- package/resources/customers.mjs.map +1 -1
- package/resources/data/accounts.d.ts +104 -0
- package/resources/data/accounts.d.ts.map +1 -0
- package/resources/data/accounts.js +15 -0
- package/resources/data/accounts.js.map +1 -0
- package/resources/data/accounts.mjs +11 -0
- package/resources/data/accounts.mjs.map +1 -0
- package/resources/data/balances.d.ts +45 -0
- package/resources/data/balances.d.ts.map +1 -0
- package/resources/data/balances.js +15 -0
- package/resources/data/balances.js.map +1 -0
- package/resources/data/balances.mjs +11 -0
- package/resources/data/balances.mjs.map +1 -0
- package/resources/data/consent.d.ts +80 -0
- package/resources/data/consent.d.ts.map +1 -0
- package/resources/data/consent.js +21 -0
- package/resources/data/consent.js.map +1 -0
- package/resources/data/consent.mjs +17 -0
- package/resources/data/consent.mjs.map +1 -0
- package/resources/data/data.d.ts +26 -0
- package/resources/data/data.d.ts.map +1 -0
- package/resources/data/data.js +55 -0
- package/resources/data/data.js.map +1 -0
- package/resources/data/data.mjs +28 -0
- package/resources/data/data.mjs.map +1 -0
- package/resources/data/index.d.ts +7 -0
- package/resources/data/index.d.ts.map +1 -0
- package/resources/data/index.js +17 -0
- package/resources/data/index.js.map +1 -0
- package/resources/data/index.mjs +8 -0
- package/resources/data/index.mjs.map +1 -0
- package/resources/data/session.d.ts +233 -0
- package/resources/data/session.d.ts.map +1 -0
- package/resources/data/session.js +21 -0
- package/resources/data/session.js.map +1 -0
- package/resources/data/session.mjs +17 -0
- package/resources/data/session.mjs.map +1 -0
- package/resources/data/transactions.d.ts +54 -0
- package/resources/data/transactions.d.ts.map +1 -0
- package/resources/data/transactions.js +16 -0
- package/resources/data/transactions.js.map +1 -0
- package/resources/data/transactions.mjs +12 -0
- package/resources/data/transactions.mjs.map +1 -0
- package/resources/data.d.ts +2 -0
- package/resources/data.d.ts.map +1 -0
- package/resources/data.js +19 -0
- package/resources/data.js.map +1 -0
- package/resources/data.mjs +3 -0
- package/resources/data.mjs.map +1 -0
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.ts +251 -105
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +10 -6
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +10 -6
- package/resources/orders.mjs.map +1 -1
- package/resources/payouts.d.ts +2 -2
- package/resources/payouts.d.ts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reports.d.ts +2 -2
- package/resources/reports.d.ts.map +1 -1
- package/resources/webhooksubscription.d.ts +155 -0
- package/resources/webhooksubscription.d.ts.map +1 -0
- package/resources/webhooksubscription.js +42 -0
- package/resources/webhooksubscription.js.map +1 -0
- package/resources/webhooksubscription.mjs +38 -0
- package/resources/webhooksubscription.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +39 -12
- package/src/index.ts +38 -4
- package/src/resources/balance.ts +2 -2
- package/src/resources/banks.ts +92 -5
- package/src/resources/charges.ts +1 -14
- package/src/resources/checkoutsession.ts +2100 -4413
- package/src/resources/customers.ts +61 -6
- package/src/resources/data/accounts.ts +134 -0
- package/src/resources/data/balances.ts +57 -0
- package/src/resources/data/consent.ts +110 -0
- package/src/resources/data/data.ts +75 -0
- package/src/resources/data/index.ts +20 -0
- package/src/resources/data/session.ts +1298 -0
- package/src/resources/data/transactions.ts +71 -0
- package/src/resources/data.ts +3 -0
- package/src/resources/index.ts +16 -2
- package/src/resources/orders.ts +296 -122
- package/src/resources/payouts.ts +2 -2
- package/src/resources/refunds.ts +0 -1
- package/src/resources/reports.ts +2 -2
- package/src/resources/webhooksubscription.ts +353 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/orders.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
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
|
|
7
15
|
* Checkout Session to the `id` field.
|
|
8
16
|
*/
|
|
9
17
|
retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Update certain fields of the specified order.
|
|
12
|
-
*/
|
|
13
|
-
update(body: OrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<OrderUpdateResponse>;
|
|
14
18
|
}
|
|
15
|
-
export interface
|
|
19
|
+
export interface OrderCreateResponse {
|
|
16
20
|
/**
|
|
17
21
|
* The Ivy unique identifier for the order.
|
|
18
22
|
*/
|
|
@@ -38,12 +42,12 @@ export interface OrderRetrieveResponse {
|
|
|
38
42
|
*/
|
|
39
43
|
merchantId: string;
|
|
40
44
|
/**
|
|
41
|
-
* The
|
|
45
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
42
46
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
43
47
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
44
48
|
* as this is the format accepted by most banks.
|
|
45
49
|
*/
|
|
46
|
-
price:
|
|
50
|
+
price: OrderCreateResponse.Price;
|
|
47
51
|
/**
|
|
48
52
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
49
53
|
* order. Needs to be unique per shop per order and can be up to 200 characters.
|
|
@@ -58,17 +62,22 @@ export interface OrderRetrieveResponse {
|
|
|
58
62
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
59
63
|
* information.
|
|
60
64
|
*/
|
|
61
|
-
status: 'failed' | 'canceled' | 'processing' | '
|
|
65
|
+
status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
62
66
|
updatedAt: string;
|
|
63
67
|
/**
|
|
64
|
-
* The
|
|
65
|
-
*
|
|
68
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
69
|
+
* if no payment was made.
|
|
70
|
+
*/
|
|
71
|
+
bankId?: string;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
74
|
+
* the reference that will be visible on the bank statement.
|
|
66
75
|
*/
|
|
67
76
|
bankStatementReference?: string;
|
|
68
77
|
/**
|
|
69
78
|
* The billing address of the user. Required when handshake=true.
|
|
70
79
|
*/
|
|
71
|
-
billingAddress?:
|
|
80
|
+
billingAddress?: OrderCreateResponse.BillingAddress;
|
|
72
81
|
/**
|
|
73
82
|
* The merchant category code or
|
|
74
83
|
* [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
|
|
@@ -77,7 +86,7 @@ export interface OrderRetrieveResponse {
|
|
|
77
86
|
/**
|
|
78
87
|
* @deprecated
|
|
79
88
|
*/
|
|
80
|
-
climateActionMode?:
|
|
89
|
+
climateActionMode?: OrderCreateResponse.ClimateActionMode;
|
|
81
90
|
/**
|
|
82
91
|
* @deprecated
|
|
83
92
|
*/
|
|
@@ -86,6 +95,7 @@ export interface OrderRetrieveResponse {
|
|
|
86
95
|
* The unique identifier of the customer who placed the order.
|
|
87
96
|
*/
|
|
88
97
|
customerId?: string;
|
|
98
|
+
destination?: OrderCreateResponse.Destination;
|
|
89
99
|
/**
|
|
90
100
|
* The customer facing id. This id is displayed to the user during the checkout and
|
|
91
101
|
* in the merchant dashboard.
|
|
@@ -111,12 +121,12 @@ export interface OrderRetrieveResponse {
|
|
|
111
121
|
/**
|
|
112
122
|
* The line items of the Checkout.
|
|
113
123
|
*/
|
|
114
|
-
lineItems?: Array<
|
|
115
|
-
mandate?:
|
|
124
|
+
lineItems?: Array<OrderCreateResponse.LineItem>;
|
|
125
|
+
mandate?: OrderCreateResponse.Mandate;
|
|
116
126
|
/**
|
|
117
|
-
*
|
|
127
|
+
* @deprecated
|
|
118
128
|
*/
|
|
119
|
-
merchantFinancialAddress?:
|
|
129
|
+
merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
|
|
120
130
|
/**
|
|
121
131
|
* Any data which will be stored and returned for this checkout session and
|
|
122
132
|
* corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
|
|
@@ -131,8 +141,8 @@ export interface OrderRetrieveResponse {
|
|
|
131
141
|
/**
|
|
132
142
|
* The source bank account where the money is send from.
|
|
133
143
|
*/
|
|
134
|
-
payerFinancialAddress?:
|
|
135
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
144
|
+
payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
|
|
145
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
136
146
|
/**
|
|
137
147
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
138
148
|
*/
|
|
@@ -141,7 +151,7 @@ export interface OrderRetrieveResponse {
|
|
|
141
151
|
* @deprecated Deprecated in favor of `status`. Do not use this field to trigger
|
|
142
152
|
* actions in your system.
|
|
143
153
|
*/
|
|
144
|
-
paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
|
|
154
|
+
paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
|
|
145
155
|
/**
|
|
146
156
|
* The total amount in the currency of all successful refunds for this order
|
|
147
157
|
*/
|
|
@@ -149,16 +159,16 @@ export interface OrderRetrieveResponse {
|
|
|
149
159
|
/**
|
|
150
160
|
* The list of refunds connected to this order.
|
|
151
161
|
*/
|
|
152
|
-
refunds?: Array<
|
|
162
|
+
refunds?: Array<OrderCreateResponse.Refund>;
|
|
153
163
|
/**
|
|
154
164
|
* The shipping address of the user. This is only collected in express Checkouts.
|
|
155
165
|
*/
|
|
156
|
-
shippingAddress?:
|
|
166
|
+
shippingAddress?: OrderCreateResponse.ShippingAddress;
|
|
157
167
|
/**
|
|
158
168
|
* The selected shipping method by the user. Can either be selected during an
|
|
159
169
|
* express Checkout Session or passed during Checkout Session creation.
|
|
160
170
|
*/
|
|
161
|
-
shippingMethod?:
|
|
171
|
+
shippingMethod?: OrderCreateResponse.ShippingMethod;
|
|
162
172
|
/**
|
|
163
173
|
* The logo of the shop provided as a URL.
|
|
164
174
|
*/
|
|
@@ -167,18 +177,18 @@ export interface OrderRetrieveResponse {
|
|
|
167
177
|
* The shopper object. Contains information collected from the user during the
|
|
168
178
|
* Checkout.
|
|
169
179
|
*/
|
|
170
|
-
shopper?:
|
|
180
|
+
shopper?: OrderCreateResponse.Shopper;
|
|
171
181
|
/**
|
|
172
182
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
173
183
|
* collected in the Checkout.
|
|
174
184
|
*/
|
|
175
185
|
shopperEmail?: string;
|
|
176
|
-
statusClassification?:
|
|
186
|
+
statusClassification?: OrderCreateResponse.StatusClassification;
|
|
177
187
|
/**
|
|
178
188
|
* List of status history items for the order, used for logging every update on
|
|
179
189
|
* status.
|
|
180
190
|
*/
|
|
181
|
-
statusHistoryList?: Array<
|
|
191
|
+
statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
|
|
182
192
|
/**
|
|
183
193
|
* The subaccount id of the order.
|
|
184
194
|
*/
|
|
@@ -192,35 +202,22 @@ export interface OrderRetrieveResponse {
|
|
|
192
202
|
*/
|
|
193
203
|
trees?: number;
|
|
194
204
|
}
|
|
195
|
-
export declare namespace
|
|
205
|
+
export declare namespace OrderCreateResponse {
|
|
196
206
|
/**
|
|
197
|
-
* The
|
|
207
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
198
208
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
199
209
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
200
210
|
* as this is the format accepted by most banks.
|
|
201
211
|
*/
|
|
202
212
|
interface Price {
|
|
203
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
213
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
204
214
|
/**
|
|
205
215
|
* The total amount to be paid.
|
|
206
216
|
*/
|
|
207
217
|
total: number;
|
|
208
|
-
/**
|
|
209
|
-
* The shipping amount.
|
|
210
|
-
*/
|
|
211
218
|
shipping?: number;
|
|
212
|
-
/**
|
|
213
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
214
|
-
*/
|
|
215
219
|
subTotal?: number;
|
|
216
|
-
/**
|
|
217
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
218
|
-
* to 2 decimal places for the actual transfer.
|
|
219
|
-
*/
|
|
220
220
|
totalNet?: number;
|
|
221
|
-
/**
|
|
222
|
-
* The VAT amount.
|
|
223
|
-
*/
|
|
224
221
|
vat?: number;
|
|
225
222
|
}
|
|
226
223
|
/**
|
|
@@ -247,6 +244,76 @@ export declare namespace OrderRetrieveResponse {
|
|
|
247
244
|
amount: number;
|
|
248
245
|
type: 'transaction' | 'amount';
|
|
249
246
|
}
|
|
247
|
+
interface Destination {
|
|
248
|
+
/**
|
|
249
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
250
|
+
* to "iban", the "iban" object must be filled out.
|
|
251
|
+
*/
|
|
252
|
+
bankAccount: Destination.BankAccount;
|
|
253
|
+
/**
|
|
254
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
255
|
+
* that will be visible on the bank statement.
|
|
256
|
+
*/
|
|
257
|
+
bankStatementReference: string;
|
|
258
|
+
}
|
|
259
|
+
namespace Destination {
|
|
260
|
+
/**
|
|
261
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
262
|
+
* to "iban", the "iban" object must be filled out.
|
|
263
|
+
*/
|
|
264
|
+
interface BankAccount {
|
|
265
|
+
/**
|
|
266
|
+
* The type of the financial address. The actual destination is determined by this
|
|
267
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
268
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
269
|
+
* in the "iban" object.
|
|
270
|
+
*
|
|
271
|
+
* - iban: The IBAN of the account
|
|
272
|
+
* - sort_code: The sort code of the account
|
|
273
|
+
* - bank_code: The bank code of the account
|
|
274
|
+
* - bban: The BBAN of the account
|
|
275
|
+
*/
|
|
276
|
+
type: string;
|
|
277
|
+
bankCode?: BankAccount.BankCode;
|
|
278
|
+
bban?: BankAccount.Bban;
|
|
279
|
+
iban?: BankAccount.Iban;
|
|
280
|
+
sortCode?: BankAccount.SortCode;
|
|
281
|
+
}
|
|
282
|
+
namespace BankAccount {
|
|
283
|
+
interface BankCode {
|
|
284
|
+
/**
|
|
285
|
+
* The name of the account holder.
|
|
286
|
+
*/
|
|
287
|
+
accountHolderName: string;
|
|
288
|
+
accountNumber: string;
|
|
289
|
+
code: string;
|
|
290
|
+
}
|
|
291
|
+
interface Bban {
|
|
292
|
+
/**
|
|
293
|
+
* The name of the account holder.
|
|
294
|
+
*/
|
|
295
|
+
accountHolderName: string;
|
|
296
|
+
bban: string;
|
|
297
|
+
bic?: string;
|
|
298
|
+
}
|
|
299
|
+
interface Iban {
|
|
300
|
+
/**
|
|
301
|
+
* The name of the account holder.
|
|
302
|
+
*/
|
|
303
|
+
accountHolderName: string;
|
|
304
|
+
iban: string;
|
|
305
|
+
bic?: string;
|
|
306
|
+
}
|
|
307
|
+
interface SortCode {
|
|
308
|
+
/**
|
|
309
|
+
* The name of the account holder.
|
|
310
|
+
*/
|
|
311
|
+
accountHolderName: string;
|
|
312
|
+
accountNumber: string;
|
|
313
|
+
sortCode: string;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
250
317
|
interface LineItem {
|
|
251
318
|
/**
|
|
252
319
|
* The total amount of all line items, i.e. single amount \* quantity. Given in
|
|
@@ -344,7 +411,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
344
411
|
* 10.23 EUR.
|
|
345
412
|
*/
|
|
346
413
|
amount?: number;
|
|
347
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
414
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
348
415
|
}
|
|
349
416
|
}
|
|
350
417
|
/**
|
|
@@ -356,7 +423,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
356
423
|
}
|
|
357
424
|
}
|
|
358
425
|
/**
|
|
359
|
-
*
|
|
426
|
+
* @deprecated
|
|
360
427
|
*/
|
|
361
428
|
interface MerchantFinancialAddress {
|
|
362
429
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -606,7 +673,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
606
673
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
607
674
|
* information.
|
|
608
675
|
*/
|
|
609
|
-
currentStatus: 'failed' | 'canceled' | 'processing' | '
|
|
676
|
+
currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
610
677
|
reason: string;
|
|
611
678
|
updatedAt: string;
|
|
612
679
|
/**
|
|
@@ -614,10 +681,10 @@ export declare namespace OrderRetrieveResponse {
|
|
|
614
681
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
615
682
|
* information.
|
|
616
683
|
*/
|
|
617
|
-
previousStatus?: 'failed' | 'canceled' | 'processing' | '
|
|
684
|
+
previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
|
|
618
685
|
}
|
|
619
686
|
}
|
|
620
|
-
export interface
|
|
687
|
+
export interface OrderRetrieveResponse {
|
|
621
688
|
/**
|
|
622
689
|
* The Ivy unique identifier for the order.
|
|
623
690
|
*/
|
|
@@ -643,12 +710,12 @@ export interface OrderUpdateResponse {
|
|
|
643
710
|
*/
|
|
644
711
|
merchantId: string;
|
|
645
712
|
/**
|
|
646
|
-
* The
|
|
713
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
647
714
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
648
715
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
649
716
|
* as this is the format accepted by most banks.
|
|
650
717
|
*/
|
|
651
|
-
price:
|
|
718
|
+
price: OrderRetrieveResponse.Price;
|
|
652
719
|
/**
|
|
653
720
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
654
721
|
* order. Needs to be unique per shop per order and can be up to 200 characters.
|
|
@@ -663,17 +730,22 @@ export interface OrderUpdateResponse {
|
|
|
663
730
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
664
731
|
* information.
|
|
665
732
|
*/
|
|
666
|
-
status: 'failed' | 'canceled' | 'processing' | '
|
|
733
|
+
status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
667
734
|
updatedAt: string;
|
|
668
735
|
/**
|
|
669
|
-
* The
|
|
670
|
-
*
|
|
736
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
737
|
+
* if no payment was made.
|
|
738
|
+
*/
|
|
739
|
+
bankId?: string;
|
|
740
|
+
/**
|
|
741
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
742
|
+
* the reference that will be visible on the bank statement.
|
|
671
743
|
*/
|
|
672
744
|
bankStatementReference?: string;
|
|
673
745
|
/**
|
|
674
746
|
* The billing address of the user. Required when handshake=true.
|
|
675
747
|
*/
|
|
676
|
-
billingAddress?:
|
|
748
|
+
billingAddress?: OrderRetrieveResponse.BillingAddress;
|
|
677
749
|
/**
|
|
678
750
|
* The merchant category code or
|
|
679
751
|
* [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
|
|
@@ -682,7 +754,7 @@ export interface OrderUpdateResponse {
|
|
|
682
754
|
/**
|
|
683
755
|
* @deprecated
|
|
684
756
|
*/
|
|
685
|
-
climateActionMode?:
|
|
757
|
+
climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
|
|
686
758
|
/**
|
|
687
759
|
* @deprecated
|
|
688
760
|
*/
|
|
@@ -691,6 +763,7 @@ export interface OrderUpdateResponse {
|
|
|
691
763
|
* The unique identifier of the customer who placed the order.
|
|
692
764
|
*/
|
|
693
765
|
customerId?: string;
|
|
766
|
+
destination?: OrderRetrieveResponse.Destination;
|
|
694
767
|
/**
|
|
695
768
|
* The customer facing id. This id is displayed to the user during the checkout and
|
|
696
769
|
* in the merchant dashboard.
|
|
@@ -716,12 +789,12 @@ export interface OrderUpdateResponse {
|
|
|
716
789
|
/**
|
|
717
790
|
* The line items of the Checkout.
|
|
718
791
|
*/
|
|
719
|
-
lineItems?: Array<
|
|
720
|
-
mandate?:
|
|
792
|
+
lineItems?: Array<OrderRetrieveResponse.LineItem>;
|
|
793
|
+
mandate?: OrderRetrieveResponse.Mandate;
|
|
721
794
|
/**
|
|
722
|
-
*
|
|
795
|
+
* @deprecated
|
|
723
796
|
*/
|
|
724
|
-
merchantFinancialAddress?:
|
|
797
|
+
merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
|
|
725
798
|
/**
|
|
726
799
|
* Any data which will be stored and returned for this checkout session and
|
|
727
800
|
* corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
|
|
@@ -736,8 +809,8 @@ export interface OrderUpdateResponse {
|
|
|
736
809
|
/**
|
|
737
810
|
* The source bank account where the money is send from.
|
|
738
811
|
*/
|
|
739
|
-
payerFinancialAddress?:
|
|
740
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
812
|
+
payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
|
|
813
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
741
814
|
/**
|
|
742
815
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
743
816
|
*/
|
|
@@ -746,7 +819,7 @@ export interface OrderUpdateResponse {
|
|
|
746
819
|
* @deprecated Deprecated in favor of `status`. Do not use this field to trigger
|
|
747
820
|
* actions in your system.
|
|
748
821
|
*/
|
|
749
|
-
paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
|
|
822
|
+
paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
|
|
750
823
|
/**
|
|
751
824
|
* The total amount in the currency of all successful refunds for this order
|
|
752
825
|
*/
|
|
@@ -754,16 +827,16 @@ export interface OrderUpdateResponse {
|
|
|
754
827
|
/**
|
|
755
828
|
* The list of refunds connected to this order.
|
|
756
829
|
*/
|
|
757
|
-
refunds?: Array<
|
|
830
|
+
refunds?: Array<OrderRetrieveResponse.Refund>;
|
|
758
831
|
/**
|
|
759
832
|
* The shipping address of the user. This is only collected in express Checkouts.
|
|
760
833
|
*/
|
|
761
|
-
shippingAddress?:
|
|
834
|
+
shippingAddress?: OrderRetrieveResponse.ShippingAddress;
|
|
762
835
|
/**
|
|
763
836
|
* The selected shipping method by the user. Can either be selected during an
|
|
764
837
|
* express Checkout Session or passed during Checkout Session creation.
|
|
765
838
|
*/
|
|
766
|
-
shippingMethod?:
|
|
839
|
+
shippingMethod?: OrderRetrieveResponse.ShippingMethod;
|
|
767
840
|
/**
|
|
768
841
|
* The logo of the shop provided as a URL.
|
|
769
842
|
*/
|
|
@@ -772,18 +845,18 @@ export interface OrderUpdateResponse {
|
|
|
772
845
|
* The shopper object. Contains information collected from the user during the
|
|
773
846
|
* Checkout.
|
|
774
847
|
*/
|
|
775
|
-
shopper?:
|
|
848
|
+
shopper?: OrderRetrieveResponse.Shopper;
|
|
776
849
|
/**
|
|
777
850
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
778
851
|
* collected in the Checkout.
|
|
779
852
|
*/
|
|
780
853
|
shopperEmail?: string;
|
|
781
|
-
statusClassification?:
|
|
854
|
+
statusClassification?: OrderRetrieveResponse.StatusClassification;
|
|
782
855
|
/**
|
|
783
856
|
* List of status history items for the order, used for logging every update on
|
|
784
857
|
* status.
|
|
785
858
|
*/
|
|
786
|
-
statusHistoryList?: Array<
|
|
859
|
+
statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
|
|
787
860
|
/**
|
|
788
861
|
* The subaccount id of the order.
|
|
789
862
|
*/
|
|
@@ -797,35 +870,22 @@ export interface OrderUpdateResponse {
|
|
|
797
870
|
*/
|
|
798
871
|
trees?: number;
|
|
799
872
|
}
|
|
800
|
-
export declare namespace
|
|
873
|
+
export declare namespace OrderRetrieveResponse {
|
|
801
874
|
/**
|
|
802
|
-
* The
|
|
875
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
803
876
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
804
877
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
805
878
|
* as this is the format accepted by most banks.
|
|
806
879
|
*/
|
|
807
880
|
interface Price {
|
|
808
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
881
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
809
882
|
/**
|
|
810
883
|
* The total amount to be paid.
|
|
811
884
|
*/
|
|
812
885
|
total: number;
|
|
813
|
-
/**
|
|
814
|
-
* The shipping amount.
|
|
815
|
-
*/
|
|
816
886
|
shipping?: number;
|
|
817
|
-
/**
|
|
818
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
819
|
-
*/
|
|
820
887
|
subTotal?: number;
|
|
821
|
-
/**
|
|
822
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
823
|
-
* to 2 decimal places for the actual transfer.
|
|
824
|
-
*/
|
|
825
888
|
totalNet?: number;
|
|
826
|
-
/**
|
|
827
|
-
* The VAT amount.
|
|
828
|
-
*/
|
|
829
889
|
vat?: number;
|
|
830
890
|
}
|
|
831
891
|
/**
|
|
@@ -852,6 +912,76 @@ export declare namespace OrderUpdateResponse {
|
|
|
852
912
|
amount: number;
|
|
853
913
|
type: 'transaction' | 'amount';
|
|
854
914
|
}
|
|
915
|
+
interface Destination {
|
|
916
|
+
/**
|
|
917
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
918
|
+
* to "iban", the "iban" object must be filled out.
|
|
919
|
+
*/
|
|
920
|
+
bankAccount: Destination.BankAccount;
|
|
921
|
+
/**
|
|
922
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
923
|
+
* that will be visible on the bank statement.
|
|
924
|
+
*/
|
|
925
|
+
bankStatementReference: string;
|
|
926
|
+
}
|
|
927
|
+
namespace Destination {
|
|
928
|
+
/**
|
|
929
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
930
|
+
* to "iban", the "iban" object must be filled out.
|
|
931
|
+
*/
|
|
932
|
+
interface BankAccount {
|
|
933
|
+
/**
|
|
934
|
+
* The type of the financial address. The actual destination is determined by this
|
|
935
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
936
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
937
|
+
* in the "iban" object.
|
|
938
|
+
*
|
|
939
|
+
* - iban: The IBAN of the account
|
|
940
|
+
* - sort_code: The sort code of the account
|
|
941
|
+
* - bank_code: The bank code of the account
|
|
942
|
+
* - bban: The BBAN of the account
|
|
943
|
+
*/
|
|
944
|
+
type: string;
|
|
945
|
+
bankCode?: BankAccount.BankCode;
|
|
946
|
+
bban?: BankAccount.Bban;
|
|
947
|
+
iban?: BankAccount.Iban;
|
|
948
|
+
sortCode?: BankAccount.SortCode;
|
|
949
|
+
}
|
|
950
|
+
namespace BankAccount {
|
|
951
|
+
interface BankCode {
|
|
952
|
+
/**
|
|
953
|
+
* The name of the account holder.
|
|
954
|
+
*/
|
|
955
|
+
accountHolderName: string;
|
|
956
|
+
accountNumber: string;
|
|
957
|
+
code: string;
|
|
958
|
+
}
|
|
959
|
+
interface Bban {
|
|
960
|
+
/**
|
|
961
|
+
* The name of the account holder.
|
|
962
|
+
*/
|
|
963
|
+
accountHolderName: string;
|
|
964
|
+
bban: string;
|
|
965
|
+
bic?: string;
|
|
966
|
+
}
|
|
967
|
+
interface Iban {
|
|
968
|
+
/**
|
|
969
|
+
* The name of the account holder.
|
|
970
|
+
*/
|
|
971
|
+
accountHolderName: string;
|
|
972
|
+
iban: string;
|
|
973
|
+
bic?: string;
|
|
974
|
+
}
|
|
975
|
+
interface SortCode {
|
|
976
|
+
/**
|
|
977
|
+
* The name of the account holder.
|
|
978
|
+
*/
|
|
979
|
+
accountHolderName: string;
|
|
980
|
+
accountNumber: string;
|
|
981
|
+
sortCode: string;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
855
985
|
interface LineItem {
|
|
856
986
|
/**
|
|
857
987
|
* The total amount of all line items, i.e. single amount \* quantity. Given in
|
|
@@ -949,7 +1079,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
949
1079
|
* 10.23 EUR.
|
|
950
1080
|
*/
|
|
951
1081
|
amount?: number;
|
|
952
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
1082
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
953
1083
|
}
|
|
954
1084
|
}
|
|
955
1085
|
/**
|
|
@@ -961,7 +1091,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
961
1091
|
}
|
|
962
1092
|
}
|
|
963
1093
|
/**
|
|
964
|
-
*
|
|
1094
|
+
* @deprecated
|
|
965
1095
|
*/
|
|
966
1096
|
interface MerchantFinancialAddress {
|
|
967
1097
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -1211,7 +1341,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
1211
1341
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1212
1342
|
* information.
|
|
1213
1343
|
*/
|
|
1214
|
-
currentStatus: 'failed' | 'canceled' | 'processing' | '
|
|
1344
|
+
currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
1215
1345
|
reason: string;
|
|
1216
1346
|
updatedAt: string;
|
|
1217
1347
|
/**
|
|
@@ -1219,37 +1349,53 @@ export declare namespace OrderUpdateResponse {
|
|
|
1219
1349
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1220
1350
|
* information.
|
|
1221
1351
|
*/
|
|
1222
|
-
previousStatus?: 'failed' | 'canceled' | 'processing' | '
|
|
1352
|
+
previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
|
|
1223
1353
|
}
|
|
1224
1354
|
}
|
|
1225
|
-
export interface
|
|
1226
|
-
id: string;
|
|
1227
|
-
}
|
|
1228
|
-
export interface OrderUpdateParams {
|
|
1229
|
-
id: string;
|
|
1355
|
+
export interface OrderCreateParams {
|
|
1230
1356
|
/**
|
|
1231
|
-
* The
|
|
1232
|
-
* orders in the Ivy Dashboard.
|
|
1357
|
+
* The total amount of the order
|
|
1233
1358
|
*/
|
|
1234
|
-
|
|
1359
|
+
amount: number;
|
|
1235
1360
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
* order. Needs to be unique per shop per order and can be up to 200 characters. We
|
|
1238
|
-
* recommend to use your internal order id here.
|
|
1361
|
+
* The currency code of the order
|
|
1239
1362
|
*/
|
|
1240
|
-
|
|
1363
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
1241
1364
|
/**
|
|
1242
|
-
* The
|
|
1365
|
+
* The merchant's unique reference ID for the order
|
|
1243
1366
|
*/
|
|
1244
|
-
|
|
1367
|
+
referenceId: string;
|
|
1245
1368
|
/**
|
|
1246
|
-
* The
|
|
1247
|
-
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1248
|
-
* information.
|
|
1369
|
+
* The customer of the merchant.
|
|
1249
1370
|
*/
|
|
1250
|
-
|
|
1371
|
+
customer?: OrderCreateParams.Email | OrderCreateParams.ID;
|
|
1372
|
+
/**
|
|
1373
|
+
* Optional expiration timestamp in seconds
|
|
1374
|
+
*/
|
|
1375
|
+
expiresAt?: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* The subaccount id of the merchant.
|
|
1378
|
+
*/
|
|
1379
|
+
subaccountId?: string;
|
|
1380
|
+
}
|
|
1381
|
+
export declare namespace OrderCreateParams {
|
|
1382
|
+
interface Email {
|
|
1383
|
+
/**
|
|
1384
|
+
* The email of the customer.
|
|
1385
|
+
*/
|
|
1386
|
+
email: string;
|
|
1387
|
+
}
|
|
1388
|
+
interface ID {
|
|
1389
|
+
/**
|
|
1390
|
+
* The Ivy id of the customer.
|
|
1391
|
+
*/
|
|
1392
|
+
id: string;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
export interface OrderRetrieveParams {
|
|
1396
|
+
id: string;
|
|
1251
1397
|
}
|
|
1252
1398
|
export declare namespace Orders {
|
|
1253
|
-
export { type
|
|
1399
|
+
export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, };
|
|
1254
1400
|
}
|
|
1255
1401
|
//# sourceMappingURL=orders.d.ts.map
|