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

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.
@@ -1,14 +1,28 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
3
  export declare class Orders extends APIResource {
4
+ /**
5
+ * Create a new order. By creating a new order, you will create a new settlement
6
+ * destination which you can use to settle expected incoming payments efficiently.
7
+ * After creating the order, Ivy provides you with a destination for the expected
8
+ * incoming payment. As soon as a payment with the same details arrives, Ivy will
9
+ * update the status of the order.
10
+ */
11
+ create(body: OrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<OrderCreateResponse>;
4
12
  /**
5
13
  * Retrieve details of an order. You can retrieve the order by passing either the
6
14
  * internal Ivy order id or the `referenceId` you specified when creating a
7
15
  * Checkout Session to the `id` field.
8
16
  */
9
17
  retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
18
+ /**
19
+ * Expire an order. This will set the order to status `canceled` immediately. All
20
+ * transactions which arrive afterwards for this order will be returned
21
+ * automatically.
22
+ */
23
+ expire(body: OrderExpireParams, options?: Core.RequestOptions): Core.APIPromise<OrderExpireResponse>;
10
24
  }
11
- export interface OrderRetrieveResponse {
25
+ export interface OrderCreateResponse {
12
26
  /**
13
27
  * The Ivy unique identifier for the order.
14
28
  */
@@ -39,7 +53,7 @@ export interface OrderRetrieveResponse {
39
53
  * initialization, but the actual transfer amount is rounded to 2 decimal places,
40
54
  * as this is the format accepted by most banks.
41
55
  */
42
- price: OrderRetrieveResponse.Price;
56
+ price: OrderCreateResponse.Price;
43
57
  /**
44
58
  * An internal reference id which will be stored with the checkout & corresponding
45
59
  * order. Needs to be unique per shop per order and can be up to 200 characters.
@@ -69,7 +83,7 @@ export interface OrderRetrieveResponse {
69
83
  /**
70
84
  * The billing address of the user. Required when handshake=true.
71
85
  */
72
- billingAddress?: OrderRetrieveResponse.BillingAddress;
86
+ billingAddress?: OrderCreateResponse.BillingAddress;
73
87
  /**
74
88
  * The merchant category code or
75
89
  * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
@@ -78,7 +92,7 @@ export interface OrderRetrieveResponse {
78
92
  /**
79
93
  * @deprecated
80
94
  */
81
- climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
95
+ climateActionMode?: OrderCreateResponse.ClimateActionMode;
82
96
  /**
83
97
  * @deprecated
84
98
  */
@@ -87,7 +101,7 @@ export interface OrderRetrieveResponse {
87
101
  * The unique identifier of the customer who placed the order.
88
102
  */
89
103
  customerId?: string;
90
- destination?: OrderRetrieveResponse.Destination;
104
+ destination?: OrderCreateResponse.Destination;
91
105
  /**
92
106
  * The customer facing id. This id is displayed to the user during the checkout and
93
107
  * in the merchant dashboard.
@@ -113,12 +127,12 @@ export interface OrderRetrieveResponse {
113
127
  /**
114
128
  * The line items of the Checkout.
115
129
  */
116
- lineItems?: Array<OrderRetrieveResponse.LineItem>;
117
- mandate?: OrderRetrieveResponse.Mandate;
130
+ lineItems?: Array<OrderCreateResponse.LineItem>;
131
+ mandate?: OrderCreateResponse.Mandate;
118
132
  /**
119
133
  * @deprecated
120
134
  */
121
- merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
135
+ merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
122
136
  /**
123
137
  * Any data which will be stored and returned for this checkout session and
124
138
  * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
@@ -133,7 +147,7 @@ export interface OrderRetrieveResponse {
133
147
  /**
134
148
  * The source bank account where the money is send from.
135
149
  */
136
- payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
150
+ payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
137
151
  paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
138
152
  /**
139
153
  * The payment mode of the order. Can be either 'settlement' or 'direct'.
@@ -151,16 +165,16 @@ export interface OrderRetrieveResponse {
151
165
  /**
152
166
  * The list of refunds connected to this order.
153
167
  */
154
- refunds?: Array<OrderRetrieveResponse.Refund>;
168
+ refunds?: Array<OrderCreateResponse.Refund>;
155
169
  /**
156
170
  * The shipping address of the user. This is only collected in express Checkouts.
157
171
  */
158
- shippingAddress?: OrderRetrieveResponse.ShippingAddress;
172
+ shippingAddress?: OrderCreateResponse.ShippingAddress;
159
173
  /**
160
174
  * The selected shipping method by the user. Can either be selected during an
161
175
  * express Checkout Session or passed during Checkout Session creation.
162
176
  */
163
- shippingMethod?: OrderRetrieveResponse.ShippingMethod;
177
+ shippingMethod?: OrderCreateResponse.ShippingMethod;
164
178
  /**
165
179
  * The logo of the shop provided as a URL.
166
180
  */
@@ -169,18 +183,18 @@ export interface OrderRetrieveResponse {
169
183
  * The shopper object. Contains information collected from the user during the
170
184
  * Checkout.
171
185
  */
172
- shopper?: OrderRetrieveResponse.Shopper;
186
+ shopper?: OrderCreateResponse.Shopper;
173
187
  /**
174
188
  * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
175
189
  * collected in the Checkout.
176
190
  */
177
191
  shopperEmail?: string;
178
- statusClassification?: OrderRetrieveResponse.StatusClassification;
192
+ statusClassification?: OrderCreateResponse.StatusClassification;
179
193
  /**
180
194
  * List of status history items for the order, used for logging every update on
181
195
  * status.
182
196
  */
183
- statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
197
+ statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
184
198
  /**
185
199
  * The subaccount id of the order.
186
200
  */
@@ -194,7 +208,7 @@ export interface OrderRetrieveResponse {
194
208
  */
195
209
  trees?: number;
196
210
  }
197
- export declare namespace OrderRetrieveResponse {
211
+ export declare namespace OrderCreateResponse {
198
212
  /**
199
213
  * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
200
214
  * represents EUR 10.23. Any amount of decimal places can be provided on
@@ -676,10 +690,1389 @@ export declare namespace OrderRetrieveResponse {
676
690
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
677
691
  }
678
692
  }
679
- export interface OrderRetrieveParams {
693
+ export interface OrderRetrieveResponse {
694
+ /**
695
+ * The Ivy unique identifier for the order.
696
+ */
697
+ id: string;
698
+ /**
699
+ * @deprecated The unique identifier for the merchantApp which initiated the order
700
+ * / payment attempt.
701
+ */
702
+ appId: string;
703
+ /**
704
+ * The Ivy fee for the payment.
705
+ */
706
+ applicationFeeAmount: number;
707
+ createdAt: string;
708
+ instantPaymentScheme: boolean;
709
+ /**
710
+ * @deprecated Deprecated in favor of `appId`.
711
+ */
712
+ merchantAppId: string;
713
+ /**
714
+ * The unique identifier for the merchant which initiated the order / payment
715
+ * attempt.
716
+ */
717
+ merchantId: string;
718
+ /**
719
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
720
+ * represents EUR 10.23. Any amount of decimal places can be provided on
721
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
722
+ * as this is the format accepted by most banks.
723
+ */
724
+ price: OrderRetrieveResponse.Price;
725
+ /**
726
+ * An internal reference id which will be stored with the checkout & corresponding
727
+ * order. Needs to be unique per shop per order and can be up to 200 characters.
728
+ */
729
+ referenceId: string;
730
+ /**
731
+ * The name of the merchant which initiated the order.
732
+ */
733
+ shopName: string;
734
+ /**
735
+ * The order status. This status symbolises the state of the user's payment
736
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
737
+ * information.
738
+ */
739
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
740
+ updatedAt: string;
741
+ /**
742
+ * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
743
+ * if no payment was made.
744
+ */
745
+ bankId?: string;
746
+ /**
747
+ * @deprecated The bank statement reference of the payment for the order. This is
748
+ * the reference that will be visible on the bank statement.
749
+ */
750
+ bankStatementReference?: string;
751
+ /**
752
+ * The billing address of the user. Required when handshake=true.
753
+ */
754
+ billingAddress?: OrderRetrieveResponse.BillingAddress;
755
+ /**
756
+ * The merchant category code or
757
+ * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
758
+ */
759
+ category?: string;
760
+ /**
761
+ * @deprecated
762
+ */
763
+ climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
764
+ /**
765
+ * @deprecated
766
+ */
767
+ co2Grams?: number;
768
+ /**
769
+ * The unique identifier of the customer who placed the order.
770
+ */
771
+ customerId?: string;
772
+ destination?: OrderRetrieveResponse.Destination;
773
+ /**
774
+ * The customer facing id. This id is displayed to the user during the checkout and
775
+ * in the merchant dashboard.
776
+ */
777
+ displayId?: string;
778
+ /**
779
+ * False by default. If set to true, customers skip email input and jump directly
780
+ * to their bank login. For express Checkout Sessions this is always false.
781
+ */
782
+ guest?: boolean;
783
+ /**
784
+ * Only valid for sustainable incentive mode. The social / sustainable projects
785
+ * available to the user during Checkout.
786
+ */
787
+ impactOffsetProjects?: Array<string>;
788
+ /**
789
+ * The incentive mode of the checkout session. For any use-case apart from
790
+ * e-commerce, please use `white_label` as the value. If set to `white_label`, the
791
+ * checkout session will be white labeled. If set to `sustainable`, the checkout
792
+ * session will contain sustainable incentives for users.
793
+ */
794
+ incentiveMode?: 'white_label' | 'sustainable';
795
+ /**
796
+ * The line items of the Checkout.
797
+ */
798
+ lineItems?: Array<OrderRetrieveResponse.LineItem>;
799
+ mandate?: OrderRetrieveResponse.Mandate;
800
+ /**
801
+ * @deprecated
802
+ */
803
+ merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
804
+ /**
805
+ * Any data which will be stored and returned for this checkout session and
806
+ * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
807
+ * more info.
808
+ */
809
+ metadata?: Record<string, unknown>;
810
+ /**
811
+ * Only valid for sustainable incentive mode. The social / sustainability project
812
+ * chosen by the user during Checkout.
813
+ */
814
+ offsetProject?: string;
815
+ /**
816
+ * The source bank account where the money is send from.
817
+ */
818
+ payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
819
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
820
+ /**
821
+ * The payment mode of the order. Can be either 'settlement' or 'direct'.
822
+ */
823
+ paymentMode?: 'settlement' | 'direct';
824
+ /**
825
+ * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
826
+ * actions in your system.
827
+ */
828
+ paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
829
+ /**
830
+ * The total amount in the currency of all successful refunds for this order
831
+ */
832
+ refundAmount?: number;
833
+ /**
834
+ * The list of refunds connected to this order.
835
+ */
836
+ refunds?: Array<OrderRetrieveResponse.Refund>;
837
+ /**
838
+ * The shipping address of the user. This is only collected in express Checkouts.
839
+ */
840
+ shippingAddress?: OrderRetrieveResponse.ShippingAddress;
841
+ /**
842
+ * The selected shipping method by the user. Can either be selected during an
843
+ * express Checkout Session or passed during Checkout Session creation.
844
+ */
845
+ shippingMethod?: OrderRetrieveResponse.ShippingMethod;
846
+ /**
847
+ * The logo of the shop provided as a URL.
848
+ */
849
+ shopLogo?: string;
850
+ /**
851
+ * The shopper object. Contains information collected from the user during the
852
+ * Checkout.
853
+ */
854
+ shopper?: OrderRetrieveResponse.Shopper;
855
+ /**
856
+ * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
857
+ * collected in the Checkout.
858
+ */
859
+ shopperEmail?: string;
860
+ statusClassification?: OrderRetrieveResponse.StatusClassification;
861
+ /**
862
+ * List of status history items for the order, used for logging every update on
863
+ * status.
864
+ */
865
+ statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
866
+ /**
867
+ * The subaccount id of the order.
868
+ */
869
+ subaccountId?: string;
870
+ /**
871
+ * The legal name of the subaccount
872
+ */
873
+ subaccountLegalName?: string;
874
+ /**
875
+ * @deprecated
876
+ */
877
+ trees?: number;
878
+ }
879
+ export declare namespace OrderRetrieveResponse {
880
+ /**
881
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
882
+ * represents EUR 10.23. Any amount of decimal places can be provided on
883
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
884
+ * as this is the format accepted by most banks.
885
+ */
886
+ interface Price {
887
+ currency: 'EUR' | 'GBP' | 'PLN';
888
+ /**
889
+ * The total amount to be paid.
890
+ */
891
+ total: number;
892
+ shipping?: number;
893
+ subTotal?: number;
894
+ totalNet?: number;
895
+ vat?: number;
896
+ }
897
+ /**
898
+ * The billing address of the user. Required when handshake=true.
899
+ */
900
+ interface BillingAddress {
901
+ city: string;
902
+ /**
903
+ * The country code in
904
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
905
+ */
906
+ 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';
907
+ line1: string;
908
+ zipCode: string;
909
+ firstName?: string;
910
+ lastName?: string;
911
+ line2?: string;
912
+ region?: string;
913
+ }
914
+ /**
915
+ * @deprecated
916
+ */
917
+ interface ClimateActionMode {
918
+ amount: number;
919
+ type: 'transaction' | 'amount';
920
+ }
921
+ interface Destination {
922
+ /**
923
+ * The validation logic is based on the "type" field. For example, if "type" is set
924
+ * to "iban", the "iban" object must be filled out.
925
+ */
926
+ bankAccount: Destination.BankAccount;
927
+ /**
928
+ * The bank statement reference of the payment for the order. This is the reference
929
+ * that will be visible on the bank statement.
930
+ */
931
+ bankStatementReference: string;
932
+ }
933
+ namespace Destination {
934
+ /**
935
+ * The validation logic is based on the "type" field. For example, if "type" is set
936
+ * to "iban", the "iban" object must be filled out.
937
+ */
938
+ interface BankAccount {
939
+ /**
940
+ * The type of the financial address. The actual destination is determined by this
941
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
942
+ * validation will fail if you set e.g. type="iban", but then not fill any values
943
+ * in the "iban" object.
944
+ *
945
+ * - iban: The IBAN of the account
946
+ * - sort_code: The sort code of the account
947
+ * - bank_code: The bank code of the account
948
+ * - bban: The BBAN of the account
949
+ */
950
+ type: string;
951
+ bankCode?: BankAccount.BankCode;
952
+ bban?: BankAccount.Bban;
953
+ iban?: BankAccount.Iban;
954
+ sortCode?: BankAccount.SortCode;
955
+ }
956
+ namespace BankAccount {
957
+ interface BankCode {
958
+ /**
959
+ * The name of the account holder.
960
+ */
961
+ accountHolderName: string;
962
+ accountNumber: string;
963
+ code: string;
964
+ }
965
+ interface Bban {
966
+ /**
967
+ * The name of the account holder.
968
+ */
969
+ accountHolderName: string;
970
+ bban: string;
971
+ bic?: string;
972
+ }
973
+ interface Iban {
974
+ /**
975
+ * The name of the account holder.
976
+ */
977
+ accountHolderName: string;
978
+ iban: string;
979
+ bic?: string;
980
+ }
981
+ interface SortCode {
982
+ /**
983
+ * The name of the account holder.
984
+ */
985
+ accountHolderName: string;
986
+ accountNumber: string;
987
+ sortCode: string;
988
+ }
989
+ }
990
+ }
991
+ interface LineItem {
992
+ /**
993
+ * The total amount of all line items, i.e. single amount \* quantity. Given in
994
+ * decimals, i.e. 10.23 represents EUR 10.23.
995
+ */
996
+ amount: number;
997
+ /**
998
+ * The name of the line item.
999
+ */
1000
+ name: string;
1001
+ /**
1002
+ * The quantity of the line item.
1003
+ */
1004
+ quantity: number;
1005
+ /**
1006
+ * The net amount of a single item.
1007
+ */
1008
+ singleNet: number;
1009
+ /**
1010
+ * The VAT amount of a single item.
1011
+ */
1012
+ singleVat: number;
1013
+ /**
1014
+ * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
1015
+ * the line item.
1016
+ */
1017
+ category?: string;
1018
+ /**
1019
+ * The
1020
+ * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
1021
+ * of the line item.
1022
+ */
1023
+ EAN?: string;
1024
+ /**
1025
+ * The image of the line item as a URL.
1026
+ */
1027
+ image?: string;
1028
+ /**
1029
+ * The internal unique identifier of the line item.
1030
+ */
1031
+ referenceId?: string;
1032
+ }
1033
+ interface Mandate {
1034
+ /**
1035
+ * The name of the account holder who signs the mandate.
1036
+ */
1037
+ accountHolderName?: string;
1038
+ /**
1039
+ * Additional information to display to the user during the mandate setup. This
1040
+ * information is not used to setup any recurrence on the mandate. It is only
1041
+ * displayed to the user during checkout.
1042
+ */
1043
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1044
+ /**
1045
+ * Mandate creditor data
1046
+ */
1047
+ creditor?: Mandate.Creditor;
1048
+ /**
1049
+ * The reference of the mandate going to be setup
1050
+ */
1051
+ reference?: string;
1052
+ /**
1053
+ * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
1054
+ * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
1055
+ * mandate setup request.
1056
+ */
1057
+ referenceId?: string;
1058
+ /**
1059
+ * If true, a ready to use mandate will be set up after the payment flow.
1060
+ */
1061
+ setup?: boolean;
1062
+ /**
1063
+ * The email of the user who signs the mandate.
1064
+ */
1065
+ userNotificationEmail?: string;
1066
+ }
1067
+ namespace Mandate {
1068
+ /**
1069
+ * Additional information to display to the user during the mandate setup. This
1070
+ * information is not used to setup any recurrence on the mandate. It is only
1071
+ * displayed to the user during checkout.
1072
+ */
1073
+ interface AdditionalDisplayInformation {
1074
+ /**
1075
+ * The intended cadence of charges used for displaying purpose only. On demand
1076
+ * would be used for unscheduled charges.
1077
+ */
1078
+ cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1079
+ price?: AdditionalDisplayInformation.Price;
1080
+ }
1081
+ namespace AdditionalDisplayInformation {
1082
+ interface Price {
1083
+ /**
1084
+ * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
1085
+ * 10.23 EUR.
1086
+ */
1087
+ amount?: number;
1088
+ currency?: 'EUR' | 'GBP' | 'PLN';
1089
+ }
1090
+ }
1091
+ /**
1092
+ * Mandate creditor data
1093
+ */
1094
+ interface Creditor {
1095
+ id?: string;
1096
+ name?: string;
1097
+ }
1098
+ }
1099
+ /**
1100
+ * @deprecated
1101
+ */
1102
+ interface MerchantFinancialAddress {
1103
+ bankCode?: MerchantFinancialAddress.BankCode;
1104
+ bban?: MerchantFinancialAddress.Bban;
1105
+ iban?: MerchantFinancialAddress.Iban;
1106
+ /**
1107
+ * The payment reference for the order. This is the reference that will be visible
1108
+ * on the bank statement.
1109
+ */
1110
+ paymentReference?: string;
1111
+ sortCode?: MerchantFinancialAddress.SortCode;
1112
+ /**
1113
+ * The type of the financial address. The actual destination is determined by this
1114
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1115
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1116
+ * in the "iban" object.
1117
+ *
1118
+ * - iban: The IBAN of the account
1119
+ * - sort_code: The sort code of the account
1120
+ * - bank_code: The bank code of the account
1121
+ * - bban: The BBAN of the account
1122
+ */
1123
+ type?: string;
1124
+ }
1125
+ namespace MerchantFinancialAddress {
1126
+ interface BankCode {
1127
+ /**
1128
+ * The name of the account holder.
1129
+ */
1130
+ accountHolderName: string;
1131
+ accountNumber: string;
1132
+ code: string;
1133
+ }
1134
+ interface Bban {
1135
+ /**
1136
+ * The name of the account holder.
1137
+ */
1138
+ accountHolderName: string;
1139
+ bban: string;
1140
+ bic?: string;
1141
+ }
1142
+ interface Iban {
1143
+ /**
1144
+ * The name of the account holder.
1145
+ */
1146
+ accountHolderName: string;
1147
+ iban: string;
1148
+ bic?: string;
1149
+ }
1150
+ interface SortCode {
1151
+ /**
1152
+ * The name of the account holder.
1153
+ */
1154
+ accountHolderName: string;
1155
+ accountNumber: string;
1156
+ sortCode: string;
1157
+ }
1158
+ }
1159
+ /**
1160
+ * The source bank account where the money is send from.
1161
+ */
1162
+ interface PayerFinancialAddress {
1163
+ /**
1164
+ * The type of the financial address. The actual destination is determined by this
1165
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1166
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1167
+ * in the "iban" object.
1168
+ *
1169
+ * - iban: The IBAN of the account
1170
+ * - sort_code: The sort code of the account
1171
+ * - bank_code: The bank code of the account
1172
+ * - bban: The BBAN of the account
1173
+ */
1174
+ type: string;
1175
+ bankCode?: PayerFinancialAddress.BankCode;
1176
+ bban?: PayerFinancialAddress.Bban;
1177
+ iban?: PayerFinancialAddress.Iban;
1178
+ sortCode?: PayerFinancialAddress.SortCode;
1179
+ }
1180
+ namespace PayerFinancialAddress {
1181
+ interface BankCode {
1182
+ accountNumber: string;
1183
+ code: string;
1184
+ /**
1185
+ * The name of the account holder.
1186
+ */
1187
+ accountHolderName?: string;
1188
+ }
1189
+ interface Bban {
1190
+ bban: string;
1191
+ /**
1192
+ * The name of the account holder.
1193
+ */
1194
+ accountHolderName?: string;
1195
+ bic?: string;
1196
+ }
1197
+ interface Iban {
1198
+ iban: string;
1199
+ /**
1200
+ * The name of the account holder.
1201
+ */
1202
+ accountHolderName?: string;
1203
+ bic?: string;
1204
+ }
1205
+ interface SortCode {
1206
+ accountNumber: string;
1207
+ sortCode: string;
1208
+ /**
1209
+ * The name of the account holder.
1210
+ */
1211
+ accountHolderName?: string;
1212
+ }
1213
+ }
1214
+ /**
1215
+ * A Refund object. This corresponds to one Refund request.
1216
+ */
1217
+ interface Refund {
1218
+ id: string;
1219
+ amount: number;
1220
+ createdAt: string;
1221
+ referenceId: string;
1222
+ /**
1223
+ * The status of the refund. Always use the status of the order as your source of
1224
+ * truth to trigger actions in your dashboard.
1225
+ */
1226
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1227
+ updatedAt: string;
1228
+ description?: string;
1229
+ }
1230
+ /**
1231
+ * The shipping address of the user. This is only collected in express Checkouts.
1232
+ */
1233
+ interface ShippingAddress {
1234
+ city: string;
1235
+ /**
1236
+ * The country code in
1237
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1238
+ */
1239
+ 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';
1240
+ line1: string;
1241
+ zipCode: string;
1242
+ firstName?: string;
1243
+ lastName?: string;
1244
+ line2?: string;
1245
+ region?: string;
1246
+ }
1247
+ /**
1248
+ * The selected shipping method by the user. Can either be selected during an
1249
+ * express Checkout Session or passed during Checkout Session creation.
1250
+ */
1251
+ interface ShippingMethod {
1252
+ /**
1253
+ * The customer-facing name of the shipping method.
1254
+ */
1255
+ name: string;
1256
+ /**
1257
+ * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
1258
+ */
1259
+ price: number;
1260
+ /**
1261
+ * The unique identifier of the shipping method within Ivy.
1262
+ */
1263
+ id?: string;
1264
+ /**
1265
+ * The list of countries where the shipping method is available.
1266
+ */
1267
+ 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'>;
1268
+ /**
1269
+ * The delivery estimate of the shipping method.
1270
+ */
1271
+ deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1272
+ /**
1273
+ * The unique identifier within your system of the shipping method.
1274
+ */
1275
+ reference?: string;
1276
+ /**
1277
+ * @deprecated Deprecated in favor of deliveryEstimate
1278
+ */
1279
+ timeFrame?: string;
1280
+ }
1281
+ namespace ShippingMethod {
1282
+ /**
1283
+ * The delivery estimate of the shipping method.
1284
+ */
1285
+ interface DeliveryEstimate {
1286
+ /**
1287
+ * The maximum delivery time.
1288
+ */
1289
+ maximum?: DeliveryEstimate.Maximum;
1290
+ /**
1291
+ * The minimum delivery time.
1292
+ */
1293
+ minimum?: DeliveryEstimate.Minimum;
1294
+ }
1295
+ namespace DeliveryEstimate {
1296
+ /**
1297
+ * The maximum delivery time.
1298
+ */
1299
+ interface Maximum {
1300
+ /**
1301
+ * The unit of the time duration.
1302
+ */
1303
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1304
+ /**
1305
+ * The value of the time duration.
1306
+ */
1307
+ value: number;
1308
+ }
1309
+ /**
1310
+ * The minimum delivery time.
1311
+ */
1312
+ interface Minimum {
1313
+ /**
1314
+ * The unit of the time duration.
1315
+ */
1316
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1317
+ /**
1318
+ * The value of the time duration.
1319
+ */
1320
+ value: number;
1321
+ }
1322
+ }
1323
+ }
1324
+ /**
1325
+ * The shopper object. Contains information collected from the user during the
1326
+ * Checkout.
1327
+ */
1328
+ interface Shopper {
1329
+ email?: string;
1330
+ phoneNumber?: string;
1331
+ }
1332
+ interface StatusClassification {
1333
+ /**
1334
+ * Populated with the primary payment initiation failure classsification if
1335
+ * available.
1336
+ */
1337
+ primary?: string;
1338
+ /**
1339
+ * Populated with the secondary payment initiation failure classsification if
1340
+ * available.
1341
+ */
1342
+ secondary?: string;
1343
+ }
1344
+ interface StatusHistoryList {
1345
+ /**
1346
+ * The order status. This status symbolises the state of the user's payment
1347
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1348
+ * information.
1349
+ */
1350
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1351
+ reason: string;
1352
+ updatedAt: string;
1353
+ /**
1354
+ * The order status. This status symbolises the state of the user's payment
1355
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1356
+ * information.
1357
+ */
1358
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
1359
+ }
1360
+ }
1361
+ export interface OrderExpireResponse {
1362
+ /**
1363
+ * The Ivy unique identifier for the order.
1364
+ */
1365
+ id: string;
1366
+ /**
1367
+ * @deprecated The unique identifier for the merchantApp which initiated the order
1368
+ * / payment attempt.
1369
+ */
1370
+ appId: string;
1371
+ /**
1372
+ * The Ivy fee for the payment.
1373
+ */
1374
+ applicationFeeAmount: number;
1375
+ createdAt: string;
1376
+ instantPaymentScheme: boolean;
1377
+ /**
1378
+ * @deprecated Deprecated in favor of `appId`.
1379
+ */
1380
+ merchantAppId: string;
1381
+ /**
1382
+ * The unique identifier for the merchant which initiated the order / payment
1383
+ * attempt.
1384
+ */
1385
+ merchantId: string;
1386
+ /**
1387
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1388
+ * represents EUR 10.23. Any amount of decimal places can be provided on
1389
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
1390
+ * as this is the format accepted by most banks.
1391
+ */
1392
+ price: OrderExpireResponse.Price;
1393
+ /**
1394
+ * An internal reference id which will be stored with the checkout & corresponding
1395
+ * order. Needs to be unique per shop per order and can be up to 200 characters.
1396
+ */
1397
+ referenceId: string;
1398
+ /**
1399
+ * The name of the merchant which initiated the order.
1400
+ */
1401
+ shopName: string;
1402
+ /**
1403
+ * The order status. This status symbolises the state of the user's payment
1404
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1405
+ * information.
1406
+ */
1407
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1408
+ updatedAt: string;
1409
+ /**
1410
+ * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
1411
+ * if no payment was made.
1412
+ */
1413
+ bankId?: string;
1414
+ /**
1415
+ * @deprecated The bank statement reference of the payment for the order. This is
1416
+ * the reference that will be visible on the bank statement.
1417
+ */
1418
+ bankStatementReference?: string;
1419
+ /**
1420
+ * The billing address of the user. Required when handshake=true.
1421
+ */
1422
+ billingAddress?: OrderExpireResponse.BillingAddress;
1423
+ /**
1424
+ * The merchant category code or
1425
+ * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
1426
+ */
1427
+ category?: string;
1428
+ /**
1429
+ * @deprecated
1430
+ */
1431
+ climateActionMode?: OrderExpireResponse.ClimateActionMode;
1432
+ /**
1433
+ * @deprecated
1434
+ */
1435
+ co2Grams?: number;
1436
+ /**
1437
+ * The unique identifier of the customer who placed the order.
1438
+ */
1439
+ customerId?: string;
1440
+ destination?: OrderExpireResponse.Destination;
1441
+ /**
1442
+ * The customer facing id. This id is displayed to the user during the checkout and
1443
+ * in the merchant dashboard.
1444
+ */
1445
+ displayId?: string;
1446
+ /**
1447
+ * False by default. If set to true, customers skip email input and jump directly
1448
+ * to their bank login. For express Checkout Sessions this is always false.
1449
+ */
1450
+ guest?: boolean;
1451
+ /**
1452
+ * Only valid for sustainable incentive mode. The social / sustainable projects
1453
+ * available to the user during Checkout.
1454
+ */
1455
+ impactOffsetProjects?: Array<string>;
1456
+ /**
1457
+ * The incentive mode of the checkout session. For any use-case apart from
1458
+ * e-commerce, please use `white_label` as the value. If set to `white_label`, the
1459
+ * checkout session will be white labeled. If set to `sustainable`, the checkout
1460
+ * session will contain sustainable incentives for users.
1461
+ */
1462
+ incentiveMode?: 'white_label' | 'sustainable';
1463
+ /**
1464
+ * The line items of the Checkout.
1465
+ */
1466
+ lineItems?: Array<OrderExpireResponse.LineItem>;
1467
+ mandate?: OrderExpireResponse.Mandate;
1468
+ /**
1469
+ * @deprecated
1470
+ */
1471
+ merchantFinancialAddress?: OrderExpireResponse.MerchantFinancialAddress;
1472
+ /**
1473
+ * Any data which will be stored and returned for this checkout session and
1474
+ * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
1475
+ * more info.
1476
+ */
1477
+ metadata?: Record<string, unknown>;
1478
+ /**
1479
+ * Only valid for sustainable incentive mode. The social / sustainability project
1480
+ * chosen by the user during Checkout.
1481
+ */
1482
+ offsetProject?: string;
1483
+ /**
1484
+ * The source bank account where the money is send from.
1485
+ */
1486
+ payerFinancialAddress?: OrderExpireResponse.PayerFinancialAddress;
1487
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1488
+ /**
1489
+ * The payment mode of the order. Can be either 'settlement' or 'direct'.
1490
+ */
1491
+ paymentMode?: 'settlement' | 'direct';
1492
+ /**
1493
+ * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
1494
+ * actions in your system.
1495
+ */
1496
+ paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
1497
+ /**
1498
+ * The total amount in the currency of all successful refunds for this order
1499
+ */
1500
+ refundAmount?: number;
1501
+ /**
1502
+ * The list of refunds connected to this order.
1503
+ */
1504
+ refunds?: Array<OrderExpireResponse.Refund>;
1505
+ /**
1506
+ * The shipping address of the user. This is only collected in express Checkouts.
1507
+ */
1508
+ shippingAddress?: OrderExpireResponse.ShippingAddress;
1509
+ /**
1510
+ * The selected shipping method by the user. Can either be selected during an
1511
+ * express Checkout Session or passed during Checkout Session creation.
1512
+ */
1513
+ shippingMethod?: OrderExpireResponse.ShippingMethod;
1514
+ /**
1515
+ * The logo of the shop provided as a URL.
1516
+ */
1517
+ shopLogo?: string;
1518
+ /**
1519
+ * The shopper object. Contains information collected from the user during the
1520
+ * Checkout.
1521
+ */
1522
+ shopper?: OrderExpireResponse.Shopper;
1523
+ /**
1524
+ * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
1525
+ * collected in the Checkout.
1526
+ */
1527
+ shopperEmail?: string;
1528
+ statusClassification?: OrderExpireResponse.StatusClassification;
1529
+ /**
1530
+ * List of status history items for the order, used for logging every update on
1531
+ * status.
1532
+ */
1533
+ statusHistoryList?: Array<OrderExpireResponse.StatusHistoryList>;
1534
+ /**
1535
+ * The subaccount id of the order.
1536
+ */
1537
+ subaccountId?: string;
1538
+ /**
1539
+ * The legal name of the subaccount
1540
+ */
1541
+ subaccountLegalName?: string;
1542
+ /**
1543
+ * @deprecated
1544
+ */
1545
+ trees?: number;
1546
+ }
1547
+ export declare namespace OrderExpireResponse {
1548
+ /**
1549
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1550
+ * represents EUR 10.23. Any amount of decimal places can be provided on
1551
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
1552
+ * as this is the format accepted by most banks.
1553
+ */
1554
+ interface Price {
1555
+ currency: 'EUR' | 'GBP' | 'PLN';
1556
+ /**
1557
+ * The total amount to be paid.
1558
+ */
1559
+ total: number;
1560
+ shipping?: number;
1561
+ subTotal?: number;
1562
+ totalNet?: number;
1563
+ vat?: number;
1564
+ }
1565
+ /**
1566
+ * The billing address of the user. Required when handshake=true.
1567
+ */
1568
+ interface BillingAddress {
1569
+ city: string;
1570
+ /**
1571
+ * The country code in
1572
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1573
+ */
1574
+ 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';
1575
+ line1: string;
1576
+ zipCode: string;
1577
+ firstName?: string;
1578
+ lastName?: string;
1579
+ line2?: string;
1580
+ region?: string;
1581
+ }
1582
+ /**
1583
+ * @deprecated
1584
+ */
1585
+ interface ClimateActionMode {
1586
+ amount: number;
1587
+ type: 'transaction' | 'amount';
1588
+ }
1589
+ interface Destination {
1590
+ /**
1591
+ * The validation logic is based on the "type" field. For example, if "type" is set
1592
+ * to "iban", the "iban" object must be filled out.
1593
+ */
1594
+ bankAccount: Destination.BankAccount;
1595
+ /**
1596
+ * The bank statement reference of the payment for the order. This is the reference
1597
+ * that will be visible on the bank statement.
1598
+ */
1599
+ bankStatementReference: string;
1600
+ }
1601
+ namespace Destination {
1602
+ /**
1603
+ * The validation logic is based on the "type" field. For example, if "type" is set
1604
+ * to "iban", the "iban" object must be filled out.
1605
+ */
1606
+ interface BankAccount {
1607
+ /**
1608
+ * The type of the financial address. The actual destination is determined by this
1609
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1610
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1611
+ * in the "iban" object.
1612
+ *
1613
+ * - iban: The IBAN of the account
1614
+ * - sort_code: The sort code of the account
1615
+ * - bank_code: The bank code of the account
1616
+ * - bban: The BBAN of the account
1617
+ */
1618
+ type: string;
1619
+ bankCode?: BankAccount.BankCode;
1620
+ bban?: BankAccount.Bban;
1621
+ iban?: BankAccount.Iban;
1622
+ sortCode?: BankAccount.SortCode;
1623
+ }
1624
+ namespace BankAccount {
1625
+ interface BankCode {
1626
+ /**
1627
+ * The name of the account holder.
1628
+ */
1629
+ accountHolderName: string;
1630
+ accountNumber: string;
1631
+ code: string;
1632
+ }
1633
+ interface Bban {
1634
+ /**
1635
+ * The name of the account holder.
1636
+ */
1637
+ accountHolderName: string;
1638
+ bban: string;
1639
+ bic?: string;
1640
+ }
1641
+ interface Iban {
1642
+ /**
1643
+ * The name of the account holder.
1644
+ */
1645
+ accountHolderName: string;
1646
+ iban: string;
1647
+ bic?: string;
1648
+ }
1649
+ interface SortCode {
1650
+ /**
1651
+ * The name of the account holder.
1652
+ */
1653
+ accountHolderName: string;
1654
+ accountNumber: string;
1655
+ sortCode: string;
1656
+ }
1657
+ }
1658
+ }
1659
+ interface LineItem {
1660
+ /**
1661
+ * The total amount of all line items, i.e. single amount \* quantity. Given in
1662
+ * decimals, i.e. 10.23 represents EUR 10.23.
1663
+ */
1664
+ amount: number;
1665
+ /**
1666
+ * The name of the line item.
1667
+ */
1668
+ name: string;
1669
+ /**
1670
+ * The quantity of the line item.
1671
+ */
1672
+ quantity: number;
1673
+ /**
1674
+ * The net amount of a single item.
1675
+ */
1676
+ singleNet: number;
1677
+ /**
1678
+ * The VAT amount of a single item.
1679
+ */
1680
+ singleVat: number;
1681
+ /**
1682
+ * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
1683
+ * the line item.
1684
+ */
1685
+ category?: string;
1686
+ /**
1687
+ * The
1688
+ * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
1689
+ * of the line item.
1690
+ */
1691
+ EAN?: string;
1692
+ /**
1693
+ * The image of the line item as a URL.
1694
+ */
1695
+ image?: string;
1696
+ /**
1697
+ * The internal unique identifier of the line item.
1698
+ */
1699
+ referenceId?: string;
1700
+ }
1701
+ interface Mandate {
1702
+ /**
1703
+ * The name of the account holder who signs the mandate.
1704
+ */
1705
+ accountHolderName?: string;
1706
+ /**
1707
+ * Additional information to display to the user during the mandate setup. This
1708
+ * information is not used to setup any recurrence on the mandate. It is only
1709
+ * displayed to the user during checkout.
1710
+ */
1711
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1712
+ /**
1713
+ * Mandate creditor data
1714
+ */
1715
+ creditor?: Mandate.Creditor;
1716
+ /**
1717
+ * The reference of the mandate going to be setup
1718
+ */
1719
+ reference?: string;
1720
+ /**
1721
+ * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
1722
+ * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
1723
+ * mandate setup request.
1724
+ */
1725
+ referenceId?: string;
1726
+ /**
1727
+ * If true, a ready to use mandate will be set up after the payment flow.
1728
+ */
1729
+ setup?: boolean;
1730
+ /**
1731
+ * The email of the user who signs the mandate.
1732
+ */
1733
+ userNotificationEmail?: string;
1734
+ }
1735
+ namespace Mandate {
1736
+ /**
1737
+ * Additional information to display to the user during the mandate setup. This
1738
+ * information is not used to setup any recurrence on the mandate. It is only
1739
+ * displayed to the user during checkout.
1740
+ */
1741
+ interface AdditionalDisplayInformation {
1742
+ /**
1743
+ * The intended cadence of charges used for displaying purpose only. On demand
1744
+ * would be used for unscheduled charges.
1745
+ */
1746
+ cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1747
+ price?: AdditionalDisplayInformation.Price;
1748
+ }
1749
+ namespace AdditionalDisplayInformation {
1750
+ interface Price {
1751
+ /**
1752
+ * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
1753
+ * 10.23 EUR.
1754
+ */
1755
+ amount?: number;
1756
+ currency?: 'EUR' | 'GBP' | 'PLN';
1757
+ }
1758
+ }
1759
+ /**
1760
+ * Mandate creditor data
1761
+ */
1762
+ interface Creditor {
1763
+ id?: string;
1764
+ name?: string;
1765
+ }
1766
+ }
1767
+ /**
1768
+ * @deprecated
1769
+ */
1770
+ interface MerchantFinancialAddress {
1771
+ bankCode?: MerchantFinancialAddress.BankCode;
1772
+ bban?: MerchantFinancialAddress.Bban;
1773
+ iban?: MerchantFinancialAddress.Iban;
1774
+ /**
1775
+ * The payment reference for the order. This is the reference that will be visible
1776
+ * on the bank statement.
1777
+ */
1778
+ paymentReference?: string;
1779
+ sortCode?: MerchantFinancialAddress.SortCode;
1780
+ /**
1781
+ * The type of the financial address. The actual destination is determined by this
1782
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1783
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1784
+ * in the "iban" object.
1785
+ *
1786
+ * - iban: The IBAN of the account
1787
+ * - sort_code: The sort code of the account
1788
+ * - bank_code: The bank code of the account
1789
+ * - bban: The BBAN of the account
1790
+ */
1791
+ type?: string;
1792
+ }
1793
+ namespace MerchantFinancialAddress {
1794
+ interface BankCode {
1795
+ /**
1796
+ * The name of the account holder.
1797
+ */
1798
+ accountHolderName: string;
1799
+ accountNumber: string;
1800
+ code: string;
1801
+ }
1802
+ interface Bban {
1803
+ /**
1804
+ * The name of the account holder.
1805
+ */
1806
+ accountHolderName: string;
1807
+ bban: string;
1808
+ bic?: string;
1809
+ }
1810
+ interface Iban {
1811
+ /**
1812
+ * The name of the account holder.
1813
+ */
1814
+ accountHolderName: string;
1815
+ iban: string;
1816
+ bic?: string;
1817
+ }
1818
+ interface SortCode {
1819
+ /**
1820
+ * The name of the account holder.
1821
+ */
1822
+ accountHolderName: string;
1823
+ accountNumber: string;
1824
+ sortCode: string;
1825
+ }
1826
+ }
1827
+ /**
1828
+ * The source bank account where the money is send from.
1829
+ */
1830
+ interface PayerFinancialAddress {
1831
+ /**
1832
+ * The type of the financial address. The actual destination is determined by this
1833
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1834
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1835
+ * in the "iban" object.
1836
+ *
1837
+ * - iban: The IBAN of the account
1838
+ * - sort_code: The sort code of the account
1839
+ * - bank_code: The bank code of the account
1840
+ * - bban: The BBAN of the account
1841
+ */
1842
+ type: string;
1843
+ bankCode?: PayerFinancialAddress.BankCode;
1844
+ bban?: PayerFinancialAddress.Bban;
1845
+ iban?: PayerFinancialAddress.Iban;
1846
+ sortCode?: PayerFinancialAddress.SortCode;
1847
+ }
1848
+ namespace PayerFinancialAddress {
1849
+ interface BankCode {
1850
+ accountNumber: string;
1851
+ code: string;
1852
+ /**
1853
+ * The name of the account holder.
1854
+ */
1855
+ accountHolderName?: string;
1856
+ }
1857
+ interface Bban {
1858
+ bban: string;
1859
+ /**
1860
+ * The name of the account holder.
1861
+ */
1862
+ accountHolderName?: string;
1863
+ bic?: string;
1864
+ }
1865
+ interface Iban {
1866
+ iban: string;
1867
+ /**
1868
+ * The name of the account holder.
1869
+ */
1870
+ accountHolderName?: string;
1871
+ bic?: string;
1872
+ }
1873
+ interface SortCode {
1874
+ accountNumber: string;
1875
+ sortCode: string;
1876
+ /**
1877
+ * The name of the account holder.
1878
+ */
1879
+ accountHolderName?: string;
1880
+ }
1881
+ }
1882
+ /**
1883
+ * A Refund object. This corresponds to one Refund request.
1884
+ */
1885
+ interface Refund {
1886
+ id: string;
1887
+ amount: number;
1888
+ createdAt: string;
1889
+ referenceId: string;
1890
+ /**
1891
+ * The status of the refund. Always use the status of the order as your source of
1892
+ * truth to trigger actions in your dashboard.
1893
+ */
1894
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1895
+ updatedAt: string;
1896
+ description?: string;
1897
+ }
1898
+ /**
1899
+ * The shipping address of the user. This is only collected in express Checkouts.
1900
+ */
1901
+ interface ShippingAddress {
1902
+ city: string;
1903
+ /**
1904
+ * The country code in
1905
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1906
+ */
1907
+ 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';
1908
+ line1: string;
1909
+ zipCode: string;
1910
+ firstName?: string;
1911
+ lastName?: string;
1912
+ line2?: string;
1913
+ region?: string;
1914
+ }
1915
+ /**
1916
+ * The selected shipping method by the user. Can either be selected during an
1917
+ * express Checkout Session or passed during Checkout Session creation.
1918
+ */
1919
+ interface ShippingMethod {
1920
+ /**
1921
+ * The customer-facing name of the shipping method.
1922
+ */
1923
+ name: string;
1924
+ /**
1925
+ * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
1926
+ */
1927
+ price: number;
1928
+ /**
1929
+ * The unique identifier of the shipping method within Ivy.
1930
+ */
1931
+ id?: string;
1932
+ /**
1933
+ * The list of countries where the shipping method is available.
1934
+ */
1935
+ 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'>;
1936
+ /**
1937
+ * The delivery estimate of the shipping method.
1938
+ */
1939
+ deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1940
+ /**
1941
+ * The unique identifier within your system of the shipping method.
1942
+ */
1943
+ reference?: string;
1944
+ /**
1945
+ * @deprecated Deprecated in favor of deliveryEstimate
1946
+ */
1947
+ timeFrame?: string;
1948
+ }
1949
+ namespace ShippingMethod {
1950
+ /**
1951
+ * The delivery estimate of the shipping method.
1952
+ */
1953
+ interface DeliveryEstimate {
1954
+ /**
1955
+ * The maximum delivery time.
1956
+ */
1957
+ maximum?: DeliveryEstimate.Maximum;
1958
+ /**
1959
+ * The minimum delivery time.
1960
+ */
1961
+ minimum?: DeliveryEstimate.Minimum;
1962
+ }
1963
+ namespace DeliveryEstimate {
1964
+ /**
1965
+ * The maximum delivery time.
1966
+ */
1967
+ interface Maximum {
1968
+ /**
1969
+ * The unit of the time duration.
1970
+ */
1971
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1972
+ /**
1973
+ * The value of the time duration.
1974
+ */
1975
+ value: number;
1976
+ }
1977
+ /**
1978
+ * The minimum delivery time.
1979
+ */
1980
+ interface Minimum {
1981
+ /**
1982
+ * The unit of the time duration.
1983
+ */
1984
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1985
+ /**
1986
+ * The value of the time duration.
1987
+ */
1988
+ value: number;
1989
+ }
1990
+ }
1991
+ }
1992
+ /**
1993
+ * The shopper object. Contains information collected from the user during the
1994
+ * Checkout.
1995
+ */
1996
+ interface Shopper {
1997
+ email?: string;
1998
+ phoneNumber?: string;
1999
+ }
2000
+ interface StatusClassification {
2001
+ /**
2002
+ * Populated with the primary payment initiation failure classsification if
2003
+ * available.
2004
+ */
2005
+ primary?: string;
2006
+ /**
2007
+ * Populated with the secondary payment initiation failure classsification if
2008
+ * available.
2009
+ */
2010
+ secondary?: string;
2011
+ }
2012
+ interface StatusHistoryList {
2013
+ /**
2014
+ * The order status. This status symbolises the state of the user's payment
2015
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
2016
+ * information.
2017
+ */
2018
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
2019
+ reason: string;
2020
+ updatedAt: string;
2021
+ /**
2022
+ * The order status. This status symbolises the state of the user's payment
2023
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
2024
+ * information.
2025
+ */
2026
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
2027
+ }
2028
+ }
2029
+ export interface OrderCreateParams {
2030
+ /**
2031
+ * The total amount of the order
2032
+ */
2033
+ amount: number;
2034
+ /**
2035
+ * The currency code of the order
2036
+ */
2037
+ currency: 'EUR' | 'GBP' | 'PLN';
2038
+ /**
2039
+ * The merchant's unique reference ID for the order
2040
+ */
2041
+ referenceId: string;
2042
+ /**
2043
+ * The customer of the merchant.
2044
+ */
2045
+ customer?: OrderCreateParams.Email | OrderCreateParams.ID;
2046
+ /**
2047
+ * Optional expiration timestamp in seconds
2048
+ */
2049
+ expiresAt?: string;
2050
+ /**
2051
+ * The subaccount id of the merchant.
2052
+ */
2053
+ subaccountId?: string;
2054
+ }
2055
+ export declare namespace OrderCreateParams {
2056
+ interface Email {
2057
+ /**
2058
+ * The email of the customer.
2059
+ */
2060
+ email: string;
2061
+ }
2062
+ interface ID {
2063
+ /**
2064
+ * The Ivy id of the customer.
2065
+ */
2066
+ id: string;
2067
+ }
2068
+ }
2069
+ export interface OrderRetrieveParams {
2070
+ id: string;
2071
+ }
2072
+ export interface OrderExpireParams {
680
2073
  id: string;
681
2074
  }
682
2075
  export declare namespace Orders {
683
- export { type OrderRetrieveResponse as OrderRetrieveResponse, type OrderRetrieveParams as OrderRetrieveParams, };
2076
+ export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderExpireResponse as OrderExpireResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, type OrderExpireParams as OrderExpireParams, };
684
2077
  }
685
2078
  //# sourceMappingURL=orders.d.ts.map