@getivy/node-sdk 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (87) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/LICENSE +1 -1
  3. package/README.md +18 -18
  4. package/_shims/index.d.ts +2 -0
  5. package/_shims/index.js +5 -1
  6. package/_shims/index.mjs +5 -1
  7. package/core.d.ts +12 -1
  8. package/core.d.ts.map +1 -1
  9. package/core.js +29 -20
  10. package/core.js.map +1 -1
  11. package/core.mjs +31 -22
  12. package/core.mjs.map +1 -1
  13. package/error.d.ts +2 -2
  14. package/error.d.ts.map +1 -1
  15. package/error.js +4 -4
  16. package/error.js.map +1 -1
  17. package/error.mjs +2 -2
  18. package/error.mjs.map +1 -1
  19. package/index.d.mts +15 -12
  20. package/index.d.ts +15 -12
  21. package/index.d.ts.map +1 -1
  22. package/index.js +45 -42
  23. package/index.js.map +1 -1
  24. package/index.mjs +43 -40
  25. package/index.mjs.map +1 -1
  26. package/package.json +3 -3
  27. package/resource.d.ts +3 -3
  28. package/resource.d.ts.map +1 -1
  29. package/resource.js.map +1 -1
  30. package/resource.mjs.map +1 -1
  31. package/resources/banks.d.ts +12 -0
  32. package/resources/banks.d.ts.map +1 -1
  33. package/resources/charges.d.ts +0 -13
  34. package/resources/charges.d.ts.map +1 -1
  35. package/resources/checkoutsession.d.ts +444 -1305
  36. package/resources/checkoutsession.d.ts.map +1 -1
  37. package/resources/customers.d.ts +41 -4
  38. package/resources/customers.d.ts.map +1 -1
  39. package/resources/index.d.ts +2 -1
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js +3 -1
  42. package/resources/index.js.map +1 -1
  43. package/resources/index.mjs +2 -1
  44. package/resources/index.mjs.map +1 -1
  45. package/resources/orders.d.ts +89 -659
  46. package/resources/orders.d.ts.map +1 -1
  47. package/resources/orders.js +0 -6
  48. package/resources/orders.js.map +1 -1
  49. package/resources/orders.mjs +0 -6
  50. package/resources/orders.mjs.map +1 -1
  51. package/resources/refunds.d.ts +1 -1
  52. package/resources/refunds.d.ts.map +1 -1
  53. package/resources/webhooksubscription.d.ts +155 -0
  54. package/resources/webhooksubscription.d.ts.map +1 -0
  55. package/resources/webhooksubscription.js +42 -0
  56. package/resources/webhooksubscription.js.map +1 -0
  57. package/resources/webhooksubscription.mjs +38 -0
  58. package/resources/webhooksubscription.mjs.map +1 -0
  59. package/resources.d.ts +2 -0
  60. package/resources.d.ts.map +1 -0
  61. package/resources.js +18 -0
  62. package/resources.js.map +1 -0
  63. package/resources.mjs +2 -0
  64. package/resources.mjs.map +1 -0
  65. package/src/_shims/index.d.ts +2 -0
  66. package/src/_shims/index.js +5 -1
  67. package/src/_shims/index.mjs +5 -1
  68. package/src/core.ts +49 -22
  69. package/src/error.ts +2 -2
  70. package/src/index.ts +57 -36
  71. package/src/resource.ts +3 -3
  72. package/src/resources/banks.ts +15 -0
  73. package/src/resources/charges.ts +0 -13
  74. package/src/resources/checkoutsession.ts +2103 -4416
  75. package/src/resources/customers.ts +46 -4
  76. package/src/resources/index.ts +14 -7
  77. package/src/resources/orders.ts +107 -1635
  78. package/src/resources/refunds.ts +0 -1
  79. package/src/resources/webhooksubscription.ts +353 -0
  80. package/src/resources.ts +1 -0
  81. package/src/version.ts +1 -1
  82. package/version.d.ts +1 -1
  83. package/version.d.ts.map +1 -1
  84. package/version.js +1 -1
  85. package/version.js.map +1 -1
  86. package/version.mjs +1 -1
  87. package/version.mjs.map +1 -1
