@getivy/node-sdk 0.1.0-alpha.31 → 0.1.0-alpha.33

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 (123) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.mts +14 -14
  3. package/index.d.ts +14 -14
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs +1 -1
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/balance.d.ts +6 -3
  10. package/resources/balance.d.ts.map +1 -1
  11. package/resources/banks.d.ts +38 -59
  12. package/resources/banks.d.ts.map +1 -1
  13. package/resources/capabilities.d.ts +1 -10
  14. package/resources/capabilities.d.ts.map +1 -1
  15. package/resources/charges.d.ts +30 -21
  16. package/resources/charges.d.ts.map +1 -1
  17. package/resources/checkoutsession.d.ts +315 -807
  18. package/resources/checkoutsession.d.ts.map +1 -1
  19. package/resources/customers.d.ts +9 -12
  20. package/resources/customers.d.ts.map +1 -1
  21. package/resources/data/accounts.d.ts +0 -100
  22. package/resources/data/accounts.d.ts.map +1 -1
  23. package/resources/data/accounts.js +0 -6
  24. package/resources/data/accounts.js.map +1 -1
  25. package/resources/data/accounts.mjs +0 -6
  26. package/resources/data/accounts.mjs.map +1 -1
  27. package/resources/data/balances.d.ts +0 -41
  28. package/resources/data/balances.d.ts.map +1 -1
  29. package/resources/data/balances.js +0 -6
  30. package/resources/data/balances.js.map +1 -1
  31. package/resources/data/balances.mjs +0 -6
  32. package/resources/data/balances.mjs.map +1 -1
  33. package/resources/data/consent.d.ts +0 -76
  34. package/resources/data/consent.d.ts.map +1 -1
  35. package/resources/data/consent.js +0 -12
  36. package/resources/data/consent.js.map +1 -1
  37. package/resources/data/consent.mjs +0 -12
  38. package/resources/data/consent.mjs.map +1 -1
  39. package/resources/data/data.d.ts +10 -10
  40. package/resources/data/data.d.ts.map +1 -1
  41. package/resources/data/data.js.map +1 -1
  42. package/resources/data/data.mjs +2 -2
  43. package/resources/data/data.mjs.map +1 -1
  44. package/resources/data/index.d.ts +5 -5
  45. package/resources/data/index.d.ts.map +1 -1
  46. package/resources/data/index.js.map +1 -1
  47. package/resources/data/index.mjs +2 -2
  48. package/resources/data/index.mjs.map +1 -1
  49. package/resources/data/session.d.ts +0 -230
  50. package/resources/data/session.d.ts.map +1 -1
  51. package/resources/data/session.js +0 -12
  52. package/resources/data/session.js.map +1 -1
  53. package/resources/data/session.mjs +0 -12
  54. package/resources/data/session.mjs.map +1 -1
  55. package/resources/data/transactions.d.ts +0 -50
  56. package/resources/data/transactions.d.ts.map +1 -1
  57. package/resources/data/transactions.js +0 -7
  58. package/resources/data/transactions.js.map +1 -1
  59. package/resources/data/transactions.mjs +0 -7
  60. package/resources/data/transactions.mjs.map +1 -1
  61. package/resources/index.d.ts +7 -7
  62. package/resources/index.d.ts.map +1 -1
  63. package/resources/index.js.map +1 -1
  64. package/resources/index.mjs +1 -1
  65. package/resources/index.mjs.map +1 -1
  66. package/resources/mandates.d.ts +55 -17
  67. package/resources/mandates.d.ts.map +1 -1
  68. package/resources/mandates.js.map +1 -1
  69. package/resources/mandates.mjs.map +1 -1
  70. package/resources/orders.d.ts +242 -524
  71. package/resources/orders.d.ts.map +1 -1
  72. package/resources/payouts.d.ts +146 -70
  73. package/resources/payouts.d.ts.map +1 -1
  74. package/resources/payouts.js.map +1 -1
  75. package/resources/payouts.mjs.map +1 -1
  76. package/resources/refunds.d.ts +16 -92
  77. package/resources/refunds.d.ts.map +1 -1
  78. package/resources/refunds.js +4 -4
  79. package/resources/refunds.js.map +1 -1
  80. package/resources/refunds.mjs +4 -4
  81. package/resources/refunds.mjs.map +1 -1
  82. package/resources/reports.d.ts +4 -78
  83. package/resources/reports.d.ts.map +1 -1
  84. package/resources/reports.js +5 -1
  85. package/resources/reports.js.map +1 -1
  86. package/resources/reports.mjs +5 -1
  87. package/resources/reports.mjs.map +1 -1
  88. package/resources/subaccounts.d.ts +19 -7
  89. package/resources/subaccounts.d.ts.map +1 -1
  90. package/resources/subaccounts.js.map +1 -1
  91. package/resources/subaccounts.mjs.map +1 -1
  92. package/resources/webhooksubscription.d.ts +0 -151
  93. package/resources/webhooksubscription.d.ts.map +1 -1
  94. package/resources/webhooksubscription.js +0 -33
  95. package/resources/webhooksubscription.js.map +1 -1
  96. package/resources/webhooksubscription.mjs +0 -33
  97. package/resources/webhooksubscription.mjs.map +1 -1
  98. package/src/index.ts +22 -38
  99. package/src/resources/balance.ts +6 -3
  100. package/src/resources/banks.ts +41 -59
  101. package/src/resources/capabilities.ts +1 -10
  102. package/src/resources/charges.ts +32 -23
  103. package/src/resources/checkoutsession.ts +1399 -1003
  104. package/src/resources/customers.ts +9 -12
  105. package/src/resources/data/accounts.ts +1 -130
  106. package/src/resources/data/balances.ts +1 -53
  107. package/src/resources/data/consent.ts +1 -106
  108. package/src/resources/data/data.ts +10 -46
  109. package/src/resources/data/index.ts +5 -17
  110. package/src/resources/data/session.ts +1 -1295
  111. package/src/resources/data/transactions.ts +1 -67
  112. package/src/resources/index.ts +9 -19
  113. package/src/resources/mandates.ts +82 -17
  114. package/src/resources/orders.ts +1149 -805
  115. package/src/resources/payouts.ts +239 -70
  116. package/src/resources/refunds.ts +33 -94
  117. package/src/resources/reports.ts +8 -98
  118. package/src/resources/subaccounts.ts +36 -7
  119. package/src/resources/webhooksubscription.ts +1 -349
  120. package/src/version.ts +1 -1
  121. package/version.d.ts +1 -1
  122. package/version.js +1 -1
  123. package/version.mjs +1 -1
