@getivy/node-sdk 0.1.0-alpha.30 → 0.1.0-alpha.32

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.
@@ -110,7 +110,7 @@ export interface OrderCreateResponse {
110
110
  bankStatementReference?: string;
111
111
 
112
112
  /**
113
- * The billing address of the user. Required when handshake=true.
113
+ * The billing address of the customer.
114
114
  */
115
115
  billingAddress?: OrderCreateResponse.BillingAddress;
116
116
 
@@ -120,16 +120,6 @@ export interface OrderCreateResponse {
120
120
  */
121
121
  category?: string;
122
122
 
123
- /**
124
- * @deprecated
125
- */
126
- climateActionMode?: OrderCreateResponse.ClimateActionMode;
127
-
128
- /**
129
- * @deprecated
130
- */
131
- co2Grams?: number;
132
-
133
123
  /**
134
124
  * The unique identifier of the customer who placed the order.
135
125
  */
@@ -138,33 +128,13 @@ export interface OrderCreateResponse {
138
128
  destination?: OrderCreateResponse.Destination;
139
129
 
140
130
  /**
141
- * The customer facing id. This id is displayed to the user during the checkout and
142
- * in the merchant dashboard.
131
+ * @deprecated Currently only visible in the merchant dashboard. This id used to be
132
+ * displayed to the user during the checkout.
143
133
  */
144
134
  displayId?: string;
145
135
 
146
136
  /**
147
- * False by default. If set to true, customers skip email input and jump directly
148
- * to their bank login. For express Checkout Sessions this is always false.
149
- */
150
- guest?: boolean;
151
-
152
- /**
153
- * Only valid for sustainable incentive mode. The social / sustainable projects
154
- * available to the user during Checkout.
155
- */
156
- impactOffsetProjects?: Array<string>;
157
-
158
- /**
159
- * The incentive mode of the checkout session. For any use-case apart from
160
- * e-commerce, please use `white_label` as the value. If set to `white_label`, the
161
- * checkout session will be white labeled. If set to `sustainable`, the checkout
162
- * session will contain sustainable incentives for users.
163
- */
164
- incentiveMode?: 'white_label' | 'sustainable';
165
-
166
- /**
167
- * The line items of the Checkout.
137
+ * @deprecated The list of line items for the order.
168
138
  */
169
139
  lineItems?: Array<OrderCreateResponse.LineItem>;
170
140
 
@@ -182,12 +152,6 @@ export interface OrderCreateResponse {
182
152
  */
183
153
  metadata?: Record<string, unknown>;
184
154
 
185
- /**
186
- * Only valid for sustainable incentive mode. The social / sustainability project
187
- * chosen by the user during Checkout.
188
- */
189
- offsetProject?: string;
190
-
191
155
  /**
192
156
  * The source bank account where the money is send from.
193
157
  */
@@ -215,8 +179,7 @@ export interface OrderCreateResponse {
215
179
  | 'refund_failed'
216
180
  | 'partially_refunded'
217
181
  | 'not_settled'
218
- | 'disputed'
219
- | 'frozen_due_to_aml';
182
+ | 'disputed';
220
183
 
221
184
  /**
222
185
  * The total amount in the currency of all successful refunds for this order
@@ -228,22 +191,6 @@ export interface OrderCreateResponse {
228
191
  */
229
192
  refunds?: Array<OrderCreateResponse.Refund>;
230
193
 
231
- /**
232
- * The shipping address of the user. This is only collected in express Checkouts.
233
- */
234
- shippingAddress?: OrderCreateResponse.ShippingAddress;
235
-
236
- /**
237
- * The selected shipping method by the user. Can either be selected during an
238
- * express Checkout Session or passed during Checkout Session creation.
239
- */
240
- shippingMethod?: OrderCreateResponse.ShippingMethod;
241
-
242
- /**
243
- * The logo of the shop provided as a URL.
244
- */
245
- shopLogo?: string;
246
-
247
194
  /**
248
195
  * The shopper object. Contains information collected from the user during the
249
196
  * Checkout.
@@ -273,11 +220,6 @@ export interface OrderCreateResponse {
273
220
  * The legal name of the subaccount
274
221
  */
275
222
  subaccountLegalName?: string;
276
-
277
- /**
278
- * @deprecated
279
- */
280
- trees?: number;
281
223
  }
282
224
 
283
225
  export namespace OrderCreateResponse {
@@ -305,7 +247,7 @@ export namespace OrderCreateResponse {
305
247
  }
306
248
 
307
249
  /**
308
- * The billing address of the user. Required when handshake=true.
250
+ * The billing address of the customer.
309
251
  */
310
252
  export interface BillingAddress {
311
253
  city: string;
@@ -579,15 +521,6 @@ export namespace OrderCreateResponse {
579
521
  region?: string;
580
522
  }
581
523
 
582
- /**
583
- * @deprecated
584
- */
585
- export interface ClimateActionMode {
586
- amount: number;
587
-
588
- type: 'transaction' | 'amount';
589
- }
590
-
591
524
  export interface Destination {
592
525
  /**
593
526
  * The validation logic is based on the "type" field. For example, if "type" is set
@@ -981,707 +914,108 @@ export namespace OrderCreateResponse {
981
914
  }
982
915
 
983
916
  /**
984
- * The shipping address of the user. This is only collected in express Checkouts.
917
+ * The shopper object. Contains information collected from the user during the
918
+ * Checkout.
985
919
  */
986
- export interface ShippingAddress {
987
- city: string;
920
+ export interface Shopper {
921
+ email?: string;
922
+
923
+ phoneNumber?: string;
924
+ }
988
925
 
926
+ export interface StatusClassification {
989
927
  /**
990
- * The country code in
991
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
928
+ * Populated with the primary payment initiation failure classsification if
929
+ * available.
992
930
  */
993
- country:
994
- | 'AF'
995
- | 'AL'
996
- | 'DZ'
997
- | 'AS'
998
- | 'AD'
999
- | 'AO'
1000
- | 'AI'
1001
- | 'AQ'
1002
- | 'AG'
1003
- | 'AR'
1004
- | 'AM'
1005
- | 'AW'
1006
- | 'AU'
1007
- | 'AT'
1008
- | 'AZ'
1009
- | 'BS'
1010
- | 'BH'
1011
- | 'BD'
1012
- | 'BB'
1013
- | 'BY'
1014
- | 'BE'
1015
- | 'BZ'
1016
- | 'BJ'
1017
- | 'BM'
1018
- | 'BT'
1019
- | 'BO'
1020
- | 'BA'
1021
- | 'BW'
1022
- | 'BV'
1023
- | 'BR'
1024
- | 'IO'
1025
- | 'BN'
1026
- | 'BG'
1027
- | 'BF'
1028
- | 'BI'
1029
- | 'KH'
1030
- | 'CM'
1031
- | 'CA'
1032
- | 'CV'
1033
- | 'KY'
1034
- | 'CF'
1035
- | 'TD'
1036
- | 'CL'
1037
- | 'CN'
1038
- | 'CX'
1039
- | 'CC'
1040
- | 'CO'
1041
- | 'KM'
1042
- | 'CG'
1043
- | 'CD'
1044
- | 'CK'
1045
- | 'CR'
1046
- | 'CI'
1047
- | 'HR'
1048
- | 'CU'
1049
- | 'CY'
1050
- | 'CZ'
1051
- | 'DK'
1052
- | 'DJ'
1053
- | 'DM'
1054
- | 'DO'
1055
- | 'EC'
1056
- | 'EG'
1057
- | 'SV'
1058
- | 'GQ'
1059
- | 'ER'
1060
- | 'EE'
1061
- | 'ET'
1062
- | 'FK'
1063
- | 'FO'
1064
- | 'FJ'
1065
- | 'FI'
1066
- | 'FR'
1067
- | 'GF'
1068
- | 'PF'
1069
- | 'TF'
1070
- | 'GA'
1071
- | 'GM'
1072
- | 'GE'
1073
- | 'DE'
1074
- | 'GH'
1075
- | 'GI'
1076
- | 'GR'
1077
- | 'GL'
1078
- | 'GD'
1079
- | 'GP'
1080
- | 'GU'
1081
- | 'GT'
1082
- | 'GN'
1083
- | 'GW'
1084
- | 'GY'
1085
- | 'HT'
1086
- | 'HM'
1087
- | 'VA'
1088
- | 'HN'
1089
- | 'HK'
1090
- | 'HU'
1091
- | 'IS'
1092
- | 'IN'
1093
- | 'ID'
1094
- | 'IR'
1095
- | 'IQ'
1096
- | 'IE'
1097
- | 'IL'
1098
- | 'IT'
1099
- | 'JM'
1100
- | 'JP'
1101
- | 'JO'
1102
- | 'KZ'
1103
- | 'KE'
1104
- | 'KI'
1105
- | 'KP'
1106
- | 'KR'
1107
- | 'KW'
1108
- | 'KG'
1109
- | 'LA'
1110
- | 'LV'
1111
- | 'LB'
1112
- | 'LS'
1113
- | 'LR'
1114
- | 'LY'
1115
- | 'LI'
1116
- | 'LT'
1117
- | 'LU'
1118
- | 'MO'
1119
- | 'MG'
1120
- | 'MW'
1121
- | 'MY'
1122
- | 'MV'
1123
- | 'ML'
1124
- | 'MT'
1125
- | 'MH'
1126
- | 'MQ'
1127
- | 'MR'
1128
- | 'MU'
1129
- | 'YT'
1130
- | 'MX'
1131
- | 'FM'
1132
- | 'MD'
1133
- | 'MC'
1134
- | 'MN'
1135
- | 'MS'
1136
- | 'MA'
1137
- | 'MZ'
1138
- | 'MM'
1139
- | 'NA'
1140
- | 'NR'
1141
- | 'NP'
1142
- | 'NL'
1143
- | 'NC'
1144
- | 'NZ'
1145
- | 'NI'
1146
- | 'NE'
1147
- | 'NG'
1148
- | 'NU'
1149
- | 'NF'
1150
- | 'MP'
1151
- | 'MK'
1152
- | 'NO'
1153
- | 'OM'
1154
- | 'PK'
1155
- | 'PW'
1156
- | 'PS'
1157
- | 'PA'
1158
- | 'PG'
1159
- | 'PY'
1160
- | 'PE'
1161
- | 'PH'
1162
- | 'PN'
1163
- | 'PL'
1164
- | 'PT'
1165
- | 'PR'
1166
- | 'QA'
1167
- | 'RE'
1168
- | 'RO'
1169
- | 'RU'
1170
- | 'RW'
1171
- | 'SH'
1172
- | 'KN'
1173
- | 'LC'
1174
- | 'PM'
1175
- | 'VC'
1176
- | 'WS'
1177
- | 'SM'
1178
- | 'ST'
1179
- | 'SA'
1180
- | 'SN'
1181
- | 'SC'
1182
- | 'SL'
1183
- | 'SG'
1184
- | 'SK'
1185
- | 'SI'
1186
- | 'SB'
1187
- | 'SO'
1188
- | 'ZA'
1189
- | 'GS'
1190
- | 'ES'
1191
- | 'LK'
1192
- | 'SD'
1193
- | 'SR'
1194
- | 'SJ'
1195
- | 'SZ'
1196
- | 'SE'
1197
- | 'CH'
1198
- | 'SY'
1199
- | 'TW'
1200
- | 'TJ'
1201
- | 'TZ'
1202
- | 'TH'
1203
- | 'TL'
1204
- | 'TG'
1205
- | 'TK'
1206
- | 'TO'
1207
- | 'TT'
1208
- | 'TN'
1209
- | 'TR'
1210
- | 'TM'
1211
- | 'TC'
1212
- | 'TV'
1213
- | 'UG'
1214
- | 'UA'
1215
- | 'AE'
1216
- | 'GB'
1217
- | 'US'
1218
- | 'UM'
1219
- | 'UY'
1220
- | 'UZ'
1221
- | 'VU'
1222
- | 'VE'
1223
- | 'VN'
1224
- | 'VG'
1225
- | 'VI'
1226
- | 'WF'
1227
- | 'EH'
1228
- | 'YE'
1229
- | 'ZM'
1230
- | 'ZW'
1231
- | 'AX'
1232
- | 'BQ'
1233
- | 'CW'
1234
- | 'GG'
1235
- | 'IM'
1236
- | 'JE'
1237
- | 'ME'
1238
- | 'BL'
1239
- | 'MF'
1240
- | 'RS'
1241
- | 'SX'
1242
- | 'SS'
1243
- | 'XK';
1244
-
1245
- line1: string;
931
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1246
932
 
1247
- zipCode: string;
933
+ /**
934
+ * Populated with the secondary payment initiation failure classsification if
935
+ * available.
936
+ */
937
+ secondary?:
938
+ | 'timeout'
939
+ | 'wrong_credentials'
940
+ | 'incorrect_2fa_response'
941
+ | 'payment_rejected'
942
+ | 'insufficient_funds'
943
+ | 'cancelled'
944
+ | 'connection_to_bank_failed'
945
+ | 'international_transfer_blocked'
946
+ | 'international_transfer_limit_exceeded'
947
+ | 'user_blocked'
948
+ | 'bank_error'
949
+ | 'instant_transfers_not_enabled'
950
+ | 'no_active_tan_methods_available'
951
+ | 'account_limit_exceeded'
952
+ | 'bank_under_maintenance'
953
+ | 'pin_blocked'
954
+ | 'payment_not_settled';
955
+ }
1248
956
 
1249
- firstName?: string;
957
+ export interface StatusHistoryList {
958
+ /**
959
+ * The order status. This status symbolises the state of the user's payment
960
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
961
+ * information.
962
+ */
963
+ currentStatus:
964
+ | 'failed'
965
+ | 'canceled'
966
+ | 'processing'
967
+ | 'waiting_for_payment'
968
+ | 'paid'
969
+ | 'in_refund'
970
+ | 'refunded'
971
+ | 'refund_failed'
972
+ | 'partially_refunded'
973
+ | 'in_dispute'
974
+ | 'disputed'
975
+ | 'refused';
1250
976
 
1251
- lastName?: string;
977
+ reason: string;
1252
978
 
1253
- line2?: string;
979
+ updatedAt: string;
1254
980
 
1255
- region?: string;
981
+ /**
982
+ * The order status. This status symbolises the state of the user's payment
983
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
984
+ * information.
985
+ */
986
+ previousStatus?:
987
+ | 'failed'
988
+ | 'canceled'
989
+ | 'processing'
990
+ | 'waiting_for_payment'
991
+ | 'paid'
992
+ | 'in_refund'
993
+ | 'refunded'
994
+ | 'refund_failed'
995
+ | 'partially_refunded'
996
+ | 'in_dispute'
997
+ | 'disputed'
998
+ | 'refused'
999
+ | null;
1256
1000
  }
1001
+ }
1257
1002
 
1003
+ export interface OrderRetrieveResponse {
1258
1004
  /**
1259
- * The selected shipping method by the user. Can either be selected during an
1260
- * express Checkout Session or passed during Checkout Session creation.
1005
+ * The Ivy unique identifier for the order.
1261
1006
  */
1262
- export interface ShippingMethod {
1263
- /**
1264
- * The customer-facing name of the shipping method.
1265
- */
1266
- name: string;
1007
+ id: string;
1267
1008
 
1268
- /**
1269
- * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
1270
- */
1271
- price: number;
1009
+ /**
1010
+ * @deprecated The unique identifier for the merchantApp which initiated the order
1011
+ * / payment attempt.
1012
+ */
1013
+ appId: string;
1272
1014
 
1273
- /**
1274
- * The unique identifier of the shipping method within Ivy.
1275
- */
1276
- id?: string;
1277
-
1278
- /**
1279
- * The list of countries where the shipping method is available.
1280
- */
1281
- countries?: Array<
1282
- | 'AF'
1283
- | 'AL'
1284
- | 'DZ'
1285
- | 'AS'
1286
- | 'AD'
1287
- | 'AO'
1288
- | 'AI'
1289
- | 'AQ'
1290
- | 'AG'
1291
- | 'AR'
1292
- | 'AM'
1293
- | 'AW'
1294
- | 'AU'
1295
- | 'AT'
1296
- | 'AZ'
1297
- | 'BS'
1298
- | 'BH'
1299
- | 'BD'
1300
- | 'BB'
1301
- | 'BY'
1302
- | 'BE'
1303
- | 'BZ'
1304
- | 'BJ'
1305
- | 'BM'
1306
- | 'BT'
1307
- | 'BO'
1308
- | 'BA'
1309
- | 'BW'
1310
- | 'BV'
1311
- | 'BR'
1312
- | 'IO'
1313
- | 'BN'
1314
- | 'BG'
1315
- | 'BF'
1316
- | 'BI'
1317
- | 'KH'
1318
- | 'CM'
1319
- | 'CA'
1320
- | 'CV'
1321
- | 'KY'
1322
- | 'CF'
1323
- | 'TD'
1324
- | 'CL'
1325
- | 'CN'
1326
- | 'CX'
1327
- | 'CC'
1328
- | 'CO'
1329
- | 'KM'
1330
- | 'CG'
1331
- | 'CD'
1332
- | 'CK'
1333
- | 'CR'
1334
- | 'CI'
1335
- | 'HR'
1336
- | 'CU'
1337
- | 'CY'
1338
- | 'CZ'
1339
- | 'DK'
1340
- | 'DJ'
1341
- | 'DM'
1342
- | 'DO'
1343
- | 'EC'
1344
- | 'EG'
1345
- | 'SV'
1346
- | 'GQ'
1347
- | 'ER'
1348
- | 'EE'
1349
- | 'ET'
1350
- | 'FK'
1351
- | 'FO'
1352
- | 'FJ'
1353
- | 'FI'
1354
- | 'FR'
1355
- | 'GF'
1356
- | 'PF'
1357
- | 'TF'
1358
- | 'GA'
1359
- | 'GM'
1360
- | 'GE'
1361
- | 'DE'
1362
- | 'GH'
1363
- | 'GI'
1364
- | 'GR'
1365
- | 'GL'
1366
- | 'GD'
1367
- | 'GP'
1368
- | 'GU'
1369
- | 'GT'
1370
- | 'GN'
1371
- | 'GW'
1372
- | 'GY'
1373
- | 'HT'
1374
- | 'HM'
1375
- | 'VA'
1376
- | 'HN'
1377
- | 'HK'
1378
- | 'HU'
1379
- | 'IS'
1380
- | 'IN'
1381
- | 'ID'
1382
- | 'IR'
1383
- | 'IQ'
1384
- | 'IE'
1385
- | 'IL'
1386
- | 'IT'
1387
- | 'JM'
1388
- | 'JP'
1389
- | 'JO'
1390
- | 'KZ'
1391
- | 'KE'
1392
- | 'KI'
1393
- | 'KP'
1394
- | 'KR'
1395
- | 'KW'
1396
- | 'KG'
1397
- | 'LA'
1398
- | 'LV'
1399
- | 'LB'
1400
- | 'LS'
1401
- | 'LR'
1402
- | 'LY'
1403
- | 'LI'
1404
- | 'LT'
1405
- | 'LU'
1406
- | 'MO'
1407
- | 'MG'
1408
- | 'MW'
1409
- | 'MY'
1410
- | 'MV'
1411
- | 'ML'
1412
- | 'MT'
1413
- | 'MH'
1414
- | 'MQ'
1415
- | 'MR'
1416
- | 'MU'
1417
- | 'YT'
1418
- | 'MX'
1419
- | 'FM'
1420
- | 'MD'
1421
- | 'MC'
1422
- | 'MN'
1423
- | 'MS'
1424
- | 'MA'
1425
- | 'MZ'
1426
- | 'MM'
1427
- | 'NA'
1428
- | 'NR'
1429
- | 'NP'
1430
- | 'NL'
1431
- | 'NC'
1432
- | 'NZ'
1433
- | 'NI'
1434
- | 'NE'
1435
- | 'NG'
1436
- | 'NU'
1437
- | 'NF'
1438
- | 'MP'
1439
- | 'MK'
1440
- | 'NO'
1441
- | 'OM'
1442
- | 'PK'
1443
- | 'PW'
1444
- | 'PS'
1445
- | 'PA'
1446
- | 'PG'
1447
- | 'PY'
1448
- | 'PE'
1449
- | 'PH'
1450
- | 'PN'
1451
- | 'PL'
1452
- | 'PT'
1453
- | 'PR'
1454
- | 'QA'
1455
- | 'RE'
1456
- | 'RO'
1457
- | 'RU'
1458
- | 'RW'
1459
- | 'SH'
1460
- | 'KN'
1461
- | 'LC'
1462
- | 'PM'
1463
- | 'VC'
1464
- | 'WS'
1465
- | 'SM'
1466
- | 'ST'
1467
- | 'SA'
1468
- | 'SN'
1469
- | 'SC'
1470
- | 'SL'
1471
- | 'SG'
1472
- | 'SK'
1473
- | 'SI'
1474
- | 'SB'
1475
- | 'SO'
1476
- | 'ZA'
1477
- | 'GS'
1478
- | 'ES'
1479
- | 'LK'
1480
- | 'SD'
1481
- | 'SR'
1482
- | 'SJ'
1483
- | 'SZ'
1484
- | 'SE'
1485
- | 'CH'
1486
- | 'SY'
1487
- | 'TW'
1488
- | 'TJ'
1489
- | 'TZ'
1490
- | 'TH'
1491
- | 'TL'
1492
- | 'TG'
1493
- | 'TK'
1494
- | 'TO'
1495
- | 'TT'
1496
- | 'TN'
1497
- | 'TR'
1498
- | 'TM'
1499
- | 'TC'
1500
- | 'TV'
1501
- | 'UG'
1502
- | 'UA'
1503
- | 'AE'
1504
- | 'GB'
1505
- | 'US'
1506
- | 'UM'
1507
- | 'UY'
1508
- | 'UZ'
1509
- | 'VU'
1510
- | 'VE'
1511
- | 'VN'
1512
- | 'VG'
1513
- | 'VI'
1514
- | 'WF'
1515
- | 'EH'
1516
- | 'YE'
1517
- | 'ZM'
1518
- | 'ZW'
1519
- | 'AX'
1520
- | 'BQ'
1521
- | 'CW'
1522
- | 'GG'
1523
- | 'IM'
1524
- | 'JE'
1525
- | 'ME'
1526
- | 'BL'
1527
- | 'MF'
1528
- | 'RS'
1529
- | 'SX'
1530
- | 'SS'
1531
- | 'XK'
1532
- >;
1533
-
1534
- /**
1535
- * The delivery estimate of the shipping method.
1536
- */
1537
- deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1538
-
1539
- /**
1540
- * The unique identifier within your system of the shipping method.
1541
- */
1542
- reference?: string;
1543
-
1544
- /**
1545
- * @deprecated Deprecated in favor of deliveryEstimate
1546
- */
1547
- timeFrame?: string;
1548
- }
1549
-
1550
- export namespace ShippingMethod {
1551
- /**
1552
- * The delivery estimate of the shipping method.
1553
- */
1554
- export interface DeliveryEstimate {
1555
- /**
1556
- * The maximum delivery time.
1557
- */
1558
- maximum?: DeliveryEstimate.Maximum;
1559
-
1560
- /**
1561
- * The minimum delivery time.
1562
- */
1563
- minimum?: DeliveryEstimate.Minimum;
1564
- }
1565
-
1566
- export namespace DeliveryEstimate {
1567
- /**
1568
- * The maximum delivery time.
1569
- */
1570
- export interface Maximum {
1571
- /**
1572
- * The unit of the time duration.
1573
- */
1574
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1575
-
1576
- /**
1577
- * The value of the time duration.
1578
- */
1579
- value: number;
1580
- }
1581
-
1582
- /**
1583
- * The minimum delivery time.
1584
- */
1585
- export interface Minimum {
1586
- /**
1587
- * The unit of the time duration.
1588
- */
1589
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1590
-
1591
- /**
1592
- * The value of the time duration.
1593
- */
1594
- value: number;
1595
- }
1596
- }
1597
- }
1598
-
1599
- /**
1600
- * The shopper object. Contains information collected from the user during the
1601
- * Checkout.
1602
- */
1603
- export interface Shopper {
1604
- email?: string;
1605
-
1606
- phoneNumber?: string;
1607
- }
1608
-
1609
- export interface StatusClassification {
1610
- /**
1611
- * Populated with the primary payment initiation failure classsification if
1612
- * available.
1613
- */
1614
- primary?: string;
1615
-
1616
- /**
1617
- * Populated with the secondary payment initiation failure classsification if
1618
- * available.
1619
- */
1620
- secondary?: string;
1621
- }
1622
-
1623
- export interface StatusHistoryList {
1624
- /**
1625
- * The order status. This status symbolises the state of the user's payment
1626
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1627
- * information.
1628
- */
1629
- currentStatus:
1630
- | 'failed'
1631
- | 'canceled'
1632
- | 'processing'
1633
- | 'waiting_for_payment'
1634
- | 'paid'
1635
- | 'in_refund'
1636
- | 'refunded'
1637
- | 'refund_failed'
1638
- | 'partially_refunded'
1639
- | 'in_dispute'
1640
- | 'disputed'
1641
- | 'refused';
1642
-
1643
- reason: string;
1644
-
1645
- updatedAt: string;
1646
-
1647
- /**
1648
- * The order status. This status symbolises the state of the user's payment
1649
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1650
- * information.
1651
- */
1652
- previousStatus?:
1653
- | 'failed'
1654
- | 'canceled'
1655
- | 'processing'
1656
- | 'waiting_for_payment'
1657
- | 'paid'
1658
- | 'in_refund'
1659
- | 'refunded'
1660
- | 'refund_failed'
1661
- | 'partially_refunded'
1662
- | 'in_dispute'
1663
- | 'disputed'
1664
- | 'refused'
1665
- | null;
1666
- }
1667
- }
1668
-
1669
- export interface OrderRetrieveResponse {
1670
- /**
1671
- * The Ivy unique identifier for the order.
1672
- */
1673
- id: string;
1674
-
1675
- /**
1676
- * @deprecated The unique identifier for the merchantApp which initiated the order
1677
- * / payment attempt.
1678
- */
1679
- appId: string;
1680
-
1681
- /**
1682
- * The Ivy fee for the payment.
1683
- */
1684
- applicationFeeAmount: number;
1015
+ /**
1016
+ * The Ivy fee for the payment.
1017
+ */
1018
+ applicationFeeAmount: number;
1685
1019
 
1686
1020
  createdAt: string;
1687
1021
 
@@ -1751,7 +1085,7 @@ export interface OrderRetrieveResponse {
1751
1085
  bankStatementReference?: string;
1752
1086
 
1753
1087
  /**
1754
- * The billing address of the user. Required when handshake=true.
1088
+ * The billing address of the customer.
1755
1089
  */
1756
1090
  billingAddress?: OrderRetrieveResponse.BillingAddress;
1757
1091
 
@@ -1761,1165 +1095,143 @@ export interface OrderRetrieveResponse {
1761
1095
  */
1762
1096
  category?: string;
1763
1097
 
1764
- /**
1765
- * @deprecated
1766
- */
1767
- climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
1768
-
1769
- /**
1770
- * @deprecated
1771
- */
1772
- co2Grams?: number;
1773
-
1774
1098
  /**
1775
1099
  * The unique identifier of the customer who placed the order.
1776
- */
1777
- customerId?: string;
1778
-
1779
- destination?: OrderRetrieveResponse.Destination;
1780
-
1781
- /**
1782
- * The customer facing id. This id is displayed to the user during the checkout and
1783
- * in the merchant dashboard.
1784
- */
1785
- displayId?: string;
1786
-
1787
- /**
1788
- * False by default. If set to true, customers skip email input and jump directly
1789
- * to their bank login. For express Checkout Sessions this is always false.
1790
- */
1791
- guest?: boolean;
1792
-
1793
- /**
1794
- * Only valid for sustainable incentive mode. The social / sustainable projects
1795
- * available to the user during Checkout.
1796
- */
1797
- impactOffsetProjects?: Array<string>;
1798
-
1799
- /**
1800
- * The incentive mode of the checkout session. For any use-case apart from
1801
- * e-commerce, please use `white_label` as the value. If set to `white_label`, the
1802
- * checkout session will be white labeled. If set to `sustainable`, the checkout
1803
- * session will contain sustainable incentives for users.
1804
- */
1805
- incentiveMode?: 'white_label' | 'sustainable';
1806
-
1807
- /**
1808
- * The line items of the Checkout.
1809
- */
1810
- lineItems?: Array<OrderRetrieveResponse.LineItem>;
1811
-
1812
- mandate?: OrderRetrieveResponse.Mandate;
1813
-
1814
- /**
1815
- * @deprecated
1816
- */
1817
- merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
1818
-
1819
- /**
1820
- * Any data which will be stored and returned for this checkout session and
1821
- * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
1822
- * more info.
1823
- */
1824
- metadata?: Record<string, unknown>;
1825
-
1826
- /**
1827
- * Only valid for sustainable incentive mode. The social / sustainability project
1828
- * chosen by the user during Checkout.
1829
- */
1830
- offsetProject?: string;
1831
-
1832
- /**
1833
- * The source bank account where the money is send from.
1834
- */
1835
- payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
1836
-
1837
- paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1838
-
1839
- /**
1840
- * The payment mode of the order. Can be either 'settlement' or 'direct'.
1841
- */
1842
- paymentMode?: 'settlement' | 'direct';
1843
-
1844
- /**
1845
- * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
1846
- * actions in your system.
1847
- */
1848
- paymentStatus?:
1849
- | 'failed'
1850
- | 'canceled'
1851
- | 'processing'
1852
- | 'requires_action'
1853
- | 'succeeded'
1854
- | 'in_refund'
1855
- | 'refunded'
1856
- | 'refund_failed'
1857
- | 'partially_refunded'
1858
- | 'not_settled'
1859
- | 'disputed'
1860
- | 'frozen_due_to_aml';
1861
-
1862
- /**
1863
- * The total amount in the currency of all successful refunds for this order
1864
- */
1865
- refundAmount?: number;
1866
-
1867
- /**
1868
- * The list of refunds connected to this order.
1869
- */
1870
- refunds?: Array<OrderRetrieveResponse.Refund>;
1871
-
1872
- /**
1873
- * The shipping address of the user. This is only collected in express Checkouts.
1874
- */
1875
- shippingAddress?: OrderRetrieveResponse.ShippingAddress;
1876
-
1877
- /**
1878
- * The selected shipping method by the user. Can either be selected during an
1879
- * express Checkout Session or passed during Checkout Session creation.
1880
- */
1881
- shippingMethod?: OrderRetrieveResponse.ShippingMethod;
1882
-
1883
- /**
1884
- * The logo of the shop provided as a URL.
1885
- */
1886
- shopLogo?: string;
1887
-
1888
- /**
1889
- * The shopper object. Contains information collected from the user during the
1890
- * Checkout.
1891
- */
1892
- shopper?: OrderRetrieveResponse.Shopper;
1893
-
1894
- /**
1895
- * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
1896
- * collected in the Checkout.
1897
- */
1898
- shopperEmail?: string;
1899
-
1900
- statusClassification?: OrderRetrieveResponse.StatusClassification;
1901
-
1902
- /**
1903
- * List of status history items for the order, used for logging every update on
1904
- * status.
1905
- */
1906
- statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
1907
-
1908
- /**
1909
- * The subaccount id of the order.
1910
- */
1911
- subaccountId?: string;
1912
-
1913
- /**
1914
- * The legal name of the subaccount
1915
- */
1916
- subaccountLegalName?: string;
1917
-
1918
- /**
1919
- * @deprecated
1920
- */
1921
- trees?: number;
1922
- }
1923
-
1924
- export namespace OrderRetrieveResponse {
1925
- /**
1926
- * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1927
- * represents EUR 10.23. Any amount of decimal places can be provided on
1928
- * initialization, but the actual transfer amount is rounded to 2 decimal places,
1929
- * as this is the format accepted by most banks.
1930
- */
1931
- export interface Price {
1932
- currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1933
-
1934
- /**
1935
- * The total amount to be paid.
1936
- */
1937
- total: number;
1938
-
1939
- shipping?: number;
1940
-
1941
- subTotal?: number;
1942
-
1943
- totalNet?: number;
1944
-
1945
- vat?: number;
1946
- }
1947
-
1948
- /**
1949
- * The billing address of the user. Required when handshake=true.
1950
- */
1951
- export interface BillingAddress {
1952
- city: string;
1953
-
1954
- /**
1955
- * The country code in
1956
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1957
- */
1958
- country:
1959
- | 'AF'
1960
- | 'AL'
1961
- | 'DZ'
1962
- | 'AS'
1963
- | 'AD'
1964
- | 'AO'
1965
- | 'AI'
1966
- | 'AQ'
1967
- | 'AG'
1968
- | 'AR'
1969
- | 'AM'
1970
- | 'AW'
1971
- | 'AU'
1972
- | 'AT'
1973
- | 'AZ'
1974
- | 'BS'
1975
- | 'BH'
1976
- | 'BD'
1977
- | 'BB'
1978
- | 'BY'
1979
- | 'BE'
1980
- | 'BZ'
1981
- | 'BJ'
1982
- | 'BM'
1983
- | 'BT'
1984
- | 'BO'
1985
- | 'BA'
1986
- | 'BW'
1987
- | 'BV'
1988
- | 'BR'
1989
- | 'IO'
1990
- | 'BN'
1991
- | 'BG'
1992
- | 'BF'
1993
- | 'BI'
1994
- | 'KH'
1995
- | 'CM'
1996
- | 'CA'
1997
- | 'CV'
1998
- | 'KY'
1999
- | 'CF'
2000
- | 'TD'
2001
- | 'CL'
2002
- | 'CN'
2003
- | 'CX'
2004
- | 'CC'
2005
- | 'CO'
2006
- | 'KM'
2007
- | 'CG'
2008
- | 'CD'
2009
- | 'CK'
2010
- | 'CR'
2011
- | 'CI'
2012
- | 'HR'
2013
- | 'CU'
2014
- | 'CY'
2015
- | 'CZ'
2016
- | 'DK'
2017
- | 'DJ'
2018
- | 'DM'
2019
- | 'DO'
2020
- | 'EC'
2021
- | 'EG'
2022
- | 'SV'
2023
- | 'GQ'
2024
- | 'ER'
2025
- | 'EE'
2026
- | 'ET'
2027
- | 'FK'
2028
- | 'FO'
2029
- | 'FJ'
2030
- | 'FI'
2031
- | 'FR'
2032
- | 'GF'
2033
- | 'PF'
2034
- | 'TF'
2035
- | 'GA'
2036
- | 'GM'
2037
- | 'GE'
2038
- | 'DE'
2039
- | 'GH'
2040
- | 'GI'
2041
- | 'GR'
2042
- | 'GL'
2043
- | 'GD'
2044
- | 'GP'
2045
- | 'GU'
2046
- | 'GT'
2047
- | 'GN'
2048
- | 'GW'
2049
- | 'GY'
2050
- | 'HT'
2051
- | 'HM'
2052
- | 'VA'
2053
- | 'HN'
2054
- | 'HK'
2055
- | 'HU'
2056
- | 'IS'
2057
- | 'IN'
2058
- | 'ID'
2059
- | 'IR'
2060
- | 'IQ'
2061
- | 'IE'
2062
- | 'IL'
2063
- | 'IT'
2064
- | 'JM'
2065
- | 'JP'
2066
- | 'JO'
2067
- | 'KZ'
2068
- | 'KE'
2069
- | 'KI'
2070
- | 'KP'
2071
- | 'KR'
2072
- | 'KW'
2073
- | 'KG'
2074
- | 'LA'
2075
- | 'LV'
2076
- | 'LB'
2077
- | 'LS'
2078
- | 'LR'
2079
- | 'LY'
2080
- | 'LI'
2081
- | 'LT'
2082
- | 'LU'
2083
- | 'MO'
2084
- | 'MG'
2085
- | 'MW'
2086
- | 'MY'
2087
- | 'MV'
2088
- | 'ML'
2089
- | 'MT'
2090
- | 'MH'
2091
- | 'MQ'
2092
- | 'MR'
2093
- | 'MU'
2094
- | 'YT'
2095
- | 'MX'
2096
- | 'FM'
2097
- | 'MD'
2098
- | 'MC'
2099
- | 'MN'
2100
- | 'MS'
2101
- | 'MA'
2102
- | 'MZ'
2103
- | 'MM'
2104
- | 'NA'
2105
- | 'NR'
2106
- | 'NP'
2107
- | 'NL'
2108
- | 'NC'
2109
- | 'NZ'
2110
- | 'NI'
2111
- | 'NE'
2112
- | 'NG'
2113
- | 'NU'
2114
- | 'NF'
2115
- | 'MP'
2116
- | 'MK'
2117
- | 'NO'
2118
- | 'OM'
2119
- | 'PK'
2120
- | 'PW'
2121
- | 'PS'
2122
- | 'PA'
2123
- | 'PG'
2124
- | 'PY'
2125
- | 'PE'
2126
- | 'PH'
2127
- | 'PN'
2128
- | 'PL'
2129
- | 'PT'
2130
- | 'PR'
2131
- | 'QA'
2132
- | 'RE'
2133
- | 'RO'
2134
- | 'RU'
2135
- | 'RW'
2136
- | 'SH'
2137
- | 'KN'
2138
- | 'LC'
2139
- | 'PM'
2140
- | 'VC'
2141
- | 'WS'
2142
- | 'SM'
2143
- | 'ST'
2144
- | 'SA'
2145
- | 'SN'
2146
- | 'SC'
2147
- | 'SL'
2148
- | 'SG'
2149
- | 'SK'
2150
- | 'SI'
2151
- | 'SB'
2152
- | 'SO'
2153
- | 'ZA'
2154
- | 'GS'
2155
- | 'ES'
2156
- | 'LK'
2157
- | 'SD'
2158
- | 'SR'
2159
- | 'SJ'
2160
- | 'SZ'
2161
- | 'SE'
2162
- | 'CH'
2163
- | 'SY'
2164
- | 'TW'
2165
- | 'TJ'
2166
- | 'TZ'
2167
- | 'TH'
2168
- | 'TL'
2169
- | 'TG'
2170
- | 'TK'
2171
- | 'TO'
2172
- | 'TT'
2173
- | 'TN'
2174
- | 'TR'
2175
- | 'TM'
2176
- | 'TC'
2177
- | 'TV'
2178
- | 'UG'
2179
- | 'UA'
2180
- | 'AE'
2181
- | 'GB'
2182
- | 'US'
2183
- | 'UM'
2184
- | 'UY'
2185
- | 'UZ'
2186
- | 'VU'
2187
- | 'VE'
2188
- | 'VN'
2189
- | 'VG'
2190
- | 'VI'
2191
- | 'WF'
2192
- | 'EH'
2193
- | 'YE'
2194
- | 'ZM'
2195
- | 'ZW'
2196
- | 'AX'
2197
- | 'BQ'
2198
- | 'CW'
2199
- | 'GG'
2200
- | 'IM'
2201
- | 'JE'
2202
- | 'ME'
2203
- | 'BL'
2204
- | 'MF'
2205
- | 'RS'
2206
- | 'SX'
2207
- | 'SS'
2208
- | 'XK';
2209
-
2210
- line1: string;
2211
-
2212
- zipCode: string;
2213
-
2214
- firstName?: string;
2215
-
2216
- lastName?: string;
2217
-
2218
- line2?: string;
2219
-
2220
- region?: string;
2221
- }
2222
-
2223
- /**
2224
- * @deprecated
2225
- */
2226
- export interface ClimateActionMode {
2227
- amount: number;
2228
-
2229
- type: 'transaction' | 'amount';
2230
- }
2231
-
2232
- export interface Destination {
2233
- /**
2234
- * The validation logic is based on the "type" field. For example, if "type" is set
2235
- * to "iban", the "iban" object must be filled out.
2236
- */
2237
- bankAccount: Destination.BankAccount;
2238
-
2239
- /**
2240
- * The bank statement reference of the payment for the order. This is the reference
2241
- * that will be visible on the bank statement.
2242
- */
2243
- bankStatementReference: string;
2244
- }
2245
-
2246
- export namespace Destination {
2247
- /**
2248
- * The validation logic is based on the "type" field. For example, if "type" is set
2249
- * to "iban", the "iban" object must be filled out.
2250
- */
2251
- export interface BankAccount {
2252
- /**
2253
- * The type of the financial address. The actual destination is determined by this
2254
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
2255
- * validation will fail if you set e.g. type="iban", but then not fill any values
2256
- * in the "iban" object.
2257
- *
2258
- * - iban: The IBAN of the account
2259
- * - sort_code: The sort code of the account
2260
- * - bank_code: The bank code of the account
2261
- * - bban: The BBAN of the account
2262
- */
2263
- type: string;
2264
-
2265
- bankCode?: BankAccount.BankCode;
2266
-
2267
- bban?: BankAccount.Bban;
2268
-
2269
- iban?: BankAccount.Iban;
2270
-
2271
- sortCode?: BankAccount.SortCode;
2272
- }
2273
-
2274
- export namespace BankAccount {
2275
- export interface BankCode {
2276
- /**
2277
- * The name of the account holder.
2278
- */
2279
- accountHolderName: string;
2280
-
2281
- accountNumber: string;
2282
-
2283
- code: string;
2284
- }
2285
-
2286
- export interface Bban {
2287
- /**
2288
- * The name of the account holder.
2289
- */
2290
- accountHolderName: string;
2291
-
2292
- bban: string;
2293
-
2294
- bic?: string;
2295
- }
2296
-
2297
- export interface Iban {
2298
- /**
2299
- * The name of the account holder.
2300
- */
2301
- accountHolderName: string;
2302
-
2303
- iban: string;
2304
-
2305
- bic?: string;
2306
- }
2307
-
2308
- export interface SortCode {
2309
- /**
2310
- * The name of the account holder.
2311
- */
2312
- accountHolderName: string;
2313
-
2314
- accountNumber: string;
2315
-
2316
- sortCode: string;
2317
- }
2318
- }
2319
- }
2320
-
2321
- export interface LineItem {
2322
- /**
2323
- * The total amount of all line items, i.e. single amount \* quantity. Given in
2324
- * decimals, i.e. 10.23 represents EUR 10.23.
2325
- */
2326
- amount: number;
2327
-
2328
- /**
2329
- * The name of the line item.
2330
- */
2331
- name: string;
2332
-
2333
- /**
2334
- * The quantity of the line item.
2335
- */
2336
- quantity: number;
2337
-
2338
- /**
2339
- * The net amount of a single item.
2340
- */
2341
- singleNet: number;
2342
-
2343
- /**
2344
- * The VAT amount of a single item.
2345
- */
2346
- singleVat: number;
2347
-
2348
- /**
2349
- * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
2350
- * the line item.
2351
- */
2352
- category?: string;
2353
-
2354
- /**
2355
- * The
2356
- * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
2357
- * of the line item.
2358
- */
2359
- EAN?: string;
2360
-
2361
- /**
2362
- * The image of the line item as a URL.
2363
- */
2364
- image?: string;
2365
-
2366
- /**
2367
- * The internal unique identifier of the line item.
2368
- */
2369
- referenceId?: string;
2370
- }
2371
-
2372
- export interface Mandate {
2373
- /**
2374
- * The name of the account holder who signs the mandate.
2375
- */
2376
- accountHolderName?: string;
2377
-
2378
- /**
2379
- * Additional information to display to the user during the mandate setup. This
2380
- * information is not used to setup any recurrence on the mandate. It is only
2381
- * displayed to the user during checkout.
2382
- */
2383
- additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
2384
-
2385
- /**
2386
- * Mandate creditor data
2387
- */
2388
- creditor?: Mandate.Creditor;
2389
-
2390
- /**
2391
- * The reference of the mandate going to be setup
2392
- */
2393
- reference?: string;
2394
-
2395
- /**
2396
- * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
2397
- * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
2398
- * mandate setup request.
2399
- */
2400
- referenceId?: string;
2401
-
2402
- /**
2403
- * If true, a ready to use mandate will be set up after the payment flow.
2404
- */
2405
- setup?: boolean;
2406
-
2407
- /**
2408
- * The email of the user who signs the mandate.
2409
- */
2410
- userNotificationEmail?: string;
2411
- }
2412
-
2413
- export namespace Mandate {
2414
- /**
2415
- * Additional information to display to the user during the mandate setup. This
2416
- * information is not used to setup any recurrence on the mandate. It is only
2417
- * displayed to the user during checkout.
2418
- */
2419
- export interface AdditionalDisplayInformation {
2420
- /**
2421
- * The intended cadence of charges used for displaying purpose only. On demand
2422
- * would be used for unscheduled charges.
2423
- */
2424
- cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
2425
-
2426
- price?: AdditionalDisplayInformation.Price;
2427
- }
2428
-
2429
- export namespace AdditionalDisplayInformation {
2430
- export interface Price {
2431
- /**
2432
- * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
2433
- * 10.23 EUR.
2434
- */
2435
- amount?: number;
2436
-
2437
- currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
2438
- }
2439
- }
2440
-
2441
- /**
2442
- * Mandate creditor data
2443
- */
2444
- export interface Creditor {
2445
- id?: string;
2446
-
2447
- name?: string;
2448
- }
2449
- }
2450
-
2451
- /**
2452
- * @deprecated
2453
- */
2454
- export interface MerchantFinancialAddress {
2455
- bankCode?: MerchantFinancialAddress.BankCode;
2456
-
2457
- bban?: MerchantFinancialAddress.Bban;
2458
-
2459
- iban?: MerchantFinancialAddress.Iban;
2460
-
2461
- /**
2462
- * The payment reference for the order. This is the reference that will be visible
2463
- * on the bank statement.
2464
- */
2465
- paymentReference?: string;
2466
-
2467
- sortCode?: MerchantFinancialAddress.SortCode;
2468
-
2469
- /**
2470
- * The type of the financial address. The actual destination is determined by this
2471
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
2472
- * validation will fail if you set e.g. type="iban", but then not fill any values
2473
- * in the "iban" object.
2474
- *
2475
- * - iban: The IBAN of the account
2476
- * - sort_code: The sort code of the account
2477
- * - bank_code: The bank code of the account
2478
- * - bban: The BBAN of the account
2479
- */
2480
- type?: string;
2481
- }
2482
-
2483
- export namespace MerchantFinancialAddress {
2484
- export interface BankCode {
2485
- /**
2486
- * The name of the account holder.
2487
- */
2488
- accountHolderName: string;
2489
-
2490
- accountNumber: string;
2491
-
2492
- code: string;
2493
- }
2494
-
2495
- export interface Bban {
2496
- /**
2497
- * The name of the account holder.
2498
- */
2499
- accountHolderName: string;
2500
-
2501
- bban: string;
2502
-
2503
- bic?: string;
2504
- }
2505
-
2506
- export interface Iban {
2507
- /**
2508
- * The name of the account holder.
2509
- */
2510
- accountHolderName: string;
2511
-
2512
- iban: string;
2513
-
2514
- bic?: string;
2515
- }
2516
-
2517
- export interface SortCode {
2518
- /**
2519
- * The name of the account holder.
2520
- */
2521
- accountHolderName: string;
2522
-
2523
- accountNumber: string;
2524
-
2525
- sortCode: string;
2526
- }
2527
- }
2528
-
2529
- /**
2530
- * The source bank account where the money is send from.
2531
- */
2532
- export interface PayerFinancialAddress {
2533
- /**
2534
- * The type of the financial address. The actual destination is determined by this
2535
- * field which can be either "iban", "sortCode", "bankCode", or "bban". The
2536
- * validation will fail if you set e.g. type="iban", but then not fill any values
2537
- * in the "iban" object.
2538
- *
2539
- * - iban: The IBAN of the account
2540
- * - sort_code: The sort code of the account
2541
- * - bank_code: The bank code of the account
2542
- * - bban: The BBAN of the account
2543
- */
2544
- type: string;
2545
-
2546
- bankCode?: PayerFinancialAddress.BankCode;
2547
-
2548
- bban?: PayerFinancialAddress.Bban;
2549
-
2550
- iban?: PayerFinancialAddress.Iban;
2551
-
2552
- sortCode?: PayerFinancialAddress.SortCode;
2553
- }
2554
-
2555
- export namespace PayerFinancialAddress {
2556
- export interface BankCode {
2557
- accountNumber: string;
2558
-
2559
- code: string;
2560
-
2561
- /**
2562
- * The name of the account holder.
2563
- */
2564
- accountHolderName?: string;
2565
- }
2566
-
2567
- export interface Bban {
2568
- bban: string;
2569
-
2570
- /**
2571
- * The name of the account holder.
2572
- */
2573
- accountHolderName?: string;
2574
-
2575
- bic?: string;
2576
- }
2577
-
2578
- export interface Iban {
2579
- iban: string;
2580
-
2581
- /**
2582
- * The name of the account holder.
2583
- */
2584
- accountHolderName?: string;
2585
-
2586
- bic?: string;
2587
- }
2588
-
2589
- export interface SortCode {
2590
- accountNumber: string;
2591
-
2592
- sortCode: string;
2593
-
2594
- /**
2595
- * The name of the account holder.
2596
- */
2597
- accountHolderName?: string;
2598
- }
2599
- }
2600
-
2601
- /**
2602
- * A Refund object. This corresponds to one Refund request.
2603
- */
2604
- export interface Refund {
2605
- id: string;
2606
-
2607
- amount: number;
2608
-
2609
- createdAt: string;
2610
-
2611
- referenceId: string;
2612
-
2613
- /**
2614
- * The status of the refund. Always use the status of the order as your source of
2615
- * truth to trigger actions in your dashboard.
2616
- */
2617
- status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
2618
-
2619
- updatedAt: string;
2620
-
2621
- description?: string;
2622
- }
2623
-
2624
- /**
2625
- * The shipping address of the user. This is only collected in express Checkouts.
2626
- */
2627
- export interface ShippingAddress {
2628
- city: string;
2629
-
2630
- /**
2631
- * The country code in
2632
- * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
2633
- */
2634
- country:
2635
- | 'AF'
2636
- | 'AL'
2637
- | 'DZ'
2638
- | 'AS'
2639
- | 'AD'
2640
- | 'AO'
2641
- | 'AI'
2642
- | 'AQ'
2643
- | 'AG'
2644
- | 'AR'
2645
- | 'AM'
2646
- | 'AW'
2647
- | 'AU'
2648
- | 'AT'
2649
- | 'AZ'
2650
- | 'BS'
2651
- | 'BH'
2652
- | 'BD'
2653
- | 'BB'
2654
- | 'BY'
2655
- | 'BE'
2656
- | 'BZ'
2657
- | 'BJ'
2658
- | 'BM'
2659
- | 'BT'
2660
- | 'BO'
2661
- | 'BA'
2662
- | 'BW'
2663
- | 'BV'
2664
- | 'BR'
2665
- | 'IO'
2666
- | 'BN'
2667
- | 'BG'
2668
- | 'BF'
2669
- | 'BI'
2670
- | 'KH'
2671
- | 'CM'
2672
- | 'CA'
2673
- | 'CV'
2674
- | 'KY'
2675
- | 'CF'
2676
- | 'TD'
2677
- | 'CL'
2678
- | 'CN'
2679
- | 'CX'
2680
- | 'CC'
2681
- | 'CO'
2682
- | 'KM'
2683
- | 'CG'
2684
- | 'CD'
2685
- | 'CK'
2686
- | 'CR'
2687
- | 'CI'
2688
- | 'HR'
2689
- | 'CU'
2690
- | 'CY'
2691
- | 'CZ'
2692
- | 'DK'
2693
- | 'DJ'
2694
- | 'DM'
2695
- | 'DO'
2696
- | 'EC'
2697
- | 'EG'
2698
- | 'SV'
2699
- | 'GQ'
2700
- | 'ER'
2701
- | 'EE'
2702
- | 'ET'
2703
- | 'FK'
2704
- | 'FO'
2705
- | 'FJ'
2706
- | 'FI'
2707
- | 'FR'
2708
- | 'GF'
2709
- | 'PF'
2710
- | 'TF'
2711
- | 'GA'
2712
- | 'GM'
2713
- | 'GE'
2714
- | 'DE'
2715
- | 'GH'
2716
- | 'GI'
2717
- | 'GR'
2718
- | 'GL'
2719
- | 'GD'
2720
- | 'GP'
2721
- | 'GU'
2722
- | 'GT'
2723
- | 'GN'
2724
- | 'GW'
2725
- | 'GY'
2726
- | 'HT'
2727
- | 'HM'
2728
- | 'VA'
2729
- | 'HN'
2730
- | 'HK'
2731
- | 'HU'
2732
- | 'IS'
2733
- | 'IN'
2734
- | 'ID'
2735
- | 'IR'
2736
- | 'IQ'
2737
- | 'IE'
2738
- | 'IL'
2739
- | 'IT'
2740
- | 'JM'
2741
- | 'JP'
2742
- | 'JO'
2743
- | 'KZ'
2744
- | 'KE'
2745
- | 'KI'
2746
- | 'KP'
2747
- | 'KR'
2748
- | 'KW'
2749
- | 'KG'
2750
- | 'LA'
2751
- | 'LV'
2752
- | 'LB'
2753
- | 'LS'
2754
- | 'LR'
2755
- | 'LY'
2756
- | 'LI'
2757
- | 'LT'
2758
- | 'LU'
2759
- | 'MO'
2760
- | 'MG'
2761
- | 'MW'
2762
- | 'MY'
2763
- | 'MV'
2764
- | 'ML'
2765
- | 'MT'
2766
- | 'MH'
2767
- | 'MQ'
2768
- | 'MR'
2769
- | 'MU'
2770
- | 'YT'
2771
- | 'MX'
2772
- | 'FM'
2773
- | 'MD'
2774
- | 'MC'
2775
- | 'MN'
2776
- | 'MS'
2777
- | 'MA'
2778
- | 'MZ'
2779
- | 'MM'
2780
- | 'NA'
2781
- | 'NR'
2782
- | 'NP'
2783
- | 'NL'
2784
- | 'NC'
2785
- | 'NZ'
2786
- | 'NI'
2787
- | 'NE'
2788
- | 'NG'
2789
- | 'NU'
2790
- | 'NF'
2791
- | 'MP'
2792
- | 'MK'
2793
- | 'NO'
2794
- | 'OM'
2795
- | 'PK'
2796
- | 'PW'
2797
- | 'PS'
2798
- | 'PA'
2799
- | 'PG'
2800
- | 'PY'
2801
- | 'PE'
2802
- | 'PH'
2803
- | 'PN'
2804
- | 'PL'
2805
- | 'PT'
2806
- | 'PR'
2807
- | 'QA'
2808
- | 'RE'
2809
- | 'RO'
2810
- | 'RU'
2811
- | 'RW'
2812
- | 'SH'
2813
- | 'KN'
2814
- | 'LC'
2815
- | 'PM'
2816
- | 'VC'
2817
- | 'WS'
2818
- | 'SM'
2819
- | 'ST'
2820
- | 'SA'
2821
- | 'SN'
2822
- | 'SC'
2823
- | 'SL'
2824
- | 'SG'
2825
- | 'SK'
2826
- | 'SI'
2827
- | 'SB'
2828
- | 'SO'
2829
- | 'ZA'
2830
- | 'GS'
2831
- | 'ES'
2832
- | 'LK'
2833
- | 'SD'
2834
- | 'SR'
2835
- | 'SJ'
2836
- | 'SZ'
2837
- | 'SE'
2838
- | 'CH'
2839
- | 'SY'
2840
- | 'TW'
2841
- | 'TJ'
2842
- | 'TZ'
2843
- | 'TH'
2844
- | 'TL'
2845
- | 'TG'
2846
- | 'TK'
2847
- | 'TO'
2848
- | 'TT'
2849
- | 'TN'
2850
- | 'TR'
2851
- | 'TM'
2852
- | 'TC'
2853
- | 'TV'
2854
- | 'UG'
2855
- | 'UA'
2856
- | 'AE'
2857
- | 'GB'
2858
- | 'US'
2859
- | 'UM'
2860
- | 'UY'
2861
- | 'UZ'
2862
- | 'VU'
2863
- | 'VE'
2864
- | 'VN'
2865
- | 'VG'
2866
- | 'VI'
2867
- | 'WF'
2868
- | 'EH'
2869
- | 'YE'
2870
- | 'ZM'
2871
- | 'ZW'
2872
- | 'AX'
2873
- | 'BQ'
2874
- | 'CW'
2875
- | 'GG'
2876
- | 'IM'
2877
- | 'JE'
2878
- | 'ME'
2879
- | 'BL'
2880
- | 'MF'
2881
- | 'RS'
2882
- | 'SX'
2883
- | 'SS'
2884
- | 'XK';
1100
+ */
1101
+ customerId?: string;
2885
1102
 
2886
- line1: string;
1103
+ destination?: OrderRetrieveResponse.Destination;
2887
1104
 
2888
- zipCode: string;
1105
+ /**
1106
+ * @deprecated Currently only visible in the merchant dashboard. This id used to be
1107
+ * displayed to the user during the checkout.
1108
+ */
1109
+ displayId?: string;
2889
1110
 
2890
- firstName?: string;
1111
+ /**
1112
+ * @deprecated The list of line items for the order.
1113
+ */
1114
+ lineItems?: Array<OrderRetrieveResponse.LineItem>;
2891
1115
 
2892
- lastName?: string;
1116
+ mandate?: OrderRetrieveResponse.Mandate;
2893
1117
 
2894
- line2?: string;
1118
+ /**
1119
+ * @deprecated
1120
+ */
1121
+ merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
2895
1122
 
2896
- region?: string;
2897
- }
1123
+ /**
1124
+ * Any data which will be stored and returned for this checkout session and
1125
+ * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
1126
+ * more info.
1127
+ */
1128
+ metadata?: Record<string, unknown>;
2898
1129
 
2899
1130
  /**
2900
- * The selected shipping method by the user. Can either be selected during an
2901
- * express Checkout Session or passed during Checkout Session creation.
1131
+ * The source bank account where the money is send from.
2902
1132
  */
2903
- export interface ShippingMethod {
2904
- /**
2905
- * The customer-facing name of the shipping method.
2906
- */
2907
- name: string;
1133
+ payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
2908
1134
 
2909
- /**
2910
- * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
2911
- */
2912
- price: number;
1135
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1136
+
1137
+ /**
1138
+ * The payment mode of the order. Can be either 'settlement' or 'direct'.
1139
+ */
1140
+ paymentMode?: 'settlement' | 'direct';
1141
+
1142
+ /**
1143
+ * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
1144
+ * actions in your system.
1145
+ */
1146
+ paymentStatus?:
1147
+ | 'failed'
1148
+ | 'canceled'
1149
+ | 'processing'
1150
+ | 'requires_action'
1151
+ | 'succeeded'
1152
+ | 'in_refund'
1153
+ | 'refunded'
1154
+ | 'refund_failed'
1155
+ | 'partially_refunded'
1156
+ | 'not_settled'
1157
+ | 'disputed';
1158
+
1159
+ /**
1160
+ * The total amount in the currency of all successful refunds for this order
1161
+ */
1162
+ refundAmount?: number;
1163
+
1164
+ /**
1165
+ * The list of refunds connected to this order.
1166
+ */
1167
+ refunds?: Array<OrderRetrieveResponse.Refund>;
1168
+
1169
+ /**
1170
+ * The shopper object. Contains information collected from the user during the
1171
+ * Checkout.
1172
+ */
1173
+ shopper?: OrderRetrieveResponse.Shopper;
1174
+
1175
+ /**
1176
+ * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
1177
+ * collected in the Checkout.
1178
+ */
1179
+ shopperEmail?: string;
1180
+
1181
+ statusClassification?: OrderRetrieveResponse.StatusClassification;
1182
+
1183
+ /**
1184
+ * List of status history items for the order, used for logging every update on
1185
+ * status.
1186
+ */
1187
+ statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
1188
+
1189
+ /**
1190
+ * The subaccount id of the order.
1191
+ */
1192
+ subaccountId?: string;
1193
+
1194
+ /**
1195
+ * The legal name of the subaccount
1196
+ */
1197
+ subaccountLegalName?: string;
1198
+ }
1199
+
1200
+ export namespace OrderRetrieveResponse {
1201
+ /**
1202
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1203
+ * represents EUR 10.23. Any amount of decimal places can be provided on
1204
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
1205
+ * as this is the format accepted by most banks.
1206
+ */
1207
+ export interface Price {
1208
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
2913
1209
 
2914
1210
  /**
2915
- * The unique identifier of the shipping method within Ivy.
1211
+ * The total amount to be paid.
2916
1212
  */
2917
- id?: string;
1213
+ total: number;
1214
+
1215
+ shipping?: number;
1216
+
1217
+ subTotal?: number;
1218
+
1219
+ totalNet?: number;
1220
+
1221
+ vat?: number;
1222
+ }
1223
+
1224
+ /**
1225
+ * The billing address of the customer.
1226
+ */
1227
+ export interface BillingAddress {
1228
+ city: string;
2918
1229
 
2919
1230
  /**
2920
- * The list of countries where the shipping method is available.
1231
+ * The country code in
1232
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
2921
1233
  */
2922
- countries?: Array<
1234
+ country:
2923
1235
  | 'AF'
2924
1236
  | 'AL'
2925
1237
  | 'DZ'
@@ -3169,74 +1481,413 @@ export namespace OrderRetrieveResponse {
3169
1481
  | 'RS'
3170
1482
  | 'SX'
3171
1483
  | 'SS'
3172
- | 'XK'
3173
- >;
1484
+ | 'XK';
1485
+
1486
+ line1: string;
1487
+
1488
+ zipCode: string;
1489
+
1490
+ firstName?: string;
1491
+
1492
+ lastName?: string;
1493
+
1494
+ line2?: string;
1495
+
1496
+ region?: string;
1497
+ }
1498
+
1499
+ export interface Destination {
1500
+ /**
1501
+ * The validation logic is based on the "type" field. For example, if "type" is set
1502
+ * to "iban", the "iban" object must be filled out.
1503
+ */
1504
+ bankAccount: Destination.BankAccount;
1505
+
1506
+ /**
1507
+ * The bank statement reference of the payment for the order. This is the reference
1508
+ * that will be visible on the bank statement.
1509
+ */
1510
+ bankStatementReference: string;
1511
+ }
1512
+
1513
+ export namespace Destination {
1514
+ /**
1515
+ * The validation logic is based on the "type" field. For example, if "type" is set
1516
+ * to "iban", the "iban" object must be filled out.
1517
+ */
1518
+ export interface BankAccount {
1519
+ /**
1520
+ * The type of the financial address. The actual destination is determined by this
1521
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1522
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1523
+ * in the "iban" object.
1524
+ *
1525
+ * - iban: The IBAN of the account
1526
+ * - sort_code: The sort code of the account
1527
+ * - bank_code: The bank code of the account
1528
+ * - bban: The BBAN of the account
1529
+ */
1530
+ type: string;
1531
+
1532
+ bankCode?: BankAccount.BankCode;
1533
+
1534
+ bban?: BankAccount.Bban;
1535
+
1536
+ iban?: BankAccount.Iban;
1537
+
1538
+ sortCode?: BankAccount.SortCode;
1539
+ }
1540
+
1541
+ export namespace BankAccount {
1542
+ export interface BankCode {
1543
+ /**
1544
+ * The name of the account holder.
1545
+ */
1546
+ accountHolderName: string;
1547
+
1548
+ accountNumber: string;
1549
+
1550
+ code: string;
1551
+ }
1552
+
1553
+ export interface Bban {
1554
+ /**
1555
+ * The name of the account holder.
1556
+ */
1557
+ accountHolderName: string;
1558
+
1559
+ bban: string;
1560
+
1561
+ bic?: string;
1562
+ }
1563
+
1564
+ export interface Iban {
1565
+ /**
1566
+ * The name of the account holder.
1567
+ */
1568
+ accountHolderName: string;
1569
+
1570
+ iban: string;
1571
+
1572
+ bic?: string;
1573
+ }
1574
+
1575
+ export interface SortCode {
1576
+ /**
1577
+ * The name of the account holder.
1578
+ */
1579
+ accountHolderName: string;
1580
+
1581
+ accountNumber: string;
1582
+
1583
+ sortCode: string;
1584
+ }
1585
+ }
1586
+ }
1587
+
1588
+ export interface LineItem {
1589
+ /**
1590
+ * The total amount of all line items, i.e. single amount \* quantity. Given in
1591
+ * decimals, i.e. 10.23 represents EUR 10.23.
1592
+ */
1593
+ amount: number;
1594
+
1595
+ /**
1596
+ * The name of the line item.
1597
+ */
1598
+ name: string;
1599
+
1600
+ /**
1601
+ * The quantity of the line item.
1602
+ */
1603
+ quantity: number;
1604
+
1605
+ /**
1606
+ * The net amount of a single item.
1607
+ */
1608
+ singleNet: number;
1609
+
1610
+ /**
1611
+ * The VAT amount of a single item.
1612
+ */
1613
+ singleVat: number;
3174
1614
 
3175
1615
  /**
3176
- * The delivery estimate of the shipping method.
1616
+ * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
1617
+ * the line item.
1618
+ */
1619
+ category?: string;
1620
+
1621
+ /**
1622
+ * The
1623
+ * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
1624
+ * of the line item.
1625
+ */
1626
+ EAN?: string;
1627
+
1628
+ /**
1629
+ * The image of the line item as a URL.
1630
+ */
1631
+ image?: string;
1632
+
1633
+ /**
1634
+ * The internal unique identifier of the line item.
1635
+ */
1636
+ referenceId?: string;
1637
+ }
1638
+
1639
+ export interface Mandate {
1640
+ /**
1641
+ * The name of the account holder who signs the mandate.
1642
+ */
1643
+ accountHolderName?: string;
1644
+
1645
+ /**
1646
+ * Additional information to display to the user during the mandate setup. This
1647
+ * information is not used to setup any recurrence on the mandate. It is only
1648
+ * displayed to the user during checkout.
1649
+ */
1650
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1651
+
1652
+ /**
1653
+ * Mandate creditor data
3177
1654
  */
3178
- deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1655
+ creditor?: Mandate.Creditor;
3179
1656
 
3180
1657
  /**
3181
- * The unique identifier within your system of the shipping method.
1658
+ * The reference of the mandate going to be setup
3182
1659
  */
3183
1660
  reference?: string;
3184
1661
 
3185
1662
  /**
3186
- * @deprecated Deprecated in favor of deliveryEstimate
1663
+ * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
1664
+ * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
1665
+ * mandate setup request.
1666
+ */
1667
+ referenceId?: string;
1668
+
1669
+ /**
1670
+ * If true, a ready to use mandate will be set up after the payment flow.
1671
+ */
1672
+ setup?: boolean;
1673
+
1674
+ /**
1675
+ * The email of the user who signs the mandate.
1676
+ */
1677
+ userNotificationEmail?: string;
1678
+ }
1679
+
1680
+ export namespace Mandate {
1681
+ /**
1682
+ * Additional information to display to the user during the mandate setup. This
1683
+ * information is not used to setup any recurrence on the mandate. It is only
1684
+ * displayed to the user during checkout.
1685
+ */
1686
+ export interface AdditionalDisplayInformation {
1687
+ /**
1688
+ * The intended cadence of charges used for displaying purpose only. On demand
1689
+ * would be used for unscheduled charges.
1690
+ */
1691
+ cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1692
+
1693
+ price?: AdditionalDisplayInformation.Price;
1694
+ }
1695
+
1696
+ export namespace AdditionalDisplayInformation {
1697
+ export interface Price {
1698
+ /**
1699
+ * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
1700
+ * 10.23 EUR.
1701
+ */
1702
+ amount?: number;
1703
+
1704
+ currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1705
+ }
1706
+ }
1707
+
1708
+ /**
1709
+ * Mandate creditor data
3187
1710
  */
3188
- timeFrame?: string;
1711
+ export interface Creditor {
1712
+ id?: string;
1713
+
1714
+ name?: string;
1715
+ }
3189
1716
  }
3190
1717
 
3191
- export namespace ShippingMethod {
1718
+ /**
1719
+ * @deprecated
1720
+ */
1721
+ export interface MerchantFinancialAddress {
1722
+ bankCode?: MerchantFinancialAddress.BankCode;
1723
+
1724
+ bban?: MerchantFinancialAddress.Bban;
1725
+
1726
+ iban?: MerchantFinancialAddress.Iban;
1727
+
1728
+ /**
1729
+ * The payment reference for the order. This is the reference that will be visible
1730
+ * on the bank statement.
1731
+ */
1732
+ paymentReference?: string;
1733
+
1734
+ sortCode?: MerchantFinancialAddress.SortCode;
1735
+
3192
1736
  /**
3193
- * The delivery estimate of the shipping method.
1737
+ * The type of the financial address. The actual destination is determined by this
1738
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1739
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1740
+ * in the "iban" object.
1741
+ *
1742
+ * - iban: The IBAN of the account
1743
+ * - sort_code: The sort code of the account
1744
+ * - bank_code: The bank code of the account
1745
+ * - bban: The BBAN of the account
3194
1746
  */
3195
- export interface DeliveryEstimate {
1747
+ type?: string;
1748
+ }
1749
+
1750
+ export namespace MerchantFinancialAddress {
1751
+ export interface BankCode {
1752
+ /**
1753
+ * The name of the account holder.
1754
+ */
1755
+ accountHolderName: string;
1756
+
1757
+ accountNumber: string;
1758
+
1759
+ code: string;
1760
+ }
1761
+
1762
+ export interface Bban {
3196
1763
  /**
3197
- * The maximum delivery time.
1764
+ * The name of the account holder.
3198
1765
  */
3199
- maximum?: DeliveryEstimate.Maximum;
1766
+ accountHolderName: string;
1767
+
1768
+ bban: string;
1769
+
1770
+ bic?: string;
1771
+ }
3200
1772
 
1773
+ export interface Iban {
3201
1774
  /**
3202
- * The minimum delivery time.
1775
+ * The name of the account holder.
3203
1776
  */
3204
- minimum?: DeliveryEstimate.Minimum;
1777
+ accountHolderName: string;
1778
+
1779
+ iban: string;
1780
+
1781
+ bic?: string;
3205
1782
  }
3206
1783
 
3207
- export namespace DeliveryEstimate {
1784
+ export interface SortCode {
3208
1785
  /**
3209
- * The maximum delivery time.
1786
+ * The name of the account holder.
3210
1787
  */
3211
- export interface Maximum {
3212
- /**
3213
- * The unit of the time duration.
3214
- */
3215
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1788
+ accountHolderName: string;
3216
1789
 
3217
- /**
3218
- * The value of the time duration.
3219
- */
3220
- value: number;
3221
- }
1790
+ accountNumber: string;
1791
+
1792
+ sortCode: string;
1793
+ }
1794
+ }
1795
+
1796
+ /**
1797
+ * The source bank account where the money is send from.
1798
+ */
1799
+ export interface PayerFinancialAddress {
1800
+ /**
1801
+ * The type of the financial address. The actual destination is determined by this
1802
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1803
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1804
+ * in the "iban" object.
1805
+ *
1806
+ * - iban: The IBAN of the account
1807
+ * - sort_code: The sort code of the account
1808
+ * - bank_code: The bank code of the account
1809
+ * - bban: The BBAN of the account
1810
+ */
1811
+ type: string;
1812
+
1813
+ bankCode?: PayerFinancialAddress.BankCode;
1814
+
1815
+ bban?: PayerFinancialAddress.Bban;
1816
+
1817
+ iban?: PayerFinancialAddress.Iban;
1818
+
1819
+ sortCode?: PayerFinancialAddress.SortCode;
1820
+ }
1821
+
1822
+ export namespace PayerFinancialAddress {
1823
+ export interface BankCode {
1824
+ accountNumber: string;
1825
+
1826
+ code: string;
3222
1827
 
3223
1828
  /**
3224
- * The minimum delivery time.
1829
+ * The name of the account holder.
3225
1830
  */
3226
- export interface Minimum {
3227
- /**
3228
- * The unit of the time duration.
3229
- */
3230
- unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1831
+ accountHolderName?: string;
1832
+ }
3231
1833
 
3232
- /**
3233
- * The value of the time duration.
3234
- */
3235
- value: number;
3236
- }
1834
+ export interface Bban {
1835
+ bban: string;
1836
+
1837
+ /**
1838
+ * The name of the account holder.
1839
+ */
1840
+ accountHolderName?: string;
1841
+
1842
+ bic?: string;
1843
+ }
1844
+
1845
+ export interface Iban {
1846
+ iban: string;
1847
+
1848
+ /**
1849
+ * The name of the account holder.
1850
+ */
1851
+ accountHolderName?: string;
1852
+
1853
+ bic?: string;
1854
+ }
1855
+
1856
+ export interface SortCode {
1857
+ accountNumber: string;
1858
+
1859
+ sortCode: string;
1860
+
1861
+ /**
1862
+ * The name of the account holder.
1863
+ */
1864
+ accountHolderName?: string;
3237
1865
  }
3238
1866
  }
3239
1867
 
1868
+ /**
1869
+ * A Refund object. This corresponds to one Refund request.
1870
+ */
1871
+ export interface Refund {
1872
+ id: string;
1873
+
1874
+ amount: number;
1875
+
1876
+ createdAt: string;
1877
+
1878
+ referenceId: string;
1879
+
1880
+ /**
1881
+ * The status of the refund. Always use the status of the order as your source of
1882
+ * truth to trigger actions in your dashboard.
1883
+ */
1884
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1885
+
1886
+ updatedAt: string;
1887
+
1888
+ description?: string;
1889
+ }
1890
+
3240
1891
  /**
3241
1892
  * The shopper object. Contains information collected from the user during the
3242
1893
  * Checkout.
@@ -3252,13 +1903,30 @@ export namespace OrderRetrieveResponse {
3252
1903
  * Populated with the primary payment initiation failure classsification if
3253
1904
  * available.
3254
1905
  */
3255
- primary?: string;
1906
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
3256
1907
 
3257
1908
  /**
3258
1909
  * Populated with the secondary payment initiation failure classsification if
3259
1910
  * available.
3260
1911
  */
3261
- secondary?: string;
1912
+ secondary?:
1913
+ | 'timeout'
1914
+ | 'wrong_credentials'
1915
+ | 'incorrect_2fa_response'
1916
+ | 'payment_rejected'
1917
+ | 'insufficient_funds'
1918
+ | 'cancelled'
1919
+ | 'connection_to_bank_failed'
1920
+ | 'international_transfer_blocked'
1921
+ | 'international_transfer_limit_exceeded'
1922
+ | 'user_blocked'
1923
+ | 'bank_error'
1924
+ | 'instant_transfers_not_enabled'
1925
+ | 'no_active_tan_methods_available'
1926
+ | 'account_limit_exceeded'
1927
+ | 'bank_under_maintenance'
1928
+ | 'pin_blocked'
1929
+ | 'payment_not_settled';
3262
1930
  }
3263
1931
 
3264
1932
  export interface StatusHistoryList {