@getivy/node-sdk 1.7.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (639) hide show
  1. package/CHANGELOG.md +149 -571
  2. package/README.md +112 -42
  3. package/api-promise.d.mts +2 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +2 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +6 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +2 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/bin/cli +53 -0
  12. package/bin/migration-config.json +6 -0
  13. package/client.d.mts +243 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +243 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +524 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +520 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +46 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +46 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +113 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +97 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/resource.d.mts +6 -0
  38. package/core/resource.d.mts.map +1 -0
  39. package/core/resource.d.ts +6 -0
  40. package/core/resource.d.ts.map +1 -0
  41. package/core/resource.js +11 -0
  42. package/core/resource.js.map +1 -0
  43. package/core/resource.mjs +7 -0
  44. package/core/resource.mjs.map +1 -0
  45. package/core/uploads.d.mts +3 -0
  46. package/core/uploads.d.mts.map +1 -0
  47. package/core/uploads.d.ts +3 -0
  48. package/core/uploads.d.ts.map +1 -0
  49. package/core/uploads.js +6 -0
  50. package/core/uploads.js.map +1 -0
  51. package/core/uploads.mjs +2 -0
  52. package/core/uploads.mjs.map +1 -0
  53. package/error.d.mts +2 -0
  54. package/error.d.mts.map +1 -0
  55. package/error.d.ts +1 -46
  56. package/error.d.ts.map +1 -1
  57. package/error.js +3 -110
  58. package/error.js.map +1 -1
  59. package/error.mjs +1 -96
  60. package/error.mjs.map +1 -1
  61. package/index.d.mts +6 -175
  62. package/index.d.mts.map +1 -0
  63. package/index.d.ts +5 -174
  64. package/index.d.ts.map +1 -1
  65. package/index.js +12 -166
  66. package/index.js.map +1 -1
  67. package/index.mjs +5 -139
  68. package/index.mjs.map +1 -1
  69. package/internal/builtin-types.d.mts +73 -0
  70. package/internal/builtin-types.d.mts.map +1 -0
  71. package/internal/builtin-types.d.ts +73 -0
  72. package/internal/builtin-types.d.ts.map +1 -0
  73. package/internal/builtin-types.js +4 -0
  74. package/internal/builtin-types.js.map +1 -0
  75. package/internal/builtin-types.mjs +3 -0
  76. package/internal/builtin-types.mjs.map +1 -0
  77. package/internal/detect-platform.d.mts +15 -0
  78. package/internal/detect-platform.d.mts.map +1 -0
  79. package/internal/detect-platform.d.ts +15 -0
  80. package/internal/detect-platform.d.ts.map +1 -0
  81. package/internal/detect-platform.js +162 -0
  82. package/internal/detect-platform.js.map +1 -0
  83. package/internal/detect-platform.mjs +157 -0
  84. package/internal/detect-platform.mjs.map +1 -0
  85. package/internal/errors.d.mts +3 -0
  86. package/internal/errors.d.mts.map +1 -0
  87. package/internal/errors.d.ts +3 -0
  88. package/internal/errors.d.ts.map +1 -0
  89. package/internal/errors.js +41 -0
  90. package/internal/errors.js.map +1 -0
  91. package/internal/errors.mjs +36 -0
  92. package/internal/errors.mjs.map +1 -0
  93. package/internal/headers.d.mts +20 -0
  94. package/internal/headers.d.mts.map +1 -0
  95. package/internal/headers.d.ts +20 -0
  96. package/internal/headers.d.ts.map +1 -0
  97. package/internal/headers.js +79 -0
  98. package/internal/headers.js.map +1 -0
  99. package/internal/headers.mjs +74 -0
  100. package/internal/headers.mjs.map +1 -0
  101. package/internal/parse.d.mts +12 -0
  102. package/internal/parse.d.mts.map +1 -0
  103. package/internal/parse.d.ts +12 -0
  104. package/internal/parse.d.ts.map +1 -0
  105. package/internal/parse.js +40 -0
  106. package/internal/parse.js.map +1 -0
  107. package/internal/parse.mjs +37 -0
  108. package/internal/parse.mjs.map +1 -0
  109. package/internal/request-options.d.mts +75 -0
  110. package/internal/request-options.d.mts.map +1 -0
  111. package/internal/request-options.d.ts +75 -0
  112. package/internal/request-options.d.ts.map +1 -0
  113. package/internal/request-options.js +14 -0
  114. package/internal/request-options.js.map +1 -0
  115. package/internal/request-options.mjs +10 -0
  116. package/internal/request-options.mjs.map +1 -0
  117. package/internal/shim-types.d.mts +17 -0
  118. package/internal/shim-types.d.mts.map +1 -0
  119. package/internal/shim-types.d.ts +17 -0
  120. package/internal/shim-types.d.ts.map +1 -0
  121. package/internal/shim-types.js +4 -0
  122. package/internal/shim-types.js.map +1 -0
  123. package/internal/shim-types.mjs +3 -0
  124. package/internal/shim-types.mjs.map +1 -0
  125. package/internal/shims.d.mts +20 -0
  126. package/internal/shims.d.mts.map +1 -0
  127. package/internal/shims.d.ts +20 -0
  128. package/internal/shims.d.ts.map +1 -0
  129. package/internal/shims.js +92 -0
  130. package/internal/shims.js.map +1 -0
  131. package/internal/shims.mjs +85 -0
  132. package/internal/shims.mjs.map +1 -0
  133. package/internal/to-file.d.mts +45 -0
  134. package/internal/to-file.d.mts.map +1 -0
  135. package/internal/to-file.d.ts +45 -0
  136. package/internal/to-file.d.ts.map +1 -0
  137. package/internal/to-file.js +91 -0
  138. package/internal/to-file.js.map +1 -0
  139. package/internal/to-file.mjs +88 -0
  140. package/internal/to-file.mjs.map +1 -0
  141. package/internal/tslib.js +81 -0
  142. package/internal/tslib.mjs +17 -0
  143. package/internal/types.d.mts +69 -0
  144. package/internal/types.d.mts.map +1 -0
  145. package/internal/types.d.ts +69 -0
  146. package/internal/types.d.ts.map +1 -0
  147. package/internal/types.js +4 -0
  148. package/internal/types.js.map +1 -0
  149. package/internal/types.mjs +3 -0
  150. package/internal/types.mjs.map +1 -0
  151. package/internal/uploads.d.mts +42 -0
  152. package/internal/uploads.d.mts.map +1 -0
  153. package/internal/uploads.d.ts +42 -0
  154. package/internal/uploads.d.ts.map +1 -0
  155. package/internal/uploads.js +141 -0
  156. package/internal/uploads.js.map +1 -0
  157. package/internal/uploads.mjs +131 -0
  158. package/internal/uploads.mjs.map +1 -0
  159. package/internal/utils/base64.d.mts +3 -0
  160. package/internal/utils/base64.d.mts.map +1 -0
  161. package/internal/utils/base64.d.ts +3 -0
  162. package/internal/utils/base64.d.ts.map +1 -0
  163. package/internal/utils/base64.js +38 -0
  164. package/internal/utils/base64.js.map +1 -0
  165. package/internal/utils/base64.mjs +33 -0
  166. package/internal/utils/base64.mjs.map +1 -0
  167. package/internal/utils/bytes.d.mts +4 -0
  168. package/internal/utils/bytes.d.mts.map +1 -0
  169. package/internal/utils/bytes.d.ts +4 -0
  170. package/internal/utils/bytes.d.ts.map +1 -0
  171. package/internal/utils/bytes.js +31 -0
  172. package/internal/utils/bytes.js.map +1 -0
  173. package/internal/utils/bytes.mjs +26 -0
  174. package/internal/utils/bytes.mjs.map +1 -0
  175. package/internal/utils/env.d.mts +9 -0
  176. package/internal/utils/env.d.mts.map +1 -0
  177. package/internal/utils/env.d.ts +9 -0
  178. package/internal/utils/env.d.ts.map +1 -0
  179. package/internal/utils/env.js +22 -0
  180. package/internal/utils/env.js.map +1 -0
  181. package/internal/utils/env.mjs +18 -0
  182. package/internal/utils/env.mjs.map +1 -0
  183. package/internal/utils/log.d.mts +37 -0
  184. package/internal/utils/log.d.mts.map +1 -0
  185. package/internal/utils/log.d.ts +37 -0
  186. package/internal/utils/log.d.ts.map +1 -0
  187. package/internal/utils/log.js +86 -0
  188. package/internal/utils/log.js.map +1 -0
  189. package/internal/utils/log.mjs +80 -0
  190. package/internal/utils/log.mjs.map +1 -0
  191. package/internal/utils/path.d.mts +15 -0
  192. package/internal/utils/path.d.mts.map +1 -0
  193. package/internal/utils/path.d.ts +15 -0
  194. package/internal/utils/path.d.ts.map +1 -0
  195. package/internal/utils/path.js +79 -0
  196. package/internal/utils/path.js.map +1 -0
  197. package/internal/utils/path.mjs +74 -0
  198. package/internal/utils/path.mjs.map +1 -0
  199. package/internal/utils/query.d.mts +5 -0
  200. package/internal/utils/query.d.mts.map +1 -0
  201. package/internal/utils/query.js +2 -3
  202. package/internal/utils/query.js.map +1 -1
  203. package/internal/utils/query.mjs +1 -1
  204. package/internal/utils/query.mjs.map +1 -1
  205. package/internal/utils/sleep.d.mts +2 -0
  206. package/internal/utils/sleep.d.mts.map +1 -0
  207. package/internal/utils/sleep.d.ts +2 -0
  208. package/internal/utils/sleep.d.ts.map +1 -0
  209. package/internal/utils/sleep.js +7 -0
  210. package/internal/utils/sleep.js.map +1 -0
  211. package/internal/utils/sleep.mjs +3 -0
  212. package/internal/utils/sleep.mjs.map +1 -0
  213. package/internal/utils/uuid.d.mts +5 -0
  214. package/internal/utils/uuid.d.mts.map +1 -0
  215. package/internal/utils/uuid.d.ts +5 -0
  216. package/internal/utils/uuid.d.ts.map +1 -0
  217. package/internal/utils/uuid.js +19 -0
  218. package/internal/utils/uuid.js.map +1 -0
  219. package/internal/utils/uuid.mjs +15 -0
  220. package/internal/utils/uuid.mjs.map +1 -0
  221. package/internal/utils/values.d.mts +18 -0
  222. package/internal/utils/values.d.mts.map +1 -0
  223. package/internal/utils/values.d.ts +18 -0
  224. package/internal/utils/values.d.ts.map +1 -0
  225. package/internal/utils/values.js +112 -0
  226. package/internal/utils/values.js.map +1 -0
  227. package/internal/utils/values.mjs +94 -0
  228. package/internal/utils/values.mjs.map +1 -0
  229. package/internal/utils.d.mts +8 -0
  230. package/internal/utils.d.mts.map +1 -0
  231. package/internal/utils.d.ts +8 -0
  232. package/internal/utils.d.ts.map +1 -0
  233. package/internal/utils.js +12 -0
  234. package/internal/utils.js.map +1 -0
  235. package/internal/utils.mjs +9 -0
  236. package/internal/utils.mjs.map +1 -0
  237. package/package.json +114 -64
  238. package/resource.d.mts +2 -0
  239. package/resource.d.mts.map +1 -0
  240. package/resource.d.ts +1 -5
  241. package/resource.d.ts.map +1 -1
  242. package/resource.js +3 -8
  243. package/resource.js.map +1 -1
  244. package/resource.mjs +1 -6
  245. package/resource.mjs.map +1 -1
  246. package/resources/balance.d.mts +44 -0
  247. package/resources/balance.d.mts.map +1 -0
  248. package/resources/balance.d.ts +4 -3
  249. package/resources/balance.d.ts.map +1 -1
  250. package/resources/balance.js +1 -1
  251. package/resources/balance.js.map +1 -1
  252. package/resources/balance.mjs +1 -1
  253. package/resources/balance.mjs.map +1 -1
  254. package/resources/banks.d.mts +251 -0
  255. package/resources/banks.d.mts.map +1 -0
  256. package/resources/banks.d.ts +6 -5
  257. package/resources/banks.d.ts.map +1 -1
  258. package/resources/banks.js +1 -1
  259. package/resources/banks.js.map +1 -1
  260. package/resources/banks.mjs +1 -1
  261. package/resources/banks.mjs.map +1 -1
  262. package/resources/beneficiary-payouts.d.mts +64 -0
  263. package/resources/beneficiary-payouts.d.mts.map +1 -0
  264. package/resources/beneficiary-payouts.d.ts +4 -3
  265. package/resources/beneficiary-payouts.d.ts.map +1 -1
  266. package/resources/beneficiary-payouts.js +1 -1
  267. package/resources/beneficiary-payouts.js.map +1 -1
  268. package/resources/beneficiary-payouts.mjs +1 -1
  269. package/resources/beneficiary-payouts.mjs.map +1 -1
  270. package/resources/capabilities.d.mts +20 -0
  271. package/resources/capabilities.d.mts.map +1 -0
  272. package/resources/capabilities.d.ts +4 -3
  273. package/resources/capabilities.d.ts.map +1 -1
  274. package/resources/capabilities.js +1 -1
  275. package/resources/capabilities.js.map +1 -1
  276. package/resources/capabilities.mjs +1 -1
  277. package/resources/capabilities.mjs.map +1 -1
  278. package/resources/checkoutsession.d.mts +659 -0
  279. package/resources/checkoutsession.d.mts.map +1 -0
  280. package/resources/checkoutsession.d.ts +6 -5
  281. package/resources/checkoutsession.d.ts.map +1 -1
  282. package/resources/checkoutsession.js +1 -1
  283. package/resources/checkoutsession.js.map +1 -1
  284. package/resources/checkoutsession.mjs +1 -1
  285. package/resources/checkoutsession.mjs.map +1 -1
  286. package/resources/customers.d.mts +668 -0
  287. package/resources/customers.d.mts.map +1 -0
  288. package/resources/customers.d.ts +8 -7
  289. package/resources/customers.d.ts.map +1 -1
  290. package/resources/customers.js +1 -1
  291. package/resources/customers.js.map +1 -1
  292. package/resources/customers.mjs +1 -1
  293. package/resources/customers.mjs.map +1 -1
  294. package/resources/data/accounts.d.mts +95 -0
  295. package/resources/data/accounts.d.mts.map +1 -0
  296. package/resources/data/accounts.d.ts +4 -3
  297. package/resources/data/accounts.d.ts.map +1 -1
  298. package/resources/data/accounts.js +1 -1
  299. package/resources/data/accounts.js.map +1 -1
  300. package/resources/data/accounts.mjs +1 -1
  301. package/resources/data/accounts.mjs.map +1 -1
  302. package/resources/data/balances.d.mts +49 -0
  303. package/resources/data/balances.d.mts.map +1 -0
  304. package/resources/data/balances.d.ts +4 -3
  305. package/resources/data/balances.d.ts.map +1 -1
  306. package/resources/data/balances.js +1 -1
  307. package/resources/data/balances.js.map +1 -1
  308. package/resources/data/balances.mjs +1 -1
  309. package/resources/data/balances.mjs.map +1 -1
  310. package/resources/data/consent.d.mts +81 -0
  311. package/resources/data/consent.d.mts.map +1 -0
  312. package/resources/data/consent.d.ts +5 -4
  313. package/resources/data/consent.d.ts.map +1 -1
  314. package/resources/data/consent.js +1 -1
  315. package/resources/data/consent.js.map +1 -1
  316. package/resources/data/consent.mjs +1 -1
  317. package/resources/data/consent.mjs.map +1 -1
  318. package/resources/data/data.d.mts +26 -0
  319. package/resources/data/data.d.mts.map +1 -0
  320. package/resources/data/data.d.ts +1 -1
  321. package/resources/data/data.d.ts.map +1 -1
  322. package/resources/data/data.js +7 -29
  323. package/resources/data/data.js.map +1 -1
  324. package/resources/data/data.mjs +1 -1
  325. package/resources/data/index.d.mts +7 -0
  326. package/resources/data/index.d.mts.map +1 -0
  327. package/resources/data/index.d.ts.map +1 -1
  328. package/resources/data/session.d.mts +259 -0
  329. package/resources/data/session.d.mts.map +1 -0
  330. package/resources/data/session.d.ts +5 -4
  331. package/resources/data/session.d.ts.map +1 -1
  332. package/resources/data/session.js +1 -1
  333. package/resources/data/session.js.map +1 -1
  334. package/resources/data/session.mjs +1 -1
  335. package/resources/data/session.mjs.map +1 -1
  336. package/resources/data/transactions.d.mts +62 -0
  337. package/resources/data/transactions.d.mts.map +1 -0
  338. package/resources/data/transactions.d.ts +4 -3
  339. package/resources/data/transactions.d.ts.map +1 -1
  340. package/resources/data/transactions.js +1 -1
  341. package/resources/data/transactions.js.map +1 -1
  342. package/resources/data/transactions.mjs +1 -1
  343. package/resources/data/transactions.mjs.map +1 -1
  344. package/resources/data.d.mts +2 -0
  345. package/resources/data.d.mts.map +1 -0
  346. package/resources/data.d.ts.map +1 -1
  347. package/resources/data.js +2 -15
  348. package/resources/data.js.map +1 -1
  349. package/resources/deposits.d.mts +192 -0
  350. package/resources/deposits.d.mts.map +1 -0
  351. package/resources/deposits.d.ts +4 -3
  352. package/resources/deposits.d.ts.map +1 -1
  353. package/resources/deposits.js +1 -1
  354. package/resources/deposits.js.map +1 -1
  355. package/resources/deposits.mjs +1 -1
  356. package/resources/deposits.mjs.map +1 -1
  357. package/resources/fx.d.mts +155 -0
  358. package/resources/fx.d.mts.map +1 -0
  359. package/resources/fx.d.ts +6 -5
  360. package/resources/fx.d.ts.map +1 -1
  361. package/resources/fx.js +1 -1
  362. package/resources/fx.js.map +1 -1
  363. package/resources/fx.mjs +1 -1
  364. package/resources/fx.mjs.map +1 -1
  365. package/resources/index.d.mts +18 -0
  366. package/resources/index.d.mts.map +1 -0
  367. package/resources/index.d.ts.map +1 -1
  368. package/resources/orders.d.mts +1251 -0
  369. package/resources/orders.d.mts.map +1 -0
  370. package/resources/orders.d.ts +6 -5
  371. package/resources/orders.d.ts.map +1 -1
  372. package/resources/orders.js +1 -1
  373. package/resources/orders.js.map +1 -1
  374. package/resources/orders.mjs +1 -1
  375. package/resources/orders.mjs.map +1 -1
  376. package/resources/payee.d.mts +51 -0
  377. package/resources/payee.d.mts.map +1 -0
  378. package/resources/payee.d.ts +4 -3
  379. package/resources/payee.d.ts.map +1 -1
  380. package/resources/payee.js +1 -1
  381. package/resources/payee.js.map +1 -1
  382. package/resources/payee.mjs +1 -1
  383. package/resources/payee.mjs.map +1 -1
  384. package/resources/payouts.d.mts +459 -0
  385. package/resources/payouts.d.mts.map +1 -0
  386. package/resources/payouts.d.ts +6 -5
  387. package/resources/payouts.d.ts.map +1 -1
  388. package/resources/payouts.js +1 -1
  389. package/resources/payouts.js.map +1 -1
  390. package/resources/payouts.mjs +1 -1
  391. package/resources/payouts.mjs.map +1 -1
  392. package/resources/refunds.d.mts +97 -0
  393. package/resources/refunds.d.mts.map +1 -0
  394. package/resources/refunds.d.ts +5 -4
  395. package/resources/refunds.d.ts.map +1 -1
  396. package/resources/refunds.js +1 -1
  397. package/resources/refunds.js.map +1 -1
  398. package/resources/refunds.mjs +1 -1
  399. package/resources/refunds.mjs.map +1 -1
  400. package/resources/returns.d.mts +105 -0
  401. package/resources/returns.d.mts.map +1 -0
  402. package/resources/returns.d.ts +5 -4
  403. package/resources/returns.d.ts.map +1 -1
  404. package/resources/returns.js +1 -1
  405. package/resources/returns.js.map +1 -1
  406. package/resources/returns.mjs +1 -1
  407. package/resources/returns.mjs.map +1 -1
  408. package/resources/subaccounts.d.mts +60 -0
  409. package/resources/subaccounts.d.mts.map +1 -0
  410. package/resources/subaccounts.d.ts +5 -4
  411. package/resources/subaccounts.d.ts.map +1 -1
  412. package/resources/subaccounts.js +1 -1
  413. package/resources/subaccounts.js.map +1 -1
  414. package/resources/subaccounts.mjs +1 -1
  415. package/resources/subaccounts.mjs.map +1 -1
  416. package/resources/transactions.d.mts +198 -0
  417. package/resources/transactions.d.mts.map +1 -0
  418. package/resources/transactions.d.ts +4 -3
  419. package/resources/transactions.d.ts.map +1 -1
  420. package/resources/transactions.js +1 -1
  421. package/resources/transactions.js.map +1 -1
  422. package/resources/transactions.mjs +1 -1
  423. package/resources/transactions.mjs.map +1 -1
  424. package/resources/webhook/index.d.mts +3 -0
  425. package/resources/webhook/index.d.mts.map +1 -0
  426. package/resources/webhook/index.d.ts.map +1 -1
  427. package/resources/webhook/subscription.d.mts +153 -0
  428. package/resources/webhook/subscription.d.mts.map +1 -0
  429. package/resources/webhook/subscription.d.ts +8 -7
  430. package/resources/webhook/subscription.d.ts.map +1 -1
  431. package/resources/webhook/subscription.js +1 -1
  432. package/resources/webhook/subscription.js.map +1 -1
  433. package/resources/webhook/subscription.mjs +1 -1
  434. package/resources/webhook/subscription.mjs.map +1 -1
  435. package/resources/webhook/webhook.d.mts +29 -0
  436. package/resources/webhook/webhook.d.mts.map +1 -0
  437. package/resources/webhook/webhook.d.ts +4 -3
  438. package/resources/webhook/webhook.d.ts.map +1 -1
  439. package/resources/webhook/webhook.js +3 -25
  440. package/resources/webhook/webhook.js.map +1 -1
  441. package/resources/webhook/webhook.mjs +1 -1
  442. package/resources/webhook/webhook.mjs.map +1 -1
  443. package/resources/webhook.d.mts +2 -0
  444. package/resources/webhook.d.mts.map +1 -0
  445. package/resources/webhook.d.ts.map +1 -1
  446. package/resources/webhook.js +2 -15
  447. package/resources/webhook.js.map +1 -1
  448. package/resources.d.mts +2 -0
  449. package/resources.d.mts.map +1 -0
  450. package/resources.d.ts.map +1 -1
  451. package/resources.js +2 -15
  452. package/resources.js.map +1 -1
  453. package/src/api-promise.ts +2 -0
  454. package/src/client.ts +1002 -0
  455. package/src/core/README.md +3 -0
  456. package/src/core/api-promise.ts +89 -0
  457. package/src/core/error.ts +130 -0
  458. package/src/core/resource.ts +11 -0
  459. package/src/core/uploads.ts +2 -0
  460. package/src/error.ts +2 -130
  461. package/src/index.ts +5 -450
  462. package/src/internal/README.md +3 -0
  463. package/src/internal/builtin-types.ts +93 -0
  464. package/src/internal/detect-platform.ts +196 -0
  465. package/src/internal/errors.ts +33 -0
  466. package/src/internal/headers.ts +97 -0
  467. package/src/internal/parse.ts +56 -0
  468. package/src/internal/request-options.ts +91 -0
  469. package/src/internal/shim-types.ts +26 -0
  470. package/src/internal/shims.ts +107 -0
  471. package/src/internal/to-file.ts +154 -0
  472. package/src/internal/types.ts +95 -0
  473. package/src/internal/uploads.ts +187 -0
  474. package/src/internal/utils/base64.ts +40 -0
  475. package/src/internal/utils/bytes.ts +32 -0
  476. package/src/internal/utils/env.ts +18 -0
  477. package/src/internal/utils/log.ts +127 -0
  478. package/src/internal/utils/path.ts +88 -0
  479. package/src/internal/utils/query.ts +1 -1
  480. package/src/internal/utils/sleep.ts +3 -0
  481. package/src/internal/utils/uuid.ts +17 -0
  482. package/src/internal/utils/values.ts +105 -0
  483. package/src/internal/utils.ts +9 -0
  484. package/src/resource.ts +2 -11
  485. package/src/resources/balance.ts +4 -6
  486. package/src/resources/banks.ts +6 -5
  487. package/src/resources/beneficiary-payouts.ts +4 -3
  488. package/src/resources/capabilities.ts +4 -6
  489. package/src/resources/checkoutsession.ts +9 -8
  490. package/src/resources/customers.ts +8 -10
  491. package/src/resources/data/accounts.ts +4 -3
  492. package/src/resources/data/balances.ts +4 -3
  493. package/src/resources/data/consent.ts +5 -7
  494. package/src/resources/data/data.ts +1 -1
  495. package/src/resources/data/session.ts +5 -7
  496. package/src/resources/data/transactions.ts +4 -3
  497. package/src/resources/deposits.ts +4 -6
  498. package/src/resources/fx.ts +6 -8
  499. package/src/resources/orders.ts +6 -5
  500. package/src/resources/payee.ts +4 -3
  501. package/src/resources/payouts.ts +6 -8
  502. package/src/resources/refunds.ts +5 -4
  503. package/src/resources/returns.ts +5 -7
  504. package/src/resources/subaccounts.ts +5 -7
  505. package/src/resources/transactions.ts +4 -3
  506. package/src/resources/webhook/subscription.ts +8 -22
  507. package/src/resources/webhook/webhook.ts +4 -6
  508. package/src/tsconfig.json +2 -2
  509. package/src/uploads.ts +2 -255
  510. package/src/version.ts +1 -1
  511. package/uploads.d.mts +2 -0
  512. package/uploads.d.mts.map +1 -0
  513. package/uploads.d.ts +1 -74
  514. package/uploads.d.ts.map +1 -1
  515. package/uploads.js +3 -168
  516. package/uploads.js.map +1 -1
  517. package/uploads.mjs +1 -157
  518. package/uploads.mjs.map +1 -1
  519. package/version.d.mts +2 -0
  520. package/version.d.mts.map +1 -0
  521. package/version.d.ts +1 -1
  522. package/version.js +1 -1
  523. package/version.mjs +1 -1
  524. package/_shims/MultipartBody.d.ts +0 -9
  525. package/_shims/MultipartBody.d.ts.map +0 -1
  526. package/_shims/MultipartBody.js +0 -16
  527. package/_shims/MultipartBody.js.map +0 -1
  528. package/_shims/MultipartBody.mjs +0 -12
  529. package/_shims/MultipartBody.mjs.map +0 -1
  530. package/_shims/README.md +0 -46
  531. package/_shims/auto/runtime-bun.d.ts +0 -5
  532. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  533. package/_shims/auto/runtime-bun.js +0 -21
  534. package/_shims/auto/runtime-bun.js.map +0 -1
  535. package/_shims/auto/runtime-bun.mjs +0 -2
  536. package/_shims/auto/runtime-bun.mjs.map +0 -1
  537. package/_shims/auto/runtime-node.d.ts +0 -5
  538. package/_shims/auto/runtime-node.d.ts.map +0 -1
  539. package/_shims/auto/runtime-node.js +0 -21
  540. package/_shims/auto/runtime-node.js.map +0 -1
  541. package/_shims/auto/runtime-node.mjs +0 -2
  542. package/_shims/auto/runtime-node.mjs.map +0 -1
  543. package/_shims/auto/runtime.d.ts +0 -5
  544. package/_shims/auto/runtime.d.ts.map +0 -1
  545. package/_shims/auto/runtime.js +0 -21
  546. package/_shims/auto/runtime.js.map +0 -1
  547. package/_shims/auto/runtime.mjs +0 -2
  548. package/_shims/auto/runtime.mjs.map +0 -1
  549. package/_shims/auto/types-node.d.ts +0 -5
  550. package/_shims/auto/types-node.d.ts.map +0 -1
  551. package/_shims/auto/types-node.js +0 -21
  552. package/_shims/auto/types-node.js.map +0 -1
  553. package/_shims/auto/types-node.mjs +0 -2
  554. package/_shims/auto/types-node.mjs.map +0 -1
  555. package/_shims/auto/types.d.ts +0 -101
  556. package/_shims/auto/types.js +0 -3
  557. package/_shims/auto/types.mjs +0 -3
  558. package/_shims/bun-runtime.d.ts +0 -6
  559. package/_shims/bun-runtime.d.ts.map +0 -1
  560. package/_shims/bun-runtime.js +0 -14
  561. package/_shims/bun-runtime.js.map +0 -1
  562. package/_shims/bun-runtime.mjs +0 -10
  563. package/_shims/bun-runtime.mjs.map +0 -1
  564. package/_shims/index.d.ts +0 -83
  565. package/_shims/index.js +0 -17
  566. package/_shims/index.mjs +0 -11
  567. package/_shims/manual-types.d.ts +0 -12
  568. package/_shims/manual-types.js +0 -3
  569. package/_shims/manual-types.mjs +0 -3
  570. package/_shims/node-runtime.d.ts +0 -3
  571. package/_shims/node-runtime.d.ts.map +0 -1
  572. package/_shims/node-runtime.js +0 -89
  573. package/_shims/node-runtime.js.map +0 -1
  574. package/_shims/node-runtime.mjs +0 -56
  575. package/_shims/node-runtime.mjs.map +0 -1
  576. package/_shims/node-types.d.ts +0 -42
  577. package/_shims/node-types.js +0 -3
  578. package/_shims/node-types.mjs +0 -3
  579. package/_shims/registry.d.ts +0 -37
  580. package/_shims/registry.d.ts.map +0 -1
  581. package/_shims/registry.js +0 -41
  582. package/_shims/registry.js.map +0 -1
  583. package/_shims/registry.mjs +0 -37
  584. package/_shims/registry.mjs.map +0 -1
  585. package/_shims/web-runtime.d.ts +0 -5
  586. package/_shims/web-runtime.d.ts.map +0 -1
  587. package/_shims/web-runtime.js +0 -78
  588. package/_shims/web-runtime.js.map +0 -1
  589. package/_shims/web-runtime.mjs +0 -71
  590. package/_shims/web-runtime.mjs.map +0 -1
  591. package/_shims/web-types.d.ts +0 -83
  592. package/_shims/web-types.js +0 -3
  593. package/_shims/web-types.mjs +0 -3
  594. package/core.d.ts +0 -255
  595. package/core.d.ts.map +0 -1
  596. package/core.js +0 -920
  597. package/core.js.map +0 -1
  598. package/core.mjs +0 -888
  599. package/core.mjs.map +0 -1
  600. package/shims/node.d.ts +0 -30
  601. package/shims/node.d.ts.map +0 -1
  602. package/shims/node.js +0 -31
  603. package/shims/node.js.map +0 -1
  604. package/shims/node.mjs +0 -5
  605. package/shims/node.mjs.map +0 -1
  606. package/shims/web.d.ts +0 -26
  607. package/shims/web.d.ts.map +0 -1
  608. package/shims/web.js +0 -31
  609. package/shims/web.js.map +0 -1
  610. package/shims/web.mjs +0 -5
  611. package/shims/web.mjs.map +0 -1
  612. package/src/_shims/MultipartBody.ts +0 -9
  613. package/src/_shims/README.md +0 -46
  614. package/src/_shims/auto/runtime-bun.ts +0 -4
  615. package/src/_shims/auto/runtime-node.ts +0 -4
  616. package/src/_shims/auto/runtime.ts +0 -4
  617. package/src/_shims/auto/types-node.ts +0 -4
  618. package/src/_shims/auto/types.d.ts +0 -101
  619. package/src/_shims/auto/types.js +0 -3
  620. package/src/_shims/auto/types.mjs +0 -3
  621. package/src/_shims/bun-runtime.ts +0 -14
  622. package/src/_shims/index.d.ts +0 -83
  623. package/src/_shims/index.js +0 -17
  624. package/src/_shims/index.mjs +0 -11
  625. package/src/_shims/manual-types.d.ts +0 -12
  626. package/src/_shims/manual-types.js +0 -3
  627. package/src/_shims/manual-types.mjs +0 -3
  628. package/src/_shims/node-runtime.ts +0 -81
  629. package/src/_shims/node-types.d.ts +0 -42
  630. package/src/_shims/node-types.js +0 -3
  631. package/src/_shims/node-types.mjs +0 -3
  632. package/src/_shims/registry.ts +0 -67
  633. package/src/_shims/web-runtime.ts +0 -103
  634. package/src/_shims/web-types.d.ts +0 -83
  635. package/src/_shims/web-types.js +0 -3
  636. package/src/_shims/web-types.mjs +0 -3
  637. package/src/core.ts +0 -1231
  638. package/src/shims/node.ts +0 -50
  639. package/src/shims/web.ts +0 -50