@@ -27,59 +27,49 @@ export class Orders extends APIResource {
27
27
 
28
28
  export interface OrderCreateResponse {
29
29
  /**
30
- * The Ivy unique identifier for the order.
30
+ * The unique id for the order.
31
31
  */
32
32
  id: string;
33
33
 
34
34
  /**
35
- * @deprecated The unique identifier for the merchantApp which initiated the order
36
- * / payment attempt.
35
+ * The unique id for the merchantApp which initiated the order.
37
36
  */
38
37
  appId: string;
39
38
 
40
39
  /**
41
- * The Ivy fee for the payment.
40
+ * The amount of application fee collected with the order.
42
41
  */
43
42
  applicationFeeAmount: number;
44
43
 
45
- createdAt: string;
44
+ createdAt: unknown;
46
45
 
47
46
  instantPaymentScheme: boolean;
48
47
 
49
48
  /**
50
- * @deprecated Deprecated in favor of `appId`.
49
+ * Same as appId
51
50
  */
52
51
  merchantAppId: string;
53
52
 
54
- /**
55
- * The unique identifier for the merchant which initiated the order / payment
56
- * attempt.
57
- */
58
53
  merchantId: string;
59
54
 
60
55
  /**
61
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
62
- * represents EUR 10.23. Any amount of decimal places can be provided on
63
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
64
- * as this is the format accepted by most banks.
56
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
65
57
  */
66
58
  price: OrderCreateResponse.Price;
67
59
 
68
60
  /**
69
- * An internal reference id which will be stored with the checkout & corresponding
70
- * order. Needs to be unique per shop per order and can be up to 200 characters.
61
+ * A unique id for the order which can be set when creating the checkoutSession.
71
62
  */
72
63
  referenceId: string;
73
64
 
74
65
  /**
75
- * The name of the merchant which initiated the order.
66
+ * The legal name of the merchant which initiated the order.
76
67
  */
77
68
  shopName: string;
78
69
 
79
70
  /**
80
- * The order status. This status symbolises the state of the user's payment
81
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
82
- * information.
71
+ * The status of the order. As soon as this value is 'paid', you can ship the
72
+ * order.
83
73
  */
84
74
  status:
85
75
  | 'failed'
@@ -95,80 +85,92 @@ export interface OrderCreateResponse {
95
85
  | 'disputed'
96
86
  | 'refused';
97
87
 
98
- updatedAt: string;
88
+ updatedAt: unknown;
99
89
 
100
90
  /**
101
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
102
- * if no payment was made.
91
+ * The unique identifier of the customer's bank.
103
92
  */
104
93
  bankId?: string;
105
94
 
106
95
  /**
107
- * @deprecated The bank statement reference of the payment for the order. This is
108
- * the reference that will be visible on the bank statement.
96
+ * The reference that will be shown on the bank statement of the customer. Only
97
+ * available after a successful DirectDebit initiation.
109
98
  */
110
99
  bankStatementReference?: string;
111
100
 
112
- /**
113
- * The billing address of the customer.
114
- */
115
101
  billingAddress?: OrderCreateResponse.BillingAddress;
116
102
 
117
103
  /**
118
- * The merchant category code or
119
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
104
+ * The merchant category code for the account. MCCs are used to classify businesses
105
+ * based on the goods or services they provide.
120
106
  */
121
107
  category?: string;
122
108
 
109
+ climateActionMode?: OrderCreateResponse.ClimateActionMode;
110
+
111
+ co2Grams?: number;
112
+
123
113
  /**
124
114
  * The unique identifier of the customer who placed the order.
125
115
  */
126
116
  customerId?: string;
127
117
 
118
+ /**
119
+ * The destination bank account and statement reference for the order.
120
+ */
128
121
  destination?: OrderCreateResponse.Destination;
129
122
 
130
123
  /**
131
- * @deprecated Currently only visible in the merchant dashboard. This id used to be
132
- * displayed to the user during the checkout.
124
+ * The customer-facing id of the order.
133
125
  */
134
126
  displayId?: string;
135
127
 
128
+ guest?: boolean;
129
+
130
+ impactOffsetProjects?: Array<unknown>;
131
+
136
132
  /**
137
- * @deprecated The list of line items for the order.
133
+ * The list of line items sold with the order.
138
134
  */
139
135
  lineItems?: Array<OrderCreateResponse.LineItem>;
140
136
 
141
137
  mandate?: OrderCreateResponse.Mandate;
142
138
 
143
139
  /**
144
- * @deprecated
140
+ * The financial address of the merchant associated with the order. Only available
141
+ * when requested via order/details and therefore requires authentication.
145
142
  */
146
143
  merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
147
144
 
148
145
  /**
149
- * Any data which will be stored and returned for this checkout session and
150
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
151
- * more info.
146
+ * Set of key-value pairs that you can attach to an object. This can be useful for
147
+ * storing additional information about the object in a structured format.
152
148
  */
153
149
  metadata?: Record<string, unknown>;
154
150
 
155
151
  /**
156
- * The source bank account where the money is send from.
152
+ * The project related to the order.
153
+ */
154
+ offsetProject?: string;
155
+
156
+ /**
157
+ * The financial address of the payer associated with the order. Only available
158
+ * after successful PIS flow.
157
159
  */
158
160
  payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
159
161
 
160
162
  paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
161
163
 
162
164
  /**
163
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
165
+ * The payment mode of the order. Can be either settlement or direct.
164
166
  */
165
- paymentMode?: 'settlement' | 'direct';
167
+ paymentMode?: 'direct' | 'settlement';
166
168
 
167
169
  /**
168
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
169
- * actions in your system.
170
+ * Deprecated. The status of the payment.
170
171
  */
171
172
  paymentStatus?:
173
+ | 'not_settled'
172
174
  | 'failed'
173
175
  | 'canceled'
174
176
  | 'processing'
@@ -178,7 +180,6 @@ export interface OrderCreateResponse {
178
180
  | 'refunded'
179
181
  | 'refund_failed'
180
182
  | 'partially_refunded'
181
- | 'not_settled'
182
183
  | 'disputed';
183
184
 
184
185
  /**
@@ -187,54 +188,51 @@ export interface OrderCreateResponse {
187
188
  refundAmount?: number;
188
189
 
189
190
  /**
190
- * The list of refunds connected to this order.
191
+ * All partial and total refunds of this order.
191
192
  */
192
193
  refunds?: Array<OrderCreateResponse.Refund>;
193
194
 
194
195
  /**
195
- * The shopper object. Contains information collected from the user during the
196
- * Checkout.
196
+ * If set to true, a payment mandate will be created for the user. This is
197
+ * currently in alpha and defaults to false.
198
+ */
199
+ setupPaymentMandate?: boolean;
200
+
201
+ shippingAddress?: OrderCreateResponse.ShippingAddress;
202
+
203
+ shopLogo?: string;
204
+
205
+ /**
206
+ * Information about the customer who finished the order.
197
207
  */
198
208
  shopper?: OrderCreateResponse.Shopper;
199
209
 
200
210
  /**
201
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
202
- * collected in the Checkout.
211
+ * Deprecated. The email of the customer who completed the order.
203
212
  */
204
213
  shopperEmail?: string;
205
214
 
206
215
  statusClassification?: OrderCreateResponse.StatusClassification;
207
216
 
208
- /**
209
- * List of status history items for the order, used for logging every update on
210
- * status.
211
- */
212
217
  statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
213
218
 
214
219
  /**
215
- * The subaccount id of the order.
220
+ * The subaccount id of the merchant.
216
221
  */
217
222
  subaccountId?: string;
218
223
 
219
- /**
220
- * The legal name of the subaccount
221
- */
222
224
  subaccountLegalName?: string;
225
+
226
+ trees?: number;
223
227
  }
224
228
 
225
229
  export namespace OrderCreateResponse {
226
230
  /**
227
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
228
- * represents EUR 10.23. Any amount of decimal places can be provided on
229
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
230
- * as this is the format accepted by most banks.
231
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
231
232
  */
232
233
  export interface Price {
233
234
  currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
234
235
 
235
- /**
236
- * The total amount to be paid.
237
- */
238
236
  total: number;
239
237
 
240
238
  shipping?: number;
@@ -246,16 +244,9 @@ export namespace OrderCreateResponse {
246
244
  vat?: number;
247
245
  }
248
246
 
249
- /**
250
- * The billing address of the customer.
251
- */
252
247
  export interface BillingAddress {
253
248
  city: string;
254
249
 
255
- /**
256
- * The country code in
257
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
258
- */
259
250
  country:
260
251
  | 'AF'
261
252
  | 'AL'
@@ -508,24 +499,29 @@ export namespace OrderCreateResponse {
508
499
  | 'SS'
509
500
  | 'XK';
510
501
 
502
+ firstName: string;
503
+
504
+ lastName: string;
505
+
511
506
  line1: string;
512
507
 
513
- zipCode: string;
508
+ line2: string;
514
509
 
515
- firstName?: string;
510
+ region: string;
516
511
 
517
- lastName?: string;
512
+ zipCode: string;
513
+ }
518
514
 
519
- line2?: string;
515
+ export interface ClimateActionMode {
516
+ amount: number;
520
517
 
521
- region?: string;
518
+ type: 'transaction' | 'amount';
522
519
  }
523
520
 
521
+ /**
522
+ * The destination bank account and statement reference for the order.
523
+ */
524
524
  export interface Destination {
525
- /**
526
- * The validation logic is based on the "type" field. For example, if "type" is set
527
- * to "iban", the "iban" object must be filled out.
528
- */
529
525
  bankAccount: Destination.BankAccount;
530
526
 
531
527
  /**
@@ -536,23 +532,8 @@ export namespace OrderCreateResponse {
536
532
  }
537
533
 
538
534
  export namespace Destination {
539
- /**
540
- * The validation logic is based on the "type" field. For example, if "type" is set
541
- * to "iban", the "iban" object must be filled out.
542
- */
543
535
  export interface BankAccount {
544
- /**
545
- * The type of the financial address. The actual destination is determined by this
546
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
547
- * validation will fail if you set e.g. type="iban", but then not fill any values
548
- * in the "iban" object.
549
- *
550
- * - iban: The IBAN of the account
551
- * - sort_code: The sort code of the account
552
- * - bank_code: The bank code of the account
553
- * - bban: The BBAN of the account
554
- */
555
- type: string;
536
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
556
537
 
557
538
  bankCode?: BankAccount.BankCode;
558
539
 
@@ -560,14 +541,13 @@ export namespace OrderCreateResponse {
560
541
 
561
542
  iban?: BankAccount.Iban;
562
543
 
544
+ paymentReference?: string;
545
+
563
546
  sortCode?: BankAccount.SortCode;
564
547
  }
565
548
 
566
549
  export namespace BankAccount {
567
550
  export interface BankCode {
568
- /**
569
- * The name of the account holder.
570
- */
571
551
  accountHolderName: string;
572
552
 
573
553
  accountNumber: string;
@@ -576,9 +556,6 @@ export namespace OrderCreateResponse {
576
556
  }
577
557
 
578
558
  export interface Bban {
579
- /**
580
- * The name of the account holder.
581
- */
582
559
  accountHolderName: string;
583
560
 
584
561
  bban: string;
@@ -587,9 +564,6 @@ export namespace OrderCreateResponse {
587
564
  }
588
565
 
589
566
  export interface Iban {
590
- /**
591
- * The name of the account holder.
592
- */
593
567
  accountHolderName: string;
594
568
 
595
569
  iban: string;
@@ -598,9 +572,6 @@ export namespace OrderCreateResponse {
598
572
  }
599
573
 
600
574
  export interface SortCode {
601
- /**
602
- * The name of the account holder.
603
- */
604
575
  accountHolderName: string;
605
576
 
606
577
  accountNumber: string;
@@ -612,107 +583,76 @@ export namespace OrderCreateResponse {
612
583
 
613
584
  export interface LineItem {
614
585
  /**
615
- * The total amount of all line items, i.e. single amount \* quantity. Given in
616
- * decimals, i.e. 10.23 represents EUR 10.23.
586
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
587
+ * and quantity 4, amount would be equal to 12.00.
617
588
  */
618
589
  amount: number;
619
590
 
620
591
  /**
621
- * The name of the line item.
592
+ * Customer-facing name of the line item.
622
593
  */
623
594
  name: string;
624
595
 
625
- /**
626
- * The quantity of the line item.
627
- */
628
- quantity: number;
629
-
630
- /**
631
- * The net amount of a single item.
632
- */
633
596
  singleNet: number;
634
597
 
635
- /**
636
- * The VAT amount of a single item.
637
- */
638
598
  singleVat: number;
639
599
 
640
- /**
641
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
642
- * the line item.
643
- */
644
- category?: string;
600
+ category?:
601
+ | '5045'
602
+ | '5065'
603
+ | '5094'
604
+ | '5192'
605
+ | '5193'
606
+ | '5499'
607
+ | '5655'
608
+ | '5691'
609
+ | '5712'
610
+ | '5722'
611
+ | '5812'
612
+ | '5814'
613
+ | '5912'
614
+ | '5977'
615
+ | '5999'
616
+ | '7629';
617
+
618
+ co2Grams?: number;
645
619
 
646
- /**
647
- * The
648
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
649
- * of the line item.
650
- */
651
620
  EAN?: string;
652
621
 
653
622
  /**
654
- * The image of the line item as a URL.
623
+ * An image of the line item. Valid URLs are accepted only.
655
624
  */
656
625
  image?: string;
657
626
 
658
627
  /**
659
- * The internal unique identifier of the line item.
628
+ * Quantity of this lineItem.
629
+ */
630
+ quantity?: number;
631
+
632
+ /**
633
+ * An internal unique id stored to this line item.
660
634
  */
661
635
  referenceId?: string;
662
636
  }
663
637
 
664
638
  export interface Mandate {
665
- /**
666
- * The name of the account holder who signs the mandate.
667
- */
668
- accountHolderName?: string;
639
+ accountHolderName: string;
669
640
 
670
- /**
671
- * Additional information to display to the user during the mandate setup. This
672
- * information is not used to setup any recurrence on the mandate. It is only
673
- * displayed to the user during checkout.
674
- */
675
641
  additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
676
642
 
677
- /**
678
- * Mandate creditor data
679
- */
680
643
  creditor?: Mandate.Creditor;
681
644
 
682
- /**
683
- * The reference of the mandate going to be setup
684
- */
685
645
  reference?: string;
686
646
 
687
- /**
688
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
689
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
690
- * mandate setup request.
691
- */
692
647
  referenceId?: string;
693
648
 
694
- /**
695
- * If true, a ready to use mandate will be set up after the payment flow.
696
- */
697
649
  setup?: boolean;
698
650
 
699
- /**
700
- * The email of the user who signs the mandate.
701
- */
702
651
  userNotificationEmail?: string;
703
652
  }
704
653
 
705
654
  export namespace Mandate {
706
- /**
707
- * Additional information to display to the user during the mandate setup. This
708
- * information is not used to setup any recurrence on the mandate. It is only
709
- * displayed to the user during checkout.
710
- */
711
655
  export interface AdditionalDisplayInformation {
712
- /**
713
- * The intended cadence of charges used for displaying purpose only. On demand
714
- * would be used for unscheduled charges.
715
- */
716
656
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
717
657
 
718
658
  price?: AdditionalDisplayInformation.Price;
@@ -720,19 +660,12 @@ export namespace OrderCreateResponse {
720
660
 
721
661
  export namespace AdditionalDisplayInformation {
722
662
  export interface Price {
723
- /**
724
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
725
- * 10.23 EUR.
726
- */
727
- amount?: number;
663
+ amount: number;
728
664
 
729
- currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
665
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
730
666
  }
731
667
  }
732
668
 
733
- /**
734
- * Mandate creditor data
735
- */
736
669
  export interface Creditor {
737
670
  id?: string;
738
671
 
@@ -741,42 +674,25 @@ export namespace OrderCreateResponse {
741
674
  }
742
675
 
743
676
  /**
744
- * @deprecated
677
+ * The financial address of the merchant associated with the order. Only available
678
+ * when requested via order/details and therefore requires authentication.
745
679
  */
746
680
  export interface MerchantFinancialAddress {
681
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
682
+
747
683
  bankCode?: MerchantFinancialAddress.BankCode;
748
684
 
749
685
  bban?: MerchantFinancialAddress.Bban;
750
686
 
751
687
  iban?: MerchantFinancialAddress.Iban;
752
688
 
753
- /**
754
- * The payment reference for the order. This is the reference that will be visible
755
- * on the bank statement.
756
- */
757
689
  paymentReference?: string;
758
690
 
759
691
  sortCode?: MerchantFinancialAddress.SortCode;
760
-
761
- /**
762
- * The type of the financial address. The actual destination is determined by this
763
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
764
- * validation will fail if you set e.g. type="iban", but then not fill any values
765
- * in the "iban" object.
766
- *
767
- * - iban: The IBAN of the account
768
- * - sort_code: The sort code of the account
769
- * - bank_code: The bank code of the account
770
- * - bban: The BBAN of the account
771
- */
772
- type?: string;
773
692
  }
774
693
 
775
694
  export namespace MerchantFinancialAddress {
776
695
  export interface BankCode {
777
- /**
778
- * The name of the account holder.
779
- */
780
696
  accountHolderName: string;
781
697
 
782
698
  accountNumber: string;
@@ -785,9 +701,6 @@ export namespace OrderCreateResponse {
785
701
  }
786
702
 
787
703
  export interface Bban {
788
- /**
789
- * The name of the account holder.
790
- */
791
704
  accountHolderName: string;
792
705
 
793
706
  bban: string;
@@ -796,9 +709,6 @@ export namespace OrderCreateResponse {
796
709
  }
797
710
 
798
711
  export interface Iban {
799
- /**
800
- * The name of the account holder.
801
- */
802
712
  accountHolderName: string;
803
713
 
804
714
  iban: string;
@@ -807,9 +717,6 @@ export namespace OrderCreateResponse {
807
717
  }
808
718
 
809
719
  export interface SortCode {
810
- /**
811
- * The name of the account holder.
812
- */
813
720
  accountHolderName: string;
814
721
 
815
722
  accountNumber: string;
@@ -819,21 +726,11 @@ export namespace OrderCreateResponse {
819
726
  }
820
727
 
821
728
  /**
822
- * The source bank account where the money is send from.
729
+ * The financial address of the payer associated with the order. Only available
730
+ * after successful PIS flow.
823
731
  */
824
732
  export interface PayerFinancialAddress {
825
- /**
826
- * The type of the financial address. The actual destination is determined by this
827
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
828
- * validation will fail if you set e.g. type="iban", but then not fill any values
829
- * in the "iban" object.
830
- *
831
- * - iban: The IBAN of the account
832
- * - sort_code: The sort code of the account
833
- * - bank_code: The bank code of the account
834
- * - bban: The BBAN of the account
835
- */
836
- type: string;
733
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
837
734
 
838
735
  bankCode?: PayerFinancialAddress.BankCode;
839
736
 
@@ -850,18 +747,12 @@ export namespace OrderCreateResponse {
850
747
 
851
748
  code: string;
852
749
 
853
- /**
854
- * The name of the account holder.
855
- */
856
750
  accountHolderName?: string;
857
751
  }
858
752
 
859
753
  export interface Bban {
860
754
  bban: string;
861
755
 
862
- /**
863
- * The name of the account holder.
864
- */
865
756
  accountHolderName?: string;
866
757
 
867
758
  bic?: string;
@@ -870,9 +761,6 @@ export namespace OrderCreateResponse {
870
761
  export interface Iban {
871
762
  iban: string;
872
763
 
873
- /**
874
- * The name of the account holder.
875
- */
876
764
  accountHolderName?: string;
877
765
 
878
766
  bic?: string;
@@ -883,354 +771,45 @@ export namespace OrderCreateResponse {
883
771
 
884
772
  sortCode: string;
885
773
 
886
- /**
887
- * The name of the account holder.
888
- */
889
774
  accountHolderName?: string;
890
775
  }
891
776
  }
892
777
 
893
- /**
894
- * A Refund object. This corresponds to one Refund request.
895
- */
896
778
  export interface Refund {
897
- id: string;
898
-
899
- amount: number;
900
-
901
- createdAt: string;
902
-
903
- referenceId: string;
904
-
905
779
  /**
906
- * The status of the refund. Always use the status of the order as your source of
907
- * truth to trigger actions in your dashboard.
780
+ * The unique id of this refund request.
908
781
  */
909
- status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
910
-
911
- updatedAt: string;
912
-
913
- description?: string;
914
- }
915
-
916
- /**
917
- * The shopper object. Contains information collected from the user during the
918
- * Checkout.
919
- */
920
- export interface Shopper {
921
- email?: string;
922
-
923
- phoneNumber?: string;
924
- }
782
+ id: string;
925
783
 
926
- export interface StatusClassification {
927
784
  /**
928
- * Populated with the primary payment initiation failure classsification if
929
- * available.
785
+ * The amount of the refund in decimals.
930
786
  */
931
- primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
787
+ amount: number;
788
+
789
+ createdAt: unknown;
932
790
 
933
791
  /**
934
- * Populated with the secondary payment initiation failure classsification if
935
- * available.
792
+ * The unique id of this refund request. This can be set when requesting the
793
+ * refund.
936
794
  */
937
- secondary?:
938
- | 'timeout'
939
- | 'wrong_credentials'
940
- | 'incorrect_2fa_response'
941
- | 'payment_rejected'
942
- | 'insufficient_funds'
943
- | 'cancelled'
944
- | 'connection_to_bank_failed'
945
- | 'international_transfer_blocked'
946
- | 'international_transfer_limit_exceeded'
947
- | 'user_blocked'
948
- | 'bank_error'
949
- | 'instant_transfers_not_enabled'
950
- | 'no_active_tan_methods_available'
951
- | 'account_limit_exceeded'
952
- | 'bank_under_maintenance'
953
- | 'pin_blocked'
954
- | 'payment_not_settled';
955
- }
795
+ referenceId: string;
956
796
 
957
- export interface StatusHistoryList {
958
797
  /**
959
- * The order status. This status symbolises the state of the user's payment
960
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
961
- * information.
798
+ * The current status of this refund.
962
799
  */
963
- currentStatus:
964
- | 'failed'
965
- | 'canceled'
966
- | 'processing'
967
- | 'waiting_for_payment'
968
- | 'paid'
969
- | 'in_refund'
970
- | 'refunded'
971
- | 'refund_failed'
972
- | 'partially_refunded'
973
- | 'in_dispute'
974
- | 'disputed'
975
- | 'refused';
976
-
977
- reason: string;
800
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
978
801
 
979
- updatedAt: string;
802
+ updatedAt: unknown;
980
803
 
981
804
  /**
982
- * The order status. This status symbolises the state of the user's payment
983
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
984
- * information.
805
+ * The description of the refund.
985
806
  */
986
- previousStatus?:
987
- | 'failed'
988
- | 'canceled'
989
- | 'processing'
990
- | 'waiting_for_payment'
991
- | 'paid'
992
- | 'in_refund'
993
- | 'refunded'
994
- | 'refund_failed'
995
- | 'partially_refunded'
996
- | 'in_dispute'
997
- | 'disputed'
998
- | 'refused'
999
- | null;
807
+ description?: string;
1000
808
  }
1001
- }
1002
-
1003
- export interface OrderRetrieveResponse {
1004
- /**
1005
- * The Ivy unique identifier for the order.
1006
- */
1007
- id: string;
1008
-
1009
- /**
1010
- * @deprecated The unique identifier for the merchantApp which initiated the order
1011
- * / payment attempt.
1012
- */
1013
- appId: string;
1014
-
1015
- /**
1016
- * The Ivy fee for the payment.
1017
- */
1018
- applicationFeeAmount: number;
1019
-
1020
- createdAt: string;
1021
-
1022
- instantPaymentScheme: boolean;
1023
-
1024
- /**
1025
- * @deprecated Deprecated in favor of `appId`.
1026
- */
1027
- merchantAppId: string;
1028
-
1029
- /**
1030
- * The unique identifier for the merchant which initiated the order / payment
1031
- * attempt.
1032
- */
1033
- merchantId: string;
1034
-
1035
- /**
1036
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1037
- * represents EUR 10.23. Any amount of decimal places can be provided on
1038
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
1039
- * as this is the format accepted by most banks.
1040
- */
1041
- price: OrderRetrieveResponse.Price;
1042
809
 
1043
- /**
1044
- * An internal reference id which will be stored with the checkout & corresponding
1045
- * order. Needs to be unique per shop per order and can be up to 200 characters.
1046
- */
1047
- referenceId: string;
1048
-
1049
- /**
1050
- * The name of the merchant which initiated the order.
1051
- */
1052
- shopName: string;
1053
-
1054
- /**
1055
- * The order status. This status symbolises the state of the user's payment
1056
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1057
- * information.
1058
- */
1059
- status:
1060
- | 'failed'
1061
- | 'canceled'
1062
- | 'processing'
1063
- | 'waiting_for_payment'
1064
- | 'paid'
1065
- | 'in_refund'
1066
- | 'refunded'
1067
- | 'refund_failed'
1068
- | 'partially_refunded'
1069
- | 'in_dispute'
1070
- | 'disputed'
1071
- | 'refused';
1072
-
1073
- updatedAt: string;
1074
-
1075
- /**
1076
- * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
1077
- * if no payment was made.
1078
- */
1079
- bankId?: string;
1080
-
1081
- /**
1082
- * @deprecated The bank statement reference of the payment for the order. This is
1083
- * the reference that will be visible on the bank statement.
1084
- */
1085
- bankStatementReference?: string;
1086
-
1087
- /**
1088
- * The billing address of the customer.
1089
- */
1090
- billingAddress?: OrderRetrieveResponse.BillingAddress;
1091
-
1092
- /**
1093
- * The merchant category code or
1094
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
1095
- */
1096
- category?: string;
1097
-
1098
- /**
1099
- * The unique identifier of the customer who placed the order.
1100
- */
1101
- customerId?: string;
1102
-
1103
- destination?: OrderRetrieveResponse.Destination;
1104
-
1105
- /**
1106
- * @deprecated Currently only visible in the merchant dashboard. This id used to be
1107
- * displayed to the user during the checkout.
1108
- */
1109
- displayId?: string;
1110
-
1111
- /**
1112
- * @deprecated The list of line items for the order.
1113
- */
1114
- lineItems?: Array<OrderRetrieveResponse.LineItem>;
1115
-
1116
- mandate?: OrderRetrieveResponse.Mandate;
1117
-
1118
- /**
1119
- * @deprecated
1120
- */
1121
- merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
810
+ export interface ShippingAddress {
811
+ city: string;
1122
812
 
1123
- /**
1124
- * Any data which will be stored and returned for this checkout session and
1125
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
1126
- * more info.
1127
- */
1128
- metadata?: Record<string, unknown>;
1129
-
1130
- /**
1131
- * The source bank account where the money is send from.
1132
- */
1133
- payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
1134
-
1135
- paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1136
-
1137
- /**
1138
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
1139
- */
1140
- paymentMode?: 'settlement' | 'direct';
1141
-
1142
- /**
1143
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
1144
- * actions in your system.
1145
- */
1146
- paymentStatus?:
1147
- | 'failed'
1148
- | 'canceled'
1149
- | 'processing'
1150
- | 'requires_action'
1151
- | 'succeeded'
1152
- | 'in_refund'
1153
- | 'refunded'
1154
- | 'refund_failed'
1155
- | 'partially_refunded'
1156
- | 'not_settled'
1157
- | 'disputed';
1158
-
1159
- /**
1160
- * The total amount in the currency of all successful refunds for this order
1161
- */
1162
- refundAmount?: number;
1163
-
1164
- /**
1165
- * The list of refunds connected to this order.
1166
- */
1167
- refunds?: Array<OrderRetrieveResponse.Refund>;
1168
-
1169
- /**
1170
- * The shopper object. Contains information collected from the user during the
1171
- * Checkout.
1172
- */
1173
- shopper?: OrderRetrieveResponse.Shopper;
1174
-
1175
- /**
1176
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
1177
- * collected in the Checkout.
1178
- */
1179
- shopperEmail?: string;
1180
-
1181
- statusClassification?: OrderRetrieveResponse.StatusClassification;
1182
-
1183
- /**
1184
- * List of status history items for the order, used for logging every update on
1185
- * status.
1186
- */
1187
- statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
1188
-
1189
- /**
1190
- * The subaccount id of the order.
1191
- */
1192
- subaccountId?: string;
1193
-
1194
- /**
1195
- * The legal name of the subaccount
1196
- */
1197
- subaccountLegalName?: string;
1198
- }
1199
-
1200
- export namespace OrderRetrieveResponse {
1201
- /**
1202
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1203
- * represents EUR 10.23. Any amount of decimal places can be provided on
1204
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
1205
- * as this is the format accepted by most banks.
1206
- */
1207
- export interface Price {
1208
- currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1209
-
1210
- /**
1211
- * The total amount to be paid.
1212
- */
1213
- total: number;
1214
-
1215
- shipping?: number;
1216
-
1217
- subTotal?: number;
1218
-
1219
- totalNet?: number;
1220
-
1221
- vat?: number;
1222
- }
1223
-
1224
- /**
1225
- * The billing address of the customer.
1226
- */
1227
- export interface BillingAddress {
1228
- city: string;
1229
-
1230
- /**
1231
- * The country code in
1232
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1233
- */
1234
813
  country:
1235
814
  | 'AF'
1236
815
  | 'AL'
@@ -1483,211 +1062,742 @@ export namespace OrderRetrieveResponse {
1483
1062
  | 'SS'
1484
1063
  | 'XK';
1485
1064
 
1486
- line1: string;
1065
+ firstName: string;
1487
1066
 
1488
- zipCode: string;
1067
+ lastName: string;
1489
1068
 
1490
- firstName?: string;
1069
+ line1: string;
1491
1070
 
1492
- lastName?: string;
1071
+ line2: string;
1493
1072
 
1494
- line2?: string;
1073
+ region: string;
1495
1074
 
1496
- region?: string;
1075
+ zipCode: string;
1497
1076
  }
1498
1077
 
1499
- export interface Destination {
1500
- /**
1501
- * The validation logic is based on the "type" field. For example, if "type" is set
1502
- * to "iban", the "iban" object must be filled out.
1503
- */
1504
- bankAccount: Destination.BankAccount;
1078
+ /**
1079
+ * Information about the customer who finished the order.
1080
+ */
1081
+ export interface Shopper {
1082
+ email?: string;
1505
1083
 
1506
- /**
1507
- * The bank statement reference of the payment for the order. This is the reference
1508
- * that will be visible on the bank statement.
1509
- */
1510
- bankStatementReference: string;
1084
+ phoneNumber?: string;
1511
1085
  }
1512
1086
 
1513
- export namespace Destination {
1514
- /**
1515
- * The validation logic is based on the "type" field. For example, if "type" is set
1516
- * to "iban", the "iban" object must be filled out.
1517
- */
1518
- export interface BankAccount {
1519
- /**
1520
- * The type of the financial address. The actual destination is determined by this
1521
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1522
- * validation will fail if you set e.g. type="iban", but then not fill any values
1523
- * in the "iban" object.
1524
- *
1525
- * - iban: The IBAN of the account
1526
- * - sort_code: The sort code of the account
1527
- * - bank_code: The bank code of the account
1528
- * - bban: The BBAN of the account
1529
- */
1530
- type: string;
1087
+ export interface StatusClassification {
1088
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1531
1089
 
1532
- bankCode?: BankAccount.BankCode;
1090
+ secondary?:
1091
+ | 'timeout'
1092
+ | 'wrong_credentials'
1093
+ | 'incorrect_2fa_response'
1094
+ | 'payment_rejected'
1095
+ | 'insufficient_funds'
1096
+ | 'cancelled'
1097
+ | 'connection_to_bank_failed'
1098
+ | 'international_transfer_blocked'
1099
+ | 'international_transfer_limit_exceeded'
1100
+ | 'user_blocked'
1101
+ | 'bank_error'
1102
+ | 'instant_transfers_not_enabled'
1103
+ | 'no_active_tan_methods_available'
1104
+ | 'account_limit_exceeded'
1105
+ | 'bank_under_maintenance'
1106
+ | 'pin_blocked'
1107
+ | 'payment_not_settled';
1108
+ }
1533
1109
 
1534
- bban?: BankAccount.Bban;
1110
+ export interface StatusHistoryList {
1111
+ createdAt: unknown;
1535
1112
 
1536
- iban?: BankAccount.Iban;
1113
+ currentStatus:
1114
+ | 'failed'
1115
+ | 'canceled'
1116
+ | 'processing'
1117
+ | 'waiting_for_payment'
1118
+ | 'paid'
1119
+ | 'in_refund'
1120
+ | 'refunded'
1121
+ | 'refund_failed'
1122
+ | 'partially_refunded'
1123
+ | 'in_dispute'
1124
+ | 'disputed'
1125
+ | 'refused';
1537
1126
 
1538
- sortCode?: BankAccount.SortCode;
1539
- }
1127
+ reason:
1128
+ | 'ORDER_CREATED'
1129
+ | 'CHECKOUT_SESSION_ABORTED'
1130
+ | 'PAYMENT_SUCCEEDED'
1131
+ | 'PAYMENT_INITIATED'
1132
+ | 'ORDER_CANCELED'
1133
+ | 'ORDER_REFUND_INITIATED'
1134
+ | 'ORDER_REFUNDED'
1135
+ | 'REFUND_CHARGE_SUCCEEDED'
1136
+ | 'REFUND_UPDATED'
1137
+ | 'CHECKOUT_COMPLETED'
1138
+ | 'PIS_PAYMENT_INITIATED'
1139
+ | 'PIS_PAYMENT_UPDATED'
1140
+ | 'PIS_PAYMENT_SUCCEEDED'
1141
+ | 'PAYMENT_NOT_SETTLED'
1142
+ | 'PAYMENT_INITIATION_FAILED'
1143
+ | 'PAYMENT_CANCELED'
1144
+ | 'PAYMENT_FAILED'
1145
+ | 'CHECKOUT_SESSION_CREATED'
1146
+ | 'EXPIRED_CHECKOUT_SESSION_ABORTED'
1147
+ | 'DISPUTE'
1148
+ | 'PENDING_PAYMENT_ATTEMPTS_FOUND'
1149
+ | 'AML_FREEZE'
1150
+ | 'MANUAL_FREEZE'
1151
+ | 'MANUAL_UNFREEZE'
1152
+ | 'ORDER_MANUALLY_REOPENED';
1153
+
1154
+ updatedAt: unknown;
1540
1155
 
1541
- export namespace BankAccount {
1542
- export interface BankCode {
1543
- /**
1544
- * The name of the account holder.
1545
- */
1546
- accountHolderName: string;
1156
+ previousStatus?:
1157
+ | 'failed'
1158
+ | 'canceled'
1159
+ | 'processing'
1160
+ | 'waiting_for_payment'
1161
+ | 'paid'
1162
+ | 'in_refund'
1163
+ | 'refunded'
1164
+ | 'refund_failed'
1165
+ | 'partially_refunded'
1166
+ | 'in_dispute'
1167
+ | 'disputed'
1168
+ | 'refused'
1169
+ | null;
1170
+ }
1171
+ }
1547
1172
 
1548
- accountNumber: string;
1173
+ export interface OrderRetrieveResponse {
1174
+ /**
1175
+ * The unique id for the order.
1176
+ */
1177
+ id: string;
1549
1178
 
1550
- code: string;
1551
- }
1179
+ /**
1180
+ * The unique id for the merchantApp which initiated the order.
1181
+ */
1182
+ appId: string;
1552
1183
 
1553
- export interface Bban {
1554
- /**
1555
- * The name of the account holder.
1556
- */
1557
- accountHolderName: string;
1184
+ /**
1185
+ * The amount of application fee collected with the order.
1186
+ */
1187
+ applicationFeeAmount: number;
1558
1188
 
1559
- bban: string;
1189
+ createdAt: unknown;
1560
1190
 
1561
- bic?: string;
1562
- }
1191
+ instantPaymentScheme: boolean;
1563
1192
 
1564
- export interface Iban {
1565
- /**
1566
- * The name of the account holder.
1567
- */
1568
- accountHolderName: string;
1193
+ /**
1194
+ * Same as appId
1195
+ */
1196
+ merchantAppId: string;
1569
1197
 
1570
- iban: string;
1198
+ merchantId: string;
1571
1199
 
1572
- bic?: string;
1573
- }
1200
+ /**
1201
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
1202
+ */
1203
+ price: OrderRetrieveResponse.Price;
1574
1204
 
1575
- export interface SortCode {
1576
- /**
1577
- * The name of the account holder.
1578
- */
1579
- accountHolderName: string;
1205
+ /**
1206
+ * A unique id for the order which can be set when creating the checkoutSession.
1207
+ */
1208
+ referenceId: string;
1580
1209
 
1581
- accountNumber: string;
1210
+ /**
1211
+ * The legal name of the merchant which initiated the order.
1212
+ */
1213
+ shopName: string;
1582
1214
 
1583
- sortCode: string;
1584
- }
1585
- }
1586
- }
1215
+ /**
1216
+ * The status of the order. As soon as this value is 'paid', you can ship the
1217
+ * order.
1218
+ */
1219
+ status:
1220
+ | 'failed'
1221
+ | 'canceled'
1222
+ | 'processing'
1223
+ | 'waiting_for_payment'
1224
+ | 'paid'
1225
+ | 'in_refund'
1226
+ | 'refunded'
1227
+ | 'refund_failed'
1228
+ | 'partially_refunded'
1229
+ | 'in_dispute'
1230
+ | 'disputed'
1231
+ | 'refused';
1587
1232
 
1588
- export interface LineItem {
1589
- /**
1590
- * The total amount of all line items, i.e. single amount \* quantity. Given in
1591
- * decimals, i.e. 10.23 represents EUR 10.23.
1592
- */
1593
- amount: number;
1233
+ updatedAt: unknown;
1594
1234
 
1595
- /**
1596
- * The name of the line item.
1597
- */
1598
- name: string;
1235
+ /**
1236
+ * The unique identifier of the customer's bank.
1237
+ */
1238
+ bankId?: string;
1599
1239
 
1600
- /**
1601
- * The quantity of the line item.
1602
- */
1603
- quantity: number;
1240
+ /**
1241
+ * The reference that will be shown on the bank statement of the customer. Only
1242
+ * available after a successful DirectDebit initiation.
1243
+ */
1244
+ bankStatementReference?: string;
1604
1245
 
1605
- /**
1606
- * The net amount of a single item.
1607
- */
1608
- singleNet: number;
1246
+ billingAddress?: OrderRetrieveResponse.BillingAddress;
1609
1247
 
1610
- /**
1611
- * The VAT amount of a single item.
1612
- */
1613
- singleVat: number;
1248
+ /**
1249
+ * The merchant category code for the account. MCCs are used to classify businesses
1250
+ * based on the goods or services they provide.
1251
+ */
1252
+ category?: string;
1614
1253
 
1615
- /**
1616
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
1617
- * the line item.
1618
- */
1619
- category?: string;
1254
+ climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
1620
1255
 
1621
- /**
1622
- * The
1623
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
1624
- * of the line item.
1625
- */
1626
- EAN?: string;
1256
+ co2Grams?: number;
1627
1257
 
1628
- /**
1629
- * The image of the line item as a URL.
1630
- */
1631
- image?: string;
1258
+ /**
1259
+ * The unique identifier of the customer who placed the order.
1260
+ */
1261
+ customerId?: string;
1262
+
1263
+ /**
1264
+ * The destination bank account and statement reference for the order.
1265
+ */
1266
+ destination?: OrderRetrieveResponse.Destination;
1267
+
1268
+ /**
1269
+ * The customer-facing id of the order.
1270
+ */
1271
+ displayId?: string;
1272
+
1273
+ guest?: boolean;
1274
+
1275
+ impactOffsetProjects?: Array<unknown>;
1276
+
1277
+ /**
1278
+ * The list of line items sold with the order.
1279
+ */
1280
+ lineItems?: Array<OrderRetrieveResponse.LineItem>;
1281
+
1282
+ mandate?: OrderRetrieveResponse.Mandate;
1283
+
1284
+ /**
1285
+ * The financial address of the merchant associated with the order. Only available
1286
+ * when requested via order/details and therefore requires authentication.
1287
+ */
1288
+ merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
1289
+
1290
+ /**
1291
+ * Set of key-value pairs that you can attach to an object. This can be useful for
1292
+ * storing additional information about the object in a structured format.
1293
+ */
1294
+ metadata?: Record<string, unknown>;
1295
+
1296
+ /**
1297
+ * The project related to the order.
1298
+ */
1299
+ offsetProject?: string;
1300
+
1301
+ /**
1302
+ * The financial address of the payer associated with the order. Only available
1303
+ * after successful PIS flow.
1304
+ */
1305
+ payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
1306
+
1307
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1308
+
1309
+ /**
1310
+ * The payment mode of the order. Can be either settlement or direct.
1311
+ */
1312
+ paymentMode?: 'direct' | 'settlement';
1313
+
1314
+ /**
1315
+ * Deprecated. The status of the payment.
1316
+ */
1317
+ paymentStatus?:
1318
+ | 'not_settled'
1319
+ | 'failed'
1320
+ | 'canceled'
1321
+ | 'processing'
1322
+ | 'requires_action'
1323
+ | 'succeeded'
1324
+ | 'in_refund'
1325
+ | 'refunded'
1326
+ | 'refund_failed'
1327
+ | 'partially_refunded'
1328
+ | 'disputed';
1329
+
1330
+ /**
1331
+ * The total amount in the currency of all successful refunds for this order
1332
+ */
1333
+ refundAmount?: number;
1334
+
1335
+ /**
1336
+ * All partial and total refunds of this order.
1337
+ */
1338
+ refunds?: Array<OrderRetrieveResponse.Refund>;
1339
+
1340
+ /**
1341
+ * If set to true, a payment mandate will be created for the user. This is
1342
+ * currently in alpha and defaults to false.
1343
+ */
1344
+ setupPaymentMandate?: boolean;
1345
+
1346
+ shippingAddress?: OrderRetrieveResponse.ShippingAddress;
1347
+
1348
+ shopLogo?: string;
1349
+
1350
+ /**
1351
+ * Information about the customer who finished the order.
1352
+ */
1353
+ shopper?: OrderRetrieveResponse.Shopper;
1354
+
1355
+ /**
1356
+ * Deprecated. The email of the customer who completed the order.
1357
+ */
1358
+ shopperEmail?: string;
1359
+
1360
+ statusClassification?: OrderRetrieveResponse.StatusClassification;
1361
+
1362
+ statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
1363
+
1364
+ /**
1365
+ * The subaccount id of the merchant.
1366
+ */
1367
+ subaccountId?: string;
1368
+
1369
+ subaccountLegalName?: string;
1370
+
1371
+ trees?: number;
1372
+ }
1373
+
1374
+ export namespace OrderRetrieveResponse {
1375
+ /**
1376
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
1377
+ */
1378
+ export interface Price {
1379
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1380
+
1381
+ total: number;
1382
+
1383
+ shipping?: number;
1384
+
1385
+ subTotal?: number;
1386
+
1387
+ totalNet?: number;
1388
+
1389
+ vat?: number;
1390
+ }
1391
+
1392
+ export interface BillingAddress {
1393
+ city: string;
1394
+
1395
+ country:
1396
+ | 'AF'
1397
+ | 'AL'
1398
+ | 'DZ'
1399
+ | 'AS'
1400
+ | 'AD'
1401
+ | 'AO'
1402
+ | 'AI'
1403
+ | 'AQ'
1404
+ | 'AG'
1405
+ | 'AR'
1406
+ | 'AM'
1407
+ | 'AW'
1408
+ | 'AU'
1409
+ | 'AT'
1410
+ | 'AZ'
1411
+ | 'BS'
1412
+ | 'BH'
1413
+ | 'BD'
1414
+ | 'BB'
1415
+ | 'BY'
1416
+ | 'BE'
1417
+ | 'BZ'
1418
+ | 'BJ'
1419
+ | 'BM'
1420
+ | 'BT'
1421
+ | 'BO'
1422
+ | 'BA'
1423
+ | 'BW'
1424
+ | 'BV'
1425
+ | 'BR'
1426
+ | 'IO'
1427
+ | 'BN'
1428
+ | 'BG'
1429
+ | 'BF'
1430
+ | 'BI'
1431
+ | 'KH'
1432
+ | 'CM'
1433
+ | 'CA'
1434
+ | 'CV'
1435
+ | 'KY'
1436
+ | 'CF'
1437
+ | 'TD'
1438
+ | 'CL'
1439
+ | 'CN'
1440
+ | 'CX'
1441
+ | 'CC'
1442
+ | 'CO'
1443
+ | 'KM'
1444
+ | 'CG'
1445
+ | 'CD'
1446
+ | 'CK'
1447
+ | 'CR'
1448
+ | 'CI'
1449
+ | 'HR'
1450
+ | 'CU'
1451
+ | 'CY'
1452
+ | 'CZ'
1453
+ | 'DK'
1454
+ | 'DJ'
1455
+ | 'DM'
1456
+ | 'DO'
1457
+ | 'EC'
1458
+ | 'EG'
1459
+ | 'SV'
1460
+ | 'GQ'
1461
+ | 'ER'
1462
+ | 'EE'
1463
+ | 'ET'
1464
+ | 'FK'
1465
+ | 'FO'
1466
+ | 'FJ'
1467
+ | 'FI'
1468
+ | 'FR'
1469
+ | 'GF'
1470
+ | 'PF'
1471
+ | 'TF'
1472
+ | 'GA'
1473
+ | 'GM'
1474
+ | 'GE'
1475
+ | 'DE'
1476
+ | 'GH'
1477
+ | 'GI'
1478
+ | 'GR'
1479
+ | 'GL'
1480
+ | 'GD'
1481
+ | 'GP'
1482
+ | 'GU'
1483
+ | 'GT'
1484
+ | 'GN'
1485
+ | 'GW'
1486
+ | 'GY'
1487
+ | 'HT'
1488
+ | 'HM'
1489
+ | 'VA'
1490
+ | 'HN'
1491
+ | 'HK'
1492
+ | 'HU'
1493
+ | 'IS'
1494
+ | 'IN'
1495
+ | 'ID'
1496
+ | 'IR'
1497
+ | 'IQ'
1498
+ | 'IE'
1499
+ | 'IL'
1500
+ | 'IT'
1501
+ | 'JM'
1502
+ | 'JP'
1503
+ | 'JO'
1504
+ | 'KZ'
1505
+ | 'KE'
1506
+ | 'KI'
1507
+ | 'KP'
1508
+ | 'KR'
1509
+ | 'KW'
1510
+ | 'KG'
1511
+ | 'LA'
1512
+ | 'LV'
1513
+ | 'LB'
1514
+ | 'LS'
1515
+ | 'LR'
1516
+ | 'LY'
1517
+ | 'LI'
1518
+ | 'LT'
1519
+ | 'LU'
1520
+ | 'MO'
1521
+ | 'MG'
1522
+ | 'MW'
1523
+ | 'MY'
1524
+ | 'MV'
1525
+ | 'ML'
1526
+ | 'MT'
1527
+ | 'MH'
1528
+ | 'MQ'
1529
+ | 'MR'
1530
+ | 'MU'
1531
+ | 'YT'
1532
+ | 'MX'
1533
+ | 'FM'
1534
+ | 'MD'
1535
+ | 'MC'
1536
+ | 'MN'
1537
+ | 'MS'
1538
+ | 'MA'
1539
+ | 'MZ'
1540
+ | 'MM'
1541
+ | 'NA'
1542
+ | 'NR'
1543
+ | 'NP'
1544
+ | 'NL'
1545
+ | 'NC'
1546
+ | 'NZ'
1547
+ | 'NI'
1548
+ | 'NE'
1549
+ | 'NG'
1550
+ | 'NU'
1551
+ | 'NF'
1552
+ | 'MP'
1553
+ | 'MK'
1554
+ | 'NO'
1555
+ | 'OM'
1556
+ | 'PK'
1557
+ | 'PW'
1558
+ | 'PS'
1559
+ | 'PA'
1560
+ | 'PG'
1561
+ | 'PY'
1562
+ | 'PE'
1563
+ | 'PH'
1564
+ | 'PN'
1565
+ | 'PL'
1566
+ | 'PT'
1567
+ | 'PR'
1568
+ | 'QA'
1569
+ | 'RE'
1570
+ | 'RO'
1571
+ | 'RU'
1572
+ | 'RW'
1573
+ | 'SH'
1574
+ | 'KN'
1575
+ | 'LC'
1576
+ | 'PM'
1577
+ | 'VC'
1578
+ | 'WS'
1579
+ | 'SM'
1580
+ | 'ST'
1581
+ | 'SA'
1582
+ | 'SN'
1583
+ | 'SC'
1584
+ | 'SL'
1585
+ | 'SG'
1586
+ | 'SK'
1587
+ | 'SI'
1588
+ | 'SB'
1589
+ | 'SO'
1590
+ | 'ZA'
1591
+ | 'GS'
1592
+ | 'ES'
1593
+ | 'LK'
1594
+ | 'SD'
1595
+ | 'SR'
1596
+ | 'SJ'
1597
+ | 'SZ'
1598
+ | 'SE'
1599
+ | 'CH'
1600
+ | 'SY'
1601
+ | 'TW'
1602
+ | 'TJ'
1603
+ | 'TZ'
1604
+ | 'TH'
1605
+ | 'TL'
1606
+ | 'TG'
1607
+ | 'TK'
1608
+ | 'TO'
1609
+ | 'TT'
1610
+ | 'TN'
1611
+ | 'TR'
1612
+ | 'TM'
1613
+ | 'TC'
1614
+ | 'TV'
1615
+ | 'UG'
1616
+ | 'UA'
1617
+ | 'AE'
1618
+ | 'GB'
1619
+ | 'US'
1620
+ | 'UM'
1621
+ | 'UY'
1622
+ | 'UZ'
1623
+ | 'VU'
1624
+ | 'VE'
1625
+ | 'VN'
1626
+ | 'VG'
1627
+ | 'VI'
1628
+ | 'WF'
1629
+ | 'EH'
1630
+ | 'YE'
1631
+ | 'ZM'
1632
+ | 'ZW'
1633
+ | 'AX'
1634
+ | 'BQ'
1635
+ | 'CW'
1636
+ | 'GG'
1637
+ | 'IM'
1638
+ | 'JE'
1639
+ | 'ME'
1640
+ | 'BL'
1641
+ | 'MF'
1642
+ | 'RS'
1643
+ | 'SX'
1644
+ | 'SS'
1645
+ | 'XK';
1646
+
1647
+ firstName: string;
1648
+
1649
+ lastName: string;
1650
+
1651
+ line1: string;
1652
+
1653
+ line2: string;
1654
+
1655
+ region: string;
1656
+
1657
+ zipCode: string;
1658
+ }
1659
+
1660
+ export interface ClimateActionMode {
1661
+ amount: number;
1662
+
1663
+ type: 'transaction' | 'amount';
1664
+ }
1665
+
1666
+ /**
1667
+ * The destination bank account and statement reference for the order.
1668
+ */
1669
+ export interface Destination {
1670
+ bankAccount: Destination.BankAccount;
1632
1671
 
1633
1672
  /**
1634
- * The internal unique identifier of the line item.
1673
+ * The bank statement reference of the payment for the order. This is the reference
1674
+ * that will be visible on the bank statement.
1635
1675
  */
1636
- referenceId?: string;
1676
+ bankStatementReference: string;
1637
1677
  }
1638
1678
 
1639
- export interface Mandate {
1679
+ export namespace Destination {
1680
+ export interface BankAccount {
1681
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1682
+
1683
+ bankCode?: BankAccount.BankCode;
1684
+
1685
+ bban?: BankAccount.Bban;
1686
+
1687
+ iban?: BankAccount.Iban;
1688
+
1689
+ paymentReference?: string;
1690
+
1691
+ sortCode?: BankAccount.SortCode;
1692
+ }
1693
+
1694
+ export namespace BankAccount {
1695
+ export interface BankCode {
1696
+ accountHolderName: string;
1697
+
1698
+ accountNumber: string;
1699
+
1700
+ code: string;
1701
+ }
1702
+
1703
+ export interface Bban {
1704
+ accountHolderName: string;
1705
+
1706
+ bban: string;
1707
+
1708
+ bic?: string;
1709
+ }
1710
+
1711
+ export interface Iban {
1712
+ accountHolderName: string;
1713
+
1714
+ iban: string;
1715
+
1716
+ bic?: string;
1717
+ }
1718
+
1719
+ export interface SortCode {
1720
+ accountHolderName: string;
1721
+
1722
+ accountNumber: string;
1723
+
1724
+ sortCode: string;
1725
+ }
1726
+ }
1727
+ }
1728
+
1729
+ export interface LineItem {
1640
1730
  /**
1641
- * The name of the account holder who signs the mandate.
1731
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
1732
+ * and quantity 4, amount would be equal to 12.00.
1642
1733
  */
1643
- accountHolderName?: string;
1734
+ amount: number;
1644
1735
 
1645
1736
  /**
1646
- * Additional information to display to the user during the mandate setup. This
1647
- * information is not used to setup any recurrence on the mandate. It is only
1648
- * displayed to the user during checkout.
1737
+ * Customer-facing name of the line item.
1649
1738
  */
1650
- additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1739
+ name: string;
1740
+
1741
+ singleNet: number;
1742
+
1743
+ singleVat: number;
1744
+
1745
+ category?:
1746
+ | '5045'
1747
+ | '5065'
1748
+ | '5094'
1749
+ | '5192'
1750
+ | '5193'
1751
+ | '5499'
1752
+ | '5655'
1753
+ | '5691'
1754
+ | '5712'
1755
+ | '5722'
1756
+ | '5812'
1757
+ | '5814'
1758
+ | '5912'
1759
+ | '5977'
1760
+ | '5999'
1761
+ | '7629';
1762
+
1763
+ co2Grams?: number;
1764
+
1765
+ EAN?: string;
1651
1766
 
1652
1767
  /**
1653
- * Mandate creditor data
1768
+ * An image of the line item. Valid URLs are accepted only.
1654
1769
  */
1655
- creditor?: Mandate.Creditor;
1770
+ image?: string;
1656
1771
 
1657
1772
  /**
1658
- * The reference of the mandate going to be setup
1773
+ * Quantity of this lineItem.
1659
1774
  */
1660
- reference?: string;
1775
+ quantity?: number;
1661
1776
 
1662
1777
  /**
1663
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
1664
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
1665
- * mandate setup request.
1778
+ * An internal unique id stored to this line item.
1666
1779
  */
1667
1780
  referenceId?: string;
1781
+ }
1782
+
1783
+ export interface Mandate {
1784
+ accountHolderName: string;
1785
+
1786
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1787
+
1788
+ creditor?: Mandate.Creditor;
1789
+
1790
+ reference?: string;
1791
+
1792
+ referenceId?: string;
1668
1793
 
1669
- /**
1670
- * If true, a ready to use mandate will be set up after the payment flow.
1671
- */
1672
1794
  setup?: boolean;
1673
1795
 
1674
- /**
1675
- * The email of the user who signs the mandate.
1676
- */
1677
1796
  userNotificationEmail?: string;
1678
1797
  }
1679
1798
 
1680
1799
  export namespace Mandate {
1681
- /**
1682
- * Additional information to display to the user during the mandate setup. This
1683
- * information is not used to setup any recurrence on the mandate. It is only
1684
- * displayed to the user during checkout.
1685
- */
1686
1800
  export interface AdditionalDisplayInformation {
1687
- /**
1688
- * The intended cadence of charges used for displaying purpose only. On demand
1689
- * would be used for unscheduled charges.
1690
- */
1691
1801
  cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1692
1802
 
1693
1803
  price?: AdditionalDisplayInformation.Price;
@@ -1695,19 +1805,12 @@ export namespace OrderRetrieveResponse {
1695
1805
 
1696
1806
  export namespace AdditionalDisplayInformation {
1697
1807
  export interface Price {
1698
- /**
1699
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
1700
- * 10.23 EUR.
1701
- */
1702
- amount?: number;
1808
+ amount: number;
1703
1809
 
1704
- currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1810
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1705
1811
  }
1706
1812
  }
1707
1813
 
1708
- /**
1709
- * Mandate creditor data
1710
- */
1711
1814
  export interface Creditor {
1712
1815
  id?: string;
1713
1816
 
@@ -1716,42 +1819,25 @@ export namespace OrderRetrieveResponse {
1716
1819
  }
1717
1820
 
1718
1821
  /**
1719
- * @deprecated
1822
+ * The financial address of the merchant associated with the order. Only available
1823
+ * when requested via order/details and therefore requires authentication.
1720
1824
  */
1721
1825
  export interface MerchantFinancialAddress {
1826
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1827
+
1722
1828
  bankCode?: MerchantFinancialAddress.BankCode;
1723
1829
 
1724
1830
  bban?: MerchantFinancialAddress.Bban;
1725
1831
 
1726
1832
  iban?: MerchantFinancialAddress.Iban;
1727
1833
 
1728
- /**
1729
- * The payment reference for the order. This is the reference that will be visible
1730
- * on the bank statement.
1731
- */
1732
1834
  paymentReference?: string;
1733
1835
 
1734
1836
  sortCode?: MerchantFinancialAddress.SortCode;
1735
-
1736
- /**
1737
- * The type of the financial address. The actual destination is determined by this
1738
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1739
- * validation will fail if you set e.g. type="iban", but then not fill any values
1740
- * in the "iban" object.
1741
- *
1742
- * - iban: The IBAN of the account
1743
- * - sort_code: The sort code of the account
1744
- * - bank_code: The bank code of the account
1745
- * - bban: The BBAN of the account
1746
- */
1747
- type?: string;
1748
1837
  }
1749
1838
 
1750
1839
  export namespace MerchantFinancialAddress {
1751
1840
  export interface BankCode {
1752
- /**
1753
- * The name of the account holder.
1754
- */
1755
1841
  accountHolderName: string;
1756
1842
 
1757
1843
  accountNumber: string;
@@ -1760,9 +1846,6 @@ export namespace OrderRetrieveResponse {
1760
1846
  }
1761
1847
 
1762
1848
  export interface Bban {
1763
- /**
1764
- * The name of the account holder.
1765
- */
1766
1849
  accountHolderName: string;
1767
1850
 
1768
1851
  bban: string;
@@ -1771,9 +1854,6 @@ export namespace OrderRetrieveResponse {
1771
1854
  }
1772
1855
 
1773
1856
  export interface Iban {
1774
- /**
1775
- * The name of the account holder.
1776
- */
1777
1857
  accountHolderName: string;
1778
1858
 
1779
1859
  iban: string;
@@ -1782,9 +1862,6 @@ export namespace OrderRetrieveResponse {
1782
1862
  }
1783
1863
 
1784
1864
  export interface SortCode {
1785
- /**
1786
- * The name of the account holder.
1787
- */
1788
1865
  accountHolderName: string;
1789
1866
 
1790
1867
  accountNumber: string;
@@ -1794,21 +1871,11 @@ export namespace OrderRetrieveResponse {
1794
1871
  }
1795
1872
 
1796
1873
  /**
1797
- * The source bank account where the money is send from.
1874
+ * The financial address of the payer associated with the order. Only available
1875
+ * after successful PIS flow.
1798
1876
  */
1799
1877
  export interface PayerFinancialAddress {
1800
- /**
1801
- * The type of the financial address. The actual destination is determined by this
1802
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1803
- * validation will fail if you set e.g. type="iban", but then not fill any values
1804
- * in the "iban" object.
1805
- *
1806
- * - iban: The IBAN of the account
1807
- * - sort_code: The sort code of the account
1808
- * - bank_code: The bank code of the account
1809
- * - bban: The BBAN of the account
1810
- */
1811
- type: string;
1878
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
1812
1879
 
1813
1880
  bankCode?: PayerFinancialAddress.BankCode;
1814
1881
 
@@ -1825,18 +1892,12 @@ export namespace OrderRetrieveResponse {
1825
1892
 
1826
1893
  code: string;
1827
1894
 
1828
- /**
1829
- * The name of the account holder.
1830
- */
1831
1895
  accountHolderName?: string;
1832
1896
  }
1833
1897
 
1834
1898
  export interface Bban {
1835
1899
  bban: string;
1836
1900
 
1837
- /**
1838
- * The name of the account holder.
1839
- */
1840
1901
  accountHolderName?: string;
1841
1902
 
1842
1903
  bic?: string;
@@ -1845,9 +1906,6 @@ export namespace OrderRetrieveResponse {
1845
1906
  export interface Iban {
1846
1907
  iban: string;
1847
1908
 
1848
- /**
1849
- * The name of the account holder.
1850
- */
1851
1909
  accountHolderName?: string;
1852
1910
 
1853
1911
  bic?: string;
@@ -1858,39 +1916,312 @@ export namespace OrderRetrieveResponse {
1858
1916
 
1859
1917
  sortCode: string;
1860
1918
 
1861
- /**
1862
- * The name of the account holder.
1863
- */
1864
1919
  accountHolderName?: string;
1865
1920
  }
1866
1921
  }
1867
1922
 
1868
- /**
1869
- * A Refund object. This corresponds to one Refund request.
1870
- */
1871
1923
  export interface Refund {
1924
+ /**
1925
+ * The unique id of this refund request.
1926
+ */
1872
1927
  id: string;
1873
1928
 
1874
- amount: number;
1929
+ /**
1930
+ * The amount of the refund in decimals.
1931
+ */
1932
+ amount: number;
1933
+
1934
+ createdAt: unknown;
1935
+
1936
+ /**
1937
+ * The unique id of this refund request. This can be set when requesting the
1938
+ * refund.
1939
+ */
1940
+ referenceId: string;
1941
+
1942
+ /**
1943
+ * The current status of this refund.
1944
+ */
1945
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1946
+
1947
+ updatedAt: unknown;
1948
+
1949
+ /**
1950
+ * The description of the refund.
1951
+ */
1952
+ description?: string;
1953
+ }
1954
+
1955
+ export interface ShippingAddress {
1956
+ city: string;
1957
+
1958
+ country:
1959
+ | 'AF'
1960
+ | 'AL'
1961
+ | 'DZ'
1962
+ | 'AS'
1963
+ | 'AD'
1964
+ | 'AO'
1965
+ | 'AI'
1966
+ | 'AQ'
1967
+ | 'AG'
1968
+ | 'AR'
1969
+ | 'AM'
1970
+ | 'AW'
1971
+ | 'AU'
1972
+ | 'AT'
1973
+ | 'AZ'
1974
+ | 'BS'
1975
+ | 'BH'
1976
+ | 'BD'
1977
+ | 'BB'
1978
+ | 'BY'
1979
+ | 'BE'
1980
+ | 'BZ'
1981
+ | 'BJ'
1982
+ | 'BM'
1983
+ | 'BT'
1984
+ | 'BO'
1985
+ | 'BA'
1986
+ | 'BW'
1987
+ | 'BV'
1988
+ | 'BR'
1989
+ | 'IO'
1990
+ | 'BN'
1991
+ | 'BG'
1992
+ | 'BF'
1993
+ | 'BI'
1994
+ | 'KH'
1995
+ | 'CM'
1996
+ | 'CA'
1997
+ | 'CV'
1998
+ | 'KY'
1999
+ | 'CF'
2000
+ | 'TD'
2001
+ | 'CL'
2002
+ | 'CN'
2003
+ | 'CX'
2004
+ | 'CC'
2005
+ | 'CO'
2006
+ | 'KM'
2007
+ | 'CG'
2008
+ | 'CD'
2009
+ | 'CK'
2010
+ | 'CR'
2011
+ | 'CI'
2012
+ | 'HR'
2013
+ | 'CU'
2014
+ | 'CY'
2015
+ | 'CZ'
2016
+ | 'DK'
2017
+ | 'DJ'
2018
+ | 'DM'
2019
+ | 'DO'
2020
+ | 'EC'
2021
+ | 'EG'
2022
+ | 'SV'
2023
+ | 'GQ'
2024
+ | 'ER'
2025
+ | 'EE'
2026
+ | 'ET'
2027
+ | 'FK'
2028
+ | 'FO'
2029
+ | 'FJ'
2030
+ | 'FI'
2031
+ | 'FR'
2032
+ | 'GF'
2033
+ | 'PF'
2034
+ | 'TF'
2035
+ | 'GA'
2036
+ | 'GM'
2037
+ | 'GE'
2038
+ | 'DE'
2039
+ | 'GH'
2040
+ | 'GI'
2041
+ | 'GR'
2042
+ | 'GL'
2043
+ | 'GD'
2044
+ | 'GP'
2045
+ | 'GU'
2046
+ | 'GT'
2047
+ | 'GN'
2048
+ | 'GW'
2049
+ | 'GY'
2050
+ | 'HT'
2051
+ | 'HM'
2052
+ | 'VA'
2053
+ | 'HN'
2054
+ | 'HK'
2055
+ | 'HU'
2056
+ | 'IS'
2057
+ | 'IN'
2058
+ | 'ID'
2059
+ | 'IR'
2060
+ | 'IQ'
2061
+ | 'IE'
2062
+ | 'IL'
2063
+ | 'IT'
2064
+ | 'JM'
2065
+ | 'JP'
2066
+ | 'JO'
2067
+ | 'KZ'
2068
+ | 'KE'
2069
+ | 'KI'
2070
+ | 'KP'
2071
+ | 'KR'
2072
+ | 'KW'
2073
+ | 'KG'
2074
+ | 'LA'
2075
+ | 'LV'
2076
+ | 'LB'
2077
+ | 'LS'
2078
+ | 'LR'
2079
+ | 'LY'
2080
+ | 'LI'
2081
+ | 'LT'
2082
+ | 'LU'
2083
+ | 'MO'
2084
+ | 'MG'
2085
+ | 'MW'
2086
+ | 'MY'
2087
+ | 'MV'
2088
+ | 'ML'
2089
+ | 'MT'
2090
+ | 'MH'
2091
+ | 'MQ'
2092
+ | 'MR'
2093
+ | 'MU'
2094
+ | 'YT'
2095
+ | 'MX'
2096
+ | 'FM'
2097
+ | 'MD'
2098
+ | 'MC'
2099
+ | 'MN'
2100
+ | 'MS'
2101
+ | 'MA'
2102
+ | 'MZ'
2103
+ | 'MM'
2104
+ | 'NA'
2105
+ | 'NR'
2106
+ | 'NP'
2107
+ | 'NL'
2108
+ | 'NC'
2109
+ | 'NZ'
2110
+ | 'NI'
2111
+ | 'NE'
2112
+ | 'NG'
2113
+ | 'NU'
2114
+ | 'NF'
2115
+ | 'MP'
2116
+ | 'MK'
2117
+ | 'NO'
2118
+ | 'OM'
2119
+ | 'PK'
2120
+ | 'PW'
2121
+ | 'PS'
2122
+ | 'PA'
2123
+ | 'PG'
2124
+ | 'PY'
2125
+ | 'PE'
2126
+ | 'PH'
2127
+ | 'PN'
2128
+ | 'PL'
2129
+ | 'PT'
2130
+ | 'PR'
2131
+ | 'QA'
2132
+ | 'RE'
2133
+ | 'RO'
2134
+ | 'RU'
2135
+ | 'RW'
2136
+ | 'SH'
2137
+ | 'KN'
2138
+ | 'LC'
2139
+ | 'PM'
2140
+ | 'VC'
2141
+ | 'WS'
2142
+ | 'SM'
2143
+ | 'ST'
2144
+ | 'SA'
2145
+ | 'SN'
2146
+ | 'SC'
2147
+ | 'SL'
2148
+ | 'SG'
2149
+ | 'SK'
2150
+ | 'SI'
2151
+ | 'SB'
2152
+ | 'SO'
2153
+ | 'ZA'
2154
+ | 'GS'
2155
+ | 'ES'
2156
+ | 'LK'
2157
+ | 'SD'
2158
+ | 'SR'
2159
+ | 'SJ'
2160
+ | 'SZ'
2161
+ | 'SE'
2162
+ | 'CH'
2163
+ | 'SY'
2164
+ | 'TW'
2165
+ | 'TJ'
2166
+ | 'TZ'
2167
+ | 'TH'
2168
+ | 'TL'
2169
+ | 'TG'
2170
+ | 'TK'
2171
+ | 'TO'
2172
+ | 'TT'
2173
+ | 'TN'
2174
+ | 'TR'
2175
+ | 'TM'
2176
+ | 'TC'
2177
+ | 'TV'
2178
+ | 'UG'
2179
+ | 'UA'
2180
+ | 'AE'
2181
+ | 'GB'
2182
+ | 'US'
2183
+ | 'UM'
2184
+ | 'UY'
2185
+ | 'UZ'
2186
+ | 'VU'
2187
+ | 'VE'
2188
+ | 'VN'
2189
+ | 'VG'
2190
+ | 'VI'
2191
+ | 'WF'
2192
+ | 'EH'
2193
+ | 'YE'
2194
+ | 'ZM'
2195
+ | 'ZW'
2196
+ | 'AX'
2197
+ | 'BQ'
2198
+ | 'CW'
2199
+ | 'GG'
2200
+ | 'IM'
2201
+ | 'JE'
2202
+ | 'ME'
2203
+ | 'BL'
2204
+ | 'MF'
2205
+ | 'RS'
2206
+ | 'SX'
2207
+ | 'SS'
2208
+ | 'XK';
2209
+
2210
+ firstName: string;
1875
2211
 
1876
- createdAt: string;
2212
+ lastName: string;
1877
2213
 
1878
- referenceId: string;
2214
+ line1: string;
1879
2215
 
1880
- /**
1881
- * The status of the refund. Always use the status of the order as your source of
1882
- * truth to trigger actions in your dashboard.
1883
- */
1884
- status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
2216
+ line2: string;
1885
2217
 
1886
- updatedAt: string;
2218
+ region: string;
1887
2219
 
1888
- description?: string;
2220
+ zipCode: string;
1889
2221
  }
1890
2222
 
1891
2223
  /**
1892
- * The shopper object. Contains information collected from the user during the
1893
- * Checkout.
2224
+ * Information about the customer who finished the order.
1894
2225
  */
1895
2226
  export interface Shopper {
1896
2227
  email?: string;
@@ -1899,16 +2230,8 @@ export namespace OrderRetrieveResponse {
1899
2230
  }
1900
2231
 
1901
2232
  export interface StatusClassification {
1902
- /**
1903
- * Populated with the primary payment initiation failure classsification if
1904
- * available.
1905
- */
1906
2233
  primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1907
2234
 
1908
- /**
1909
- * Populated with the secondary payment initiation failure classsification if
1910
- * available.
1911
- */
1912
2235
  secondary?:
1913
2236
  | 'timeout'
1914
2237
  | 'wrong_credentials'
@@ -1930,11 +2253,8 @@ export namespace OrderRetrieveResponse {
1930
2253
  }
1931
2254
 
1932
2255
  export interface StatusHistoryList {
1933
- /**
1934
- * The order status. This status symbolises the state of the user's payment
1935
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1936
- * information.
1937
- */
2256
+ createdAt: unknown;
2257
+
1938
2258
  currentStatus:
1939
2259
  | 'failed'
1940
2260
  | 'canceled'
@@ -1949,15 +2269,35 @@ export namespace OrderRetrieveResponse {
1949
2269
  | 'disputed'
1950
2270
  | 'refused';
1951
2271
 
1952
- reason: string;
1953
-
1954
- updatedAt: string;
2272
+ reason:
2273
+ | 'ORDER_CREATED'
2274
+ | 'CHECKOUT_SESSION_ABORTED'
2275
+ | 'PAYMENT_SUCCEEDED'
2276
+ | 'PAYMENT_INITIATED'
2277
+ | 'ORDER_CANCELED'
2278
+ | 'ORDER_REFUND_INITIATED'
2279
+ | 'ORDER_REFUNDED'
2280
+ | 'REFUND_CHARGE_SUCCEEDED'
2281
+ | 'REFUND_UPDATED'
2282
+ | 'CHECKOUT_COMPLETED'
2283
+ | 'PIS_PAYMENT_INITIATED'
2284
+ | 'PIS_PAYMENT_UPDATED'
2285
+ | 'PIS_PAYMENT_SUCCEEDED'
2286
+ | 'PAYMENT_NOT_SETTLED'
2287
+ | 'PAYMENT_INITIATION_FAILED'
2288
+ | 'PAYMENT_CANCELED'
2289
+ | 'PAYMENT_FAILED'
2290
+ | 'CHECKOUT_SESSION_CREATED'
2291
+ | 'EXPIRED_CHECKOUT_SESSION_ABORTED'
2292
+ | 'DISPUTE'
2293
+ | 'PENDING_PAYMENT_ATTEMPTS_FOUND'
2294
+ | 'AML_FREEZE'
2295
+ | 'MANUAL_FREEZE'
2296
+ | 'MANUAL_UNFREEZE'
2297
+ | 'ORDER_MANUALLY_REOPENED';
2298
+
2299
+ updatedAt: unknown;
1955
2300
 
1956
- /**
1957
- * The order status. This status symbolises the state of the user's payment
1958
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1959
- * information.
1960
- */
1961
2301
  previousStatus?:
1962
2302
  | 'failed'
1963
2303
  | 'canceled'
@@ -1994,7 +2334,7 @@ export interface OrderCreateParams {
1994
2334
  /**
1995
2335
  * The customer of the merchant.
1996
2336
  */
1997
- customer?: OrderCreateParams.Email | OrderCreateParams.ID;
2337
+ customer?: OrderCreateParams.Customer;
1998
2338
 
1999
2339
  /**
2000
2340
  * Optional expiration timestamp in seconds
@@ -2008,22 +2348,26 @@ export interface OrderCreateParams {
2008
2348
  }
2009
2349
 
2010
2350
  export namespace OrderCreateParams {
2011
- export interface Email {
2351
+ /**
2352
+ * The customer of the merchant.
2353
+ */
2354
+ export interface Customer {
2012
2355
  /**
2013
- * The email of the customer.
2356
+ * The Ivy id of the customer.
2014
2357
  */
2015
- email: string;
2016
- }
2358
+ id?: string;
2017
2359
 
2018
- export interface ID {
2019
2360
  /**
2020
- * The Ivy id of the customer.
2361
+ * The email of the customer.
2021
2362
  */
2022
- id: string;
2363
+ email?: string;
2023
2364
  }
2024
2365
  }
2025
2366
 
2026
2367
  export interface OrderRetrieveParams {
2368
+ /**
2369
+ * You can put in either the Ivy id OR the referenceId of the order
2370
+ */
2027
2371
  id: string;
2028
2372
  }
2029
2373