@getivy/node-sdk 0.1.0-alpha.2 → 0.1.0-alpha.21
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 +217 -0
- package/LICENSE +1 -1
- package/README.md +18 -18
- 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 +29 -20
- package/core.js.map +1 -1
- package/core.mjs +31 -22
- package/core.mjs.map +1 -1
- package/error.d.ts +2 -2
- package/error.d.ts.map +1 -1
- package/error.js +4 -4
- package/error.js.map +1 -1
- package/error.mjs +2 -2
- package/error.mjs.map +1 -1
- package/index.d.mts +15 -12
- package/index.d.ts +15 -12
- package/index.d.ts.map +1 -1
- package/index.js +45 -42
- package/index.js.map +1 -1
- package/index.mjs +42 -39
- package/index.mjs.map +1 -1
- package/package.json +3 -3
- package/resource.d.ts +3 -3
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/banks.d.ts +12 -0
- package/resources/banks.d.ts.map +1 -1
- package/resources/charges.d.ts +0 -13
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +444 -1305
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +41 -4
- package/resources/customers.d.ts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.ts +243 -101
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +6 -6
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +6 -6
- package/resources/orders.mjs.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.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 +49 -22
- package/src/error.ts +2 -2
- package/src/index.ts +60 -31
- package/src/resource.ts +3 -3
- package/src/resources/banks.ts +15 -0
- package/src/resources/charges.ts +0 -13
- package/src/resources/checkoutsession.ts +2103 -4416
- package/src/resources/customers.ts +46 -4
- package/src/resources/index.ts +15 -2
- package/src/resources/orders.ts +288 -118
- package/src/resources/refunds.ts +0 -1
- 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/src/resources/orders.ts
CHANGED
|
@@ -4,6 +4,13 @@ import { APIResource } from '../resource';
|
|
|
4
4
|
import * as Core from '../core';
|
|
5
5
|
|
|
6
6
|
export class Orders extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new order
|
|
9
|
+
*/
|
|
10
|
+
create(body: OrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<OrderCreateResponse> {
|
|
11
|
+
return this._client.post('/api/service/order/create', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
/**
|
|
8
15
|
* Retrieve details of an order. You can retrieve the order by passing either the
|
|
9
16
|
* internal Ivy order id or the `referenceId` you specified when creating a
|
|
@@ -12,16 +19,9 @@ export class Orders extends APIResource {
|
|
|
12
19
|
retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse> {
|
|
13
20
|
return this._client.post('/api/service/order/details', { body, ...options });
|
|
14
21
|
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Update certain fields of the specified order.
|
|
18
|
-
*/
|
|
19
|
-
update(body: OrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<OrderUpdateResponse> {
|
|
20
|
-
return this._client.post('/api/service/order/update', { body, ...options });
|
|
21
|
-
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface OrderCreateResponse {
|
|
25
25
|
/**
|
|
26
26
|
* The Ivy unique identifier for the order.
|
|
27
27
|
*/
|
|
@@ -54,12 +54,12 @@ export interface OrderRetrieveResponse {
|
|
|
54
54
|
merchantId: string;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* The
|
|
57
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
58
58
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
59
59
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
60
60
|
* as this is the format accepted by most banks.
|
|
61
61
|
*/
|
|
62
|
-
price:
|
|
62
|
+
price: OrderCreateResponse.Price;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
@@ -81,7 +81,6 @@ export interface OrderRetrieveResponse {
|
|
|
81
81
|
| 'failed'
|
|
82
82
|
| 'canceled'
|
|
83
83
|
| 'processing'
|
|
84
|
-
| 'in_handshake'
|
|
85
84
|
| 'waiting_for_payment'
|
|
86
85
|
| 'paid'
|
|
87
86
|
| 'in_refund'
|
|
@@ -95,15 +94,21 @@ export interface OrderRetrieveResponse {
|
|
|
95
94
|
updatedAt: string;
|
|
96
95
|
|
|
97
96
|
/**
|
|
98
|
-
* The
|
|
99
|
-
*
|
|
97
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
98
|
+
* if no payment was made.
|
|
99
|
+
*/
|
|
100
|
+
bankId?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
104
|
+
* the reference that will be visible on the bank statement.
|
|
100
105
|
*/
|
|
101
106
|
bankStatementReference?: string;
|
|
102
107
|
|
|
103
108
|
/**
|
|
104
109
|
* The billing address of the user. Required when handshake=true.
|
|
105
110
|
*/
|
|
106
|
-
billingAddress?:
|
|
111
|
+
billingAddress?: OrderCreateResponse.BillingAddress;
|
|
107
112
|
|
|
108
113
|
/**
|
|
109
114
|
* The merchant category code or
|
|
@@ -114,7 +119,7 @@ export interface OrderRetrieveResponse {
|
|
|
114
119
|
/**
|
|
115
120
|
* @deprecated
|
|
116
121
|
*/
|
|
117
|
-
climateActionMode?:
|
|
122
|
+
climateActionMode?: OrderCreateResponse.ClimateActionMode;
|
|
118
123
|
|
|
119
124
|
/**
|
|
120
125
|
* @deprecated
|
|
@@ -126,6 +131,8 @@ export interface OrderRetrieveResponse {
|
|
|
126
131
|
*/
|
|
127
132
|
customerId?: string;
|
|
128
133
|
|
|
134
|
+
destination?: OrderCreateResponse.Destination;
|
|
135
|
+
|
|
129
136
|
/**
|
|
130
137
|
* The customer facing id. This id is displayed to the user during the checkout and
|
|
131
138
|
* in the merchant dashboard.
|
|
@@ -155,14 +162,14 @@ export interface OrderRetrieveResponse {
|
|
|
155
162
|
/**
|
|
156
163
|
* The line items of the Checkout.
|
|
157
164
|
*/
|
|
158
|
-
lineItems?: Array<
|
|
165
|
+
lineItems?: Array<OrderCreateResponse.LineItem>;
|
|
159
166
|
|
|
160
|
-
mandate?:
|
|
167
|
+
mandate?: OrderCreateResponse.Mandate;
|
|
161
168
|
|
|
162
169
|
/**
|
|
163
|
-
*
|
|
170
|
+
* @deprecated
|
|
164
171
|
*/
|
|
165
|
-
merchantFinancialAddress?:
|
|
172
|
+
merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
|
|
166
173
|
|
|
167
174
|
/**
|
|
168
175
|
* Any data which will be stored and returned for this checkout session and
|
|
@@ -180,9 +187,9 @@ export interface OrderRetrieveResponse {
|
|
|
180
187
|
/**
|
|
181
188
|
* The source bank account where the money is send from.
|
|
182
189
|
*/
|
|
183
|
-
payerFinancialAddress?:
|
|
190
|
+
payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
|
|
184
191
|
|
|
185
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
192
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
186
193
|
|
|
187
194
|
/**
|
|
188
195
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
@@ -204,7 +211,8 @@ export interface OrderRetrieveResponse {
|
|
|
204
211
|
| 'refund_failed'
|
|
205
212
|
| 'partially_refunded'
|
|
206
213
|
| 'not_settled'
|
|
207
|
-
| 'disputed'
|
|
214
|
+
| 'disputed'
|
|
215
|
+
| 'frozen_due_to_aml';
|
|
208
216
|
|
|
209
217
|
/**
|
|
210
218
|
* The total amount in the currency of all successful refunds for this order
|
|
@@ -214,18 +222,18 @@ export interface OrderRetrieveResponse {
|
|
|
214
222
|
/**
|
|
215
223
|
* The list of refunds connected to this order.
|
|
216
224
|
*/
|
|
217
|
-
refunds?: Array<
|
|
225
|
+
refunds?: Array<OrderCreateResponse.Refund>;
|
|
218
226
|
|
|
219
227
|
/**
|
|
220
228
|
* The shipping address of the user. This is only collected in express Checkouts.
|
|
221
229
|
*/
|
|
222
|
-
shippingAddress?:
|
|
230
|
+
shippingAddress?: OrderCreateResponse.ShippingAddress;
|
|
223
231
|
|
|
224
232
|
/**
|
|
225
233
|
* The selected shipping method by the user. Can either be selected during an
|
|
226
234
|
* express Checkout Session or passed during Checkout Session creation.
|
|
227
235
|
*/
|
|
228
|
-
shippingMethod?:
|
|
236
|
+
shippingMethod?: OrderCreateResponse.ShippingMethod;
|
|
229
237
|
|
|
230
238
|
/**
|
|
231
239
|
* The logo of the shop provided as a URL.
|
|
@@ -236,7 +244,7 @@ export interface OrderRetrieveResponse {
|
|
|
236
244
|
* The shopper object. Contains information collected from the user during the
|
|
237
245
|
* Checkout.
|
|
238
246
|
*/
|
|
239
|
-
shopper?:
|
|
247
|
+
shopper?: OrderCreateResponse.Shopper;
|
|
240
248
|
|
|
241
249
|
/**
|
|
242
250
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
@@ -244,13 +252,13 @@ export interface OrderRetrieveResponse {
|
|
|
244
252
|
*/
|
|
245
253
|
shopperEmail?: string;
|
|
246
254
|
|
|
247
|
-
statusClassification?:
|
|
255
|
+
statusClassification?: OrderCreateResponse.StatusClassification;
|
|
248
256
|
|
|
249
257
|
/**
|
|
250
258
|
* List of status history items for the order, used for logging every update on
|
|
251
259
|
* status.
|
|
252
260
|
*/
|
|
253
|
-
statusHistoryList?: Array<
|
|
261
|
+
statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
|
|
254
262
|
|
|
255
263
|
/**
|
|
256
264
|
* The subaccount id of the order.
|
|
@@ -268,9 +276,9 @@ export interface OrderRetrieveResponse {
|
|
|
268
276
|
trees?: number;
|
|
269
277
|
}
|
|
270
278
|
|
|
271
|
-
export namespace
|
|
279
|
+
export namespace OrderCreateResponse {
|
|
272
280
|
/**
|
|
273
|
-
* The
|
|
281
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
274
282
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
275
283
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
276
284
|
* as this is the format accepted by most banks.
|
|
@@ -283,25 +291,12 @@ export namespace OrderRetrieveResponse {
|
|
|
283
291
|
*/
|
|
284
292
|
total: number;
|
|
285
293
|
|
|
286
|
-
/**
|
|
287
|
-
* The shipping amount.
|
|
288
|
-
*/
|
|
289
294
|
shipping?: number;
|
|
290
295
|
|
|
291
|
-
/**
|
|
292
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
293
|
-
*/
|
|
294
296
|
subTotal?: number;
|
|
295
297
|
|
|
296
|
-
/**
|
|
297
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
298
|
-
* to 2 decimal places for the actual transfer.
|
|
299
|
-
*/
|
|
300
298
|
totalNet?: number;
|
|
301
299
|
|
|
302
|
-
/**
|
|
303
|
-
* The VAT amount.
|
|
304
|
-
*/
|
|
305
300
|
vat?: number;
|
|
306
301
|
}
|
|
307
302
|
|
|
@@ -589,6 +584,95 @@ export namespace OrderRetrieveResponse {
|
|
|
589
584
|
type: 'transaction' | 'amount';
|
|
590
585
|
}
|
|
591
586
|
|
|
587
|
+
export interface Destination {
|
|
588
|
+
/**
|
|
589
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
590
|
+
* to "iban", the "iban" object must be filled out.
|
|
591
|
+
*/
|
|
592
|
+
bankAccount: Destination.BankAccount;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
596
|
+
* that will be visible on the bank statement.
|
|
597
|
+
*/
|
|
598
|
+
bankStatementReference: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export namespace Destination {
|
|
602
|
+
/**
|
|
603
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
604
|
+
* to "iban", the "iban" object must be filled out.
|
|
605
|
+
*/
|
|
606
|
+
export interface BankAccount {
|
|
607
|
+
/**
|
|
608
|
+
* The type of the financial address. The actual destination is determined by this
|
|
609
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
610
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
611
|
+
* in the "iban" object.
|
|
612
|
+
*
|
|
613
|
+
* - iban: The IBAN of the account
|
|
614
|
+
* - sort_code: The sort code of the account
|
|
615
|
+
* - bank_code: The bank code of the account
|
|
616
|
+
* - bban: The BBAN of the account
|
|
617
|
+
*/
|
|
618
|
+
type: string;
|
|
619
|
+
|
|
620
|
+
bankCode?: BankAccount.BankCode;
|
|
621
|
+
|
|
622
|
+
bban?: BankAccount.Bban;
|
|
623
|
+
|
|
624
|
+
iban?: BankAccount.Iban;
|
|
625
|
+
|
|
626
|
+
sortCode?: BankAccount.SortCode;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export namespace BankAccount {
|
|
630
|
+
export interface BankCode {
|
|
631
|
+
/**
|
|
632
|
+
* The name of the account holder.
|
|
633
|
+
*/
|
|
634
|
+
accountHolderName: string;
|
|
635
|
+
|
|
636
|
+
accountNumber: string;
|
|
637
|
+
|
|
638
|
+
code: string;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface Bban {
|
|
642
|
+
/**
|
|
643
|
+
* The name of the account holder.
|
|
644
|
+
*/
|
|
645
|
+
accountHolderName: string;
|
|
646
|
+
|
|
647
|
+
bban: string;
|
|
648
|
+
|
|
649
|
+
bic?: string;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export interface Iban {
|
|
653
|
+
/**
|
|
654
|
+
* The name of the account holder.
|
|
655
|
+
*/
|
|
656
|
+
accountHolderName: string;
|
|
657
|
+
|
|
658
|
+
iban: string;
|
|
659
|
+
|
|
660
|
+
bic?: string;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
export interface SortCode {
|
|
664
|
+
/**
|
|
665
|
+
* The name of the account holder.
|
|
666
|
+
*/
|
|
667
|
+
accountHolderName: string;
|
|
668
|
+
|
|
669
|
+
accountNumber: string;
|
|
670
|
+
|
|
671
|
+
sortCode: string;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
592
676
|
export interface LineItem {
|
|
593
677
|
/**
|
|
594
678
|
* The total amount of all line items, i.e. single amount \* quantity. Given in
|
|
@@ -720,7 +804,7 @@ export namespace OrderRetrieveResponse {
|
|
|
720
804
|
}
|
|
721
805
|
|
|
722
806
|
/**
|
|
723
|
-
*
|
|
807
|
+
* @deprecated
|
|
724
808
|
*/
|
|
725
809
|
export interface MerchantFinancialAddress {
|
|
726
810
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -1542,7 +1626,6 @@ export namespace OrderRetrieveResponse {
|
|
|
1542
1626
|
| 'failed'
|
|
1543
1627
|
| 'canceled'
|
|
1544
1628
|
| 'processing'
|
|
1545
|
-
| 'in_handshake'
|
|
1546
1629
|
| 'waiting_for_payment'
|
|
1547
1630
|
| 'paid'
|
|
1548
1631
|
| 'in_refund'
|
|
@@ -1566,7 +1649,6 @@ export namespace OrderRetrieveResponse {
|
|
|
1566
1649
|
| 'failed'
|
|
1567
1650
|
| 'canceled'
|
|
1568
1651
|
| 'processing'
|
|
1569
|
-
| 'in_handshake'
|
|
1570
1652
|
| 'waiting_for_payment'
|
|
1571
1653
|
| 'paid'
|
|
1572
1654
|
| 'in_refund'
|
|
@@ -1580,7 +1662,7 @@ export namespace OrderRetrieveResponse {
|
|
|
1580
1662
|
}
|
|
1581
1663
|
}
|
|
1582
1664
|
|
|
1583
|
-
export interface
|
|
1665
|
+
export interface OrderRetrieveResponse {
|
|
1584
1666
|
/**
|
|
1585
1667
|
* The Ivy unique identifier for the order.
|
|
1586
1668
|
*/
|
|
@@ -1613,12 +1695,12 @@ export interface OrderUpdateResponse {
|
|
|
1613
1695
|
merchantId: string;
|
|
1614
1696
|
|
|
1615
1697
|
/**
|
|
1616
|
-
* The
|
|
1698
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
1617
1699
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
1618
1700
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
1619
1701
|
* as this is the format accepted by most banks.
|
|
1620
1702
|
*/
|
|
1621
|
-
price:
|
|
1703
|
+
price: OrderRetrieveResponse.Price;
|
|
1622
1704
|
|
|
1623
1705
|
/**
|
|
1624
1706
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
@@ -1640,7 +1722,6 @@ export interface OrderUpdateResponse {
|
|
|
1640
1722
|
| 'failed'
|
|
1641
1723
|
| 'canceled'
|
|
1642
1724
|
| 'processing'
|
|
1643
|
-
| 'in_handshake'
|
|
1644
1725
|
| 'waiting_for_payment'
|
|
1645
1726
|
| 'paid'
|
|
1646
1727
|
| 'in_refund'
|
|
@@ -1654,15 +1735,21 @@ export interface OrderUpdateResponse {
|
|
|
1654
1735
|
updatedAt: string;
|
|
1655
1736
|
|
|
1656
1737
|
/**
|
|
1657
|
-
* The
|
|
1658
|
-
*
|
|
1738
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
1739
|
+
* if no payment was made.
|
|
1740
|
+
*/
|
|
1741
|
+
bankId?: string;
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
1745
|
+
* the reference that will be visible on the bank statement.
|
|
1659
1746
|
*/
|
|
1660
1747
|
bankStatementReference?: string;
|
|
1661
1748
|
|
|
1662
1749
|
/**
|
|
1663
1750
|
* The billing address of the user. Required when handshake=true.
|
|
1664
1751
|
*/
|
|
1665
|
-
billingAddress?:
|
|
1752
|
+
billingAddress?: OrderRetrieveResponse.BillingAddress;
|
|
1666
1753
|
|
|
1667
1754
|
/**
|
|
1668
1755
|
* The merchant category code or
|
|
@@ -1673,7 +1760,7 @@ export interface OrderUpdateResponse {
|
|
|
1673
1760
|
/**
|
|
1674
1761
|
* @deprecated
|
|
1675
1762
|
*/
|
|
1676
|
-
climateActionMode?:
|
|
1763
|
+
climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
|
|
1677
1764
|
|
|
1678
1765
|
/**
|
|
1679
1766
|
* @deprecated
|
|
@@ -1685,6 +1772,8 @@ export interface OrderUpdateResponse {
|
|
|
1685
1772
|
*/
|
|
1686
1773
|
customerId?: string;
|
|
1687
1774
|
|
|
1775
|
+
destination?: OrderRetrieveResponse.Destination;
|
|
1776
|
+
|
|
1688
1777
|
/**
|
|
1689
1778
|
* The customer facing id. This id is displayed to the user during the checkout and
|
|
1690
1779
|
* in the merchant dashboard.
|
|
@@ -1714,14 +1803,14 @@ export interface OrderUpdateResponse {
|
|
|
1714
1803
|
/**
|
|
1715
1804
|
* The line items of the Checkout.
|
|
1716
1805
|
*/
|
|
1717
|
-
lineItems?: Array<
|
|
1806
|
+
lineItems?: Array<OrderRetrieveResponse.LineItem>;
|
|
1718
1807
|
|
|
1719
|
-
mandate?:
|
|
1808
|
+
mandate?: OrderRetrieveResponse.Mandate;
|
|
1720
1809
|
|
|
1721
1810
|
/**
|
|
1722
|
-
*
|
|
1811
|
+
* @deprecated
|
|
1723
1812
|
*/
|
|
1724
|
-
merchantFinancialAddress?:
|
|
1813
|
+
merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
|
|
1725
1814
|
|
|
1726
1815
|
/**
|
|
1727
1816
|
* Any data which will be stored and returned for this checkout session and
|
|
@@ -1739,9 +1828,9 @@ export interface OrderUpdateResponse {
|
|
|
1739
1828
|
/**
|
|
1740
1829
|
* The source bank account where the money is send from.
|
|
1741
1830
|
*/
|
|
1742
|
-
payerFinancialAddress?:
|
|
1831
|
+
payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
|
|
1743
1832
|
|
|
1744
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
1833
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
1745
1834
|
|
|
1746
1835
|
/**
|
|
1747
1836
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
@@ -1763,7 +1852,8 @@ export interface OrderUpdateResponse {
|
|
|
1763
1852
|
| 'refund_failed'
|
|
1764
1853
|
| 'partially_refunded'
|
|
1765
1854
|
| 'not_settled'
|
|
1766
|
-
| 'disputed'
|
|
1855
|
+
| 'disputed'
|
|
1856
|
+
| 'frozen_due_to_aml';
|
|
1767
1857
|
|
|
1768
1858
|
/**
|
|
1769
1859
|
* The total amount in the currency of all successful refunds for this order
|
|
@@ -1773,18 +1863,18 @@ export interface OrderUpdateResponse {
|
|
|
1773
1863
|
/**
|
|
1774
1864
|
* The list of refunds connected to this order.
|
|
1775
1865
|
*/
|
|
1776
|
-
refunds?: Array<
|
|
1866
|
+
refunds?: Array<OrderRetrieveResponse.Refund>;
|
|
1777
1867
|
|
|
1778
1868
|
/**
|
|
1779
1869
|
* The shipping address of the user. This is only collected in express Checkouts.
|
|
1780
1870
|
*/
|
|
1781
|
-
shippingAddress?:
|
|
1871
|
+
shippingAddress?: OrderRetrieveResponse.ShippingAddress;
|
|
1782
1872
|
|
|
1783
1873
|
/**
|
|
1784
1874
|
* The selected shipping method by the user. Can either be selected during an
|
|
1785
1875
|
* express Checkout Session or passed during Checkout Session creation.
|
|
1786
1876
|
*/
|
|
1787
|
-
shippingMethod?:
|
|
1877
|
+
shippingMethod?: OrderRetrieveResponse.ShippingMethod;
|
|
1788
1878
|
|
|
1789
1879
|
/**
|
|
1790
1880
|
* The logo of the shop provided as a URL.
|
|
@@ -1795,7 +1885,7 @@ export interface OrderUpdateResponse {
|
|
|
1795
1885
|
* The shopper object. Contains information collected from the user during the
|
|
1796
1886
|
* Checkout.
|
|
1797
1887
|
*/
|
|
1798
|
-
shopper?:
|
|
1888
|
+
shopper?: OrderRetrieveResponse.Shopper;
|
|
1799
1889
|
|
|
1800
1890
|
/**
|
|
1801
1891
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
@@ -1803,13 +1893,13 @@ export interface OrderUpdateResponse {
|
|
|
1803
1893
|
*/
|
|
1804
1894
|
shopperEmail?: string;
|
|
1805
1895
|
|
|
1806
|
-
statusClassification?:
|
|
1896
|
+
statusClassification?: OrderRetrieveResponse.StatusClassification;
|
|
1807
1897
|
|
|
1808
1898
|
/**
|
|
1809
1899
|
* List of status history items for the order, used for logging every update on
|
|
1810
1900
|
* status.
|
|
1811
1901
|
*/
|
|
1812
|
-
statusHistoryList?: Array<
|
|
1902
|
+
statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
|
|
1813
1903
|
|
|
1814
1904
|
/**
|
|
1815
1905
|
* The subaccount id of the order.
|
|
@@ -1827,9 +1917,9 @@ export interface OrderUpdateResponse {
|
|
|
1827
1917
|
trees?: number;
|
|
1828
1918
|
}
|
|
1829
1919
|
|
|
1830
|
-
export namespace
|
|
1920
|
+
export namespace OrderRetrieveResponse {
|
|
1831
1921
|
/**
|
|
1832
|
-
* The
|
|
1922
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
1833
1923
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
1834
1924
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
1835
1925
|
* as this is the format accepted by most banks.
|
|
@@ -1842,25 +1932,12 @@ export namespace OrderUpdateResponse {
|
|
|
1842
1932
|
*/
|
|
1843
1933
|
total: number;
|
|
1844
1934
|
|
|
1845
|
-
/**
|
|
1846
|
-
* The shipping amount.
|
|
1847
|
-
*/
|
|
1848
1935
|
shipping?: number;
|
|
1849
1936
|
|
|
1850
|
-
/**
|
|
1851
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
1852
|
-
*/
|
|
1853
1937
|
subTotal?: number;
|
|
1854
1938
|
|
|
1855
|
-
/**
|
|
1856
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
1857
|
-
* to 2 decimal places for the actual transfer.
|
|
1858
|
-
*/
|
|
1859
1939
|
totalNet?: number;
|
|
1860
1940
|
|
|
1861
|
-
/**
|
|
1862
|
-
* The VAT amount.
|
|
1863
|
-
*/
|
|
1864
1941
|
vat?: number;
|
|
1865
1942
|
}
|
|
1866
1943
|
|
|
@@ -2148,6 +2225,95 @@ export namespace OrderUpdateResponse {
|
|
|
2148
2225
|
type: 'transaction' | 'amount';
|
|
2149
2226
|
}
|
|
2150
2227
|
|
|
2228
|
+
export interface Destination {
|
|
2229
|
+
/**
|
|
2230
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
2231
|
+
* to "iban", the "iban" object must be filled out.
|
|
2232
|
+
*/
|
|
2233
|
+
bankAccount: Destination.BankAccount;
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
2237
|
+
* that will be visible on the bank statement.
|
|
2238
|
+
*/
|
|
2239
|
+
bankStatementReference: string;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
export namespace Destination {
|
|
2243
|
+
/**
|
|
2244
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
2245
|
+
* to "iban", the "iban" object must be filled out.
|
|
2246
|
+
*/
|
|
2247
|
+
export interface BankAccount {
|
|
2248
|
+
/**
|
|
2249
|
+
* The type of the financial address. The actual destination is determined by this
|
|
2250
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
2251
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
2252
|
+
* in the "iban" object.
|
|
2253
|
+
*
|
|
2254
|
+
* - iban: The IBAN of the account
|
|
2255
|
+
* - sort_code: The sort code of the account
|
|
2256
|
+
* - bank_code: The bank code of the account
|
|
2257
|
+
* - bban: The BBAN of the account
|
|
2258
|
+
*/
|
|
2259
|
+
type: string;
|
|
2260
|
+
|
|
2261
|
+
bankCode?: BankAccount.BankCode;
|
|
2262
|
+
|
|
2263
|
+
bban?: BankAccount.Bban;
|
|
2264
|
+
|
|
2265
|
+
iban?: BankAccount.Iban;
|
|
2266
|
+
|
|
2267
|
+
sortCode?: BankAccount.SortCode;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
export namespace BankAccount {
|
|
2271
|
+
export interface BankCode {
|
|
2272
|
+
/**
|
|
2273
|
+
* The name of the account holder.
|
|
2274
|
+
*/
|
|
2275
|
+
accountHolderName: string;
|
|
2276
|
+
|
|
2277
|
+
accountNumber: string;
|
|
2278
|
+
|
|
2279
|
+
code: string;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
export interface Bban {
|
|
2283
|
+
/**
|
|
2284
|
+
* The name of the account holder.
|
|
2285
|
+
*/
|
|
2286
|
+
accountHolderName: string;
|
|
2287
|
+
|
|
2288
|
+
bban: string;
|
|
2289
|
+
|
|
2290
|
+
bic?: string;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
export interface Iban {
|
|
2294
|
+
/**
|
|
2295
|
+
* The name of the account holder.
|
|
2296
|
+
*/
|
|
2297
|
+
accountHolderName: string;
|
|
2298
|
+
|
|
2299
|
+
iban: string;
|
|
2300
|
+
|
|
2301
|
+
bic?: string;
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
export interface SortCode {
|
|
2305
|
+
/**
|
|
2306
|
+
* The name of the account holder.
|
|
2307
|
+
*/
|
|
2308
|
+
accountHolderName: string;
|
|
2309
|
+
|
|
2310
|
+
accountNumber: string;
|
|
2311
|
+
|
|
2312
|
+
sortCode: string;
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2151
2317
|
export interface LineItem {
|
|
2152
2318
|
/**
|
|
2153
2319
|
* The total amount of all line items, i.e. single amount \* quantity. Given in
|
|
@@ -2279,7 +2445,7 @@ export namespace OrderUpdateResponse {
|
|
|
2279
2445
|
}
|
|
2280
2446
|
|
|
2281
2447
|
/**
|
|
2282
|
-
*
|
|
2448
|
+
* @deprecated
|
|
2283
2449
|
*/
|
|
2284
2450
|
export interface MerchantFinancialAddress {
|
|
2285
2451
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -3101,7 +3267,6 @@ export namespace OrderUpdateResponse {
|
|
|
3101
3267
|
| 'failed'
|
|
3102
3268
|
| 'canceled'
|
|
3103
3269
|
| 'processing'
|
|
3104
|
-
| 'in_handshake'
|
|
3105
3270
|
| 'waiting_for_payment'
|
|
3106
3271
|
| 'paid'
|
|
3107
3272
|
| 'in_refund'
|
|
@@ -3125,7 +3290,6 @@ export namespace OrderUpdateResponse {
|
|
|
3125
3290
|
| 'failed'
|
|
3126
3291
|
| 'canceled'
|
|
3127
3292
|
| 'processing'
|
|
3128
|
-
| 'in_handshake'
|
|
3129
3293
|
| 'waiting_for_payment'
|
|
3130
3294
|
| 'paid'
|
|
3131
3295
|
| 'in_refund'
|
|
@@ -3139,57 +3303,63 @@ export namespace OrderUpdateResponse {
|
|
|
3139
3303
|
}
|
|
3140
3304
|
}
|
|
3141
3305
|
|
|
3142
|
-
export interface
|
|
3143
|
-
|
|
3144
|
-
|
|
3306
|
+
export interface OrderCreateParams {
|
|
3307
|
+
/**
|
|
3308
|
+
* The total amount of the order
|
|
3309
|
+
*/
|
|
3310
|
+
amount: number;
|
|
3145
3311
|
|
|
3146
|
-
|
|
3147
|
-
|
|
3312
|
+
/**
|
|
3313
|
+
* The currency code of the order
|
|
3314
|
+
*/
|
|
3315
|
+
currency: 'EUR' | 'GBP' | 'PLN';
|
|
3148
3316
|
|
|
3149
3317
|
/**
|
|
3150
|
-
* The
|
|
3151
|
-
* orders in the Ivy Dashboard.
|
|
3318
|
+
* The merchant's unique reference ID for the order
|
|
3152
3319
|
*/
|
|
3153
|
-
|
|
3320
|
+
referenceId: string;
|
|
3154
3321
|
|
|
3155
3322
|
/**
|
|
3156
|
-
*
|
|
3157
|
-
* order. Needs to be unique per shop per order and can be up to 200 characters. We
|
|
3158
|
-
* recommend to use your internal order id here.
|
|
3323
|
+
* The customer of the merchant.
|
|
3159
3324
|
*/
|
|
3160
|
-
|
|
3325
|
+
customer?: OrderCreateParams.Email | OrderCreateParams.ID;
|
|
3161
3326
|
|
|
3162
3327
|
/**
|
|
3163
|
-
*
|
|
3328
|
+
* Optional expiration timestamp in seconds
|
|
3164
3329
|
*/
|
|
3165
|
-
|
|
3330
|
+
expiresAt?: string;
|
|
3166
3331
|
|
|
3167
3332
|
/**
|
|
3168
|
-
* The
|
|
3169
|
-
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
3170
|
-
* information.
|
|
3333
|
+
* The subaccount id of the merchant.
|
|
3171
3334
|
*/
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3335
|
+
subaccountId?: string;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
export namespace OrderCreateParams {
|
|
3339
|
+
export interface Email {
|
|
3340
|
+
/**
|
|
3341
|
+
* The email of the customer.
|
|
3342
|
+
*/
|
|
3343
|
+
email: string;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
export interface ID {
|
|
3347
|
+
/**
|
|
3348
|
+
* The Ivy id of the customer.
|
|
3349
|
+
*/
|
|
3350
|
+
id: string;
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
export interface OrderRetrieveParams {
|
|
3355
|
+
id: string;
|
|
3186
3356
|
}
|
|
3187
3357
|
|
|
3188
3358
|
export declare namespace Orders {
|
|
3189
3359
|
export {
|
|
3360
|
+
type OrderCreateResponse as OrderCreateResponse,
|
|
3190
3361
|
type OrderRetrieveResponse as OrderRetrieveResponse,
|
|
3191
|
-
type
|
|
3362
|
+
type OrderCreateParams as OrderCreateParams,
|
|
3192
3363
|
type OrderRetrieveParams as OrderRetrieveParams,
|
|
3193
|
-
type OrderUpdateParams as OrderUpdateParams,
|
|
3194
3364
|
};
|
|
3195
3365
|
}
|