@@ -0,0 +1,1251 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Orders extends APIResource {
5
+ /**
6
+ * Create a new order. By creating a new order, you will create a new settlement
7
+ * destination which you can use to settle expected incoming payments efficiently.
8
+ * After creating the order, Ivy provides you with a destination for the expected
9
+ * incoming payment. As soon as a payment with the same details arrives, Ivy will
10
+ * update the status of the order.
11
+ */
12
+ create(body: OrderCreateParams, options?: RequestOptions): APIPromise<OrderCreateResponse>;
13
+ /**
14
+ * Retrieve details of an order. You can retrieve the order by passing either the
15
+ * internal Ivy order id or the `referenceId` you specified when creating a
16
+ * Checkout Session to the `id` field.
17
+ */
18
+ retrieve(body: OrderRetrieveParams, options?: RequestOptions): APIPromise<OrderRetrieveResponse>;
19
+ /**
20
+ * Manually expire an order before its natural expiration time.
21
+ */
22
+ expire(body: OrderExpireParams, options?: RequestOptions): APIPromise<OrderExpireResponse>;
23
+ }
24
+ export interface OrderCreateResponse {
25
+ /**
26
+ * The unique id for the order.
27
+ */
28
+ id: string;
29
+ /**
30
+ * The unique id for the merchantApp which initiated the order.
31
+ */
32
+ appId: string;
33
+ /**
34
+ * The amount of application fee collected with the order.
35
+ */
36
+ applicationFeeAmount: number;
37
+ createdAt: unknown;
38
+ instantPaymentScheme: boolean;
39
+ /**
40
+ * Same as appId
41
+ */
42
+ merchantAppId: string;
43
+ merchantId: string;
44
+ /**
45
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
46
+ */
47
+ price: OrderCreateResponse.Price;
48
+ /**
49
+ * A unique id for the order which can be set when creating the checkoutSession.
50
+ */
51
+ referenceId: string;
52
+ /**
53
+ * The legal name of the merchant which initiated the order.
54
+ */
55
+ shopName: string;
56
+ /**
57
+ * The status of the order. As soon as this value is 'paid', you can ship the
58
+ * order.
59
+ */
60
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
61
+ updatedAt: unknown;
62
+ /**
63
+ * The unique identifier of the customer's bank.
64
+ */
65
+ bankId?: string;
66
+ /**
67
+ * The reference that will be shown on the bank statement of the customer. Only
68
+ * available after a successful DirectDebit initiation.
69
+ */
70
+ bankStatementReference?: string;
71
+ billingAddress?: OrderCreateResponse.BillingAddress;
72
+ /**
73
+ * The merchant category code for the account. MCCs are used to classify businesses
74
+ * based on the goods or services they provide.
75
+ */
76
+ category?: string;
77
+ climateActionMode?: OrderCreateResponse.ClimateActionMode;
78
+ co2Grams?: number;
79
+ /**
80
+ * The unique identifier of the customer who placed the order.
81
+ */
82
+ customerId?: string;
83
+ /**
84
+ * The destination bank account and statement reference for the order.
85
+ */
86
+ destination?: OrderCreateResponse.Destination;
87
+ /**
88
+ * The customer-facing id of the order.
89
+ */
90
+ displayId?: string;
91
+ guest?: boolean;
92
+ impactOffsetProjects?: Array<unknown>;
93
+ /**
94
+ * The list of line items sold with the order.
95
+ */
96
+ lineItems?: Array<OrderCreateResponse.LineItem>;
97
+ /**
98
+ * The financial address of the merchant associated with the order. Only available
99
+ * when requested via order/details and therefore requires authentication.
100
+ */
101
+ merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
102
+ /**
103
+ * Set of key-value pairs that you can attach to an object. This can be useful for
104
+ * storing additional information about the object in a structured format.
105
+ */
106
+ metadata?: {
107
+ [key: string]: unknown;
108
+ };
109
+ /**
110
+ * The project related to the order.
111
+ */
112
+ offsetProject?: string;
113
+ /**
114
+ * The financial address of the payer associated with the order. Only available
115
+ * after successful PIS flow.
116
+ */
117
+ payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
118
+ paymentMethodType?: 'customer_balance' | 'manual_bank_transfer';
119
+ /**
120
+ * The payment mode of the order. Can be either settlement or direct.
121
+ */
122
+ paymentMode?: 'direct' | 'settlement';
123
+ /**
124
+ * Deprecated. The status of the payment.
125
+ */
126
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
127
+ /**
128
+ * The total amount in the currency of all successful refunds for this order
129
+ */
130
+ refundAmount?: number;
131
+ /**
132
+ * All partial and total refunds of this order.
133
+ */
134
+ refunds?: Array<OrderCreateResponse.Refund>;
135
+ shippingAddress?: OrderCreateResponse.ShippingAddress;
136
+ shopLogo?: string;
137
+ /**
138
+ * Information about the customer who finished the order.
139
+ */
140
+ shopper?: OrderCreateResponse.Shopper;
141
+ /**
142
+ * Deprecated. The email of the customer who completed the order.
143
+ */
144
+ shopperEmail?: string;
145
+ statusClassification?: OrderCreateResponse.StatusClassification;
146
+ statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
147
+ /**
148
+ * The subaccount id of the merchant.
149
+ */
150
+ subaccountId?: string;
151
+ subaccountLegalName?: string;
152
+ /**
153
+ * The unique id of the transaction.
154
+ */
155
+ transactionId?: string;
156
+ trees?: number;
157
+ }
158
+ export declare namespace OrderCreateResponse {
159
+ /**
160
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
161
+ */
162
+ interface Price {
163
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
164
+ total: number;
165
+ shipping?: number;
166
+ subTotal?: number;
167
+ totalNet?: number;
168
+ vat?: number;
169
+ }
170
+ interface BillingAddress {
171
+ city: string;
172
+ 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';
173
+ line1: string;
174
+ zipCode: string;
175
+ firstName?: string;
176
+ lastName?: string;
177
+ line2?: string;
178
+ region?: string;
179
+ }
180
+ interface ClimateActionMode {
181
+ amount: number;
182
+ type: 'transaction' | 'amount';
183
+ }
184
+ /**
185
+ * The destination bank account and statement reference for the order.
186
+ */
187
+ interface Destination {
188
+ bankAccount: Destination.BankAccount;
189
+ /**
190
+ * The bank statement reference of the payment for the order. This is the reference
191
+ * that will be visible on the bank statement.
192
+ */
193
+ bankStatementReference: string;
194
+ }
195
+ namespace Destination {
196
+ interface BankAccount {
197
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
198
+ bankCode?: BankAccount.BankCode;
199
+ bban?: BankAccount.Bban;
200
+ iban?: BankAccount.Iban;
201
+ paymentReference?: string;
202
+ sortCode?: BankAccount.SortCode;
203
+ wallet?: BankAccount.Wallet;
204
+ }
205
+ namespace BankAccount {
206
+ interface BankCode {
207
+ accountHolderName: string;
208
+ accountNumber: string;
209
+ code: string;
210
+ }
211
+ interface Bban {
212
+ accountHolderName: string;
213
+ bban: string;
214
+ bic?: string;
215
+ }
216
+ interface Iban {
217
+ accountHolderName: string;
218
+ iban: string;
219
+ bic?: string;
220
+ }
221
+ interface SortCode {
222
+ accountHolderName: string;
223
+ accountNumber: string;
224
+ sortCode: string;
225
+ }
226
+ interface Wallet {
227
+ /**
228
+ * The blockchain wallet address
229
+ */
230
+ address: string;
231
+ /**
232
+ * The blockchain network
233
+ */
234
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
235
+ }
236
+ }
237
+ }
238
+ interface LineItem {
239
+ /**
240
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
241
+ * and quantity 4, amount would be equal to 12.00.
242
+ */
243
+ amount: number;
244
+ /**
245
+ * Customer-facing name of the line item.
246
+ */
247
+ name: string;
248
+ singleNet: number;
249
+ singleVat: number;
250
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
251
+ co2Grams?: number;
252
+ EAN?: string;
253
+ /**
254
+ * An image of the line item. Valid URLs are accepted only.
255
+ */
256
+ image?: string;
257
+ /**
258
+ * Quantity of this lineItem.
259
+ */
260
+ quantity?: number;
261
+ /**
262
+ * An internal unique id stored to this line item.
263
+ */
264
+ referenceId?: string;
265
+ }
266
+ /**
267
+ * The financial address of the merchant associated with the order. Only available
268
+ * when requested via order/details and therefore requires authentication.
269
+ */
270
+ interface MerchantFinancialAddress {
271
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
272
+ bankCode?: MerchantFinancialAddress.BankCode;
273
+ bban?: MerchantFinancialAddress.Bban;
274
+ iban?: MerchantFinancialAddress.Iban;
275
+ paymentReference?: string;
276
+ sortCode?: MerchantFinancialAddress.SortCode;
277
+ wallet?: MerchantFinancialAddress.Wallet;
278
+ }
279
+ namespace MerchantFinancialAddress {
280
+ interface BankCode {
281
+ accountHolderName: string;
282
+ accountNumber: string;
283
+ code: string;
284
+ }
285
+ interface Bban {
286
+ accountHolderName: string;
287
+ bban: string;
288
+ bic?: string;
289
+ }
290
+ interface Iban {
291
+ accountHolderName: string;
292
+ iban: string;
293
+ bic?: string;
294
+ }
295
+ interface SortCode {
296
+ accountHolderName: string;
297
+ accountNumber: string;
298
+ sortCode: string;
299
+ }
300
+ interface Wallet {
301
+ /**
302
+ * The blockchain wallet address
303
+ */
304
+ address: string;
305
+ /**
306
+ * The blockchain network
307
+ */
308
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
309
+ }
310
+ }
311
+ /**
312
+ * The financial address of the payer associated with the order. Only available
313
+ * after successful PIS flow.
314
+ */
315
+ interface PayerFinancialAddress {
316
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
317
+ bankCode?: PayerFinancialAddress.BankCode;
318
+ bban?: PayerFinancialAddress.Bban;
319
+ iban?: PayerFinancialAddress.Iban;
320
+ sortCode?: PayerFinancialAddress.SortCode;
321
+ wallet?: PayerFinancialAddress.Wallet;
322
+ }
323
+ namespace PayerFinancialAddress {
324
+ interface BankCode {
325
+ accountNumber: string;
326
+ code: string;
327
+ accountHolderName?: string;
328
+ }
329
+ interface Bban {
330
+ bban: string;
331
+ accountHolderName?: string;
332
+ bic?: string;
333
+ }
334
+ interface Iban {
335
+ iban: string;
336
+ accountHolderName?: string;
337
+ bic?: string;
338
+ }
339
+ interface SortCode {
340
+ accountNumber: string;
341
+ sortCode: string;
342
+ accountHolderName?: string;
343
+ }
344
+ interface Wallet {
345
+ /**
346
+ * The blockchain wallet address
347
+ */
348
+ address: string;
349
+ /**
350
+ * The blockchain network
351
+ */
352
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
353
+ }
354
+ }
355
+ interface Refund {
356
+ /**
357
+ * The unique id of this refund request.
358
+ */
359
+ id: string;
360
+ /**
361
+ * The amount of the refund in decimals.
362
+ */
363
+ amount: number;
364
+ createdAt: unknown;
365
+ /**
366
+ * The unique id of this refund request. This can be set when requesting the
367
+ * refund.
368
+ */
369
+ referenceId: string;
370
+ /**
371
+ * The current status of this refund.
372
+ */
373
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
374
+ updatedAt: unknown;
375
+ /**
376
+ * The description of the refund.
377
+ */
378
+ description?: string;
379
+ /**
380
+ * The unique id of the transaction.
381
+ */
382
+ transactionId?: string;
383
+ }
384
+ interface ShippingAddress {
385
+ city: string;
386
+ 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';
387
+ line1: string;
388
+ zipCode: string;
389
+ firstName?: string;
390
+ lastName?: string;
391
+ line2?: string;
392
+ region?: string;
393
+ }
394
+ /**
395
+ * Information about the customer who finished the order.
396
+ */
397
+ interface Shopper {
398
+ email?: string;
399
+ phoneNumber?: string;
400
+ }
401
+ interface StatusClassification {
402
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
403
+ secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled' | 'unsupported_bank_account' | 'online_banking_login_required' | 'deutsche_bank_psu_migration' | 'out_of_operational_hours';
404
+ }
405
+ interface StatusHistoryList {
406
+ createdAt: unknown;
407
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
408
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | 'ORDER_REFUND_INITIATED' | 'ORDER_REFUNDED' | 'REFUND_CHARGE_SUCCEEDED' | 'REFUND_UPDATED' | 'CHECKOUT_COMPLETED' | 'USER_CONFIRMED' | 'PIS_PAYMENT_INITIATED' | 'PIS_PAYMENT_UPDATED' | 'PIS_PAYMENT_SUCCEEDED' | 'PAYMENT_NOT_SETTLED' | 'PAYMENT_INITIATION_FAILED' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILED' | 'CHECKOUT_SESSION_CREATED' | 'EXPIRED_CHECKOUT_SESSION_ABORTED' | 'DISPUTE' | 'PENDING_PAYMENT_ATTEMPTS_FOUND' | 'AML_FREEZE' | 'MANUAL_FREEZE' | 'MANUAL_UNFREEZE' | 'ORDER_MANUALLY_REOPENED' | 'ORDER_FINALIZATION_STARTED';
409
+ updatedAt: unknown;
410
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing' | null;
411
+ }
412
+ }
413
+ export interface OrderRetrieveResponse {
414
+ /**
415
+ * The unique id for the order.
416
+ */
417
+ id: string;
418
+ /**
419
+ * The unique id for the merchantApp which initiated the order.
420
+ */
421
+ appId: string;
422
+ /**
423
+ * The amount of application fee collected with the order.
424
+ */
425
+ applicationFeeAmount: number;
426
+ createdAt: unknown;
427
+ instantPaymentScheme: boolean;
428
+ /**
429
+ * Same as appId
430
+ */
431
+ merchantAppId: string;
432
+ merchantId: string;
433
+ /**
434
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
435
+ */
436
+ price: OrderRetrieveResponse.Price;
437
+ /**
438
+ * A unique id for the order which can be set when creating the checkoutSession.
439
+ */
440
+ referenceId: string;
441
+ /**
442
+ * The legal name of the merchant which initiated the order.
443
+ */
444
+ shopName: string;
445
+ /**
446
+ * The status of the order. As soon as this value is 'paid', you can ship the
447
+ * order.
448
+ */
449
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
450
+ updatedAt: unknown;
451
+ /**
452
+ * The unique identifier of the customer's bank.
453
+ */
454
+ bankId?: string;
455
+ /**
456
+ * The reference that will be shown on the bank statement of the customer. Only
457
+ * available after a successful DirectDebit initiation.
458
+ */
459
+ bankStatementReference?: string;
460
+ billingAddress?: OrderRetrieveResponse.BillingAddress;
461
+ /**
462
+ * The merchant category code for the account. MCCs are used to classify businesses
463
+ * based on the goods or services they provide.
464
+ */
465
+ category?: string;
466
+ climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
467
+ co2Grams?: number;
468
+ /**
469
+ * The unique identifier of the customer who placed the order.
470
+ */
471
+ customerId?: string;
472
+ /**
473
+ * The destination bank account and statement reference for the order.
474
+ */
475
+ destination?: OrderRetrieveResponse.Destination;
476
+ /**
477
+ * The customer-facing id of the order.
478
+ */
479
+ displayId?: string;
480
+ guest?: boolean;
481
+ impactOffsetProjects?: Array<unknown>;
482
+ /**
483
+ * The list of line items sold with the order.
484
+ */
485
+ lineItems?: Array<OrderRetrieveResponse.LineItem>;
486
+ /**
487
+ * The financial address of the merchant associated with the order. Only available
488
+ * when requested via order/details and therefore requires authentication.
489
+ */
490
+ merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
491
+ /**
492
+ * Set of key-value pairs that you can attach to an object. This can be useful for
493
+ * storing additional information about the object in a structured format.
494
+ */
495
+ metadata?: {
496
+ [key: string]: unknown;
497
+ };
498
+ /**
499
+ * The project related to the order.
500
+ */
501
+ offsetProject?: string;
502
+ /**
503
+ * The financial address of the payer associated with the order. Only available
504
+ * after successful PIS flow.
505
+ */
506
+ payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
507
+ paymentMethodType?: 'customer_balance' | 'manual_bank_transfer';
508
+ /**
509
+ * The payment mode of the order. Can be either settlement or direct.
510
+ */
511
+ paymentMode?: 'direct' | 'settlement';
512
+ /**
513
+ * Deprecated. The status of the payment.
514
+ */
515
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
516
+ /**
517
+ * The total amount in the currency of all successful refunds for this order
518
+ */
519
+ refundAmount?: number;
520
+ /**
521
+ * All partial and total refunds of this order.
522
+ */
523
+ refunds?: Array<OrderRetrieveResponse.Refund>;
524
+ shippingAddress?: OrderRetrieveResponse.ShippingAddress;
525
+ shopLogo?: string;
526
+ /**
527
+ * Information about the customer who finished the order.
528
+ */
529
+ shopper?: OrderRetrieveResponse.Shopper;
530
+ /**
531
+ * Deprecated. The email of the customer who completed the order.
532
+ */
533
+ shopperEmail?: string;
534
+ statusClassification?: OrderRetrieveResponse.StatusClassification;
535
+ statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
536
+ /**
537
+ * The subaccount id of the merchant.
538
+ */
539
+ subaccountId?: string;
540
+ subaccountLegalName?: string;
541
+ /**
542
+ * The unique id of the transaction.
543
+ */
544
+ transactionId?: string;
545
+ trees?: number;
546
+ }
547
+ export declare namespace OrderRetrieveResponse {
548
+ /**
549
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
550
+ */
551
+ interface Price {
552
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
553
+ total: number;
554
+ shipping?: number;
555
+ subTotal?: number;
556
+ totalNet?: number;
557
+ vat?: number;
558
+ }
559
+ interface BillingAddress {
560
+ city: string;
561
+ 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';
562
+ line1: string;
563
+ zipCode: string;
564
+ firstName?: string;
565
+ lastName?: string;
566
+ line2?: string;
567
+ region?: string;
568
+ }
569
+ interface ClimateActionMode {
570
+ amount: number;
571
+ type: 'transaction' | 'amount';
572
+ }
573
+ /**
574
+ * The destination bank account and statement reference for the order.
575
+ */
576
+ interface Destination {
577
+ bankAccount: Destination.BankAccount;
578
+ /**
579
+ * The bank statement reference of the payment for the order. This is the reference
580
+ * that will be visible on the bank statement.
581
+ */
582
+ bankStatementReference: string;
583
+ }
584
+ namespace Destination {
585
+ interface BankAccount {
586
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
587
+ bankCode?: BankAccount.BankCode;
588
+ bban?: BankAccount.Bban;
589
+ iban?: BankAccount.Iban;
590
+ paymentReference?: string;
591
+ sortCode?: BankAccount.SortCode;
592
+ wallet?: BankAccount.Wallet;
593
+ }
594
+ namespace BankAccount {
595
+ interface BankCode {
596
+ accountHolderName: string;
597
+ accountNumber: string;
598
+ code: string;
599
+ }
600
+ interface Bban {
601
+ accountHolderName: string;
602
+ bban: string;
603
+ bic?: string;
604
+ }
605
+ interface Iban {
606
+ accountHolderName: string;
607
+ iban: string;
608
+ bic?: string;
609
+ }
610
+ interface SortCode {
611
+ accountHolderName: string;
612
+ accountNumber: string;
613
+ sortCode: string;
614
+ }
615
+ interface Wallet {
616
+ /**
617
+ * The blockchain wallet address
618
+ */
619
+ address: string;
620
+ /**
621
+ * The blockchain network
622
+ */
623
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
624
+ }
625
+ }
626
+ }
627
+ interface LineItem {
628
+ /**
629
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
630
+ * and quantity 4, amount would be equal to 12.00.
631
+ */
632
+ amount: number;
633
+ /**
634
+ * Customer-facing name of the line item.
635
+ */
636
+ name: string;
637
+ singleNet: number;
638
+ singleVat: number;
639
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
640
+ co2Grams?: number;
641
+ EAN?: string;
642
+ /**
643
+ * An image of the line item. Valid URLs are accepted only.
644
+ */
645
+ image?: string;
646
+ /**
647
+ * Quantity of this lineItem.
648
+ */
649
+ quantity?: number;
650
+ /**
651
+ * An internal unique id stored to this line item.
652
+ */
653
+ referenceId?: string;
654
+ }
655
+ /**
656
+ * The financial address of the merchant associated with the order. Only available
657
+ * when requested via order/details and therefore requires authentication.
658
+ */
659
+ interface MerchantFinancialAddress {
660
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
661
+ bankCode?: MerchantFinancialAddress.BankCode;
662
+ bban?: MerchantFinancialAddress.Bban;
663
+ iban?: MerchantFinancialAddress.Iban;
664
+ paymentReference?: string;
665
+ sortCode?: MerchantFinancialAddress.SortCode;
666
+ wallet?: MerchantFinancialAddress.Wallet;
667
+ }
668
+ namespace MerchantFinancialAddress {
669
+ interface BankCode {
670
+ accountHolderName: string;
671
+ accountNumber: string;
672
+ code: string;
673
+ }
674
+ interface Bban {
675
+ accountHolderName: string;
676
+ bban: string;
677
+ bic?: string;
678
+ }
679
+ interface Iban {
680
+ accountHolderName: string;
681
+ iban: string;
682
+ bic?: string;
683
+ }
684
+ interface SortCode {
685
+ accountHolderName: string;
686
+ accountNumber: string;
687
+ sortCode: string;
688
+ }
689
+ interface Wallet {
690
+ /**
691
+ * The blockchain wallet address
692
+ */
693
+ address: string;
694
+ /**
695
+ * The blockchain network
696
+ */
697
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
698
+ }
699
+ }
700
+ /**
701
+ * The financial address of the payer associated with the order. Only available
702
+ * after successful PIS flow.
703
+ */
704
+ interface PayerFinancialAddress {
705
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
706
+ bankCode?: PayerFinancialAddress.BankCode;
707
+ bban?: PayerFinancialAddress.Bban;
708
+ iban?: PayerFinancialAddress.Iban;
709
+ sortCode?: PayerFinancialAddress.SortCode;
710
+ wallet?: PayerFinancialAddress.Wallet;
711
+ }
712
+ namespace PayerFinancialAddress {
713
+ interface BankCode {
714
+ accountNumber: string;
715
+ code: string;
716
+ accountHolderName?: string;
717
+ }
718
+ interface Bban {
719
+ bban: string;
720
+ accountHolderName?: string;
721
+ bic?: string;
722
+ }
723
+ interface Iban {
724
+ iban: string;
725
+ accountHolderName?: string;
726
+ bic?: string;
727
+ }
728
+ interface SortCode {
729
+ accountNumber: string;
730
+ sortCode: string;
731
+ accountHolderName?: string;
732
+ }
733
+ interface Wallet {
734
+ /**
735
+ * The blockchain wallet address
736
+ */
737
+ address: string;
738
+ /**
739
+ * The blockchain network
740
+ */
741
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
742
+ }
743
+ }
744
+ interface Refund {
745
+ /**
746
+ * The unique id of this refund request.
747
+ */
748
+ id: string;
749
+ /**
750
+ * The amount of the refund in decimals.
751
+ */
752
+ amount: number;
753
+ createdAt: unknown;
754
+ /**
755
+ * The unique id of this refund request. This can be set when requesting the
756
+ * refund.
757
+ */
758
+ referenceId: string;
759
+ /**
760
+ * The current status of this refund.
761
+ */
762
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
763
+ updatedAt: unknown;
764
+ /**
765
+ * The description of the refund.
766
+ */
767
+ description?: string;
768
+ /**
769
+ * The unique id of the transaction.
770
+ */
771
+ transactionId?: string;
772
+ }
773
+ interface ShippingAddress {
774
+ city: string;
775
+ 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';
776
+ line1: string;
777
+ zipCode: string;
778
+ firstName?: string;
779
+ lastName?: string;
780
+ line2?: string;
781
+ region?: string;
782
+ }
783
+ /**
784
+ * Information about the customer who finished the order.
785
+ */
786
+ interface Shopper {
787
+ email?: string;
788
+ phoneNumber?: string;
789
+ }
790
+ interface StatusClassification {
791
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
792
+ secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled' | 'unsupported_bank_account' | 'online_banking_login_required' | 'deutsche_bank_psu_migration' | 'out_of_operational_hours';
793
+ }
794
+ interface StatusHistoryList {
795
+ createdAt: unknown;
796
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
797
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | 'ORDER_REFUND_INITIATED' | 'ORDER_REFUNDED' | 'REFUND_CHARGE_SUCCEEDED' | 'REFUND_UPDATED' | 'CHECKOUT_COMPLETED' | 'USER_CONFIRMED' | 'PIS_PAYMENT_INITIATED' | 'PIS_PAYMENT_UPDATED' | 'PIS_PAYMENT_SUCCEEDED' | 'PAYMENT_NOT_SETTLED' | 'PAYMENT_INITIATION_FAILED' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILED' | 'CHECKOUT_SESSION_CREATED' | 'EXPIRED_CHECKOUT_SESSION_ABORTED' | 'DISPUTE' | 'PENDING_PAYMENT_ATTEMPTS_FOUND' | 'AML_FREEZE' | 'MANUAL_FREEZE' | 'MANUAL_UNFREEZE' | 'ORDER_MANUALLY_REOPENED' | 'ORDER_FINALIZATION_STARTED';
798
+ updatedAt: unknown;
799
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing' | null;
800
+ }
801
+ }
802
+ export interface OrderExpireResponse {
803
+ /**
804
+ * The unique id for the order.
805
+ */
806
+ id: string;
807
+ /**
808
+ * The unique id for the merchantApp which initiated the order.
809
+ */
810
+ appId: string;
811
+ /**
812
+ * The amount of application fee collected with the order.
813
+ */
814
+ applicationFeeAmount: number;
815
+ createdAt: unknown;
816
+ instantPaymentScheme: boolean;
817
+ /**
818
+ * Same as appId
819
+ */
820
+ merchantAppId: string;
821
+ merchantId: string;
822
+ /**
823
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
824
+ */
825
+ price: OrderExpireResponse.Price;
826
+ /**
827
+ * A unique id for the order which can be set when creating the checkoutSession.
828
+ */
829
+ referenceId: string;
830
+ /**
831
+ * The legal name of the merchant which initiated the order.
832
+ */
833
+ shopName: string;
834
+ /**
835
+ * The status of the order. As soon as this value is 'paid', you can ship the
836
+ * order.
837
+ */
838
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
839
+ updatedAt: unknown;
840
+ /**
841
+ * The unique identifier of the customer's bank.
842
+ */
843
+ bankId?: string;
844
+ /**
845
+ * The reference that will be shown on the bank statement of the customer. Only
846
+ * available after a successful DirectDebit initiation.
847
+ */
848
+ bankStatementReference?: string;
849
+ billingAddress?: OrderExpireResponse.BillingAddress;
850
+ /**
851
+ * The merchant category code for the account. MCCs are used to classify businesses
852
+ * based on the goods or services they provide.
853
+ */
854
+ category?: string;
855
+ climateActionMode?: OrderExpireResponse.ClimateActionMode;
856
+ co2Grams?: number;
857
+ /**
858
+ * The unique identifier of the customer who placed the order.
859
+ */
860
+ customerId?: string;
861
+ /**
862
+ * The destination bank account and statement reference for the order.
863
+ */
864
+ destination?: OrderExpireResponse.Destination;
865
+ /**
866
+ * The customer-facing id of the order.
867
+ */
868
+ displayId?: string;
869
+ guest?: boolean;
870
+ impactOffsetProjects?: Array<unknown>;
871
+ /**
872
+ * The list of line items sold with the order.
873
+ */
874
+ lineItems?: Array<OrderExpireResponse.LineItem>;
875
+ /**
876
+ * The financial address of the merchant associated with the order. Only available
877
+ * when requested via order/details and therefore requires authentication.
878
+ */
879
+ merchantFinancialAddress?: OrderExpireResponse.MerchantFinancialAddress;
880
+ /**
881
+ * Set of key-value pairs that you can attach to an object. This can be useful for
882
+ * storing additional information about the object in a structured format.
883
+ */
884
+ metadata?: {
885
+ [key: string]: unknown;
886
+ };
887
+ /**
888
+ * The project related to the order.
889
+ */
890
+ offsetProject?: string;
891
+ /**
892
+ * The financial address of the payer associated with the order. Only available
893
+ * after successful PIS flow.
894
+ */
895
+ payerFinancialAddress?: OrderExpireResponse.PayerFinancialAddress;
896
+ paymentMethodType?: 'customer_balance' | 'manual_bank_transfer';
897
+ /**
898
+ * The payment mode of the order. Can be either settlement or direct.
899
+ */
900
+ paymentMode?: 'direct' | 'settlement';
901
+ /**
902
+ * Deprecated. The status of the payment.
903
+ */
904
+ paymentStatus?: 'not_settled' | 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'disputed';
905
+ /**
906
+ * The total amount in the currency of all successful refunds for this order
907
+ */
908
+ refundAmount?: number;
909
+ /**
910
+ * All partial and total refunds of this order.
911
+ */
912
+ refunds?: Array<OrderExpireResponse.Refund>;
913
+ shippingAddress?: OrderExpireResponse.ShippingAddress;
914
+ shopLogo?: string;
915
+ /**
916
+ * Information about the customer who finished the order.
917
+ */
918
+ shopper?: OrderExpireResponse.Shopper;
919
+ /**
920
+ * Deprecated. The email of the customer who completed the order.
921
+ */
922
+ shopperEmail?: string;
923
+ statusClassification?: OrderExpireResponse.StatusClassification;
924
+ statusHistoryList?: Array<OrderExpireResponse.StatusHistoryList>;
925
+ /**
926
+ * The subaccount id of the merchant.
927
+ */
928
+ subaccountId?: string;
929
+ subaccountLegalName?: string;
930
+ /**
931
+ * The unique id of the transaction.
932
+ */
933
+ transactionId?: string;
934
+ trees?: number;
935
+ }
936
+ export declare namespace OrderExpireResponse {
937
+ /**
938
+ * The price object. All values in decimals, e.g. 0.13 for 13 cents.
939
+ */
940
+ interface Price {
941
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
942
+ total: number;
943
+ shipping?: number;
944
+ subTotal?: number;
945
+ totalNet?: number;
946
+ vat?: number;
947
+ }
948
+ interface BillingAddress {
949
+ city: string;
950
+ 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';
951
+ line1: string;
952
+ zipCode: string;
953
+ firstName?: string;
954
+ lastName?: string;
955
+ line2?: string;
956
+ region?: string;
957
+ }
958
+ interface ClimateActionMode {
959
+ amount: number;
960
+ type: 'transaction' | 'amount';
961
+ }
962
+ /**
963
+ * The destination bank account and statement reference for the order.
964
+ */
965
+ interface Destination {
966
+ bankAccount: Destination.BankAccount;
967
+ /**
968
+ * The bank statement reference of the payment for the order. This is the reference
969
+ * that will be visible on the bank statement.
970
+ */
971
+ bankStatementReference: string;
972
+ }
973
+ namespace Destination {
974
+ interface BankAccount {
975
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
976
+ bankCode?: BankAccount.BankCode;
977
+ bban?: BankAccount.Bban;
978
+ iban?: BankAccount.Iban;
979
+ paymentReference?: string;
980
+ sortCode?: BankAccount.SortCode;
981
+ wallet?: BankAccount.Wallet;
982
+ }
983
+ namespace BankAccount {
984
+ interface BankCode {
985
+ accountHolderName: string;
986
+ accountNumber: string;
987
+ code: string;
988
+ }
989
+ interface Bban {
990
+ accountHolderName: string;
991
+ bban: string;
992
+ bic?: string;
993
+ }
994
+ interface Iban {
995
+ accountHolderName: string;
996
+ iban: string;
997
+ bic?: string;
998
+ }
999
+ interface SortCode {
1000
+ accountHolderName: string;
1001
+ accountNumber: string;
1002
+ sortCode: string;
1003
+ }
1004
+ interface Wallet {
1005
+ /**
1006
+ * The blockchain wallet address
1007
+ */
1008
+ address: string;
1009
+ /**
1010
+ * The blockchain network
1011
+ */
1012
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
1013
+ }
1014
+ }
1015
+ }
1016
+ interface LineItem {
1017
+ /**
1018
+ * Accumulated cost in decimals. For example, for a lineItem with total price 3.00
1019
+ * and quantity 4, amount would be equal to 12.00.
1020
+ */
1021
+ amount: number;
1022
+ /**
1023
+ * Customer-facing name of the line item.
1024
+ */
1025
+ name: string;
1026
+ singleNet: number;
1027
+ singleVat: number;
1028
+ category?: '5045' | '5065' | '5094' | '5192' | '5193' | '5499' | '5655' | '5691' | '5712' | '5722' | '5812' | '5814' | '5912' | '5977' | '5999' | '7629';
1029
+ co2Grams?: number;
1030
+ EAN?: string;
1031
+ /**
1032
+ * An image of the line item. Valid URLs are accepted only.
1033
+ */
1034
+ image?: string;
1035
+ /**
1036
+ * Quantity of this lineItem.
1037
+ */
1038
+ quantity?: number;
1039
+ /**
1040
+ * An internal unique id stored to this line item.
1041
+ */
1042
+ referenceId?: string;
1043
+ }
1044
+ /**
1045
+ * The financial address of the merchant associated with the order. Only available
1046
+ * when requested via order/details and therefore requires authentication.
1047
+ */
1048
+ interface MerchantFinancialAddress {
1049
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
1050
+ bankCode?: MerchantFinancialAddress.BankCode;
1051
+ bban?: MerchantFinancialAddress.Bban;
1052
+ iban?: MerchantFinancialAddress.Iban;
1053
+ paymentReference?: string;
1054
+ sortCode?: MerchantFinancialAddress.SortCode;
1055
+ wallet?: MerchantFinancialAddress.Wallet;
1056
+ }
1057
+ namespace MerchantFinancialAddress {
1058
+ interface BankCode {
1059
+ accountHolderName: string;
1060
+ accountNumber: string;
1061
+ code: string;
1062
+ }
1063
+ interface Bban {
1064
+ accountHolderName: string;
1065
+ bban: string;
1066
+ bic?: string;
1067
+ }
1068
+ interface Iban {
1069
+ accountHolderName: string;
1070
+ iban: string;
1071
+ bic?: string;
1072
+ }
1073
+ interface SortCode {
1074
+ accountHolderName: string;
1075
+ accountNumber: string;
1076
+ sortCode: string;
1077
+ }
1078
+ interface Wallet {
1079
+ /**
1080
+ * The blockchain wallet address
1081
+ */
1082
+ address: string;
1083
+ /**
1084
+ * The blockchain network
1085
+ */
1086
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
1087
+ }
1088
+ }
1089
+ /**
1090
+ * The financial address of the payer associated with the order. Only available
1091
+ * after successful PIS flow.
1092
+ */
1093
+ interface PayerFinancialAddress {
1094
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet';
1095
+ bankCode?: PayerFinancialAddress.BankCode;
1096
+ bban?: PayerFinancialAddress.Bban;
1097
+ iban?: PayerFinancialAddress.Iban;
1098
+ sortCode?: PayerFinancialAddress.SortCode;
1099
+ wallet?: PayerFinancialAddress.Wallet;
1100
+ }
1101
+ namespace PayerFinancialAddress {
1102
+ interface BankCode {
1103
+ accountNumber: string;
1104
+ code: string;
1105
+ accountHolderName?: string;
1106
+ }
1107
+ interface Bban {
1108
+ bban: string;
1109
+ accountHolderName?: string;
1110
+ bic?: string;
1111
+ }
1112
+ interface Iban {
1113
+ iban: string;
1114
+ accountHolderName?: string;
1115
+ bic?: string;
1116
+ }
1117
+ interface SortCode {
1118
+ accountNumber: string;
1119
+ sortCode: string;
1120
+ accountHolderName?: string;
1121
+ }
1122
+ interface Wallet {
1123
+ /**
1124
+ * The blockchain wallet address
1125
+ */
1126
+ address: string;
1127
+ /**
1128
+ * The blockchain network
1129
+ */
1130
+ blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
1131
+ }
1132
+ }
1133
+ interface Refund {
1134
+ /**
1135
+ * The unique id of this refund request.
1136
+ */
1137
+ id: string;
1138
+ /**
1139
+ * The amount of the refund in decimals.
1140
+ */
1141
+ amount: number;
1142
+ createdAt: unknown;
1143
+ /**
1144
+ * The unique id of this refund request. This can be set when requesting the
1145
+ * refund.
1146
+ */
1147
+ referenceId: string;
1148
+ /**
1149
+ * The current status of this refund.
1150
+ */
1151
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1152
+ updatedAt: unknown;
1153
+ /**
1154
+ * The description of the refund.
1155
+ */
1156
+ description?: string;
1157
+ /**
1158
+ * The unique id of the transaction.
1159
+ */
1160
+ transactionId?: string;
1161
+ }
1162
+ interface ShippingAddress {
1163
+ city: string;
1164
+ 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';
1165
+ line1: string;
1166
+ zipCode: string;
1167
+ firstName?: string;
1168
+ lastName?: string;
1169
+ line2?: string;
1170
+ region?: string;
1171
+ }
1172
+ /**
1173
+ * Information about the customer who finished the order.
1174
+ */
1175
+ interface Shopper {
1176
+ email?: string;
1177
+ phoneNumber?: string;
1178
+ }
1179
+ interface StatusClassification {
1180
+ primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
1181
+ secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled' | 'unsupported_bank_account' | 'online_banking_login_required' | 'deutsche_bank_psu_migration' | 'out_of_operational_hours';
1182
+ }
1183
+ interface StatusHistoryList {
1184
+ createdAt: unknown;
1185
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing';
1186
+ reason: 'ORDER_CREATED' | 'CHECKOUT_SESSION_ABORTED' | 'PAYMENT_SUCCEEDED' | 'PAYMENT_INITIATED' | 'ORDER_CANCELED' | 'ORDER_EXPIRED_BY_MERCHANT' | 'ORDER_REFUND_INITIATED' | 'ORDER_REFUNDED' | 'REFUND_CHARGE_SUCCEEDED' | 'REFUND_UPDATED' | 'CHECKOUT_COMPLETED' | 'USER_CONFIRMED' | 'PIS_PAYMENT_INITIATED' | 'PIS_PAYMENT_UPDATED' | 'PIS_PAYMENT_SUCCEEDED' | 'PAYMENT_NOT_SETTLED' | 'PAYMENT_INITIATION_FAILED' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILED' | 'CHECKOUT_SESSION_CREATED' | 'EXPIRED_CHECKOUT_SESSION_ABORTED' | 'DISPUTE' | 'PENDING_PAYMENT_ATTEMPTS_FOUND' | 'AML_FREEZE' | 'MANUAL_FREEZE' | 'MANUAL_UNFREEZE' | 'ORDER_MANUALLY_REOPENED' | 'ORDER_FINALIZATION_STARTED';
1187
+ updatedAt: unknown;
1188
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'waiting_for_bank_confirmation' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | 'finalizing' | null;
1189
+ }
1190
+ }
1191
+ export interface OrderCreateParams {
1192
+ /**
1193
+ * The total amount of the order
1194
+ */
1195
+ amount: number;
1196
+ /**
1197
+ * The currency code of the order
1198
+ */
1199
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
1200
+ /**
1201
+ * The merchant's unique reference ID for the order
1202
+ */
1203
+ referenceId: string;
1204
+ /**
1205
+ * The customer of the merchant.
1206
+ */
1207
+ customer?: OrderCreateParams.Customer;
1208
+ /**
1209
+ * Optional expiration timestamp in seconds
1210
+ */
1211
+ expiresAt?: string;
1212
+ /**
1213
+ * The subaccount id of the merchant.
1214
+ */
1215
+ subaccountId?: string;
1216
+ }
1217
+ export declare namespace OrderCreateParams {
1218
+ /**
1219
+ * The customer of the merchant.
1220
+ */
1221
+ interface Customer {
1222
+ /**
1223
+ * The Ivy id of the customer.
1224
+ */
1225
+ id?: string;
1226
+ /**
1227
+ * The email of the customer.
1228
+ */
1229
+ email?: string;
1230
+ /**
1231
+ * The phone number of the customer in international format (e.g., +491631234567)
1232
+ */
1233
+ phone?: string;
1234
+ }
1235
+ }
1236
+ export interface OrderRetrieveParams {
1237
+ /**
1238
+ * You can put in either the Ivy id OR the referenceId of the order
1239
+ */
1240
+ id: string;
1241
+ }
1242
+ export interface OrderExpireParams {
1243
+ /**
1244
+ * You can put in either the Ivy id OR the referenceId of the order
1245
+ */
1246
+ id: string;
1247
+ }
1248
+ export declare namespace Orders {
1249
+ 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, };
1250
+ }
1251
+ //# sourceMappingURL=orders.d.mts.map