@@ -7,10 +7,6 @@ export declare class Orders extends APIResource {
7
7
  * Checkout Session to the `id` field.
8
8
  */
9
9
  retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
10
- /**
11
- * Update certain fields of the specified order.
12
- */
13
- update(body: OrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<OrderUpdateResponse>;
14
10
  }
15
11
  export interface OrderRetrieveResponse {
16
12
  /**
@@ -38,7 +34,7 @@ export interface OrderRetrieveResponse {
38
34
  */
39
35
  merchantId: string;
40
36
  /**
41
- * The price to be paid by the user. All amounts are in decimals, i.e. 10.23
37
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
42
38
  * represents EUR 10.23. Any amount of decimal places can be provided on
43
39
  * initialization, but the actual transfer amount is rounded to 2 decimal places,
44
40
  * as this is the format accepted by most banks.
@@ -58,11 +54,16 @@ export interface OrderRetrieveResponse {
58
54
  * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
59
55
  * information.
60
56
  */
61
- status: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
57
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
62
58
  updatedAt: string;
63
59
  /**
64
- * The bank statement reference of the payment for the order. This is the reference
65
- * that will be visible on the bank statement.
60
+ * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
61
+ * if no payment was made.
62
+ */
63
+ bankId?: string;
64
+ /**
65
+ * @deprecated The bank statement reference of the payment for the order. This is
66
+ * the reference that will be visible on the bank statement.
66
67
  */
67
68
  bankStatementReference?: string;
68
69
  /**
@@ -86,6 +87,7 @@ export interface OrderRetrieveResponse {
86
87
  * The unique identifier of the customer who placed the order.
87
88
  */
88
89
  customerId?: string;
90
+ destination?: OrderRetrieveResponse.Destination;
89
91
  /**
90
92
  * The customer facing id. This id is displayed to the user during the checkout and
91
93
  * in the merchant dashboard.
@@ -114,7 +116,7 @@ export interface OrderRetrieveResponse {
114
116
  lineItems?: Array<OrderRetrieveResponse.LineItem>;
115
117
  mandate?: OrderRetrieveResponse.Mandate;
116
118
  /**
117
- * The destination bank account where the money will be sent to.
119
+ * @deprecated
118
120
  */
119
121
  merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
120
122
  /**
@@ -132,7 +134,7 @@ export interface OrderRetrieveResponse {
132
134
  * The source bank account where the money is send from.
133
135
  */
134
136
  payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
135
- paymentMethodType?: 'sepa_debit' | 'customer_balance';
137
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
136
138
  /**
137
139
  * The payment mode of the order. Can be either 'settlement' or 'direct'.
138
140
  */
@@ -141,7 +143,7 @@ export interface OrderRetrieveResponse {
141
143
  * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
142
144
  * actions in your system.
143
145
  */
144
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
146
+ paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
145
147
  /**
146
148
  * The total amount in the currency of all successful refunds for this order
147
149
  */
@@ -194,7 +196,7 @@ export interface OrderRetrieveResponse {
194
196
  }
195
197
  export declare namespace OrderRetrieveResponse {
196
198
  /**
197
- * The price to be paid by the user. All amounts are in decimals, i.e. 10.23
199
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
198
200
  * represents EUR 10.23. Any amount of decimal places can be provided on
199
201
  * initialization, but the actual transfer amount is rounded to 2 decimal places,
200
202
  * as this is the format accepted by most banks.
@@ -205,22 +207,9 @@ export declare namespace OrderRetrieveResponse {
205
207
  * The total amount to be paid.
206
208
  */
207
209
  total: number;
208
- /**
209
- * The shipping amount.
210
- */
211
210
  shipping?: number;
212
- /**
213
- * The subtotal amount, i.e. the total amount without VAT and shipping.
214
- */
215
211
  subTotal?: number;
216
- /**
217
- * The total net amount, i.e. the total amount without VAT. This value is rounded
218
- * to 2 decimal places for the actual transfer.
219
- */
220
212
  totalNet?: number;
221
- /**
222
- * The VAT amount.
223
- */
224
213
  vat?: number;
225
214
  }
226
215
  /**
@@ -247,6 +236,76 @@ export declare namespace OrderRetrieveResponse {
247
236
  amount: number;
248
237
  type: 'transaction' | 'amount';
249
238
  }
239
+ interface Destination {
240
+ /**
241
+ * The validation logic is based on the "type" field. For example, if "type" is set
242
+ * to "iban", the "iban" object must be filled out.
243
+ */
244
+ bankAccount: Destination.BankAccount;
245
+ /**
246
+ * The bank statement reference of the payment for the order. This is the reference
247
+ * that will be visible on the bank statement.
248
+ */
249
+ bankStatementReference: string;
250
+ }
251
+ namespace Destination {
252
+ /**
253
+ * The validation logic is based on the "type" field. For example, if "type" is set
254
+ * to "iban", the "iban" object must be filled out.
255
+ */
256
+ interface BankAccount {
257
+ /**
258
+ * The type of the financial address. The actual destination is determined by this
259
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
260
+ * validation will fail if you set e.g. type="iban", but then not fill any values
261
+ * in the "iban" object.
262
+ *
263
+ * - iban: The IBAN of the account
264
+ * - sort_code: The sort code of the account
265
+ * - bank_code: The bank code of the account
266
+ * - bban: The BBAN of the account
267
+ */
268
+ type: string;
269
+ bankCode?: BankAccount.BankCode;
270
+ bban?: BankAccount.Bban;
271
+ iban?: BankAccount.Iban;
272
+ sortCode?: BankAccount.SortCode;
273
+ }
274
+ namespace BankAccount {
275
+ interface BankCode {
276
+ /**
277
+ * The name of the account holder.
278
+ */
279
+ accountHolderName: string;
280
+ accountNumber: string;
281
+ code: string;
282
+ }
283
+ interface Bban {
284
+ /**
285
+ * The name of the account holder.
286
+ */
287
+ accountHolderName: string;
288
+ bban: string;
289
+ bic?: string;
290
+ }
291
+ interface Iban {
292
+ /**
293
+ * The name of the account holder.
294
+ */
295
+ accountHolderName: string;
296
+ iban: string;
297
+ bic?: string;
298
+ }
299
+ interface SortCode {
300
+ /**
301
+ * The name of the account holder.
302
+ */
303
+ accountHolderName: string;
304
+ accountNumber: string;
305
+ sortCode: string;
306
+ }
307
+ }
308
+ }
250
309
  interface LineItem {
251
310
  /**
252
311
  * The total amount of all line items, i.e. single amount \* quantity. Given in
@@ -356,7 +415,7 @@ export declare namespace OrderRetrieveResponse {
356
415
  }
357
416
  }
358
417
  /**
359
- * The destination bank account where the money will be sent to.
418
+ * @deprecated
360
419
  */
361
420
  interface MerchantFinancialAddress {
362
421
  bankCode?: MerchantFinancialAddress.BankCode;
@@ -606,7 +665,7 @@ export declare namespace OrderRetrieveResponse {
606
665
  * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
607
666
  * information.
608
667
  */
609
- currentStatus: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
668
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
610
669
  reason: string;
611
670
  updatedAt: string;
612
671
  /**
@@ -614,642 +673,13 @@ export declare namespace OrderRetrieveResponse {
614
673
  * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
615
674
  * information.
616
675
  */
617
- previousStatus?: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
676
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
618
677
  }
619
678
  }
620
- export interface OrderUpdateResponse {
621
- /**
622
- * The Ivy unique identifier for the order.
623
- */
679
+ export interface OrderRetrieveParams {
624
680
  id: string;
625
- /**
626
- * @deprecated The unique identifier for the merchantApp which initiated the order
627
- * / payment attempt.
628
- */
629
- appId: string;
630
- /**
631
- * The Ivy fee for the payment.
632
- */
633
- applicationFeeAmount: number;
634
- createdAt: string;
635
- instantPaymentScheme: boolean;
636
- /**
637
- * @deprecated Deprecated in favor of `appId`.
638
- */
639
- merchantAppId: string;
640
- /**
641
- * The unique identifier for the merchant which initiated the order / payment
642
- * attempt.
643
- */
644
- merchantId: string;
645
- /**
646
- * The price to be paid by the user. All amounts are in decimals, i.e. 10.23
647
- * represents EUR 10.23. Any amount of decimal places can be provided on
648
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
649
- * as this is the format accepted by most banks.
650
- */
651
- price: OrderUpdateResponse.Price;
652
- /**
653
- * An internal reference id which will be stored with the checkout & corresponding
654
- * order. Needs to be unique per shop per order and can be up to 200 characters.
655
- */
656
- referenceId: string;
657
- /**
658
- * The name of the merchant which initiated the order.
659
- */
660
- shopName: string;
661
- /**
662
- * The order status. This status symbolises the state of the user's payment
663
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
664
- * information.
665
- */
666
- status: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
667
- updatedAt: string;
668
- /**
669
- * The bank statement reference of the payment for the order. This is the reference
670
- * that will be visible on the bank statement.
671
- */
672
- bankStatementReference?: string;
673
- /**
674
- * The billing address of the user. Required when handshake=true.
675
- */
676
- billingAddress?: OrderUpdateResponse.BillingAddress;
677
- /**
678
- * The merchant category code or
679
- * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
680
- */
681
- category?: string;
682
- /**
683
- * @deprecated
684
- */
685
- climateActionMode?: OrderUpdateResponse.ClimateActionMode;
686
- /**
687
- * @deprecated
688
- */
689
- co2Grams?: number;
690
- /**
691
- * The unique identifier of the customer who placed the order.
692
- */
693
- customerId?: string;
694
- /**
695
- * The customer facing id. This id is displayed to the user during the checkout and
696
- * in the merchant dashboard.
697
- */
698
- displayId?: string;
699
- /**
700
- * False by default. If set to true, customers skip email input and jump directly
701
- * to their bank login. For express Checkout Sessions this is always false.
702
- */
703
- guest?: boolean;
704
- /**
705
- * Only valid for sustainable incentive mode. The social / sustainable projects
706
- * available to the user during Checkout.
707
- */
708
- impactOffsetProjects?: Array<string>;
709
- /**
710
- * The incentive mode of the checkout session. For any use-case apart from
711
- * e-commerce, please use `white_label` as the value. If set to `white_label`, the
712
- * checkout session will be white labeled. If set to `sustainable`, the checkout
713
- * session will contain sustainable incentives for users.
714
- */
715
- incentiveMode?: 'white_label' | 'sustainable';
716
- /**
717
- * The line items of the Checkout.
718
- */
719
- lineItems?: Array<OrderUpdateResponse.LineItem>;
720
- mandate?: OrderUpdateResponse.Mandate;
721
- /**
722
- * The destination bank account where the money will be sent to.
723
- */
724
- merchantFinancialAddress?: OrderUpdateResponse.MerchantFinancialAddress;
725
- /**
726
- * Any data which will be stored and returned for this checkout session and
727
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
728
- * more info.
729
- */
730
- metadata?: Record<string, unknown>;
731
- /**
732
- * Only valid for sustainable incentive mode. The social / sustainability project
733
- * chosen by the user during Checkout.
734
- */
735
- offsetProject?: string;
736
- /**
737
- * The source bank account where the money is send from.
738
- */
739
- payerFinancialAddress?: OrderUpdateResponse.PayerFinancialAddress;
740
- paymentMethodType?: 'sepa_debit' | 'customer_balance';
741
- /**
742
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
743
- */
744
- paymentMode?: 'settlement' | 'direct';
745
- /**
746
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
747
- * actions in your system.
748
- */
749
- paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed';
750
- /**
751
- * The total amount in the currency of all successful refunds for this order
752
- */
753
- refundAmount?: number;
754
- /**
755
- * The list of refunds connected to this order.
756
- */
757
- refunds?: Array<OrderUpdateResponse.Refund>;
758
- /**
759
- * The shipping address of the user. This is only collected in express Checkouts.
760
- */
761
- shippingAddress?: OrderUpdateResponse.ShippingAddress;
762
- /**
763
- * The selected shipping method by the user. Can either be selected during an
764
- * express Checkout Session or passed during Checkout Session creation.
765
- */
766
- shippingMethod?: OrderUpdateResponse.ShippingMethod;
767
- /**
768
- * The logo of the shop provided as a URL.
769
- */
770
- shopLogo?: string;
771
- /**
772
- * The shopper object. Contains information collected from the user during the
773
- * Checkout.
774
- */
775
- shopper?: OrderUpdateResponse.Shopper;
776
- /**
777
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
778
- * collected in the Checkout.
779
- */
780
- shopperEmail?: string;
781
- statusClassification?: OrderUpdateResponse.StatusClassification;
782
- /**
783
- * List of status history items for the order, used for logging every update on
784
- * status.
785
- */
786
- statusHistoryList?: Array<OrderUpdateResponse.StatusHistoryList>;
787
- /**
788
- * The subaccount id of the order.
789
- */
790
- subaccountId?: string;
791
- /**
792
- * The legal name of the subaccount
793
- */
794
- subaccountLegalName?: string;
795
- /**
796
- * @deprecated
797
- */
798
- trees?: number;
799
- }
800
- export declare namespace OrderUpdateResponse {
801
- /**
802
- * The price to be paid by the user. All amounts are in decimals, i.e. 10.23
803
- * represents EUR 10.23. Any amount of decimal places can be provided on
804
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
805
- * as this is the format accepted by most banks.
806
- */
807
- interface Price {
808
- currency: 'EUR' | 'GBP' | 'PLN';
809
- /**
810
- * The total amount to be paid.
811
- */
812
- total: number;
813
- /**
814
- * The shipping amount.
815
- */
816
- shipping?: number;
817
- /**
818
- * The subtotal amount, i.e. the total amount without VAT and shipping.
819
- */
820
- subTotal?: number;
821
- /**
822
- * The total net amount, i.e. the total amount without VAT. This value is rounded
823
- * to 2 decimal places for the actual transfer.
824
- */
825
- totalNet?: number;
826
- /**
827
- * The VAT amount.
828
- */
829
- vat?: number;
830
- }
831
- /**
832
- * The billing address of the user. Required when handshake=true.
833
- */
834
- interface BillingAddress {
835
- city: string;
836
- /**
837
- * The country code in
838
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
839
- */
840
- country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
841
- line1: string;
842
- zipCode: string;
843
- firstName?: string;
844
- lastName?: string;
845
- line2?: string;
846
- region?: string;
847
- }
848
- /**
849
- * @deprecated
850
- */
851
- interface ClimateActionMode {
852
- amount: number;
853
- type: 'transaction' | 'amount';
854
- }
855
- interface LineItem {
856
- /**
857
- * The total amount of all line items, i.e. single amount \* quantity. Given in
858
- * decimals, i.e. 10.23 represents EUR 10.23.
859
- */
860
- amount: number;
861
- /**
862
- * The name of the line item.
863
- */
864
- name: string;
865
- /**
866
- * The quantity of the line item.
867
- */
868
- quantity: number;
869
- /**
870
- * The net amount of a single item.
871
- */
872
- singleNet: number;
873
- /**
874
- * The VAT amount of a single item.
875
- */
876
- singleVat: number;
877
- /**
878
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
879
- * the line item.
880
- */
881
- category?: string;
882
- /**
883
- * The
884
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
885
- * of the line item.
886
- */
887
- EAN?: string;
888
- /**
889
- * The image of the line item as a URL.
890
- */
891
- image?: string;
892
- /**
893
- * The internal unique identifier of the line item.
894
- */
895
- referenceId?: string;
896
- }
897
- interface Mandate {
898
- /**
899
- * The name of the account holder who signs the mandate.
900
- */
901
- accountHolderName?: string;
902
- /**
903
- * Additional information to display to the user during the mandate setup. This
904
- * information is not used to setup any recurrence on the mandate. It is only
905
- * displayed to the user during checkout.
906
- */
907
- additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
908
- /**
909
- * Mandate creditor data
910
- */
911
- creditor?: Mandate.Creditor;
912
- /**
913
- * The reference of the mandate going to be setup
914
- */
915
- reference?: string;
916
- /**
917
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
918
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
919
- * mandate setup request.
920
- */
921
- referenceId?: string;
922
- /**
923
- * If true, a ready to use mandate will be set up after the payment flow.
924
- */
925
- setup?: boolean;
926
- /**
927
- * The email of the user who signs the mandate.
928
- */
929
- userNotificationEmail?: string;
930
- }
931
- namespace Mandate {
932
- /**
933
- * Additional information to display to the user during the mandate setup. This
934
- * information is not used to setup any recurrence on the mandate. It is only
935
- * displayed to the user during checkout.
936
- */
937
- interface AdditionalDisplayInformation {
938
- /**
939
- * The intended cadence of charges used for displaying purpose only. On demand
940
- * would be used for unscheduled charges.
941
- */
942
- cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
943
- price?: AdditionalDisplayInformation.Price;
944
- }
945
- namespace AdditionalDisplayInformation {
946
- interface Price {
947
- /**
948
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
949
- * 10.23 EUR.
950
- */
951
- amount?: number;
952
- currency?: 'EUR' | 'GBP' | 'PLN';
953
- }
954
- }
955
- /**
956
- * Mandate creditor data
957
- */
958
- interface Creditor {
959
- id?: string;
960
- name?: string;
961
- }
962
- }
963
- /**
964
- * The destination bank account where the money will be sent to.
965
- */
966
- interface MerchantFinancialAddress {
967
- bankCode?: MerchantFinancialAddress.BankCode;
968
- bban?: MerchantFinancialAddress.Bban;
969
- iban?: MerchantFinancialAddress.Iban;
970
- /**
971
- * The payment reference for the order. This is the reference that will be visible
972
- * on the bank statement.
973
- */
974
- paymentReference?: string;
975
- sortCode?: MerchantFinancialAddress.SortCode;
976
- /**
977
- * The type of the financial address. The actual destination is determined by this
978
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
979
- * validation will fail if you set e.g. type="iban", but then not fill any values
980
- * in the "iban" object.
981
- *
982
- * - iban: The IBAN of the account
983
- * - sort_code: The sort code of the account
984
- * - bank_code: The bank code of the account
985
- * - bban: The BBAN of the account
986
- */
987
- type?: string;
988
- }
989
- namespace MerchantFinancialAddress {
990
- interface BankCode {
991
- /**
992
- * The name of the account holder.
993
- */
994
- accountHolderName: string;
995
- accountNumber: string;
996
- code: string;
997
- }
998
- interface Bban {
999
- /**
1000
- * The name of the account holder.
1001
- */
1002
- accountHolderName: string;
1003
- bban: string;
1004
- bic?: string;
1005
- }
1006
- interface Iban {
1007
- /**
1008
- * The name of the account holder.
1009
- */
1010
- accountHolderName: string;
1011
- iban: string;
1012
- bic?: string;
1013
- }
1014
- interface SortCode {
1015
- /**
1016
- * The name of the account holder.
1017
- */
1018
- accountHolderName: string;
1019
- accountNumber: string;
1020
- sortCode: string;
1021
- }
1022
- }
1023
- /**
1024
- * The source bank account where the money is send from.
1025
- */
1026
- interface PayerFinancialAddress {
1027
- /**
1028
- * The type of the financial address. The actual destination is determined by this
1029
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1030
- * validation will fail if you set e.g. type="iban", but then not fill any values
1031
- * in the "iban" object.
1032
- *
1033
- * - iban: The IBAN of the account
1034
- * - sort_code: The sort code of the account
1035
- * - bank_code: The bank code of the account
1036
- * - bban: The BBAN of the account
1037
- */
1038
- type: string;
1039
- bankCode?: PayerFinancialAddress.BankCode;
1040
- bban?: PayerFinancialAddress.Bban;
1041
- iban?: PayerFinancialAddress.Iban;
1042
- sortCode?: PayerFinancialAddress.SortCode;
1043
- }
1044
- namespace PayerFinancialAddress {
1045
- interface BankCode {
1046
- accountNumber: string;
1047
- code: string;
1048
- /**
1049
- * The name of the account holder.
1050
- */
1051
- accountHolderName?: string;
1052
- }
1053
- interface Bban {
1054
- bban: string;
1055
- /**
1056
- * The name of the account holder.
1057
- */
1058
- accountHolderName?: string;
1059
- bic?: string;
1060
- }
1061
- interface Iban {
1062
- iban: string;
1063
- /**
1064
- * The name of the account holder.
1065
- */
1066
- accountHolderName?: string;
1067
- bic?: string;
1068
- }
1069
- interface SortCode {
1070
- accountNumber: string;
1071
- sortCode: string;
1072
- /**
1073
- * The name of the account holder.
1074
- */
1075
- accountHolderName?: string;
1076
- }
1077
- }
1078
- /**
1079
- * A Refund object. This corresponds to one Refund request.
1080
- */
1081
- interface Refund {
1082
- id: string;
1083
- amount: number;
1084
- createdAt: string;
1085
- referenceId: string;
1086
- /**
1087
- * The status of the refund. Always use the status of the order as your source of
1088
- * truth to trigger actions in your dashboard.
1089
- */
1090
- status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1091
- updatedAt: string;
1092
- description?: string;
1093
- }
1094
- /**
1095
- * The shipping address of the user. This is only collected in express Checkouts.
1096
- */
1097
- interface ShippingAddress {
1098
- city: string;
1099
- /**
1100
- * The country code in
1101
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1102
- */
1103
- country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
1104
- line1: string;
1105
- zipCode: string;
1106
- firstName?: string;
1107
- lastName?: string;
1108
- line2?: string;
1109
- region?: string;
1110
- }
1111
- /**
1112
- * The selected shipping method by the user. Can either be selected during an
1113
- * express Checkout Session or passed during Checkout Session creation.
1114
- */
1115
- interface ShippingMethod {
1116
- /**
1117
- * The customer-facing name of the shipping method.
1118
- */
1119
- name: string;
1120
- /**
1121
- * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
1122
- */
1123
- price: number;
1124
- /**
1125
- * The unique identifier of the shipping method within Ivy.
1126
- */
1127
- id?: string;
1128
- /**
1129
- * The list of countries where the shipping method is available.
1130
- */
1131
- countries?: Array<'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK'>;
1132
- /**
1133
- * The delivery estimate of the shipping method.
1134
- */
1135
- deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1136
- /**
1137
- * The unique identifier within your system of the shipping method.
1138
- */
1139
- reference?: string;
1140
- /**
1141
- * @deprecated Deprecated in favor of deliveryEstimate
1142
- */
1143
- timeFrame?: string;
1144
- }
1145
- namespace ShippingMethod {
1146
- /**
1147
- * The delivery estimate of the shipping method.
1148
- */
1149
- interface DeliveryEstimate {
1150
- /**
1151
- * The maximum delivery time.
1152
- */
1153
- maximum?: DeliveryEstimate.Maximum;
1154
- /**
1155
- * The minimum delivery time.
1156
- */
1157
- minimum?: DeliveryEstimate.Minimum;
1158
- }
1159
- namespace DeliveryEstimate {
1160
- /**
1161
- * The maximum delivery time.
1162
- */
1163
- interface Maximum {
1164
- /**
1165
- * The unit of the time duration.
1166
- */
1167
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1168
- /**
1169
- * The value of the time duration.
1170
- */
1171
- value: number;
1172
- }
1173
- /**
1174
- * The minimum delivery time.
1175
- */
1176
- interface Minimum {
1177
- /**
1178
- * The unit of the time duration.
1179
- */
1180
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1181
- /**
1182
- * The value of the time duration.
1183
- */
1184
- value: number;
1185
- }
1186
- }
1187
- }
1188
- /**
1189
- * The shopper object. Contains information collected from the user during the
1190
- * Checkout.
1191
- */
1192
- interface Shopper {
1193
- email?: string;
1194
- phoneNumber?: string;
1195
- }
1196
- interface StatusClassification {
1197
- /**
1198
- * Populated with the primary payment initiation failure classsification if
1199
- * available.
1200
- */
1201
- primary?: string;
1202
- /**
1203
- * Populated with the secondary payment initiation failure classsification if
1204
- * available.
1205
- */
1206
- secondary?: string;
1207
- }
1208
- interface StatusHistoryList {
1209
- /**
1210
- * The order status. This status symbolises the state of the user's payment
1211
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1212
- * information.
1213
- */
1214
- currentStatus: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1215
- reason: string;
1216
- updatedAt: string;
1217
- /**
1218
- * The order status. This status symbolises the state of the user's payment
1219
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1220
- * information.
1221
- */
1222
- previousStatus?: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
1223
- }
1224
- }
1225
- export interface OrderRetrieveParams {
1226
- id: string;
1227
- }
1228
- export interface OrderUpdateParams {
1229
- id: string;
1230
- /**
1231
- * The customer-facing id of the order. This id will also be shown next to the
1232
- * orders in the Ivy Dashboard.
1233
- */
1234
- displayId?: string;
1235
- /**
1236
- * An internal reference id which will be stored with the checkout & corresponding
1237
- * order. Needs to be unique per shop per order and can be up to 200 characters. We
1238
- * recommend to use your internal order id here.
1239
- */
1240
- referenceId?: string;
1241
- /**
1242
- * The customer-facing name of the shop.
1243
- */
1244
- shopName?: string;
1245
- /**
1246
- * The order status. This status symbolises the state of the user's payment
1247
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1248
- * information.
1249
- */
1250
- status?: 'failed' | 'canceled' | 'processing' | 'in_handshake' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1251
681
  }
1252
682
  export declare namespace Orders {
1253
- export { type OrderRetrieveResponse as OrderRetrieveResponse, type OrderUpdateResponse as OrderUpdateResponse, type OrderRetrieveParams as OrderRetrieveParams, type OrderUpdateParams as OrderUpdateParams, };
683
+ export { type OrderRetrieveResponse as OrderRetrieveResponse, type OrderRetrieveParams as OrderRetrieveParams, };
1254
684
  }
1255
685
  //# sourceMappingURL=orders.d.ts.map