modern-treasury 2.6.0 → 2.7.2

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 (474) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +8 -4
  3. package/_shims/MultipartBody.d.ts +9 -0
  4. package/_shims/MultipartBody.d.ts.map +1 -0
  5. package/_shims/MultipartBody.js +16 -0
  6. package/_shims/MultipartBody.js.map +1 -0
  7. package/_shims/MultipartBody.mjs +12 -0
  8. package/_shims/MultipartBody.mjs.map +1 -0
  9. package/_shims/README.md +46 -0
  10. package/{src/_shims/ReadableStream-node.ts → _shims/auto/runtime-bun.d.ts} +2 -3
  11. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  12. package/_shims/auto/runtime-bun.js +21 -0
  13. package/_shims/auto/runtime-bun.js.map +1 -0
  14. package/_shims/auto/runtime-bun.mjs +2 -0
  15. package/_shims/auto/runtime-bun.mjs.map +1 -0
  16. package/_shims/auto/runtime-node.d.ts +5 -0
  17. package/_shims/auto/runtime-node.d.ts.map +1 -0
  18. package/_shims/auto/runtime-node.js +21 -0
  19. package/_shims/auto/runtime-node.js.map +1 -0
  20. package/_shims/auto/runtime-node.mjs +2 -0
  21. package/_shims/auto/runtime-node.mjs.map +1 -0
  22. package/_shims/auto/runtime.d.ts +5 -0
  23. package/_shims/auto/runtime.d.ts.map +1 -0
  24. package/_shims/auto/runtime.js +21 -0
  25. package/_shims/auto/runtime.js.map +1 -0
  26. package/_shims/auto/runtime.mjs +2 -0
  27. package/_shims/auto/runtime.mjs.map +1 -0
  28. package/_shims/auto/types-node.d.ts +5 -0
  29. package/_shims/auto/types-node.d.ts.map +1 -0
  30. package/_shims/auto/types-node.js +21 -0
  31. package/_shims/auto/types-node.js.map +1 -0
  32. package/_shims/auto/types-node.mjs +2 -0
  33. package/_shims/auto/types-node.mjs.map +1 -0
  34. package/_shims/auto/types.d.ts +99 -0
  35. package/_shims/{ReadableStream.js → auto/types.js} +0 -2
  36. package/{src/_shims/ReadableStream.js → _shims/auto/types.mjs} +0 -2
  37. package/_shims/bun-runtime.d.ts +6 -0
  38. package/_shims/bun-runtime.d.ts.map +1 -0
  39. package/_shims/bun-runtime.js +14 -0
  40. package/_shims/bun-runtime.js.map +1 -0
  41. package/_shims/bun-runtime.mjs +10 -0
  42. package/_shims/bun-runtime.mjs.map +1 -0
  43. package/_shims/index.d.ts +79 -0
  44. package/_shims/index.js +13 -0
  45. package/_shims/index.mjs +7 -0
  46. package/_shims/manual-types.d.ts +12 -0
  47. package/_shims/manual-types.js +3 -0
  48. package/_shims/manual-types.mjs +3 -0
  49. package/_shims/node-runtime.d.ts +3 -0
  50. package/_shims/node-runtime.d.ts.map +1 -0
  51. package/_shims/node-runtime.js +87 -0
  52. package/_shims/node-runtime.js.map +1 -0
  53. package/_shims/node-runtime.mjs +54 -0
  54. package/_shims/node-runtime.mjs.map +1 -0
  55. package/_shims/node-types.d.ts +42 -0
  56. package/_shims/node-types.js +3 -0
  57. package/_shims/node-types.mjs +3 -0
  58. package/_shims/registry.d.ts +35 -0
  59. package/_shims/registry.d.ts.map +1 -0
  60. package/_shims/registry.js +39 -0
  61. package/_shims/registry.js.map +1 -0
  62. package/_shims/registry.mjs +35 -0
  63. package/_shims/registry.mjs.map +1 -0
  64. package/_shims/web-runtime.d.ts +5 -0
  65. package/_shims/web-runtime.d.ts.map +1 -0
  66. package/_shims/web-runtime.js +70 -0
  67. package/_shims/web-runtime.js.map +1 -0
  68. package/_shims/web-runtime.mjs +63 -0
  69. package/_shims/web-runtime.mjs.map +1 -0
  70. package/_shims/web-types.d.ts +82 -0
  71. package/_shims/web-types.js +3 -0
  72. package/_shims/web-types.mjs +3 -0
  73. package/core.d.ts +170 -223
  74. package/core.d.ts.map +1 -1
  75. package/core.js +678 -731
  76. package/core.js.map +1 -1
  77. package/core.mjs +672 -682
  78. package/core.mjs.map +1 -1
  79. package/error.d.ts +32 -32
  80. package/error.d.ts.map +1 -1
  81. package/error.js +95 -106
  82. package/error.js.map +1 -1
  83. package/error.mjs +91 -91
  84. package/error.mjs.map +1 -1
  85. package/index.d.mts +323 -333
  86. package/index.d.ts +323 -333
  87. package/index.d.ts.map +1 -1
  88. package/index.js +190 -243
  89. package/index.js.map +1 -1
  90. package/index.mjs +167 -190
  91. package/index.mjs.map +1 -1
  92. package/package.json +32 -58
  93. package/pagination.d.ts +11 -11
  94. package/pagination.js +30 -26
  95. package/pagination.mjs +28 -24
  96. package/resource.d.ts +10 -10
  97. package/resource.js +12 -12
  98. package/resource.mjs +10 -10
  99. package/resources/account-collection-flows.d.ts +71 -116
  100. package/resources/account-collection-flows.js +52 -62
  101. package/resources/account-collection-flows.js.map +1 -1
  102. package/resources/account-collection-flows.mjs +47 -55
  103. package/resources/account-collection-flows.mjs.map +1 -1
  104. package/resources/account-details.d.ts +59 -81
  105. package/resources/account-details.js +47 -50
  106. package/resources/account-details.js.map +1 -1
  107. package/resources/account-details.mjs +42 -45
  108. package/resources/account-details.mjs.map +1 -1
  109. package/resources/connections.d.ts +42 -44
  110. package/resources/connections.js +15 -13
  111. package/resources/connections.mjs +10 -8
  112. package/resources/counterparties.d.ts +400 -466
  113. package/resources/counterparties.js +63 -71
  114. package/resources/counterparties.js.map +1 -1
  115. package/resources/counterparties.mjs +58 -66
  116. package/resources/counterparties.mjs.map +1 -1
  117. package/resources/documents.d.ts +88 -120
  118. package/resources/documents.js +36 -42
  119. package/resources/documents.js.map +1 -1
  120. package/resources/documents.mjs +30 -36
  121. package/resources/documents.mjs.map +1 -1
  122. package/resources/events.d.ts +56 -55
  123. package/resources/events.js +21 -19
  124. package/resources/events.mjs +16 -14
  125. package/resources/expected-payments.d.ts +321 -373
  126. package/resources/expected-payments.js +46 -51
  127. package/resources/expected-payments.js.map +1 -1
  128. package/resources/expected-payments.mjs +41 -44
  129. package/resources/expected-payments.mjs.map +1 -1
  130. package/resources/external-accounts.d.ts +295 -373
  131. package/resources/external-accounts.js +76 -91
  132. package/resources/external-accounts.js.map +1 -1
  133. package/resources/external-accounts.mjs +71 -84
  134. package/resources/external-accounts.mjs.map +1 -1
  135. package/resources/incoming-payment-details.d.ts +200 -222
  136. package/resources/incoming-payment-details.js +42 -47
  137. package/resources/incoming-payment-details.js.map +1 -1
  138. package/resources/incoming-payment-details.mjs +37 -40
  139. package/resources/incoming-payment-details.mjs.map +1 -1
  140. package/resources/index.d.ts +35 -212
  141. package/resources/index.js +111 -484
  142. package/resources/index.mjs +34 -37
  143. package/resources/internal-accounts/balance-reports.d.ts +74 -113
  144. package/resources/internal-accounts/balance-reports.js +21 -23
  145. package/resources/internal-accounts/balance-reports.mjs +16 -18
  146. package/resources/internal-accounts/index.d.ts +3 -15
  147. package/resources/internal-accounts/index.js +10 -34
  148. package/resources/internal-accounts/index.mjs +3 -3
  149. package/resources/internal-accounts/internal-accounts.d.ts +203 -233
  150. package/resources/internal-accounts/internal-accounts.js +65 -86
  151. package/resources/internal-accounts/internal-accounts.js.map +1 -1
  152. package/resources/internal-accounts/internal-accounts.mjs +41 -45
  153. package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
  154. package/resources/invoices/index.d.ts +3 -17
  155. package/resources/invoices/index.js +9 -29
  156. package/resources/invoices/index.mjs +3 -3
  157. package/resources/invoices/invoices.d.ts +509 -549
  158. package/resources/invoices/invoices.js +74 -95
  159. package/resources/invoices/invoices.js.map +1 -1
  160. package/resources/invoices/invoices.mjs +50 -54
  161. package/resources/invoices/invoices.mjs.map +1 -1
  162. package/resources/invoices/line-items.d.ts +119 -133
  163. package/resources/invoices/line-items.js +49 -52
  164. package/resources/invoices/line-items.js.map +1 -1
  165. package/resources/invoices/line-items.mjs +44 -47
  166. package/resources/invoices/line-items.mjs.map +1 -1
  167. package/resources/ledger-account-balance-monitors.d.ts +213 -224
  168. package/resources/ledger-account-balance-monitors.js +49 -55
  169. package/resources/ledger-account-balance-monitors.js.map +1 -1
  170. package/resources/ledger-account-balance-monitors.mjs +44 -49
  171. package/resources/ledger-account-balance-monitors.mjs.map +1 -1
  172. package/resources/ledger-account-categories.d.ts +255 -276
  173. package/resources/ledger-account-categories.js +84 -89
  174. package/resources/ledger-account-categories.js.map +1 -1
  175. package/resources/ledger-account-categories.mjs +79 -82
  176. package/resources/ledger-account-categories.mjs.map +1 -1
  177. package/resources/ledger-account-payouts.d.ts +151 -160
  178. package/resources/ledger-account-payouts.js +45 -50
  179. package/resources/ledger-account-payouts.js.map +1 -1
  180. package/resources/ledger-account-payouts.mjs +40 -43
  181. package/resources/ledger-account-payouts.mjs.map +1 -1
  182. package/resources/ledger-account-statements.d.ts +455 -461
  183. package/resources/ledger-account-statements.js +26 -32
  184. package/resources/ledger-account-statements.js.map +1 -1
  185. package/resources/ledger-account-statements.mjs +23 -27
  186. package/resources/ledger-account-statements.mjs.map +1 -1
  187. package/resources/ledger-accounts.d.ts +347 -357
  188. package/resources/ledger-accounts.js +45 -48
  189. package/resources/ledger-accounts.js.map +1 -1
  190. package/resources/ledger-accounts.mjs +40 -43
  191. package/resources/ledger-accounts.mjs.map +1 -1
  192. package/resources/ledger-entries.d.ts +244 -250
  193. package/resources/ledger-entries.js +20 -18
  194. package/resources/ledger-entries.mjs +15 -13
  195. package/resources/ledger-event-handlers.d.ts +369 -376
  196. package/resources/ledger-event-handlers.js +44 -49
  197. package/resources/ledger-event-handlers.js.map +1 -1
  198. package/resources/ledger-event-handlers.mjs +39 -42
  199. package/resources/ledger-event-handlers.mjs.map +1 -1
  200. package/resources/ledger-transactions/index.d.ts +3 -16
  201. package/resources/ledger-transactions/index.js +10 -34
  202. package/resources/ledger-transactions/index.mjs +3 -3
  203. package/resources/ledger-transactions/ledger-transactions.d.ts +335 -389
  204. package/resources/ledger-transactions/ledger-transactions.js +70 -91
  205. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  206. package/resources/ledger-transactions/ledger-transactions.mjs +46 -50
  207. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  208. package/resources/ledger-transactions/versions.d.ts +199 -214
  209. package/resources/ledger-transactions/versions.js +18 -16
  210. package/resources/ledger-transactions/versions.mjs +13 -11
  211. package/resources/ledgerable-events.d.ts +96 -99
  212. package/resources/ledgerable-events.js +27 -33
  213. package/resources/ledgerable-events.js.map +1 -1
  214. package/resources/ledgerable-events.mjs +24 -28
  215. package/resources/ledgerable-events.mjs.map +1 -1
  216. package/resources/ledgers.d.ts +98 -97
  217. package/resources/ledgers.js +46 -49
  218. package/resources/ledgers.js.map +1 -1
  219. package/resources/ledgers.mjs +41 -44
  220. package/resources/ledgers.mjs.map +1 -1
  221. package/resources/line-items.d.ts +78 -101
  222. package/resources/line-items.js +29 -27
  223. package/resources/line-items.mjs +24 -22
  224. package/resources/paper-items.d.ts +91 -93
  225. package/resources/paper-items.js +21 -19
  226. package/resources/paper-items.mjs +16 -14
  227. package/resources/payment-flows.d.ts +132 -138
  228. package/resources/payment-flows.js +49 -57
  229. package/resources/payment-flows.js.map +1 -1
  230. package/resources/payment-flows.mjs +44 -52
  231. package/resources/payment-flows.mjs.map +1 -1
  232. package/resources/payment-orders/index.d.ts +3 -13
  233. package/resources/payment-orders/index.js +9 -29
  234. package/resources/payment-orders/index.mjs +3 -3
  235. package/resources/payment-orders/payment-orders.d.ts +1416 -1696
  236. package/resources/payment-orders/payment-orders.js +80 -109
  237. package/resources/payment-orders/payment-orders.js.map +1 -1
  238. package/resources/payment-orders/payment-orders.mjs +55 -67
  239. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  240. package/resources/payment-orders/reversals.d.ts +153 -183
  241. package/resources/payment-orders/reversals.js +38 -41
  242. package/resources/payment-orders/reversals.js.map +1 -1
  243. package/resources/payment-orders/reversals.mjs +33 -36
  244. package/resources/payment-orders/reversals.mjs.map +1 -1
  245. package/resources/payment-references.d.ts +61 -118
  246. package/resources/payment-references.js +26 -26
  247. package/resources/payment-references.mjs +21 -19
  248. package/resources/returns.d.ts +167 -324
  249. package/resources/returns.js +35 -38
  250. package/resources/returns.js.map +1 -1
  251. package/resources/returns.mjs +30 -33
  252. package/resources/returns.mjs.map +1 -1
  253. package/resources/routing-details.d.ts +83 -173
  254. package/resources/routing-details.js +47 -50
  255. package/resources/routing-details.js.map +1 -1
  256. package/resources/routing-details.mjs +42 -45
  257. package/resources/routing-details.mjs.map +1 -1
  258. package/resources/shared.d.ts +4 -194
  259. package/resources/shared.js +3 -3
  260. package/resources/shared.mjs +1 -1
  261. package/resources/top-level.d.ts +4 -4
  262. package/resources/top-level.js +5 -4
  263. package/resources/top-level.mjs +3 -2
  264. package/resources/transactions/index.d.ts +3 -14
  265. package/resources/transactions/index.js +10 -34
  266. package/resources/transactions/index.mjs +3 -3
  267. package/resources/transactions/line-items.d.ts +69 -78
  268. package/resources/transactions/line-items.js +21 -19
  269. package/resources/transactions/line-items.mjs +16 -14
  270. package/resources/transactions/transactions.d.ts +163 -211
  271. package/resources/transactions/transactions.js +51 -67
  272. package/resources/transactions/transactions.mjs +27 -26
  273. package/resources/validations.d.ts +67 -111
  274. package/resources/validations.js +13 -12
  275. package/resources/validations.mjs +10 -9
  276. package/resources/virtual-accounts.d.ts +161 -201
  277. package/resources/virtual-accounts.js +46 -51
  278. package/resources/virtual-accounts.js.map +1 -1
  279. package/resources/virtual-accounts.mjs +41 -44
  280. package/resources/virtual-accounts.mjs.map +1 -1
  281. package/resources/webhooks.d.ts +21 -28
  282. package/resources/webhooks.js +35 -37
  283. package/resources/webhooks.js.map +1 -1
  284. package/resources/webhooks.mjs +30 -31
  285. package/resources/webhooks.mjs.map +1 -1
  286. package/shims/node.d.ts +29 -0
  287. package/shims/node.d.ts.map +1 -0
  288. package/shims/node.js +31 -0
  289. package/shims/node.js.map +1 -0
  290. package/shims/node.mjs +5 -0
  291. package/shims/node.mjs.map +1 -0
  292. package/shims/web.d.ts +26 -0
  293. package/shims/web.d.ts.map +1 -0
  294. package/shims/web.js +31 -0
  295. package/shims/web.js.map +1 -0
  296. package/shims/web.mjs +5 -0
  297. package/shims/web.mjs.map +1 -0
  298. package/src/_shims/MultipartBody.ts +9 -0
  299. package/src/_shims/README.md +46 -0
  300. package/src/_shims/auto/runtime-bun.ts +4 -0
  301. package/src/_shims/auto/runtime-node.ts +4 -0
  302. package/src/_shims/auto/runtime.ts +4 -0
  303. package/src/_shims/auto/types-node.ts +4 -0
  304. package/src/_shims/auto/types.d.ts +99 -0
  305. package/src/_shims/auto/types.js +3 -0
  306. package/src/_shims/auto/types.mjs +3 -0
  307. package/src/_shims/bun-runtime.ts +14 -0
  308. package/src/_shims/index.d.ts +79 -0
  309. package/src/_shims/index.js +13 -0
  310. package/src/_shims/index.mjs +7 -0
  311. package/src/_shims/manual-types.d.ts +12 -0
  312. package/src/_shims/manual-types.js +3 -0
  313. package/src/_shims/manual-types.mjs +3 -0
  314. package/src/_shims/node-runtime.ts +79 -0
  315. package/src/_shims/node-types.d.ts +42 -0
  316. package/src/_shims/node-types.js +3 -0
  317. package/src/_shims/node-types.mjs +3 -0
  318. package/src/_shims/registry.ts +64 -0
  319. package/src/_shims/web-runtime.ts +91 -0
  320. package/src/_shims/web-types.d.ts +82 -0
  321. package/src/_shims/web-types.js +3 -0
  322. package/src/_shims/web-types.mjs +3 -0
  323. package/src/core.ts +72 -43
  324. package/src/error.ts +4 -2
  325. package/src/index.ts +10 -8
  326. package/src/pagination.ts +1 -1
  327. package/src/resource.ts +1 -1
  328. package/src/resources/account-collection-flows.ts +5 -5
  329. package/src/resources/account-details.ts +6 -6
  330. package/src/resources/connections.ts +5 -5
  331. package/src/resources/counterparties.ts +8 -8
  332. package/src/resources/documents.ts +6 -6
  333. package/src/resources/events.ts +5 -5
  334. package/src/resources/expected-payments.ts +6 -6
  335. package/src/resources/external-accounts.ts +8 -8
  336. package/src/resources/incoming-payment-details.ts +7 -7
  337. package/src/resources/index.ts +34 -40
  338. package/src/resources/internal-accounts/balance-reports.ts +6 -6
  339. package/src/resources/internal-accounts/index.ts +2 -2
  340. package/src/resources/internal-accounts/internal-accounts.ts +10 -10
  341. package/src/resources/invoices/index.ts +2 -2
  342. package/src/resources/invoices/invoices.ts +8 -8
  343. package/src/resources/invoices/line-items.ts +5 -5
  344. package/src/resources/ledger-account-balance-monitors.ts +5 -5
  345. package/src/resources/ledger-account-categories.ts +5 -5
  346. package/src/resources/ledger-account-payouts.ts +5 -5
  347. package/src/resources/ledger-account-statements.ts +3 -3
  348. package/src/resources/ledger-accounts.ts +5 -5
  349. package/src/resources/ledger-entries.ts +5 -5
  350. package/src/resources/ledger-event-handlers.ts +5 -5
  351. package/src/resources/ledger-transactions/index.ts +2 -2
  352. package/src/resources/ledger-transactions/ledger-transactions.ts +7 -7
  353. package/src/resources/ledger-transactions/versions.ts +5 -5
  354. package/src/resources/ledgerable-events.ts +3 -3
  355. package/src/resources/ledgers.ts +5 -5
  356. package/src/resources/line-items.ts +5 -5
  357. package/src/resources/paper-items.ts +6 -6
  358. package/src/resources/payment-flows.ts +5 -5
  359. package/src/resources/payment-orders/index.ts +2 -2
  360. package/src/resources/payment-orders/payment-orders.ts +10 -10
  361. package/src/resources/payment-orders/reversals.ts +5 -5
  362. package/src/resources/payment-references.ts +5 -5
  363. package/src/resources/returns.ts +6 -6
  364. package/src/resources/routing-details.ts +6 -6
  365. package/src/resources/top-level.ts +1 -1
  366. package/src/resources/transactions/index.ts +2 -7
  367. package/src/resources/transactions/line-items.ts +5 -5
  368. package/src/resources/transactions/transactions.ts +7 -7
  369. package/src/resources/validations.ts +3 -3
  370. package/src/resources/virtual-accounts.ts +7 -7
  371. package/src/resources/webhooks.ts +3 -3
  372. package/src/shims/node.ts +50 -0
  373. package/src/shims/web.ts +50 -0
  374. package/src/uploads.ts +12 -16
  375. package/src/version.ts +1 -1
  376. package/uploads.d.ts +23 -39
  377. package/uploads.d.ts.map +1 -1
  378. package/uploads.js +111 -157
  379. package/uploads.js.map +1 -1
  380. package/uploads.mjs +107 -133
  381. package/uploads.mjs.map +1 -1
  382. package/version.d.ts +2 -2
  383. package/version.js +4 -4
  384. package/version.mjs +2 -2
  385. package/_shims/ReadableStream-node.d.ts +0 -6
  386. package/_shims/ReadableStream-node.d.ts.map +0 -1
  387. package/_shims/ReadableStream-node.js +0 -14
  388. package/_shims/ReadableStream-node.js.map +0 -1
  389. package/_shims/ReadableStream-node.mjs +0 -3
  390. package/_shims/ReadableStream-node.mjs.map +0 -1
  391. package/_shims/ReadableStream.d.ts +0 -38
  392. package/_shims/ReadableStream.mjs +0 -7
  393. package/_shims/agent-node.d.ts +0 -7
  394. package/_shims/agent-node.d.ts.map +0 -1
  395. package/_shims/agent-node.js +0 -28
  396. package/_shims/agent-node.js.map +0 -1
  397. package/_shims/agent-node.mjs +0 -16
  398. package/_shims/agent-node.mjs.map +0 -1
  399. package/_shims/agent.d.ts +0 -9
  400. package/_shims/agent.d.ts.map +0 -1
  401. package/_shims/agent.js +0 -14
  402. package/_shims/agent.js.map +0 -1
  403. package/_shims/agent.mjs +0 -10
  404. package/_shims/agent.mjs.map +0 -1
  405. package/_shims/fetch-node.d.ts +0 -64
  406. package/_shims/fetch-node.js +0 -12
  407. package/_shims/fetch-node.mjs +0 -14
  408. package/_shims/fetch.d.ts +0 -60
  409. package/_shims/fetch.js +0 -13
  410. package/_shims/fetch.mjs +0 -15
  411. package/_shims/fileFromPath-node.d.ts +0 -17
  412. package/_shims/fileFromPath-node.d.ts.map +0 -1
  413. package/_shims/fileFromPath-node.js +0 -17
  414. package/_shims/fileFromPath-node.js.map +0 -1
  415. package/_shims/fileFromPath-node.mjs +0 -13
  416. package/_shims/fileFromPath-node.mjs.map +0 -1
  417. package/_shims/fileFromPath.d.ts +0 -22
  418. package/_shims/fileFromPath.d.ts.map +0 -1
  419. package/_shims/fileFromPath.js +0 -16
  420. package/_shims/fileFromPath.js.map +0 -1
  421. package/_shims/fileFromPath.mjs +0 -12
  422. package/_shims/fileFromPath.mjs.map +0 -1
  423. package/_shims/form-data-node.d.ts +0 -45
  424. package/_shims/form-data-node.js +0 -11
  425. package/_shims/form-data-node.mjs +0 -9
  426. package/_shims/form-data.d.ts +0 -43
  427. package/_shims/form-data.js +0 -17
  428. package/_shims/form-data.mjs +0 -20
  429. package/_shims/getMultipartRequestOptions-node.d.ts +0 -10
  430. package/_shims/getMultipartRequestOptions-node.d.ts.map +0 -1
  431. package/_shims/getMultipartRequestOptions-node.js +0 -22
  432. package/_shims/getMultipartRequestOptions-node.js.map +0 -1
  433. package/_shims/getMultipartRequestOptions-node.mjs +0 -18
  434. package/_shims/getMultipartRequestOptions-node.mjs.map +0 -1
  435. package/_shims/getMultipartRequestOptions.d.ts +0 -10
  436. package/_shims/getMultipartRequestOptions.d.ts.map +0 -1
  437. package/_shims/getMultipartRequestOptions.js +0 -12
  438. package/_shims/getMultipartRequestOptions.js.map +0 -1
  439. package/_shims/getMultipartRequestOptions.mjs +0 -8
  440. package/_shims/getMultipartRequestOptions.mjs.map +0 -1
  441. package/_shims/node-readable-node.d.ts +0 -8
  442. package/_shims/node-readable-node.d.ts.map +0 -1
  443. package/_shims/node-readable-node.js +0 -9
  444. package/_shims/node-readable-node.js.map +0 -1
  445. package/_shims/node-readable-node.mjs +0 -5
  446. package/_shims/node-readable-node.mjs.map +0 -1
  447. package/_shims/node-readable.d.ts +0 -23
  448. package/_shims/node-readable.d.ts.map +0 -1
  449. package/_shims/node-readable.js +0 -11
  450. package/_shims/node-readable.js.map +0 -1
  451. package/_shims/node-readable.mjs +0 -7
  452. package/_shims/node-readable.mjs.map +0 -1
  453. package/src/_shims/ReadableStream.d.ts +0 -38
  454. package/src/_shims/ReadableStream.mjs +0 -7
  455. package/src/_shims/agent-node.ts +0 -22
  456. package/src/_shims/agent.ts +0 -12
  457. package/src/_shims/fetch-node.d.ts +0 -64
  458. package/src/_shims/fetch-node.js +0 -12
  459. package/src/_shims/fetch-node.mjs +0 -14
  460. package/src/_shims/fetch.d.ts +0 -60
  461. package/src/_shims/fetch.js +0 -13
  462. package/src/_shims/fetch.mjs +0 -15
  463. package/src/_shims/fileFromPath-node.ts +0 -29
  464. package/src/_shims/fileFromPath.ts +0 -29
  465. package/src/_shims/form-data-node.d.ts +0 -45
  466. package/src/_shims/form-data-node.js +0 -11
  467. package/src/_shims/form-data-node.mjs +0 -9
  468. package/src/_shims/form-data.d.ts +0 -43
  469. package/src/_shims/form-data.js +0 -17
  470. package/src/_shims/form-data.mjs +0 -20
  471. package/src/_shims/getMultipartRequestOptions-node.ts +0 -25
  472. package/src/_shims/getMultipartRequestOptions.ts +0 -14
  473. package/src/_shims/node-readable-node.ts +0 -10
  474. package/src/_shims/node-readable.ts +0 -30
@@ -3,343 +3,268 @@ import { APIResource } from 'modern-treasury/resource';
3
3
  import * as Shared from 'modern-treasury/resources/shared';
4
4
  import * as Returns from 'modern-treasury/resources/returns';
5
5
  import * as ExternalAccounts from 'modern-treasury/resources/external-accounts';
6
- import { Reversals } from './reversals.js';
7
- import * as API from './index.js';
6
+ import { Reversals } from "./reversals.js";
7
+ import * as API from "./index.js";
8
8
  import { type Uploadable } from 'modern-treasury/core';
9
9
  import { Page, PageParams } from 'modern-treasury/pagination';
10
10
  export declare class PaymentOrders extends APIResource {
11
- reversals: Reversals;
12
- /**
13
- * Create a new Payment Order
14
- */
15
- create(params: PaymentOrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
16
- /**
17
- * Get details on a single payment order
18
- */
19
- retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
20
- /**
21
- * Update a payment order
22
- */
23
- update(
24
- id: string,
25
- body?: PaymentOrderUpdateParams,
26
- options?: Core.RequestOptions,
27
- ): Core.APIPromise<PaymentOrder>;
28
- update(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
29
- /**
30
- * Get a list of all payment orders
31
- */
32
- list(
33
- query?: PaymentOrderListParams,
34
- options?: Core.RequestOptions,
35
- ): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
36
- list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
37
- /**
38
- * Create a new payment order asynchronously
39
- */
40
- createAsync(
41
- params: PaymentOrderCreateAsyncParams,
42
- options?: Core.RequestOptions,
43
- ): Core.APIPromise<Shared.AsyncResponse>;
11
+ reversals: Reversals;
12
+ /**
13
+ * Create a new Payment Order
14
+ */
15
+ create(params: PaymentOrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
16
+ /**
17
+ * Get details on a single payment order
18
+ */
19
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
20
+ /**
21
+ * Update a payment order
22
+ */
23
+ update(id: string, body?: PaymentOrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
24
+ update(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
25
+ /**
26
+ * Get a list of all payment orders
27
+ */
28
+ list(query?: PaymentOrderListParams, options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
29
+ list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
30
+ /**
31
+ * Create a new payment order asynchronously
32
+ */
33
+ createAsync(params: PaymentOrderCreateAsyncParams, options?: Core.RequestOptions): Core.APIPromise<Shared.AsyncResponse>;
34
+ }
35
+ export declare class PaymentOrdersPage extends Page<PaymentOrder> {
44
36
  }
45
- export declare class PaymentOrdersPage extends Page<PaymentOrder> {}
46
37
  type _PaymentOrdersPage = PaymentOrdersPage;
47
38
  export interface PaymentOrder {
48
- id: string;
49
- accounting: PaymentOrder.Accounting;
50
- /**
51
- * The ID of one of your accounting categories. Note that these will only be
52
- * accessible if your accounting system has been connected.
53
- */
54
- accounting_category_id: string | null;
55
- /**
56
- * The ID of one of your accounting ledger classes. Note that these will only be
57
- * accessible if your accounting system has been connected.
58
- */
59
- accounting_ledger_class_id: string | null;
60
- /**
61
- * Value in specified currency's smallest unit. e.g. $10 would be represented as
62
- * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
63
- */
64
- amount: number;
65
- /**
66
- * The party that will pay the fees for the payment order. Only applies to wire
67
- * payment orders. Can be one of shared, sender, or receiver, which correspond
68
- * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
69
- */
70
- charge_bearer: 'shared' | 'sender' | 'receiver' | null;
71
- /**
72
- * Custom key-value pair for usage in compliance rules. Please contact support
73
- * before making changes to this field.
74
- */
75
- compliance_rule_metadata: Record<string, unknown> | null;
76
- /**
77
- * If the payment order is tied to a specific Counterparty, their id will appear,
78
- * otherwise `null`.
79
- */
80
- counterparty_id: string | null;
81
- created_at: string;
82
- /**
83
- * Defaults to the currency of the originating account.
84
- */
85
- currency: Shared.Currency | null;
86
- /**
87
- * If the payment order's status is `returned`, this will include the return
88
- * object's data.
89
- */
90
- current_return: Returns.ReturnObject | null;
91
- /**
92
- * The ID of the compliance decision for the payment order, if transaction
93
- * monitoring is enabled.
94
- */
95
- decision_id: string | null;
96
- /**
97
- * An optional description for internal use.
98
- */
99
- description: string | null;
100
- /**
101
- * One of `credit`, `debit`. Describes the direction money is flowing in the
102
- * transaction. A `credit` moves money from your account to someone else's. A
103
- * `debit` pulls money from someone else's account to your own. Note that wire,
104
- * rtp, and check payments will always be `credit`.
105
- */
106
- direction: 'credit' | 'debit';
107
- /**
108
- * Date transactions are to be posted to the participants' account. Defaults to the
109
- * current business day or the next business day if the current day is a bank
110
- * holiday or weekend. Format: yyyy-mm-dd.
111
- */
112
- effective_date: string;
113
- /**
114
- * RFP payments require an expires_at. This value must be past the effective_date.
115
- */
116
- expires_at: string | null;
117
- /**
118
- * If present, indicates a specific foreign exchange contract number that has been
119
- * generated by your financial institution.
120
- */
121
- foreign_exchange_contract: string | null;
122
- /**
123
- * Indicates the type of FX transfer to initiate, can be either
124
- * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
125
- * currency matches the originating account currency.
126
- */
127
- foreign_exchange_indicator: 'fixed_to_variable' | 'variable_to_fixed' | null;
128
- /**
129
- * The ID of the ledger transaction linked to the payment order.
130
- */
131
- ledger_transaction_id: string | null;
132
- /**
133
- * This field will be true if this object exists in the live environment or false
134
- * if it exists in the test environment.
135
- */
136
- live_mode: boolean;
137
- /**
138
- * Additional data represented as key-value pairs. Both the key and value must be
139
- * strings.
140
- */
141
- metadata: Record<string, string>;
142
- /**
143
- * A boolean to determine if NSF Protection is enabled for this payment order. Note
144
- * that this setting must also be turned on in your organization settings page.
145
- */
146
- nsf_protected: boolean;
147
- object: string;
148
- /**
149
- * The ID of one of your organization's internal accounts.
150
- */
151
- originating_account_id: string;
152
- /**
153
- * If present, this will replace your default company name on receiver's bank
154
- * statement. This field can only be used for ACH payments currently. For ACH, only
155
- * the first 16 characters of this string will be used. Any additional characters
156
- * will be truncated.
157
- */
158
- originating_party_name: string | null;
159
- /**
160
- * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
161
- * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
162
- * an overnight check rather than standard mail.
163
- */
164
- priority: 'high' | 'normal';
165
- /**
166
- * For `wire`, this is usually the purpose which is transmitted via the
167
- * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
168
- * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
169
- * CPA Code that will be attached to the payment.
170
- */
171
- purpose: string | null;
172
- /**
173
- * The receiving account ID. Can be an `external_account` or `internal_account`.
174
- */
175
- receiving_account_id: string;
176
- receiving_account_type: 'internal_account' | 'external_account';
177
- reference_numbers: Array<PaymentOrder.ReferenceNumber>;
178
- /**
179
- * For `ach`, this field will be passed through on an addenda record. For `wire`
180
- * payments the field will be passed through as the "Originator to Beneficiary
181
- * Information", also known as OBI or Fedwire tag 6000.
182
- */
183
- remittance_information: string | null;
184
- /**
185
- * Send an email to the counterparty when the payment order is sent to the bank. If
186
- * `null`, `send_remittance_advice` on the Counterparty is used.
187
- */
188
- send_remittance_advice: boolean | null;
189
- /**
190
- * An optional descriptor which will appear in the receiver's statement. For
191
- * `check` payments this field will be used as the memo line. For `ach` the maximum
192
- * length is 10 characters. Note that for ACH payments, the name on your bank
193
- * account will be included automatically by the bank, so you can use the
194
- * characters for other useful information. For `eft` the maximum length is 15
195
- * characters.
196
- */
197
- statement_descriptor: string | null;
198
- /**
199
- * The current status of the payment order.
200
- */
201
- status:
202
- | 'approved'
203
- | 'cancelled'
204
- | 'completed'
205
- | 'denied'
206
- | 'failed'
207
- | 'needs_approval'
208
- | 'pending'
209
- | 'processing'
210
- | 'returned'
211
- | 'reversed'
212
- | 'sent';
213
- /**
214
- * An additional layer of classification for the type of payment order you are
215
- * doing. This field is only used for `ach` payment orders currently. For `ach`
216
- * payment orders, the `subtype` represents the SEC code. We currently support
217
- * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
218
- */
219
- subtype: PaymentOrderSubtype | null;
220
- /**
221
- * The IDs of all the transactions associated to this payment order. Usually, you
222
- * will only have a single transaction ID. However, if a payment order initially
223
- * results in a Return, but gets redrafted and is later successfully completed, it
224
- * can have many transactions.
225
- */
226
- transaction_ids: Array<string>;
227
- /**
228
- * A flag that determines whether a payment order should go through transaction
229
- * monitoring.
230
- */
231
- transaction_monitoring_enabled: boolean;
232
- /**
233
- * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
234
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
235
- * `zengin`.
236
- */
237
- type: PaymentOrderType;
238
- /**
239
- * Identifier of the ultimate originator of the payment order.
240
- */
241
- ultimate_originating_party_identifier: string | null;
242
- /**
243
- * Name of the ultimate originator of the payment order.
244
- */
245
- ultimate_originating_party_name: string | null;
246
- ultimate_receiving_party_identifier: string | null;
247
- ultimate_receiving_party_name: string | null;
248
- updated_at: string;
249
- /**
250
- * This field will be populated if a vendor (e.g. Currencycloud) failure occurs.
251
- * Logic shouldn't be built on its value as it is free-form.
252
- */
253
- vendor_failure_reason: string | null;
254
- }
255
- export declare namespace PaymentOrder {
256
- interface Accounting {
39
+ id: string;
40
+ accounting: PaymentOrder.Accounting;
257
41
  /**
258
42
  * The ID of one of your accounting categories. Note that these will only be
259
43
  * accessible if your accounting system has been connected.
260
44
  */
261
- account_id?: string | null;
45
+ accounting_category_id: string | null;
262
46
  /**
263
- * The ID of one of the class objects in your accounting system. Class objects
264
- * track segments of your business independent of client or project. Note that
265
- * these will only be accessible if your accounting system has been connected.
47
+ * The ID of one of your accounting ledger classes. Note that these will only be
48
+ * accessible if your accounting system has been connected.
266
49
  */
267
- class_id?: string | null;
268
- }
269
- interface ReferenceNumber {
270
- id: string;
50
+ accounting_ledger_class_id: string | null;
51
+ /**
52
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
53
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
54
+ */
55
+ amount: number;
56
+ /**
57
+ * The party that will pay the fees for the payment order. Only applies to wire
58
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
59
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
60
+ */
61
+ charge_bearer: 'shared' | 'sender' | 'receiver' | null;
62
+ /**
63
+ * Custom key-value pair for usage in compliance rules. Please contact support
64
+ * before making changes to this field.
65
+ */
66
+ compliance_rule_metadata: Record<string, unknown> | null;
67
+ /**
68
+ * If the payment order is tied to a specific Counterparty, their id will appear,
69
+ * otherwise `null`.
70
+ */
71
+ counterparty_id: string | null;
271
72
  created_at: string;
73
+ /**
74
+ * Defaults to the currency of the originating account.
75
+ */
76
+ currency: Shared.Currency | null;
77
+ /**
78
+ * If the payment order's status is `returned`, this will include the return
79
+ * object's data.
80
+ */
81
+ current_return: Returns.ReturnObject | null;
82
+ /**
83
+ * The ID of the compliance decision for the payment order, if transaction
84
+ * monitoring is enabled.
85
+ */
86
+ decision_id: string | null;
87
+ /**
88
+ * An optional description for internal use.
89
+ */
90
+ description: string | null;
91
+ /**
92
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
93
+ * transaction. A `credit` moves money from your account to someone else's. A
94
+ * `debit` pulls money from someone else's account to your own. Note that wire,
95
+ * rtp, and check payments will always be `credit`.
96
+ */
97
+ direction: 'credit' | 'debit';
98
+ /**
99
+ * Date transactions are to be posted to the participants' account. Defaults to the
100
+ * current business day or the next business day if the current day is a bank
101
+ * holiday or weekend. Format: yyyy-mm-dd.
102
+ */
103
+ effective_date: string;
104
+ /**
105
+ * RFP payments require an expires_at. This value must be past the effective_date.
106
+ */
107
+ expires_at: string | null;
108
+ /**
109
+ * If present, indicates a specific foreign exchange contract number that has been
110
+ * generated by your financial institution.
111
+ */
112
+ foreign_exchange_contract: string | null;
113
+ /**
114
+ * Indicates the type of FX transfer to initiate, can be either
115
+ * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
116
+ * currency matches the originating account currency.
117
+ */
118
+ foreign_exchange_indicator: 'fixed_to_variable' | 'variable_to_fixed' | null;
119
+ /**
120
+ * The ID of the ledger transaction linked to the payment order.
121
+ */
122
+ ledger_transaction_id: string | null;
272
123
  /**
273
124
  * This field will be true if this object exists in the live environment or false
274
125
  * if it exists in the test environment.
275
126
  */
276
127
  live_mode: boolean;
128
+ /**
129
+ * Additional data represented as key-value pairs. Both the key and value must be
130
+ * strings.
131
+ */
132
+ metadata: Record<string, string>;
133
+ /**
134
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
135
+ * that this setting must also be turned on in your organization settings page.
136
+ */
137
+ nsf_protected: boolean;
277
138
  object: string;
278
139
  /**
279
- * The vendor reference number.
280
- */
281
- reference_number: string;
282
- /**
283
- * The type of the reference number. Referring to the vendor payment id.
284
- */
285
- reference_number_type:
286
- | 'ach_original_trace_number'
287
- | 'ach_trace_number'
288
- | 'bankprov_payment_activity_date'
289
- | 'bankprov_payment_id'
290
- | 'bnk_dev_prenotification_id'
291
- | 'bnk_dev_transfer_id'
292
- | 'bofa_end_to_end_id'
293
- | 'bofa_transaction_id'
294
- | 'check_number'
295
- | 'column_fx_quote_id'
296
- | 'column_reversal_pair_transfer_id'
297
- | 'column_transfer_id'
298
- | 'cross_river_payment_id'
299
- | 'cross_river_transaction_id'
300
- | 'currencycloud_conversion_id'
301
- | 'currencycloud_payment_id'
302
- | 'dc_bank_transaction_id'
303
- | 'dwolla_transaction_id'
304
- | 'eft_trace_number'
305
- | 'evolve_transaction_id'
306
- | 'fedwire_imad'
307
- | 'fedwire_omad'
308
- | 'first_republic_internal_id'
309
- | 'goldman_sachs_collection_request_id'
310
- | 'goldman_sachs_end_to_end_id'
311
- | 'goldman_sachs_payment_request_id'
312
- | 'goldman_sachs_request_id'
313
- | 'goldman_sachs_unique_payment_id'
314
- | 'interac_message_id'
315
- | 'jpmc_ccn'
316
- | 'jpmc_customer_reference_id'
317
- | 'jpmc_end_to_end_id'
318
- | 'jpmc_firm_root_id'
319
- | 'jpmc_p3_id'
320
- | 'jpmc_payment_batch_id'
321
- | 'jpmc_payment_information_id'
322
- | 'jpmc_payment_returned_datetime'
323
- | 'lob_check_id'
324
- | 'other'
325
- | 'partial_swift_mir'
326
- | 'pnc_clearing_reference'
327
- | 'pnc_instruction_id'
328
- | 'pnc_multipayment_id'
329
- | 'pnc_payment_trace_id'
330
- | 'rspec_vendor_payment_id'
331
- | 'rtp_instruction_id'
332
- | 'signet_api_reference_id'
333
- | 'signet_confirmation_id'
334
- | 'signet_request_id'
335
- | 'silvergate_payment_id'
336
- | 'swift_mir'
337
- | 'swift_uetr'
338
- | 'usbank_payment_id'
339
- | 'wells_fargo_payment_id'
340
- | 'wells_fargo_trace_number';
140
+ * The ID of one of your organization's internal accounts.
141
+ */
142
+ originating_account_id: string;
143
+ /**
144
+ * If present, this will replace your default company name on receiver's bank
145
+ * statement. This field can only be used for ACH payments currently. For ACH, only
146
+ * the first 16 characters of this string will be used. Any additional characters
147
+ * will be truncated.
148
+ */
149
+ originating_party_name: string | null;
150
+ /**
151
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
152
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
153
+ * an overnight check rather than standard mail.
154
+ */
155
+ priority: 'high' | 'normal';
156
+ /**
157
+ * For `wire`, this is usually the purpose which is transmitted via the
158
+ * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
159
+ * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
160
+ * CPA Code that will be attached to the payment.
161
+ */
162
+ purpose: string | null;
163
+ /**
164
+ * The receiving account ID. Can be an `external_account` or `internal_account`.
165
+ */
166
+ receiving_account_id: string;
167
+ receiving_account_type: 'internal_account' | 'external_account';
168
+ reference_numbers: Array<PaymentOrder.ReferenceNumber>;
169
+ /**
170
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
171
+ * payments the field will be passed through as the "Originator to Beneficiary
172
+ * Information", also known as OBI or Fedwire tag 6000.
173
+ */
174
+ remittance_information: string | null;
175
+ /**
176
+ * Send an email to the counterparty when the payment order is sent to the bank. If
177
+ * `null`, `send_remittance_advice` on the Counterparty is used.
178
+ */
179
+ send_remittance_advice: boolean | null;
180
+ /**
181
+ * An optional descriptor which will appear in the receiver's statement. For
182
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
183
+ * length is 10 characters. Note that for ACH payments, the name on your bank
184
+ * account will be included automatically by the bank, so you can use the
185
+ * characters for other useful information. For `eft` the maximum length is 15
186
+ * characters.
187
+ */
188
+ statement_descriptor: string | null;
189
+ /**
190
+ * The current status of the payment order.
191
+ */
192
+ status: 'approved' | 'cancelled' | 'completed' | 'denied' | 'failed' | 'needs_approval' | 'pending' | 'processing' | 'returned' | 'reversed' | 'sent';
193
+ /**
194
+ * An additional layer of classification for the type of payment order you are
195
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
196
+ * payment orders, the `subtype` represents the SEC code. We currently support
197
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
198
+ */
199
+ subtype: PaymentOrderSubtype | null;
200
+ /**
201
+ * The IDs of all the transactions associated to this payment order. Usually, you
202
+ * will only have a single transaction ID. However, if a payment order initially
203
+ * results in a Return, but gets redrafted and is later successfully completed, it
204
+ * can have many transactions.
205
+ */
206
+ transaction_ids: Array<string>;
207
+ /**
208
+ * A flag that determines whether a payment order should go through transaction
209
+ * monitoring.
210
+ */
211
+ transaction_monitoring_enabled: boolean;
212
+ /**
213
+ * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
214
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
215
+ * `zengin`.
216
+ */
217
+ type: PaymentOrderType;
218
+ /**
219
+ * Identifier of the ultimate originator of the payment order.
220
+ */
221
+ ultimate_originating_party_identifier: string | null;
222
+ /**
223
+ * Name of the ultimate originator of the payment order.
224
+ */
225
+ ultimate_originating_party_name: string | null;
226
+ ultimate_receiving_party_identifier: string | null;
227
+ ultimate_receiving_party_name: string | null;
341
228
  updated_at: string;
342
- }
229
+ /**
230
+ * This field will be populated if a vendor (e.g. Currencycloud) failure occurs.
231
+ * Logic shouldn't be built on its value as it is free-form.
232
+ */
233
+ vendor_failure_reason: string | null;
234
+ }
235
+ export declare namespace PaymentOrder {
236
+ interface Accounting {
237
+ /**
238
+ * The ID of one of your accounting categories. Note that these will only be
239
+ * accessible if your accounting system has been connected.
240
+ */
241
+ account_id?: string | null;
242
+ /**
243
+ * The ID of one of the class objects in your accounting system. Class objects
244
+ * track segments of your business independent of client or project. Note that
245
+ * these will only be accessible if your accounting system has been connected.
246
+ */
247
+ class_id?: string | null;
248
+ }
249
+ interface ReferenceNumber {
250
+ id: string;
251
+ created_at: string;
252
+ /**
253
+ * This field will be true if this object exists in the live environment or false
254
+ * if it exists in the test environment.
255
+ */
256
+ live_mode: boolean;
257
+ object: string;
258
+ /**
259
+ * The vendor reference number.
260
+ */
261
+ reference_number: string;
262
+ /**
263
+ * The type of the reference number. Referring to the vendor payment id.
264
+ */
265
+ reference_number_type: 'ach_original_trace_number' | 'ach_trace_number' | 'bankprov_payment_activity_date' | 'bankprov_payment_id' | 'bnk_dev_prenotification_id' | 'bnk_dev_transfer_id' | 'bofa_end_to_end_id' | 'bofa_transaction_id' | 'check_number' | 'column_fx_quote_id' | 'column_reversal_pair_transfer_id' | 'column_transfer_id' | 'cross_river_payment_id' | 'cross_river_transaction_id' | 'currencycloud_conversion_id' | 'currencycloud_payment_id' | 'dc_bank_transaction_id' | 'dwolla_transaction_id' | 'eft_trace_number' | 'evolve_transaction_id' | 'fedwire_imad' | 'fedwire_omad' | 'first_republic_internal_id' | 'goldman_sachs_collection_request_id' | 'goldman_sachs_end_to_end_id' | 'goldman_sachs_payment_request_id' | 'goldman_sachs_request_id' | 'goldman_sachs_unique_payment_id' | 'interac_message_id' | 'jpmc_ccn' | 'jpmc_customer_reference_id' | 'jpmc_end_to_end_id' | 'jpmc_firm_root_id' | 'jpmc_p3_id' | 'jpmc_payment_batch_id' | 'jpmc_payment_information_id' | 'jpmc_payment_returned_datetime' | 'lob_check_id' | 'other' | 'partial_swift_mir' | 'pnc_clearing_reference' | 'pnc_instruction_id' | 'pnc_multipayment_id' | 'pnc_payment_trace_id' | 'rspec_vendor_payment_id' | 'rtp_instruction_id' | 'signet_api_reference_id' | 'signet_confirmation_id' | 'signet_request_id' | 'silvergate_payment_id' | 'swift_mir' | 'swift_uetr' | 'usbank_payment_id' | 'wells_fargo_payment_id' | 'wells_fargo_trace_number';
266
+ updated_at: string;
267
+ }
343
268
  }
344
269
  /**
345
270
  * An additional layer of classification for the type of payment order you are
@@ -347,1552 +272,1347 @@ export declare namespace PaymentOrder {
347
272
  * payment orders, the `subtype` represents the SEC code. We currently support
348
273
  * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
349
274
  */
350
- export type PaymentOrderSubtype =
351
- | '0C'
352
- | '0N'
353
- | '0S'
354
- | 'CCD'
355
- | 'CIE'
356
- | 'CTX'
357
- | 'IAT'
358
- | 'PPD'
359
- | 'TEL'
360
- | 'WEB'
361
- | null;
275
+ export type PaymentOrderSubtype = '0C' | '0N' | '0S' | 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
362
276
  /**
363
277
  * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
364
278
  * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
365
279
  * `zengin`.
366
280
  */
367
- export type PaymentOrderType =
368
- | 'ach'
369
- | 'au_becs'
370
- | 'bacs'
371
- | 'book'
372
- | 'card'
373
- | 'check'
374
- | 'cross_border'
375
- | 'eft'
376
- | 'interac'
377
- | 'masav'
378
- | 'neft'
379
- | 'nics'
380
- | 'provxchange'
381
- | 'rtp'
382
- | 'se_bankgirot'
383
- | 'sen'
384
- | 'sepa'
385
- | 'sic'
386
- | 'signet'
387
- | 'wire'
388
- | 'zengin';
281
+ export type PaymentOrderType = 'ach' | 'au_becs' | 'bacs' | 'book' | 'card' | 'check' | 'cross_border' | 'eft' | 'interac' | 'masav' | 'neft' | 'nics' | 'provxchange' | 'rtp' | 'se_bankgirot' | 'sen' | 'sepa' | 'sic' | 'signet' | 'wire' | 'zengin';
389
282
  export interface PaymentOrderCreateParams {
390
- /**
391
- * Value in specified currency's smallest unit. e.g. $10 would be represented as
392
- * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
393
- */
394
- amount: number;
395
- /**
396
- * One of `credit`, `debit`. Describes the direction money is flowing in the
397
- * transaction. A `credit` moves money from your account to someone else's. A
398
- * `debit` pulls money from someone else's account to your own. Note that wire,
399
- * rtp, and check payments will always be `credit`.
400
- */
401
- direction: 'credit' | 'debit';
402
- /**
403
- * The ID of one of your organization's internal accounts.
404
- */
405
- originating_account_id: string;
406
- /**
407
- * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
408
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
409
- * `zengin`.
410
- */
411
- type: PaymentOrderType;
412
- accounting?: PaymentOrderCreateParams.Accounting;
413
- /**
414
- * The ID of one of your accounting categories. Note that these will only be
415
- * accessible if your accounting system has been connected.
416
- */
417
- accounting_category_id?: string | null;
418
- /**
419
- * The ID of one of your accounting ledger classes. Note that these will only be
420
- * accessible if your accounting system has been connected.
421
- */
422
- accounting_ledger_class_id?: string | null;
423
- /**
424
- * The party that will pay the fees for the payment order. Only applies to wire
425
- * payment orders. Can be one of shared, sender, or receiver, which correspond
426
- * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
427
- */
428
- charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
429
- /**
430
- * Defaults to the currency of the originating account.
431
- */
432
- currency?: Shared.Currency | null;
433
- /**
434
- * An optional description for internal use.
435
- */
436
- description?: string | null;
437
- /**
438
- * An array of documents to be attached to the payment order. Note that if you
439
- * attach documents, the request's content type must be `multipart/form-data`.
440
- */
441
- documents?: Array<PaymentOrderCreateParams.Document>;
442
- /**
443
- * Date transactions are to be posted to the participants' account. Defaults to the
444
- * current business day or the next business day if the current day is a bank
445
- * holiday or weekend. Format: yyyy-mm-dd.
446
- */
447
- effective_date?: string;
448
- /**
449
- * RFP payments require an expires_at. This value must be past the effective_date.
450
- */
451
- expires_at?: string | null;
452
- /**
453
- * A payment type to fallback to if the original type is not valid for the
454
- * receiving account. Currently, this only supports falling back from RTP to ACH
455
- * (type=rtp and fallback_type=ach)
456
- */
457
- fallback_type?: 'ach';
458
- /**
459
- * If present, indicates a specific foreign exchange contract number that has been
460
- * generated by your financial institution.
461
- */
462
- foreign_exchange_contract?: string | null;
463
- /**
464
- * Indicates the type of FX transfer to initiate, can be either
465
- * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
466
- * currency matches the originating account currency.
467
- */
468
- foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
469
- /**
470
- * Specifies a ledger transaction object that will be created with the payment
471
- * order. If the ledger transaction cannot be created, then the payment order
472
- * creation will fail. The resulting ledger transaction will mirror the status of
473
- * the payment order.
474
- */
475
- ledger_transaction?: PaymentOrderCreateParams.LedgerTransaction;
476
- /**
477
- * An array of line items that must sum up to the amount of the payment order.
478
- */
479
- line_items?: Array<PaymentOrderCreateParams.LineItem>;
480
- /**
481
- * Additional data represented as key-value pairs. Both the key and value must be
482
- * strings.
483
- */
484
- metadata?: Record<string, string>;
485
- /**
486
- * A boolean to determine if NSF Protection is enabled for this payment order. Note
487
- * that this setting must also be turned on in your organization settings page.
488
- */
489
- nsf_protected?: boolean;
490
- /**
491
- * If present, this will replace your default company name on receiver's bank
492
- * statement. This field can only be used for ACH payments currently. For ACH, only
493
- * the first 16 characters of this string will be used. Any additional characters
494
- * will be truncated.
495
- */
496
- originating_party_name?: string | null;
497
- /**
498
- * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
499
- * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
500
- * an overnight check rather than standard mail.
501
- */
502
- priority?: 'high' | 'normal';
503
- /**
504
- * For `wire`, this is usually the purpose which is transmitted via the
505
- * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
506
- * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
507
- * CPA Code that will be attached to the payment.
508
- */
509
- purpose?: string | null;
510
- /**
511
- * Either `receiving_account` or `receiving_account_id` must be present. When using
512
- * `receiving_account_id`, you may pass the id of an external account or an
513
- * internal account.
514
- */
515
- receiving_account?: PaymentOrderCreateParams.ReceivingAccount;
516
- /**
517
- * Either `receiving_account` or `receiving_account_id` must be present. When using
518
- * `receiving_account_id`, you may pass the id of an external account or an
519
- * internal account.
520
- */
521
- receiving_account_id?: string;
522
- /**
523
- * For `ach`, this field will be passed through on an addenda record. For `wire`
524
- * payments the field will be passed through as the "Originator to Beneficiary
525
- * Information", also known as OBI or Fedwire tag 6000.
526
- */
527
- remittance_information?: string | null;
528
- /**
529
- * Send an email to the counterparty when the payment order is sent to the bank. If
530
- * `null`, `send_remittance_advice` on the Counterparty is used.
531
- */
532
- send_remittance_advice?: boolean | null;
533
- /**
534
- * An optional descriptor which will appear in the receiver's statement. For
535
- * `check` payments this field will be used as the memo line. For `ach` the maximum
536
- * length is 10 characters. Note that for ACH payments, the name on your bank
537
- * account will be included automatically by the bank, so you can use the
538
- * characters for other useful information. For `eft` the maximum length is 15
539
- * characters.
540
- */
541
- statement_descriptor?: string | null;
542
- /**
543
- * An additional layer of classification for the type of payment order you are
544
- * doing. This field is only used for `ach` payment orders currently. For `ach`
545
- * payment orders, the `subtype` represents the SEC code. We currently support
546
- * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
547
- */
548
- subtype?: PaymentOrderSubtype | null;
549
- /**
550
- * A flag that determines whether a payment order should go through transaction
551
- * monitoring.
552
- */
553
- transaction_monitoring_enabled?: boolean;
554
- /**
555
- * Identifier of the ultimate originator of the payment order.
556
- */
557
- ultimate_originating_party_identifier?: string | null;
558
- /**
559
- * Name of the ultimate originator of the payment order.
560
- */
561
- ultimate_originating_party_name?: string | null;
562
- /**
563
- * Identifier of the ultimate funds recipient.
564
- */
565
- ultimate_receiving_party_identifier?: string | null;
566
- /**
567
- * Name of the ultimate funds recipient.
568
- */
569
- ultimate_receiving_party_name?: string | null;
570
- }
571
- export declare namespace PaymentOrderCreateParams {
572
- interface Accounting {
283
+ /**
284
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
285
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
286
+ */
287
+ amount: number;
288
+ /**
289
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
290
+ * transaction. A `credit` moves money from your account to someone else's. A
291
+ * `debit` pulls money from someone else's account to your own. Note that wire,
292
+ * rtp, and check payments will always be `credit`.
293
+ */
294
+ direction: 'credit' | 'debit';
295
+ /**
296
+ * The ID of one of your organization's internal accounts.
297
+ */
298
+ originating_account_id: string;
299
+ /**
300
+ * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
301
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
302
+ * `zengin`.
303
+ */
304
+ type: PaymentOrderType;
305
+ accounting?: PaymentOrderCreateParams.Accounting;
573
306
  /**
574
307
  * The ID of one of your accounting categories. Note that these will only be
575
308
  * accessible if your accounting system has been connected.
576
309
  */
577
- account_id?: string | null;
578
- /**
579
- * The ID of one of the class objects in your accounting system. Class objects
580
- * track segments of your business independent of client or project. Note that
581
- * these will only be accessible if your accounting system has been connected.
582
- */
583
- class_id?: string | null;
584
- }
585
- interface Document {
586
- /**
587
- * The unique identifier for the associated object.
588
- */
589
- documentable_id: string;
590
- documentable_type:
591
- | 'cases'
592
- | 'counterparties'
593
- | 'expected_payments'
594
- | 'external_accounts'
595
- | 'internal_accounts'
596
- | 'organizations'
597
- | 'paper_items'
598
- | 'payment_orders'
599
- | 'transactions'
600
- | 'decisions'
601
- | 'connections';
602
- file: Uploadable;
603
- /**
604
- * A category given to the document, can be `null`.
605
- */
606
- document_type?: string;
607
- }
608
- /**
609
- * Specifies a ledger transaction object that will be created with the payment
610
- * order. If the ledger transaction cannot be created, then the payment order
611
- * creation will fail. The resulting ledger transaction will mirror the status of
612
- * the payment order.
613
- */
614
- interface LedgerTransaction {
615
- /**
616
- * An array of ledger entry objects.
617
- */
618
- ledger_entries: Array<LedgerTransaction.LedgerEntry>;
310
+ accounting_category_id?: string | null;
311
+ /**
312
+ * The ID of one of your accounting ledger classes. Note that these will only be
313
+ * accessible if your accounting system has been connected.
314
+ */
315
+ accounting_ledger_class_id?: string | null;
316
+ /**
317
+ * The party that will pay the fees for the payment order. Only applies to wire
318
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
319
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
320
+ */
321
+ charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
322
+ /**
323
+ * Defaults to the currency of the originating account.
324
+ */
325
+ currency?: Shared.Currency | null;
619
326
  /**
620
327
  * An optional description for internal use.
621
328
  */
622
329
  description?: string | null;
623
330
  /**
624
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
625
- * reporting purposes.
331
+ * An array of documents to be attached to the payment order. Note that if you
332
+ * attach documents, the request's content type must be `multipart/form-data`.
626
333
  */
627
- effective_at?: string;
334
+ documents?: Array<PaymentOrderCreateParams.Document>;
628
335
  /**
629
- * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
630
- * purposes.
336
+ * Date transactions are to be posted to the participants' account. Defaults to the
337
+ * current business day or the next business day if the current day is a bank
338
+ * holiday or weekend. Format: yyyy-mm-dd.
631
339
  */
632
340
  effective_date?: string;
633
341
  /**
634
- * A unique string to represent the ledger transaction. Only one pending or posted
635
- * ledger transaction may have this ID in the ledger.
342
+ * RFP payments require an expires_at. This value must be past the effective_date.
636
343
  */
637
- external_id?: string;
344
+ expires_at?: string | null;
638
345
  /**
639
- * If the ledger transaction can be reconciled to another object in Modern
640
- * Treasury, the id will be populated here, otherwise null.
346
+ * A payment type to fallback to if the original type is not valid for the
347
+ * receiving account. Currently, this only supports falling back from RTP to ACH
348
+ * (type=rtp and fallback_type=ach)
641
349
  */
642
- ledgerable_id?: string;
350
+ fallback_type?: 'ach';
643
351
  /**
644
- * If the ledger transaction can be reconciled to another object in Modern
645
- * Treasury, the type will be populated here, otherwise null. This can be one of
646
- * payment_order, incoming_payment_detail, expected_payment, return, or reversal.
352
+ * If present, indicates a specific foreign exchange contract number that has been
353
+ * generated by your financial institution.
647
354
  */
648
- ledgerable_type?:
649
- | 'counterparty'
650
- | 'expected_payment'
651
- | 'incoming_payment_detail'
652
- | 'internal_account'
653
- | 'line_item'
654
- | 'paper_item'
655
- | 'payment_order'
656
- | 'payment_order_attempt'
657
- | 'return'
658
- | 'reversal';
355
+ foreign_exchange_contract?: string | null;
356
+ /**
357
+ * Indicates the type of FX transfer to initiate, can be either
358
+ * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
359
+ * currency matches the originating account currency.
360
+ */
361
+ foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
362
+ /**
363
+ * Specifies a ledger transaction object that will be created with the payment
364
+ * order. If the ledger transaction cannot be created, then the payment order
365
+ * creation will fail. The resulting ledger transaction will mirror the status of
366
+ * the payment order.
367
+ */
368
+ ledger_transaction?: PaymentOrderCreateParams.LedgerTransaction;
369
+ /**
370
+ * An array of line items that must sum up to the amount of the payment order.
371
+ */
372
+ line_items?: Array<PaymentOrderCreateParams.LineItem>;
659
373
  /**
660
374
  * Additional data represented as key-value pairs. Both the key and value must be
661
375
  * strings.
662
376
  */
663
377
  metadata?: Record<string, string>;
664
378
  /**
665
- * To post a ledger transaction at creation, use `posted`.
666
- */
667
- status?: 'archived' | 'pending' | 'posted';
668
- }
669
- namespace LedgerTransaction {
670
- interface LedgerEntry {
671
- /**
672
- * Value in specified currency's smallest unit. e.g. $10 would be represented
673
- * as 1000. Can be any integer up to 36 digits.
674
- */
675
- amount: number;
676
- /**
677
- * One of `credit`, `debit`. Describes the direction money is flowing in the
678
- * transaction. A `credit` moves money from your account to someone else's. A
679
- * `debit` pulls money from someone else's account to your own. Note that wire,
680
- * rtp, and check payments will always be `credit`.
681
- */
682
- direction: 'credit' | 'debit';
683
- /**
684
- * The ledger account that this ledger entry is associated with.
685
- */
686
- ledger_account_id: string;
687
- /**
688
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
689
- * account’s available balance. If any of these conditions would be false after the
690
- * transaction is created, the entire call will fail with error code 422.
691
- */
692
- available_balance_amount?: Record<string, number> | null;
693
- /**
694
- * Lock version of the ledger account. This can be passed when creating a ledger
695
- * transaction to only succeed if no ledger transactions have posted since the
696
- * given version. See our post about Designing the Ledgers API with Optimistic
697
- * Locking for more details.
698
- */
699
- lock_version?: number | null;
700
- /**
701
- * Additional data represented as key-value pairs. Both the key and value must be
702
- * strings.
703
- */
704
- metadata?: Record<string, string>;
705
- /**
706
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
707
- * account’s pending balance. If any of these conditions would be false after the
708
- * transaction is created, the entire call will fail with error code 422.
709
- */
710
- pending_balance_amount?: Record<string, number> | null;
711
- /**
712
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
713
- * account’s posted balance. If any of these conditions would be false after the
714
- * transaction is created, the entire call will fail with error code 422.
715
- */
716
- posted_balance_amount?: Record<string, number> | null;
717
- /**
718
- * If true, response will include the balance of the associated ledger account for
719
- * the entry.
720
- */
721
- show_resulting_ledger_account_balances?: boolean | null;
722
- }
723
- }
724
- interface LineItem {
379
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
380
+ * that this setting must also be turned on in your organization settings page.
381
+ */
382
+ nsf_protected?: boolean;
725
383
  /**
726
- * Value in specified currency's smallest unit. e.g. $10 would be represented
727
- * as 1000.
384
+ * If present, this will replace your default company name on receiver's bank
385
+ * statement. This field can only be used for ACH payments currently. For ACH, only
386
+ * the first 16 characters of this string will be used. Any additional characters
387
+ * will be truncated.
728
388
  */
729
- amount: number;
389
+ originating_party_name?: string | null;
730
390
  /**
731
- * The ID of one of your accounting categories. Note that these will only be
732
- * accessible if your accounting system has been connected.
391
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
392
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
393
+ * an overnight check rather than standard mail.
733
394
  */
734
- accounting_category_id?: string | null;
395
+ priority?: 'high' | 'normal';
735
396
  /**
736
- * A free-form description of the line item.
397
+ * For `wire`, this is usually the purpose which is transmitted via the
398
+ * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
399
+ * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
400
+ * CPA Code that will be attached to the payment.
737
401
  */
738
- description?: string | null;
402
+ purpose?: string | null;
739
403
  /**
740
- * Additional data represented as key-value pairs. Both the key and value must be
741
- * strings.
404
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
405
+ * `receiving_account_id`, you may pass the id of an external account or an
406
+ * internal account.
742
407
  */
743
- metadata?: Record<string, string>;
744
- }
745
- /**
746
- * Either `receiving_account` or `receiving_account_id` must be present. When using
747
- * `receiving_account_id`, you may pass the id of an external account or an
748
- * internal account.
749
- */
750
- interface ReceivingAccount {
751
- account_details?: Array<ReceivingAccount.AccountDetail>;
408
+ receiving_account?: PaymentOrderCreateParams.ReceivingAccount;
752
409
  /**
753
- * Can be `checking`, `savings` or `other`.
410
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
411
+ * `receiving_account_id`, you may pass the id of an external account or an
412
+ * internal account.
754
413
  */
755
- account_type?: ExternalAccounts.ExternalAccountType;
756
- contact_details?: Array<ReceivingAccount.ContactDetail>;
414
+ receiving_account_id?: string;
757
415
  /**
758
- * Specifies a ledger account object that will be created with the external
759
- * account. The resulting ledger account is linked to the external account for
760
- * auto-ledgering Payment objects. See
761
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
762
- * for more details.
416
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
417
+ * payments the field will be passed through as the "Originator to Beneficiary
418
+ * Information", also known as OBI or Fedwire tag 6000.
763
419
  */
764
- ledger_account?: ReceivingAccount.LedgerAccount;
420
+ remittance_information?: string | null;
765
421
  /**
766
- * Additional data represented as key-value pairs. Both the key and value must be
767
- * strings.
422
+ * Send an email to the counterparty when the payment order is sent to the bank. If
423
+ * `null`, `send_remittance_advice` on the Counterparty is used.
768
424
  */
769
- metadata?: Record<string, string>;
425
+ send_remittance_advice?: boolean | null;
426
+ /**
427
+ * An optional descriptor which will appear in the receiver's statement. For
428
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
429
+ * length is 10 characters. Note that for ACH payments, the name on your bank
430
+ * account will be included automatically by the bank, so you can use the
431
+ * characters for other useful information. For `eft` the maximum length is 15
432
+ * characters.
433
+ */
434
+ statement_descriptor?: string | null;
435
+ /**
436
+ * An additional layer of classification for the type of payment order you are
437
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
438
+ * payment orders, the `subtype` represents the SEC code. We currently support
439
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
440
+ */
441
+ subtype?: PaymentOrderSubtype | null;
770
442
  /**
771
- * A nickname for the external account. This is only for internal usage and won't
772
- * affect any payments
443
+ * A flag that determines whether a payment order should go through transaction
444
+ * monitoring.
773
445
  */
774
- name?: string | null;
446
+ transaction_monitoring_enabled?: boolean;
775
447
  /**
776
- * Required if receiving wire payments.
448
+ * Identifier of the ultimate originator of the payment order.
777
449
  */
778
- party_address?: ReceivingAccount.PartyAddress;
779
- party_identifier?: string;
450
+ ultimate_originating_party_identifier?: string | null;
780
451
  /**
781
- * If this value isn't provided, it will be inherited from the counterparty's name.
452
+ * Name of the ultimate originator of the payment order.
782
453
  */
783
- party_name?: string;
454
+ ultimate_originating_party_name?: string | null;
784
455
  /**
785
- * Either `individual` or `business`.
456
+ * Identifier of the ultimate funds recipient.
786
457
  */
787
- party_type?: 'business' | 'individual' | null;
458
+ ultimate_receiving_party_identifier?: string | null;
788
459
  /**
789
- * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
790
- * you can pass the processor token in this field.
460
+ * Name of the ultimate funds recipient.
791
461
  */
792
- plaid_processor_token?: string;
793
- routing_details?: Array<ReceivingAccount.RoutingDetail>;
794
- }
795
- namespace ReceivingAccount {
796
- interface AccountDetail {
797
- account_number: string;
798
- account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
462
+ ultimate_receiving_party_name?: string | null;
463
+ }
464
+ export declare namespace PaymentOrderCreateParams {
465
+ interface Accounting {
466
+ /**
467
+ * The ID of one of your accounting categories. Note that these will only be
468
+ * accessible if your accounting system has been connected.
469
+ */
470
+ account_id?: string | null;
471
+ /**
472
+ * The ID of one of the class objects in your accounting system. Class objects
473
+ * track segments of your business independent of client or project. Note that
474
+ * these will only be accessible if your accounting system has been connected.
475
+ */
476
+ class_id?: string | null;
799
477
  }
800
- interface ContactDetail {
801
- contact_identifier?: string;
802
- contact_identifier_type?: 'email' | 'phone_number' | 'website';
478
+ interface Document {
479
+ /**
480
+ * The unique identifier for the associated object.
481
+ */
482
+ documentable_id: string;
483
+ documentable_type: 'cases' | 'counterparties' | 'expected_payments' | 'external_accounts' | 'internal_accounts' | 'organizations' | 'paper_items' | 'payment_orders' | 'transactions' | 'decisions' | 'connections';
484
+ file: Uploadable;
485
+ /**
486
+ * A category given to the document, can be `null`.
487
+ */
488
+ document_type?: string;
803
489
  }
804
490
  /**
805
- * Specifies a ledger account object that will be created with the external
806
- * account. The resulting ledger account is linked to the external account for
807
- * auto-ledgering Payment objects. See
808
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
809
- * for more details.
810
- */
811
- interface LedgerAccount {
812
- /**
813
- * The currency of the ledger account.
814
- */
815
- currency: string;
816
- /**
817
- * The id of the ledger that this account belongs to.
818
- */
819
- ledger_id: string;
820
- /**
821
- * The name of the ledger account.
822
- */
823
- name: string;
824
- /**
825
- * The normal balance of the ledger account.
826
- */
827
- normal_balance: 'credit' | 'debit';
828
- /**
829
- * The currency exponent of the ledger account.
830
- */
831
- currency_exponent?: number | null;
832
- /**
833
- * The description of the ledger account.
834
- */
835
- description?: string | null;
836
- /**
837
- * If the ledger account links to another object in Modern Treasury, the id will be
838
- * populated here, otherwise null.
839
- */
840
- ledgerable_id?: string;
841
- /**
842
- * If the ledger account links to another object in Modern Treasury, the type will
843
- * be populated here, otherwise null. The value is one of internal_account or
844
- * external_account.
845
- */
846
- ledgerable_type?: 'external_account' | 'internal_account';
847
- /**
848
- * Additional data represented as key-value pairs. Both the key and value must be
849
- * strings.
850
- */
851
- metadata?: Record<string, string>;
491
+ * Specifies a ledger transaction object that will be created with the payment
492
+ * order. If the ledger transaction cannot be created, then the payment order
493
+ * creation will fail. The resulting ledger transaction will mirror the status of
494
+ * the payment order.
495
+ */
496
+ interface LedgerTransaction {
497
+ /**
498
+ * An array of ledger entry objects.
499
+ */
500
+ ledger_entries: Array<LedgerTransaction.LedgerEntry>;
501
+ /**
502
+ * An optional description for internal use.
503
+ */
504
+ description?: string | null;
505
+ /**
506
+ * The timestamp (ISO8601 format) at which the ledger transaction happened for
507
+ * reporting purposes.
508
+ */
509
+ effective_at?: string;
510
+ /**
511
+ * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
512
+ * purposes.
513
+ */
514
+ effective_date?: string;
515
+ /**
516
+ * A unique string to represent the ledger transaction. Only one pending or posted
517
+ * ledger transaction may have this ID in the ledger.
518
+ */
519
+ external_id?: string;
520
+ /**
521
+ * If the ledger transaction can be reconciled to another object in Modern
522
+ * Treasury, the id will be populated here, otherwise null.
523
+ */
524
+ ledgerable_id?: string;
525
+ /**
526
+ * If the ledger transaction can be reconciled to another object in Modern
527
+ * Treasury, the type will be populated here, otherwise null. This can be one of
528
+ * payment_order, incoming_payment_detail, expected_payment, return, or reversal.
529
+ */
530
+ ledgerable_type?: 'counterparty' | 'expected_payment' | 'incoming_payment_detail' | 'internal_account' | 'line_item' | 'paper_item' | 'payment_order' | 'payment_order_attempt' | 'return' | 'reversal';
531
+ /**
532
+ * Additional data represented as key-value pairs. Both the key and value must be
533
+ * strings.
534
+ */
535
+ metadata?: Record<string, string>;
536
+ /**
537
+ * To post a ledger transaction at creation, use `posted`.
538
+ */
539
+ status?: 'archived' | 'pending' | 'posted';
540
+ }
541
+ namespace LedgerTransaction {
542
+ interface LedgerEntry {
543
+ /**
544
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
545
+ * as 1000. Can be any integer up to 36 digits.
546
+ */
547
+ amount: number;
548
+ /**
549
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
550
+ * transaction. A `credit` moves money from your account to someone else's. A
551
+ * `debit` pulls money from someone else's account to your own. Note that wire,
552
+ * rtp, and check payments will always be `credit`.
553
+ */
554
+ direction: 'credit' | 'debit';
555
+ /**
556
+ * The ledger account that this ledger entry is associated with.
557
+ */
558
+ ledger_account_id: string;
559
+ /**
560
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
561
+ * account’s available balance. If any of these conditions would be false after the
562
+ * transaction is created, the entire call will fail with error code 422.
563
+ */
564
+ available_balance_amount?: Record<string, number> | null;
565
+ /**
566
+ * Lock version of the ledger account. This can be passed when creating a ledger
567
+ * transaction to only succeed if no ledger transactions have posted since the
568
+ * given version. See our post about Designing the Ledgers API with Optimistic
569
+ * Locking for more details.
570
+ */
571
+ lock_version?: number | null;
572
+ /**
573
+ * Additional data represented as key-value pairs. Both the key and value must be
574
+ * strings.
575
+ */
576
+ metadata?: Record<string, string>;
577
+ /**
578
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
579
+ * account’s pending balance. If any of these conditions would be false after the
580
+ * transaction is created, the entire call will fail with error code 422.
581
+ */
582
+ pending_balance_amount?: Record<string, number> | null;
583
+ /**
584
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
585
+ * account’s posted balance. If any of these conditions would be false after the
586
+ * transaction is created, the entire call will fail with error code 422.
587
+ */
588
+ posted_balance_amount?: Record<string, number> | null;
589
+ /**
590
+ * If true, response will include the balance of the associated ledger account for
591
+ * the entry.
592
+ */
593
+ show_resulting_ledger_account_balances?: boolean | null;
594
+ }
595
+ }
596
+ interface LineItem {
597
+ /**
598
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
599
+ * as 1000.
600
+ */
601
+ amount: number;
602
+ /**
603
+ * The ID of one of your accounting categories. Note that these will only be
604
+ * accessible if your accounting system has been connected.
605
+ */
606
+ accounting_category_id?: string | null;
607
+ /**
608
+ * A free-form description of the line item.
609
+ */
610
+ description?: string | null;
611
+ /**
612
+ * Additional data represented as key-value pairs. Both the key and value must be
613
+ * strings.
614
+ */
615
+ metadata?: Record<string, string>;
852
616
  }
853
617
  /**
854
- * Required if receiving wire payments.
855
- */
856
- interface PartyAddress {
857
- /**
858
- * Country code conforms to [ISO 3166-1 alpha-2]
859
- */
860
- country?: string | null;
861
- line1?: string | null;
862
- line2?: string | null;
863
- /**
864
- * Locality or City.
865
- */
866
- locality?: string | null;
867
- /**
868
- * The postal code of the address.
869
- */
870
- postal_code?: string | null;
871
- /**
872
- * Region or State.
873
- */
874
- region?: string | null;
618
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
619
+ * `receiving_account_id`, you may pass the id of an external account or an
620
+ * internal account.
621
+ */
622
+ interface ReceivingAccount {
623
+ account_details?: Array<ReceivingAccount.AccountDetail>;
624
+ /**
625
+ * Can be `checking`, `savings` or `other`.
626
+ */
627
+ account_type?: ExternalAccounts.ExternalAccountType;
628
+ contact_details?: Array<ReceivingAccount.ContactDetail>;
629
+ /**
630
+ * Specifies a ledger account object that will be created with the external
631
+ * account. The resulting ledger account is linked to the external account for
632
+ * auto-ledgering Payment objects. See
633
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
634
+ * for more details.
635
+ */
636
+ ledger_account?: ReceivingAccount.LedgerAccount;
637
+ /**
638
+ * Additional data represented as key-value pairs. Both the key and value must be
639
+ * strings.
640
+ */
641
+ metadata?: Record<string, string>;
642
+ /**
643
+ * A nickname for the external account. This is only for internal usage and won't
644
+ * affect any payments
645
+ */
646
+ name?: string | null;
647
+ /**
648
+ * Required if receiving wire payments.
649
+ */
650
+ party_address?: ReceivingAccount.PartyAddress;
651
+ party_identifier?: string;
652
+ /**
653
+ * If this value isn't provided, it will be inherited from the counterparty's name.
654
+ */
655
+ party_name?: string;
656
+ /**
657
+ * Either `individual` or `business`.
658
+ */
659
+ party_type?: 'business' | 'individual' | null;
660
+ /**
661
+ * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
662
+ * you can pass the processor token in this field.
663
+ */
664
+ plaid_processor_token?: string;
665
+ routing_details?: Array<ReceivingAccount.RoutingDetail>;
875
666
  }
876
- interface RoutingDetail {
877
- routing_number: string;
878
- routing_number_type:
879
- | 'aba'
880
- | 'au_bsb'
881
- | 'se_bankgiro_clearing_code'
882
- | 'br_codigo'
883
- | 'ca_cpa'
884
- | 'chips'
885
- | 'cnaps'
886
- | 'gb_sort_code'
887
- | 'in_ifsc'
888
- | 'my_branch_code'
889
- | 'swift'
890
- | 'jp_zengin_code';
891
- payment_type?:
892
- | 'ach'
893
- | 'au_becs'
894
- | 'se_bankgirot'
895
- | 'bacs'
896
- | 'book'
897
- | 'card'
898
- | 'check'
899
- | 'eft'
900
- | 'cross_border'
901
- | 'interac'
902
- | 'masav'
903
- | 'neft'
904
- | 'nics'
905
- | 'provxchange'
906
- | 'rtp'
907
- | 'sen'
908
- | 'sic'
909
- | 'sepa'
910
- | 'signet'
911
- | 'wire'
912
- | 'zengin';
667
+ namespace ReceivingAccount {
668
+ interface AccountDetail {
669
+ account_number: string;
670
+ account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
671
+ }
672
+ interface ContactDetail {
673
+ contact_identifier?: string;
674
+ contact_identifier_type?: 'email' | 'phone_number' | 'website';
675
+ }
676
+ /**
677
+ * Specifies a ledger account object that will be created with the external
678
+ * account. The resulting ledger account is linked to the external account for
679
+ * auto-ledgering Payment objects. See
680
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
681
+ * for more details.
682
+ */
683
+ interface LedgerAccount {
684
+ /**
685
+ * The currency of the ledger account.
686
+ */
687
+ currency: string;
688
+ /**
689
+ * The id of the ledger that this account belongs to.
690
+ */
691
+ ledger_id: string;
692
+ /**
693
+ * The name of the ledger account.
694
+ */
695
+ name: string;
696
+ /**
697
+ * The normal balance of the ledger account.
698
+ */
699
+ normal_balance: 'credit' | 'debit';
700
+ /**
701
+ * The currency exponent of the ledger account.
702
+ */
703
+ currency_exponent?: number | null;
704
+ /**
705
+ * The description of the ledger account.
706
+ */
707
+ description?: string | null;
708
+ /**
709
+ * If the ledger account links to another object in Modern Treasury, the id will be
710
+ * populated here, otherwise null.
711
+ */
712
+ ledgerable_id?: string;
713
+ /**
714
+ * If the ledger account links to another object in Modern Treasury, the type will
715
+ * be populated here, otherwise null. The value is one of internal_account or
716
+ * external_account.
717
+ */
718
+ ledgerable_type?: 'external_account' | 'internal_account';
719
+ /**
720
+ * Additional data represented as key-value pairs. Both the key and value must be
721
+ * strings.
722
+ */
723
+ metadata?: Record<string, string>;
724
+ }
725
+ /**
726
+ * Required if receiving wire payments.
727
+ */
728
+ interface PartyAddress {
729
+ /**
730
+ * Country code conforms to [ISO 3166-1 alpha-2]
731
+ */
732
+ country?: string | null;
733
+ line1?: string | null;
734
+ line2?: string | null;
735
+ /**
736
+ * Locality or City.
737
+ */
738
+ locality?: string | null;
739
+ /**
740
+ * The postal code of the address.
741
+ */
742
+ postal_code?: string | null;
743
+ /**
744
+ * Region or State.
745
+ */
746
+ region?: string | null;
747
+ }
748
+ interface RoutingDetail {
749
+ routing_number: string;
750
+ routing_number_type: 'aba' | 'au_bsb' | 'se_bankgiro_clearing_code' | 'br_codigo' | 'ca_cpa' | 'chips' | 'cnaps' | 'gb_sort_code' | 'in_ifsc' | 'my_branch_code' | 'swift' | 'jp_zengin_code';
751
+ payment_type?: 'ach' | 'au_becs' | 'se_bankgirot' | 'bacs' | 'book' | 'card' | 'check' | 'eft' | 'cross_border' | 'interac' | 'masav' | 'neft' | 'nics' | 'provxchange' | 'rtp' | 'sen' | 'sic' | 'sepa' | 'signet' | 'wire' | 'zengin';
752
+ }
913
753
  }
914
- }
915
754
  }
916
755
  export interface PaymentOrderUpdateParams {
917
- accounting?: PaymentOrderUpdateParams.Accounting;
918
- /**
919
- * The ID of one of your accounting categories. Note that these will only be
920
- * accessible if your accounting system has been connected.
921
- */
922
- accounting_category_id?: string | null;
923
- /**
924
- * The ID of one of your accounting ledger classes. Note that these will only be
925
- * accessible if your accounting system has been connected.
926
- */
927
- accounting_ledger_class_id?: string | null;
928
- /**
929
- * Value in specified currency's smallest unit. e.g. $10 would be represented as
930
- * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
931
- */
932
- amount?: number;
933
- /**
934
- * The party that will pay the fees for the payment order. Only applies to wire
935
- * payment orders. Can be one of shared, sender, or receiver, which correspond
936
- * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
937
- */
938
- charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
939
- /**
940
- * Required when receiving_account_id is passed the ID of an external account.
941
- */
942
- counterparty_id?: string | null;
943
- /**
944
- * Defaults to the currency of the originating account.
945
- */
946
- currency?: Shared.Currency | null;
947
- /**
948
- * An optional description for internal use.
949
- */
950
- description?: string | null;
951
- /**
952
- * One of `credit`, `debit`. Describes the direction money is flowing in the
953
- * transaction. A `credit` moves money from your account to someone else's. A
954
- * `debit` pulls money from someone else's account to your own. Note that wire,
955
- * rtp, and check payments will always be `credit`.
956
- */
957
- direction?: 'credit' | 'debit';
958
- /**
959
- * Date transactions are to be posted to the participants' account. Defaults to the
960
- * current business day or the next business day if the current day is a bank
961
- * holiday or weekend. Format: yyyy-mm-dd.
962
- */
963
- effective_date?: string;
964
- /**
965
- * RFP payments require an expires_at. This value must be past the effective_date.
966
- */
967
- expires_at?: string | null;
968
- /**
969
- * A payment type to fallback to if the original type is not valid for the
970
- * receiving account. Currently, this only supports falling back from RTP to ACH
971
- * (type=rtp and fallback_type=ach)
972
- */
973
- fallback_type?: 'ach';
974
- /**
975
- * If present, indicates a specific foreign exchange contract number that has been
976
- * generated by your financial institution.
977
- */
978
- foreign_exchange_contract?: string | null;
979
- /**
980
- * Indicates the type of FX transfer to initiate, can be either
981
- * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
982
- * currency matches the originating account currency.
983
- */
984
- foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
985
- /**
986
- * An array of line items that must sum up to the amount of the payment order.
987
- */
988
- line_items?: Array<PaymentOrderUpdateParams.LineItem>;
989
- /**
990
- * Additional data represented as key-value pairs. Both the key and value must be
991
- * strings.
992
- */
993
- metadata?: Record<string, string>;
994
- /**
995
- * A boolean to determine if NSF Protection is enabled for this payment order. Note
996
- * that this setting must also be turned on in your organization settings page.
997
- */
998
- nsf_protected?: boolean;
999
- /**
1000
- * The ID of one of your organization's internal accounts.
1001
- */
1002
- originating_account_id?: string;
1003
- /**
1004
- * If present, this will replace your default company name on receiver's bank
1005
- * statement. This field can only be used for ACH payments currently. For ACH, only
1006
- * the first 16 characters of this string will be used. Any additional characters
1007
- * will be truncated.
1008
- */
1009
- originating_party_name?: string | null;
1010
- /**
1011
- * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1012
- * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1013
- * an overnight check rather than standard mail.
1014
- */
1015
- priority?: 'high' | 'normal';
1016
- /**
1017
- * For `wire`, this is usually the purpose which is transmitted via the
1018
- * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
1019
- * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
1020
- * CPA Code that will be attached to the payment.
1021
- */
1022
- purpose?: string | null;
1023
- /**
1024
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1025
- * `receiving_account_id`, you may pass the id of an external account or an
1026
- * internal account.
1027
- */
1028
- receiving_account?: PaymentOrderUpdateParams.ReceivingAccount;
1029
- /**
1030
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1031
- * `receiving_account_id`, you may pass the id of an external account or an
1032
- * internal account.
1033
- */
1034
- receiving_account_id?: string;
1035
- /**
1036
- * For `ach`, this field will be passed through on an addenda record. For `wire`
1037
- * payments the field will be passed through as the "Originator to Beneficiary
1038
- * Information", also known as OBI or Fedwire tag 6000.
1039
- */
1040
- remittance_information?: string | null;
1041
- /**
1042
- * Send an email to the counterparty when the payment order is sent to the bank. If
1043
- * `null`, `send_remittance_advice` on the Counterparty is used.
1044
- */
1045
- send_remittance_advice?: boolean | null;
1046
- /**
1047
- * An optional descriptor which will appear in the receiver's statement. For
1048
- * `check` payments this field will be used as the memo line. For `ach` the maximum
1049
- * length is 10 characters. Note that for ACH payments, the name on your bank
1050
- * account will be included automatically by the bank, so you can use the
1051
- * characters for other useful information. For `eft` the maximum length is 15
1052
- * characters.
1053
- */
1054
- statement_descriptor?: string | null;
1055
- /**
1056
- * To cancel a payment order, use `cancelled`. To redraft a returned payment order,
1057
- * use `approved`. To undo approval on a denied or approved payment order, use
1058
- * `needs_approval`.
1059
- */
1060
- status?:
1061
- | 'approved'
1062
- | 'cancelled'
1063
- | 'completed'
1064
- | 'denied'
1065
- | 'failed'
1066
- | 'needs_approval'
1067
- | 'pending'
1068
- | 'processing'
1069
- | 'returned'
1070
- | 'reversed'
1071
- | 'sent';
1072
- /**
1073
- * An additional layer of classification for the type of payment order you are
1074
- * doing. This field is only used for `ach` payment orders currently. For `ach`
1075
- * payment orders, the `subtype` represents the SEC code. We currently support
1076
- * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
1077
- */
1078
- subtype?: PaymentOrderSubtype | null;
1079
- /**
1080
- * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
1081
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
1082
- * `zengin`.
1083
- */
1084
- type?: PaymentOrderType;
1085
- /**
1086
- * This represents the identifier by which the person is known to the receiver when
1087
- * using the CIE subtype for ACH payments. Only the first 22 characters of this
1088
- * string will be used. Any additional characters will be truncated.
1089
- */
1090
- ultimate_originating_party_identifier?: string | null;
1091
- /**
1092
- * This represents the name of the person that the payment is on behalf of when
1093
- * using the CIE subtype for ACH payments. Only the first 15 characters of this
1094
- * string will be used. Any additional characters will be truncated.
1095
- */
1096
- ultimate_originating_party_name?: string | null;
1097
- /**
1098
- * This represents the name of the merchant that the payment is being sent to when
1099
- * using the CIE subtype for ACH payments. Only the first 22 characters of this
1100
- * string will be used. Any additional characters will be truncated.
1101
- */
1102
- ultimate_receiving_party_identifier?: string | null;
1103
- /**
1104
- * This represents the identifier by which the merchant is known to the person
1105
- * initiating an ACH payment with CIE subtype. Only the first 15 characters of this
1106
- * string will be used. Any additional characters will be truncated.
1107
- */
1108
- ultimate_receiving_party_name?: string | null;
1109
- }
1110
- export declare namespace PaymentOrderUpdateParams {
1111
- interface Accounting {
756
+ accounting?: PaymentOrderUpdateParams.Accounting;
1112
757
  /**
1113
758
  * The ID of one of your accounting categories. Note that these will only be
1114
759
  * accessible if your accounting system has been connected.
1115
760
  */
1116
- account_id?: string | null;
761
+ accounting_category_id?: string | null;
1117
762
  /**
1118
- * The ID of one of the class objects in your accounting system. Class objects
1119
- * track segments of your business independent of client or project. Note that
1120
- * these will only be accessible if your accounting system has been connected.
763
+ * The ID of one of your accounting ledger classes. Note that these will only be
764
+ * accessible if your accounting system has been connected.
1121
765
  */
1122
- class_id?: string | null;
1123
- }
1124
- interface LineItem {
766
+ accounting_ledger_class_id?: string | null;
1125
767
  /**
1126
- * Value in specified currency's smallest unit. e.g. $10 would be represented
1127
- * as 1000.
768
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
769
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
1128
770
  */
1129
- amount: number;
771
+ amount?: number;
1130
772
  /**
1131
- * The ID of one of your accounting categories. Note that these will only be
1132
- * accessible if your accounting system has been connected.
773
+ * The party that will pay the fees for the payment order. Only applies to wire
774
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
775
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
1133
776
  */
1134
- accounting_category_id?: string | null;
777
+ charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
1135
778
  /**
1136
- * A free-form description of the line item.
779
+ * Required when receiving_account_id is passed the ID of an external account.
780
+ */
781
+ counterparty_id?: string | null;
782
+ /**
783
+ * Defaults to the currency of the originating account.
784
+ */
785
+ currency?: Shared.Currency | null;
786
+ /**
787
+ * An optional description for internal use.
1137
788
  */
1138
789
  description?: string | null;
1139
790
  /**
1140
- * Additional data represented as key-value pairs. Both the key and value must be
1141
- * strings.
791
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
792
+ * transaction. A `credit` moves money from your account to someone else's. A
793
+ * `debit` pulls money from someone else's account to your own. Note that wire,
794
+ * rtp, and check payments will always be `credit`.
1142
795
  */
1143
- metadata?: Record<string, string>;
1144
- }
1145
- /**
1146
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1147
- * `receiving_account_id`, you may pass the id of an external account or an
1148
- * internal account.
1149
- */
1150
- interface ReceivingAccount {
1151
- account_details?: Array<ReceivingAccount.AccountDetail>;
796
+ direction?: 'credit' | 'debit';
797
+ /**
798
+ * Date transactions are to be posted to the participants' account. Defaults to the
799
+ * current business day or the next business day if the current day is a bank
800
+ * holiday or weekend. Format: yyyy-mm-dd.
801
+ */
802
+ effective_date?: string;
1152
803
  /**
1153
- * Can be `checking`, `savings` or `other`.
804
+ * RFP payments require an expires_at. This value must be past the effective_date.
1154
805
  */
1155
- account_type?: ExternalAccounts.ExternalAccountType;
1156
- contact_details?: Array<ReceivingAccount.ContactDetail>;
806
+ expires_at?: string | null;
1157
807
  /**
1158
- * Specifies a ledger account object that will be created with the external
1159
- * account. The resulting ledger account is linked to the external account for
1160
- * auto-ledgering Payment objects. See
1161
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1162
- * for more details.
808
+ * A payment type to fallback to if the original type is not valid for the
809
+ * receiving account. Currently, this only supports falling back from RTP to ACH
810
+ * (type=rtp and fallback_type=ach)
1163
811
  */
1164
- ledger_account?: ReceivingAccount.LedgerAccount;
812
+ fallback_type?: 'ach';
813
+ /**
814
+ * If present, indicates a specific foreign exchange contract number that has been
815
+ * generated by your financial institution.
816
+ */
817
+ foreign_exchange_contract?: string | null;
818
+ /**
819
+ * Indicates the type of FX transfer to initiate, can be either
820
+ * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
821
+ * currency matches the originating account currency.
822
+ */
823
+ foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
824
+ /**
825
+ * An array of line items that must sum up to the amount of the payment order.
826
+ */
827
+ line_items?: Array<PaymentOrderUpdateParams.LineItem>;
1165
828
  /**
1166
829
  * Additional data represented as key-value pairs. Both the key and value must be
1167
830
  * strings.
1168
831
  */
1169
832
  metadata?: Record<string, string>;
1170
833
  /**
1171
- * A nickname for the external account. This is only for internal usage and won't
1172
- * affect any payments
834
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
835
+ * that this setting must also be turned on in your organization settings page.
1173
836
  */
1174
- name?: string | null;
837
+ nsf_protected?: boolean;
1175
838
  /**
1176
- * Required if receiving wire payments.
839
+ * The ID of one of your organization's internal accounts.
1177
840
  */
1178
- party_address?: ReceivingAccount.PartyAddress;
1179
- party_identifier?: string;
841
+ originating_account_id?: string;
1180
842
  /**
1181
- * If this value isn't provided, it will be inherited from the counterparty's name.
843
+ * If present, this will replace your default company name on receiver's bank
844
+ * statement. This field can only be used for ACH payments currently. For ACH, only
845
+ * the first 16 characters of this string will be used. Any additional characters
846
+ * will be truncated.
1182
847
  */
1183
- party_name?: string;
848
+ originating_party_name?: string | null;
1184
849
  /**
1185
- * Either `individual` or `business`.
850
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
851
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
852
+ * an overnight check rather than standard mail.
1186
853
  */
1187
- party_type?: 'business' | 'individual' | null;
854
+ priority?: 'high' | 'normal';
1188
855
  /**
1189
- * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
1190
- * you can pass the processor token in this field.
856
+ * For `wire`, this is usually the purpose which is transmitted via the
857
+ * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
858
+ * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
859
+ * CPA Code that will be attached to the payment.
1191
860
  */
1192
- plaid_processor_token?: string;
1193
- routing_details?: Array<ReceivingAccount.RoutingDetail>;
1194
- }
1195
- namespace ReceivingAccount {
1196
- interface AccountDetail {
1197
- account_number: string;
1198
- account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
1199
- }
1200
- interface ContactDetail {
1201
- contact_identifier?: string;
1202
- contact_identifier_type?: 'email' | 'phone_number' | 'website';
1203
- }
861
+ purpose?: string | null;
862
+ /**
863
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
864
+ * `receiving_account_id`, you may pass the id of an external account or an
865
+ * internal account.
866
+ */
867
+ receiving_account?: PaymentOrderUpdateParams.ReceivingAccount;
868
+ /**
869
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
870
+ * `receiving_account_id`, you may pass the id of an external account or an
871
+ * internal account.
872
+ */
873
+ receiving_account_id?: string;
874
+ /**
875
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
876
+ * payments the field will be passed through as the "Originator to Beneficiary
877
+ * Information", also known as OBI or Fedwire tag 6000.
878
+ */
879
+ remittance_information?: string | null;
880
+ /**
881
+ * Send an email to the counterparty when the payment order is sent to the bank. If
882
+ * `null`, `send_remittance_advice` on the Counterparty is used.
883
+ */
884
+ send_remittance_advice?: boolean | null;
885
+ /**
886
+ * An optional descriptor which will appear in the receiver's statement. For
887
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
888
+ * length is 10 characters. Note that for ACH payments, the name on your bank
889
+ * account will be included automatically by the bank, so you can use the
890
+ * characters for other useful information. For `eft` the maximum length is 15
891
+ * characters.
892
+ */
893
+ statement_descriptor?: string | null;
894
+ /**
895
+ * To cancel a payment order, use `cancelled`. To redraft a returned payment order,
896
+ * use `approved`. To undo approval on a denied or approved payment order, use
897
+ * `needs_approval`.
898
+ */
899
+ status?: 'approved' | 'cancelled' | 'completed' | 'denied' | 'failed' | 'needs_approval' | 'pending' | 'processing' | 'returned' | 'reversed' | 'sent';
900
+ /**
901
+ * An additional layer of classification for the type of payment order you are
902
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
903
+ * payment orders, the `subtype` represents the SEC code. We currently support
904
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
905
+ */
906
+ subtype?: PaymentOrderSubtype | null;
907
+ /**
908
+ * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
909
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
910
+ * `zengin`.
911
+ */
912
+ type?: PaymentOrderType;
913
+ /**
914
+ * This represents the identifier by which the person is known to the receiver when
915
+ * using the CIE subtype for ACH payments. Only the first 22 characters of this
916
+ * string will be used. Any additional characters will be truncated.
917
+ */
918
+ ultimate_originating_party_identifier?: string | null;
919
+ /**
920
+ * This represents the name of the person that the payment is on behalf of when
921
+ * using the CIE subtype for ACH payments. Only the first 15 characters of this
922
+ * string will be used. Any additional characters will be truncated.
923
+ */
924
+ ultimate_originating_party_name?: string | null;
925
+ /**
926
+ * This represents the name of the merchant that the payment is being sent to when
927
+ * using the CIE subtype for ACH payments. Only the first 22 characters of this
928
+ * string will be used. Any additional characters will be truncated.
929
+ */
930
+ ultimate_receiving_party_identifier?: string | null;
1204
931
  /**
1205
- * Specifies a ledger account object that will be created with the external
1206
- * account. The resulting ledger account is linked to the external account for
1207
- * auto-ledgering Payment objects. See
1208
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1209
- * for more details.
1210
- */
1211
- interface LedgerAccount {
1212
- /**
1213
- * The currency of the ledger account.
1214
- */
1215
- currency: string;
1216
- /**
1217
- * The id of the ledger that this account belongs to.
1218
- */
1219
- ledger_id: string;
1220
- /**
1221
- * The name of the ledger account.
1222
- */
1223
- name: string;
1224
- /**
1225
- * The normal balance of the ledger account.
1226
- */
1227
- normal_balance: 'credit' | 'debit';
1228
- /**
1229
- * The currency exponent of the ledger account.
1230
- */
1231
- currency_exponent?: number | null;
1232
- /**
1233
- * The description of the ledger account.
1234
- */
1235
- description?: string | null;
1236
- /**
1237
- * If the ledger account links to another object in Modern Treasury, the id will be
1238
- * populated here, otherwise null.
1239
- */
1240
- ledgerable_id?: string;
1241
- /**
1242
- * If the ledger account links to another object in Modern Treasury, the type will
1243
- * be populated here, otherwise null. The value is one of internal_account or
1244
- * external_account.
1245
- */
1246
- ledgerable_type?: 'external_account' | 'internal_account';
1247
- /**
1248
- * Additional data represented as key-value pairs. Both the key and value must be
1249
- * strings.
1250
- */
1251
- metadata?: Record<string, string>;
932
+ * This represents the identifier by which the merchant is known to the person
933
+ * initiating an ACH payment with CIE subtype. Only the first 15 characters of this
934
+ * string will be used. Any additional characters will be truncated.
935
+ */
936
+ ultimate_receiving_party_name?: string | null;
937
+ }
938
+ export declare namespace PaymentOrderUpdateParams {
939
+ interface Accounting {
940
+ /**
941
+ * The ID of one of your accounting categories. Note that these will only be
942
+ * accessible if your accounting system has been connected.
943
+ */
944
+ account_id?: string | null;
945
+ /**
946
+ * The ID of one of the class objects in your accounting system. Class objects
947
+ * track segments of your business independent of client or project. Note that
948
+ * these will only be accessible if your accounting system has been connected.
949
+ */
950
+ class_id?: string | null;
951
+ }
952
+ interface LineItem {
953
+ /**
954
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
955
+ * as 1000.
956
+ */
957
+ amount: number;
958
+ /**
959
+ * The ID of one of your accounting categories. Note that these will only be
960
+ * accessible if your accounting system has been connected.
961
+ */
962
+ accounting_category_id?: string | null;
963
+ /**
964
+ * A free-form description of the line item.
965
+ */
966
+ description?: string | null;
967
+ /**
968
+ * Additional data represented as key-value pairs. Both the key and value must be
969
+ * strings.
970
+ */
971
+ metadata?: Record<string, string>;
1252
972
  }
1253
973
  /**
1254
- * Required if receiving wire payments.
1255
- */
1256
- interface PartyAddress {
1257
- /**
1258
- * Country code conforms to [ISO 3166-1 alpha-2]
1259
- */
1260
- country?: string | null;
1261
- line1?: string | null;
1262
- line2?: string | null;
1263
- /**
1264
- * Locality or City.
1265
- */
1266
- locality?: string | null;
1267
- /**
1268
- * The postal code of the address.
1269
- */
1270
- postal_code?: string | null;
1271
- /**
1272
- * Region or State.
1273
- */
1274
- region?: string | null;
974
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
975
+ * `receiving_account_id`, you may pass the id of an external account or an
976
+ * internal account.
977
+ */
978
+ interface ReceivingAccount {
979
+ account_details?: Array<ReceivingAccount.AccountDetail>;
980
+ /**
981
+ * Can be `checking`, `savings` or `other`.
982
+ */
983
+ account_type?: ExternalAccounts.ExternalAccountType;
984
+ contact_details?: Array<ReceivingAccount.ContactDetail>;
985
+ /**
986
+ * Specifies a ledger account object that will be created with the external
987
+ * account. The resulting ledger account is linked to the external account for
988
+ * auto-ledgering Payment objects. See
989
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
990
+ * for more details.
991
+ */
992
+ ledger_account?: ReceivingAccount.LedgerAccount;
993
+ /**
994
+ * Additional data represented as key-value pairs. Both the key and value must be
995
+ * strings.
996
+ */
997
+ metadata?: Record<string, string>;
998
+ /**
999
+ * A nickname for the external account. This is only for internal usage and won't
1000
+ * affect any payments
1001
+ */
1002
+ name?: string | null;
1003
+ /**
1004
+ * Required if receiving wire payments.
1005
+ */
1006
+ party_address?: ReceivingAccount.PartyAddress;
1007
+ party_identifier?: string;
1008
+ /**
1009
+ * If this value isn't provided, it will be inherited from the counterparty's name.
1010
+ */
1011
+ party_name?: string;
1012
+ /**
1013
+ * Either `individual` or `business`.
1014
+ */
1015
+ party_type?: 'business' | 'individual' | null;
1016
+ /**
1017
+ * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
1018
+ * you can pass the processor token in this field.
1019
+ */
1020
+ plaid_processor_token?: string;
1021
+ routing_details?: Array<ReceivingAccount.RoutingDetail>;
1275
1022
  }
1276
- interface RoutingDetail {
1277
- routing_number: string;
1278
- routing_number_type:
1279
- | 'aba'
1280
- | 'au_bsb'
1281
- | 'se_bankgiro_clearing_code'
1282
- | 'br_codigo'
1283
- | 'ca_cpa'
1284
- | 'chips'
1285
- | 'cnaps'
1286
- | 'gb_sort_code'
1287
- | 'in_ifsc'
1288
- | 'my_branch_code'
1289
- | 'swift'
1290
- | 'jp_zengin_code';
1291
- payment_type?:
1292
- | 'ach'
1293
- | 'au_becs'
1294
- | 'se_bankgirot'
1295
- | 'bacs'
1296
- | 'book'
1297
- | 'card'
1298
- | 'check'
1299
- | 'eft'
1300
- | 'cross_border'
1301
- | 'interac'
1302
- | 'masav'
1303
- | 'neft'
1304
- | 'nics'
1305
- | 'provxchange'
1306
- | 'rtp'
1307
- | 'sen'
1308
- | 'sic'
1309
- | 'sepa'
1310
- | 'signet'
1311
- | 'wire'
1312
- | 'zengin';
1023
+ namespace ReceivingAccount {
1024
+ interface AccountDetail {
1025
+ account_number: string;
1026
+ account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
1027
+ }
1028
+ interface ContactDetail {
1029
+ contact_identifier?: string;
1030
+ contact_identifier_type?: 'email' | 'phone_number' | 'website';
1031
+ }
1032
+ /**
1033
+ * Specifies a ledger account object that will be created with the external
1034
+ * account. The resulting ledger account is linked to the external account for
1035
+ * auto-ledgering Payment objects. See
1036
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1037
+ * for more details.
1038
+ */
1039
+ interface LedgerAccount {
1040
+ /**
1041
+ * The currency of the ledger account.
1042
+ */
1043
+ currency: string;
1044
+ /**
1045
+ * The id of the ledger that this account belongs to.
1046
+ */
1047
+ ledger_id: string;
1048
+ /**
1049
+ * The name of the ledger account.
1050
+ */
1051
+ name: string;
1052
+ /**
1053
+ * The normal balance of the ledger account.
1054
+ */
1055
+ normal_balance: 'credit' | 'debit';
1056
+ /**
1057
+ * The currency exponent of the ledger account.
1058
+ */
1059
+ currency_exponent?: number | null;
1060
+ /**
1061
+ * The description of the ledger account.
1062
+ */
1063
+ description?: string | null;
1064
+ /**
1065
+ * If the ledger account links to another object in Modern Treasury, the id will be
1066
+ * populated here, otherwise null.
1067
+ */
1068
+ ledgerable_id?: string;
1069
+ /**
1070
+ * If the ledger account links to another object in Modern Treasury, the type will
1071
+ * be populated here, otherwise null. The value is one of internal_account or
1072
+ * external_account.
1073
+ */
1074
+ ledgerable_type?: 'external_account' | 'internal_account';
1075
+ /**
1076
+ * Additional data represented as key-value pairs. Both the key and value must be
1077
+ * strings.
1078
+ */
1079
+ metadata?: Record<string, string>;
1080
+ }
1081
+ /**
1082
+ * Required if receiving wire payments.
1083
+ */
1084
+ interface PartyAddress {
1085
+ /**
1086
+ * Country code conforms to [ISO 3166-1 alpha-2]
1087
+ */
1088
+ country?: string | null;
1089
+ line1?: string | null;
1090
+ line2?: string | null;
1091
+ /**
1092
+ * Locality or City.
1093
+ */
1094
+ locality?: string | null;
1095
+ /**
1096
+ * The postal code of the address.
1097
+ */
1098
+ postal_code?: string | null;
1099
+ /**
1100
+ * Region or State.
1101
+ */
1102
+ region?: string | null;
1103
+ }
1104
+ interface RoutingDetail {
1105
+ routing_number: string;
1106
+ routing_number_type: 'aba' | 'au_bsb' | 'se_bankgiro_clearing_code' | 'br_codigo' | 'ca_cpa' | 'chips' | 'cnaps' | 'gb_sort_code' | 'in_ifsc' | 'my_branch_code' | 'swift' | 'jp_zengin_code';
1107
+ payment_type?: 'ach' | 'au_becs' | 'se_bankgirot' | 'bacs' | 'book' | 'card' | 'check' | 'eft' | 'cross_border' | 'interac' | 'masav' | 'neft' | 'nics' | 'provxchange' | 'rtp' | 'sen' | 'sic' | 'sepa' | 'signet' | 'wire' | 'zengin';
1108
+ }
1313
1109
  }
1314
- }
1315
1110
  }
1316
1111
  export interface PaymentOrderListParams extends PageParams {
1317
- counterparty_id?: string;
1318
- direction?: 'credit' | 'debit';
1319
- /**
1320
- * An inclusive upper bound for searching effective_date
1321
- */
1322
- effective_date_end?: string;
1323
- /**
1324
- * An inclusive lower bound for searching effective_date
1325
- */
1326
- effective_date_start?: string;
1327
- /**
1328
- * For example, if you want to query for records with metadata key `Type` and value
1329
- * `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
1330
- * parameters.
1331
- */
1332
- metadata?: Record<string, string>;
1333
- originating_account_id?: string;
1334
- /**
1335
- * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1336
- * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1337
- * an overnight check rather than standard mail.
1338
- */
1339
- priority?: 'high' | 'normal';
1340
- /**
1341
- * Query for records with the provided reference number
1342
- */
1343
- reference_number?: string;
1344
- status?:
1345
- | 'approved'
1346
- | 'cancelled'
1347
- | 'completed'
1348
- | 'denied'
1349
- | 'failed'
1350
- | 'needs_approval'
1351
- | 'pending'
1352
- | 'processing'
1353
- | 'returned'
1354
- | 'reversed'
1355
- | 'sent';
1356
- /**
1357
- * The ID of a transaction that the payment order has been reconciled to.
1358
- */
1359
- transaction_id?: string;
1360
- type?:
1361
- | 'ach'
1362
- | 'au_becs'
1363
- | 'bacs'
1364
- | 'book'
1365
- | 'card'
1366
- | 'check'
1367
- | 'cross_border'
1368
- | 'eft'
1369
- | 'interac'
1370
- | 'masav'
1371
- | 'neft'
1372
- | 'nics'
1373
- | 'provxchange'
1374
- | 'rtp'
1375
- | 'se_bankgirot'
1376
- | 'sen'
1377
- | 'sepa'
1378
- | 'sic'
1379
- | 'signet'
1380
- | 'wire'
1381
- | 'zengin';
1112
+ counterparty_id?: string;
1113
+ direction?: 'credit' | 'debit';
1114
+ /**
1115
+ * An inclusive upper bound for searching effective_date
1116
+ */
1117
+ effective_date_end?: string;
1118
+ /**
1119
+ * An inclusive lower bound for searching effective_date
1120
+ */
1121
+ effective_date_start?: string;
1122
+ /**
1123
+ * For example, if you want to query for records with metadata key `Type` and value
1124
+ * `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
1125
+ * parameters.
1126
+ */
1127
+ metadata?: Record<string, string>;
1128
+ originating_account_id?: string;
1129
+ /**
1130
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1131
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1132
+ * an overnight check rather than standard mail.
1133
+ */
1134
+ priority?: 'high' | 'normal';
1135
+ /**
1136
+ * Query for records with the provided reference number
1137
+ */
1138
+ reference_number?: string;
1139
+ status?: 'approved' | 'cancelled' | 'completed' | 'denied' | 'failed' | 'needs_approval' | 'pending' | 'processing' | 'returned' | 'reversed' | 'sent';
1140
+ /**
1141
+ * The ID of a transaction that the payment order has been reconciled to.
1142
+ */
1143
+ transaction_id?: string;
1144
+ type?: 'ach' | 'au_becs' | 'bacs' | 'book' | 'card' | 'check' | 'cross_border' | 'eft' | 'interac' | 'masav' | 'neft' | 'nics' | 'provxchange' | 'rtp' | 'se_bankgirot' | 'sen' | 'sepa' | 'sic' | 'signet' | 'wire' | 'zengin';
1382
1145
  }
1383
1146
  export interface PaymentOrderCreateAsyncParams {
1384
- /**
1385
- * Value in specified currency's smallest unit. e.g. $10 would be represented as
1386
- * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
1387
- */
1388
- amount: number;
1389
- /**
1390
- * One of `credit`, `debit`. Describes the direction money is flowing in the
1391
- * transaction. A `credit` moves money from your account to someone else's. A
1392
- * `debit` pulls money from someone else's account to your own. Note that wire,
1393
- * rtp, and check payments will always be `credit`.
1394
- */
1395
- direction: 'credit' | 'debit';
1396
- /**
1397
- * The ID of one of your organization's internal accounts.
1398
- */
1399
- originating_account_id: string;
1400
- /**
1401
- * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
1402
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
1403
- * `zengin`.
1404
- */
1405
- type: PaymentOrderType;
1406
- accounting?: PaymentOrderCreateAsyncParams.Accounting;
1407
- /**
1408
- * The ID of one of your accounting categories. Note that these will only be
1409
- * accessible if your accounting system has been connected.
1410
- */
1411
- accounting_category_id?: string | null;
1412
- /**
1413
- * The ID of one of your accounting ledger classes. Note that these will only be
1414
- * accessible if your accounting system has been connected.
1415
- */
1416
- accounting_ledger_class_id?: string | null;
1417
- /**
1418
- * The party that will pay the fees for the payment order. Only applies to wire
1419
- * payment orders. Can be one of shared, sender, or receiver, which correspond
1420
- * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
1421
- */
1422
- charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
1423
- /**
1424
- * Defaults to the currency of the originating account.
1425
- */
1426
- currency?: Shared.Currency | null;
1427
- /**
1428
- * An optional description for internal use.
1429
- */
1430
- description?: string | null;
1431
- /**
1432
- * Date transactions are to be posted to the participants' account. Defaults to the
1433
- * current business day or the next business day if the current day is a bank
1434
- * holiday or weekend. Format: yyyy-mm-dd.
1435
- */
1436
- effective_date?: string;
1437
- /**
1438
- * RFP payments require an expires_at. This value must be past the effective_date.
1439
- */
1440
- expires_at?: string | null;
1441
- /**
1442
- * A payment type to fallback to if the original type is not valid for the
1443
- * receiving account. Currently, this only supports falling back from RTP to ACH
1444
- * (type=rtp and fallback_type=ach)
1445
- */
1446
- fallback_type?: 'ach';
1447
- /**
1448
- * If present, indicates a specific foreign exchange contract number that has been
1449
- * generated by your financial institution.
1450
- */
1451
- foreign_exchange_contract?: string | null;
1452
- /**
1453
- * Indicates the type of FX transfer to initiate, can be either
1454
- * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
1455
- * currency matches the originating account currency.
1456
- */
1457
- foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
1458
- /**
1459
- * Specifies a ledger transaction object that will be created with the payment
1460
- * order. If the ledger transaction cannot be created, then the payment order
1461
- * creation will fail. The resulting ledger transaction will mirror the status of
1462
- * the payment order.
1463
- */
1464
- ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
1465
- /**
1466
- * An array of line items that must sum up to the amount of the payment order.
1467
- */
1468
- line_items?: Array<PaymentOrderCreateAsyncParams.LineItem>;
1469
- /**
1470
- * Additional data represented as key-value pairs. Both the key and value must be
1471
- * strings.
1472
- */
1473
- metadata?: Record<string, string>;
1474
- /**
1475
- * A boolean to determine if NSF Protection is enabled for this payment order. Note
1476
- * that this setting must also be turned on in your organization settings page.
1477
- */
1478
- nsf_protected?: boolean;
1479
- /**
1480
- * If present, this will replace your default company name on receiver's bank
1481
- * statement. This field can only be used for ACH payments currently. For ACH, only
1482
- * the first 16 characters of this string will be used. Any additional characters
1483
- * will be truncated.
1484
- */
1485
- originating_party_name?: string | null;
1486
- /**
1487
- * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1488
- * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1489
- * an overnight check rather than standard mail.
1490
- */
1491
- priority?: 'high' | 'normal';
1492
- /**
1493
- * For `wire`, this is usually the purpose which is transmitted via the
1494
- * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
1495
- * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
1496
- * CPA Code that will be attached to the payment.
1497
- */
1498
- purpose?: string | null;
1499
- /**
1500
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1501
- * `receiving_account_id`, you may pass the id of an external account or an
1502
- * internal account.
1503
- */
1504
- receiving_account?: PaymentOrderCreateAsyncParams.ReceivingAccount;
1505
- /**
1506
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1507
- * `receiving_account_id`, you may pass the id of an external account or an
1508
- * internal account.
1509
- */
1510
- receiving_account_id?: string;
1511
- /**
1512
- * For `ach`, this field will be passed through on an addenda record. For `wire`
1513
- * payments the field will be passed through as the "Originator to Beneficiary
1514
- * Information", also known as OBI or Fedwire tag 6000.
1515
- */
1516
- remittance_information?: string | null;
1517
- /**
1518
- * Send an email to the counterparty when the payment order is sent to the bank. If
1519
- * `null`, `send_remittance_advice` on the Counterparty is used.
1520
- */
1521
- send_remittance_advice?: boolean | null;
1522
- /**
1523
- * An optional descriptor which will appear in the receiver's statement. For
1524
- * `check` payments this field will be used as the memo line. For `ach` the maximum
1525
- * length is 10 characters. Note that for ACH payments, the name on your bank
1526
- * account will be included automatically by the bank, so you can use the
1527
- * characters for other useful information. For `eft` the maximum length is 15
1528
- * characters.
1529
- */
1530
- statement_descriptor?: string | null;
1531
- /**
1532
- * An additional layer of classification for the type of payment order you are
1533
- * doing. This field is only used for `ach` payment orders currently. For `ach`
1534
- * payment orders, the `subtype` represents the SEC code. We currently support
1535
- * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
1536
- */
1537
- subtype?: PaymentOrderSubtype | null;
1538
- /**
1539
- * A flag that determines whether a payment order should go through transaction
1540
- * monitoring.
1541
- */
1542
- transaction_monitoring_enabled?: boolean;
1543
- /**
1544
- * Identifier of the ultimate originator of the payment order.
1545
- */
1546
- ultimate_originating_party_identifier?: string | null;
1547
- /**
1548
- * Name of the ultimate originator of the payment order.
1549
- */
1550
- ultimate_originating_party_name?: string | null;
1551
- /**
1552
- * Identifier of the ultimate funds recipient.
1553
- */
1554
- ultimate_receiving_party_identifier?: string | null;
1555
- /**
1556
- * Name of the ultimate funds recipient.
1557
- */
1558
- ultimate_receiving_party_name?: string | null;
1559
- }
1560
- export declare namespace PaymentOrderCreateAsyncParams {
1561
- interface Accounting {
1147
+ /**
1148
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
1149
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
1150
+ */
1151
+ amount: number;
1152
+ /**
1153
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
1154
+ * transaction. A `credit` moves money from your account to someone else's. A
1155
+ * `debit` pulls money from someone else's account to your own. Note that wire,
1156
+ * rtp, and check payments will always be `credit`.
1157
+ */
1158
+ direction: 'credit' | 'debit';
1159
+ /**
1160
+ * The ID of one of your organization's internal accounts.
1161
+ */
1162
+ originating_account_id: string;
1163
+ /**
1164
+ * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
1165
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
1166
+ * `zengin`.
1167
+ */
1168
+ type: PaymentOrderType;
1169
+ accounting?: PaymentOrderCreateAsyncParams.Accounting;
1562
1170
  /**
1563
1171
  * The ID of one of your accounting categories. Note that these will only be
1564
1172
  * accessible if your accounting system has been connected.
1565
1173
  */
1566
- account_id?: string | null;
1174
+ accounting_category_id?: string | null;
1175
+ /**
1176
+ * The ID of one of your accounting ledger classes. Note that these will only be
1177
+ * accessible if your accounting system has been connected.
1178
+ */
1179
+ accounting_ledger_class_id?: string | null;
1567
1180
  /**
1568
- * The ID of one of the class objects in your accounting system. Class objects
1569
- * track segments of your business independent of client or project. Note that
1570
- * these will only be accessible if your accounting system has been connected.
1181
+ * The party that will pay the fees for the payment order. Only applies to wire
1182
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
1183
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
1571
1184
  */
1572
- class_id?: string | null;
1573
- }
1574
- /**
1575
- * Specifies a ledger transaction object that will be created with the payment
1576
- * order. If the ledger transaction cannot be created, then the payment order
1577
- * creation will fail. The resulting ledger transaction will mirror the status of
1578
- * the payment order.
1579
- */
1580
- interface LedgerTransaction {
1185
+ charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
1581
1186
  /**
1582
- * An array of ledger entry objects.
1187
+ * Defaults to the currency of the originating account.
1583
1188
  */
1584
- ledger_entries: Array<LedgerTransaction.LedgerEntry>;
1189
+ currency?: Shared.Currency | null;
1585
1190
  /**
1586
1191
  * An optional description for internal use.
1587
1192
  */
1588
1193
  description?: string | null;
1589
1194
  /**
1590
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
1591
- * reporting purposes.
1195
+ * Date transactions are to be posted to the participants' account. Defaults to the
1196
+ * current business day or the next business day if the current day is a bank
1197
+ * holiday or weekend. Format: yyyy-mm-dd.
1592
1198
  */
1593
- effective_at?: string;
1199
+ effective_date?: string;
1594
1200
  /**
1595
- * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1596
- * purposes.
1201
+ * RFP payments require an expires_at. This value must be past the effective_date.
1597
1202
  */
1598
- effective_date?: string;
1203
+ expires_at?: string | null;
1204
+ /**
1205
+ * A payment type to fallback to if the original type is not valid for the
1206
+ * receiving account. Currently, this only supports falling back from RTP to ACH
1207
+ * (type=rtp and fallback_type=ach)
1208
+ */
1209
+ fallback_type?: 'ach';
1210
+ /**
1211
+ * If present, indicates a specific foreign exchange contract number that has been
1212
+ * generated by your financial institution.
1213
+ */
1214
+ foreign_exchange_contract?: string | null;
1599
1215
  /**
1600
- * A unique string to represent the ledger transaction. Only one pending or posted
1601
- * ledger transaction may have this ID in the ledger.
1216
+ * Indicates the type of FX transfer to initiate, can be either
1217
+ * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
1218
+ * currency matches the originating account currency.
1602
1219
  */
1603
- external_id?: string;
1220
+ foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
1604
1221
  /**
1605
- * If the ledger transaction can be reconciled to another object in Modern
1606
- * Treasury, the id will be populated here, otherwise null.
1222
+ * Specifies a ledger transaction object that will be created with the payment
1223
+ * order. If the ledger transaction cannot be created, then the payment order
1224
+ * creation will fail. The resulting ledger transaction will mirror the status of
1225
+ * the payment order.
1607
1226
  */
1608
- ledgerable_id?: string;
1227
+ ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
1609
1228
  /**
1610
- * If the ledger transaction can be reconciled to another object in Modern
1611
- * Treasury, the type will be populated here, otherwise null. This can be one of
1612
- * payment_order, incoming_payment_detail, expected_payment, return, or reversal.
1229
+ * An array of line items that must sum up to the amount of the payment order.
1613
1230
  */
1614
- ledgerable_type?:
1615
- | 'counterparty'
1616
- | 'expected_payment'
1617
- | 'incoming_payment_detail'
1618
- | 'internal_account'
1619
- | 'line_item'
1620
- | 'paper_item'
1621
- | 'payment_order'
1622
- | 'payment_order_attempt'
1623
- | 'return'
1624
- | 'reversal';
1231
+ line_items?: Array<PaymentOrderCreateAsyncParams.LineItem>;
1625
1232
  /**
1626
1233
  * Additional data represented as key-value pairs. Both the key and value must be
1627
1234
  * strings.
1628
1235
  */
1629
1236
  metadata?: Record<string, string>;
1630
1237
  /**
1631
- * To post a ledger transaction at creation, use `posted`.
1632
- */
1633
- status?: 'archived' | 'pending' | 'posted';
1634
- }
1635
- namespace LedgerTransaction {
1636
- interface LedgerEntry {
1637
- /**
1638
- * Value in specified currency's smallest unit. e.g. $10 would be represented
1639
- * as 1000. Can be any integer up to 36 digits.
1640
- */
1641
- amount: number;
1642
- /**
1643
- * One of `credit`, `debit`. Describes the direction money is flowing in the
1644
- * transaction. A `credit` moves money from your account to someone else's. A
1645
- * `debit` pulls money from someone else's account to your own. Note that wire,
1646
- * rtp, and check payments will always be `credit`.
1647
- */
1648
- direction: 'credit' | 'debit';
1649
- /**
1650
- * The ledger account that this ledger entry is associated with.
1651
- */
1652
- ledger_account_id: string;
1653
- /**
1654
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1655
- * account’s available balance. If any of these conditions would be false after the
1656
- * transaction is created, the entire call will fail with error code 422.
1657
- */
1658
- available_balance_amount?: Record<string, number> | null;
1659
- /**
1660
- * Lock version of the ledger account. This can be passed when creating a ledger
1661
- * transaction to only succeed if no ledger transactions have posted since the
1662
- * given version. See our post about Designing the Ledgers API with Optimistic
1663
- * Locking for more details.
1664
- */
1665
- lock_version?: number | null;
1666
- /**
1667
- * Additional data represented as key-value pairs. Both the key and value must be
1668
- * strings.
1669
- */
1670
- metadata?: Record<string, string>;
1671
- /**
1672
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1673
- * account’s pending balance. If any of these conditions would be false after the
1674
- * transaction is created, the entire call will fail with error code 422.
1675
- */
1676
- pending_balance_amount?: Record<string, number> | null;
1677
- /**
1678
- * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1679
- * account’s posted balance. If any of these conditions would be false after the
1680
- * transaction is created, the entire call will fail with error code 422.
1681
- */
1682
- posted_balance_amount?: Record<string, number> | null;
1683
- /**
1684
- * If true, response will include the balance of the associated ledger account for
1685
- * the entry.
1686
- */
1687
- show_resulting_ledger_account_balances?: boolean | null;
1688
- }
1689
- }
1690
- interface LineItem {
1238
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
1239
+ * that this setting must also be turned on in your organization settings page.
1240
+ */
1241
+ nsf_protected?: boolean;
1691
1242
  /**
1692
- * Value in specified currency's smallest unit. e.g. $10 would be represented
1693
- * as 1000.
1243
+ * If present, this will replace your default company name on receiver's bank
1244
+ * statement. This field can only be used for ACH payments currently. For ACH, only
1245
+ * the first 16 characters of this string will be used. Any additional characters
1246
+ * will be truncated.
1694
1247
  */
1695
- amount: number;
1248
+ originating_party_name?: string | null;
1696
1249
  /**
1697
- * The ID of one of your accounting categories. Note that these will only be
1698
- * accessible if your accounting system has been connected.
1250
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1251
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1252
+ * an overnight check rather than standard mail.
1699
1253
  */
1700
- accounting_category_id?: string | null;
1254
+ priority?: 'high' | 'normal';
1701
1255
  /**
1702
- * A free-form description of the line item.
1256
+ * For `wire`, this is usually the purpose which is transmitted via the
1257
+ * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
1258
+ * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
1259
+ * CPA Code that will be attached to the payment.
1703
1260
  */
1704
- description?: string | null;
1261
+ purpose?: string | null;
1705
1262
  /**
1706
- * Additional data represented as key-value pairs. Both the key and value must be
1707
- * strings.
1263
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
1264
+ * `receiving_account_id`, you may pass the id of an external account or an
1265
+ * internal account.
1708
1266
  */
1709
- metadata?: Record<string, string>;
1710
- }
1711
- /**
1712
- * Either `receiving_account` or `receiving_account_id` must be present. When using
1713
- * `receiving_account_id`, you may pass the id of an external account or an
1714
- * internal account.
1715
- */
1716
- interface ReceivingAccount {
1717
- account_details?: Array<ReceivingAccount.AccountDetail>;
1267
+ receiving_account?: PaymentOrderCreateAsyncParams.ReceivingAccount;
1718
1268
  /**
1719
- * Can be `checking`, `savings` or `other`.
1269
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
1270
+ * `receiving_account_id`, you may pass the id of an external account or an
1271
+ * internal account.
1720
1272
  */
1721
- account_type?: ExternalAccounts.ExternalAccountType;
1722
- contact_details?: Array<ReceivingAccount.ContactDetail>;
1273
+ receiving_account_id?: string;
1723
1274
  /**
1724
- * Specifies a ledger account object that will be created with the external
1725
- * account. The resulting ledger account is linked to the external account for
1726
- * auto-ledgering Payment objects. See
1727
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1728
- * for more details.
1275
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
1276
+ * payments the field will be passed through as the "Originator to Beneficiary
1277
+ * Information", also known as OBI or Fedwire tag 6000.
1729
1278
  */
1730
- ledger_account?: ReceivingAccount.LedgerAccount;
1279
+ remittance_information?: string | null;
1731
1280
  /**
1732
- * Additional data represented as key-value pairs. Both the key and value must be
1733
- * strings.
1281
+ * Send an email to the counterparty when the payment order is sent to the bank. If
1282
+ * `null`, `send_remittance_advice` on the Counterparty is used.
1734
1283
  */
1735
- metadata?: Record<string, string>;
1284
+ send_remittance_advice?: boolean | null;
1736
1285
  /**
1737
- * A nickname for the external account. This is only for internal usage and won't
1738
- * affect any payments
1286
+ * An optional descriptor which will appear in the receiver's statement. For
1287
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
1288
+ * length is 10 characters. Note that for ACH payments, the name on your bank
1289
+ * account will be included automatically by the bank, so you can use the
1290
+ * characters for other useful information. For `eft` the maximum length is 15
1291
+ * characters.
1739
1292
  */
1740
- name?: string | null;
1293
+ statement_descriptor?: string | null;
1741
1294
  /**
1742
- * Required if receiving wire payments.
1295
+ * An additional layer of classification for the type of payment order you are
1296
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
1297
+ * payment orders, the `subtype` represents the SEC code. We currently support
1298
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
1743
1299
  */
1744
- party_address?: ReceivingAccount.PartyAddress;
1745
- party_identifier?: string;
1300
+ subtype?: PaymentOrderSubtype | null;
1746
1301
  /**
1747
- * If this value isn't provided, it will be inherited from the counterparty's name.
1302
+ * A flag that determines whether a payment order should go through transaction
1303
+ * monitoring.
1748
1304
  */
1749
- party_name?: string;
1305
+ transaction_monitoring_enabled?: boolean;
1750
1306
  /**
1751
- * Either `individual` or `business`.
1307
+ * Identifier of the ultimate originator of the payment order.
1752
1308
  */
1753
- party_type?: 'business' | 'individual' | null;
1309
+ ultimate_originating_party_identifier?: string | null;
1754
1310
  /**
1755
- * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
1756
- * you can pass the processor token in this field.
1311
+ * Name of the ultimate originator of the payment order.
1757
1312
  */
1758
- plaid_processor_token?: string;
1759
- routing_details?: Array<ReceivingAccount.RoutingDetail>;
1760
- }
1761
- namespace ReceivingAccount {
1762
- interface AccountDetail {
1763
- account_number: string;
1764
- account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
1765
- }
1766
- interface ContactDetail {
1767
- contact_identifier?: string;
1768
- contact_identifier_type?: 'email' | 'phone_number' | 'website';
1313
+ ultimate_originating_party_name?: string | null;
1314
+ /**
1315
+ * Identifier of the ultimate funds recipient.
1316
+ */
1317
+ ultimate_receiving_party_identifier?: string | null;
1318
+ /**
1319
+ * Name of the ultimate funds recipient.
1320
+ */
1321
+ ultimate_receiving_party_name?: string | null;
1322
+ }
1323
+ export declare namespace PaymentOrderCreateAsyncParams {
1324
+ interface Accounting {
1325
+ /**
1326
+ * The ID of one of your accounting categories. Note that these will only be
1327
+ * accessible if your accounting system has been connected.
1328
+ */
1329
+ account_id?: string | null;
1330
+ /**
1331
+ * The ID of one of the class objects in your accounting system. Class objects
1332
+ * track segments of your business independent of client or project. Note that
1333
+ * these will only be accessible if your accounting system has been connected.
1334
+ */
1335
+ class_id?: string | null;
1769
1336
  }
1770
1337
  /**
1771
- * Specifies a ledger account object that will be created with the external
1772
- * account. The resulting ledger account is linked to the external account for
1773
- * auto-ledgering Payment objects. See
1774
- * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1775
- * for more details.
1776
- */
1777
- interface LedgerAccount {
1778
- /**
1779
- * The currency of the ledger account.
1780
- */
1781
- currency: string;
1782
- /**
1783
- * The id of the ledger that this account belongs to.
1784
- */
1785
- ledger_id: string;
1786
- /**
1787
- * The name of the ledger account.
1788
- */
1789
- name: string;
1790
- /**
1791
- * The normal balance of the ledger account.
1792
- */
1793
- normal_balance: 'credit' | 'debit';
1794
- /**
1795
- * The currency exponent of the ledger account.
1796
- */
1797
- currency_exponent?: number | null;
1798
- /**
1799
- * The description of the ledger account.
1800
- */
1801
- description?: string | null;
1802
- /**
1803
- * If the ledger account links to another object in Modern Treasury, the id will be
1804
- * populated here, otherwise null.
1805
- */
1806
- ledgerable_id?: string;
1807
- /**
1808
- * If the ledger account links to another object in Modern Treasury, the type will
1809
- * be populated here, otherwise null. The value is one of internal_account or
1810
- * external_account.
1811
- */
1812
- ledgerable_type?: 'external_account' | 'internal_account';
1813
- /**
1814
- * Additional data represented as key-value pairs. Both the key and value must be
1815
- * strings.
1816
- */
1817
- metadata?: Record<string, string>;
1338
+ * Specifies a ledger transaction object that will be created with the payment
1339
+ * order. If the ledger transaction cannot be created, then the payment order
1340
+ * creation will fail. The resulting ledger transaction will mirror the status of
1341
+ * the payment order.
1342
+ */
1343
+ interface LedgerTransaction {
1344
+ /**
1345
+ * An array of ledger entry objects.
1346
+ */
1347
+ ledger_entries: Array<LedgerTransaction.LedgerEntry>;
1348
+ /**
1349
+ * An optional description for internal use.
1350
+ */
1351
+ description?: string | null;
1352
+ /**
1353
+ * The timestamp (ISO8601 format) at which the ledger transaction happened for
1354
+ * reporting purposes.
1355
+ */
1356
+ effective_at?: string;
1357
+ /**
1358
+ * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1359
+ * purposes.
1360
+ */
1361
+ effective_date?: string;
1362
+ /**
1363
+ * A unique string to represent the ledger transaction. Only one pending or posted
1364
+ * ledger transaction may have this ID in the ledger.
1365
+ */
1366
+ external_id?: string;
1367
+ /**
1368
+ * If the ledger transaction can be reconciled to another object in Modern
1369
+ * Treasury, the id will be populated here, otherwise null.
1370
+ */
1371
+ ledgerable_id?: string;
1372
+ /**
1373
+ * If the ledger transaction can be reconciled to another object in Modern
1374
+ * Treasury, the type will be populated here, otherwise null. This can be one of
1375
+ * payment_order, incoming_payment_detail, expected_payment, return, or reversal.
1376
+ */
1377
+ ledgerable_type?: 'counterparty' | 'expected_payment' | 'incoming_payment_detail' | 'internal_account' | 'line_item' | 'paper_item' | 'payment_order' | 'payment_order_attempt' | 'return' | 'reversal';
1378
+ /**
1379
+ * Additional data represented as key-value pairs. Both the key and value must be
1380
+ * strings.
1381
+ */
1382
+ metadata?: Record<string, string>;
1383
+ /**
1384
+ * To post a ledger transaction at creation, use `posted`.
1385
+ */
1386
+ status?: 'archived' | 'pending' | 'posted';
1387
+ }
1388
+ namespace LedgerTransaction {
1389
+ interface LedgerEntry {
1390
+ /**
1391
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
1392
+ * as 1000. Can be any integer up to 36 digits.
1393
+ */
1394
+ amount: number;
1395
+ /**
1396
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
1397
+ * transaction. A `credit` moves money from your account to someone else's. A
1398
+ * `debit` pulls money from someone else's account to your own. Note that wire,
1399
+ * rtp, and check payments will always be `credit`.
1400
+ */
1401
+ direction: 'credit' | 'debit';
1402
+ /**
1403
+ * The ledger account that this ledger entry is associated with.
1404
+ */
1405
+ ledger_account_id: string;
1406
+ /**
1407
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1408
+ * account’s available balance. If any of these conditions would be false after the
1409
+ * transaction is created, the entire call will fail with error code 422.
1410
+ */
1411
+ available_balance_amount?: Record<string, number> | null;
1412
+ /**
1413
+ * Lock version of the ledger account. This can be passed when creating a ledger
1414
+ * transaction to only succeed if no ledger transactions have posted since the
1415
+ * given version. See our post about Designing the Ledgers API with Optimistic
1416
+ * Locking for more details.
1417
+ */
1418
+ lock_version?: number | null;
1419
+ /**
1420
+ * Additional data represented as key-value pairs. Both the key and value must be
1421
+ * strings.
1422
+ */
1423
+ metadata?: Record<string, string>;
1424
+ /**
1425
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1426
+ * account’s pending balance. If any of these conditions would be false after the
1427
+ * transaction is created, the entire call will fail with error code 422.
1428
+ */
1429
+ pending_balance_amount?: Record<string, number> | null;
1430
+ /**
1431
+ * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1432
+ * account’s posted balance. If any of these conditions would be false after the
1433
+ * transaction is created, the entire call will fail with error code 422.
1434
+ */
1435
+ posted_balance_amount?: Record<string, number> | null;
1436
+ /**
1437
+ * If true, response will include the balance of the associated ledger account for
1438
+ * the entry.
1439
+ */
1440
+ show_resulting_ledger_account_balances?: boolean | null;
1441
+ }
1442
+ }
1443
+ interface LineItem {
1444
+ /**
1445
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
1446
+ * as 1000.
1447
+ */
1448
+ amount: number;
1449
+ /**
1450
+ * The ID of one of your accounting categories. Note that these will only be
1451
+ * accessible if your accounting system has been connected.
1452
+ */
1453
+ accounting_category_id?: string | null;
1454
+ /**
1455
+ * A free-form description of the line item.
1456
+ */
1457
+ description?: string | null;
1458
+ /**
1459
+ * Additional data represented as key-value pairs. Both the key and value must be
1460
+ * strings.
1461
+ */
1462
+ metadata?: Record<string, string>;
1818
1463
  }
1819
1464
  /**
1820
- * Required if receiving wire payments.
1821
- */
1822
- interface PartyAddress {
1823
- /**
1824
- * Country code conforms to [ISO 3166-1 alpha-2]
1825
- */
1826
- country?: string | null;
1827
- line1?: string | null;
1828
- line2?: string | null;
1829
- /**
1830
- * Locality or City.
1831
- */
1832
- locality?: string | null;
1833
- /**
1834
- * The postal code of the address.
1835
- */
1836
- postal_code?: string | null;
1837
- /**
1838
- * Region or State.
1839
- */
1840
- region?: string | null;
1465
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
1466
+ * `receiving_account_id`, you may pass the id of an external account or an
1467
+ * internal account.
1468
+ */
1469
+ interface ReceivingAccount {
1470
+ account_details?: Array<ReceivingAccount.AccountDetail>;
1471
+ /**
1472
+ * Can be `checking`, `savings` or `other`.
1473
+ */
1474
+ account_type?: ExternalAccounts.ExternalAccountType;
1475
+ contact_details?: Array<ReceivingAccount.ContactDetail>;
1476
+ /**
1477
+ * Specifies a ledger account object that will be created with the external
1478
+ * account. The resulting ledger account is linked to the external account for
1479
+ * auto-ledgering Payment objects. See
1480
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1481
+ * for more details.
1482
+ */
1483
+ ledger_account?: ReceivingAccount.LedgerAccount;
1484
+ /**
1485
+ * Additional data represented as key-value pairs. Both the key and value must be
1486
+ * strings.
1487
+ */
1488
+ metadata?: Record<string, string>;
1489
+ /**
1490
+ * A nickname for the external account. This is only for internal usage and won't
1491
+ * affect any payments
1492
+ */
1493
+ name?: string | null;
1494
+ /**
1495
+ * Required if receiving wire payments.
1496
+ */
1497
+ party_address?: ReceivingAccount.PartyAddress;
1498
+ party_identifier?: string;
1499
+ /**
1500
+ * If this value isn't provided, it will be inherited from the counterparty's name.
1501
+ */
1502
+ party_name?: string;
1503
+ /**
1504
+ * Either `individual` or `business`.
1505
+ */
1506
+ party_type?: 'business' | 'individual' | null;
1507
+ /**
1508
+ * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
1509
+ * you can pass the processor token in this field.
1510
+ */
1511
+ plaid_processor_token?: string;
1512
+ routing_details?: Array<ReceivingAccount.RoutingDetail>;
1841
1513
  }
1842
- interface RoutingDetail {
1843
- routing_number: string;
1844
- routing_number_type:
1845
- | 'aba'
1846
- | 'au_bsb'
1847
- | 'se_bankgiro_clearing_code'
1848
- | 'br_codigo'
1849
- | 'ca_cpa'
1850
- | 'chips'
1851
- | 'cnaps'
1852
- | 'gb_sort_code'
1853
- | 'in_ifsc'
1854
- | 'my_branch_code'
1855
- | 'swift'
1856
- | 'jp_zengin_code';
1857
- payment_type?:
1858
- | 'ach'
1859
- | 'au_becs'
1860
- | 'se_bankgirot'
1861
- | 'bacs'
1862
- | 'book'
1863
- | 'card'
1864
- | 'check'
1865
- | 'eft'
1866
- | 'cross_border'
1867
- | 'interac'
1868
- | 'masav'
1869
- | 'neft'
1870
- | 'nics'
1871
- | 'provxchange'
1872
- | 'rtp'
1873
- | 'sen'
1874
- | 'sic'
1875
- | 'sepa'
1876
- | 'signet'
1877
- | 'wire'
1878
- | 'zengin';
1514
+ namespace ReceivingAccount {
1515
+ interface AccountDetail {
1516
+ account_number: string;
1517
+ account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
1518
+ }
1519
+ interface ContactDetail {
1520
+ contact_identifier?: string;
1521
+ contact_identifier_type?: 'email' | 'phone_number' | 'website';
1522
+ }
1523
+ /**
1524
+ * Specifies a ledger account object that will be created with the external
1525
+ * account. The resulting ledger account is linked to the external account for
1526
+ * auto-ledgering Payment objects. See
1527
+ * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1528
+ * for more details.
1529
+ */
1530
+ interface LedgerAccount {
1531
+ /**
1532
+ * The currency of the ledger account.
1533
+ */
1534
+ currency: string;
1535
+ /**
1536
+ * The id of the ledger that this account belongs to.
1537
+ */
1538
+ ledger_id: string;
1539
+ /**
1540
+ * The name of the ledger account.
1541
+ */
1542
+ name: string;
1543
+ /**
1544
+ * The normal balance of the ledger account.
1545
+ */
1546
+ normal_balance: 'credit' | 'debit';
1547
+ /**
1548
+ * The currency exponent of the ledger account.
1549
+ */
1550
+ currency_exponent?: number | null;
1551
+ /**
1552
+ * The description of the ledger account.
1553
+ */
1554
+ description?: string | null;
1555
+ /**
1556
+ * If the ledger account links to another object in Modern Treasury, the id will be
1557
+ * populated here, otherwise null.
1558
+ */
1559
+ ledgerable_id?: string;
1560
+ /**
1561
+ * If the ledger account links to another object in Modern Treasury, the type will
1562
+ * be populated here, otherwise null. The value is one of internal_account or
1563
+ * external_account.
1564
+ */
1565
+ ledgerable_type?: 'external_account' | 'internal_account';
1566
+ /**
1567
+ * Additional data represented as key-value pairs. Both the key and value must be
1568
+ * strings.
1569
+ */
1570
+ metadata?: Record<string, string>;
1571
+ }
1572
+ /**
1573
+ * Required if receiving wire payments.
1574
+ */
1575
+ interface PartyAddress {
1576
+ /**
1577
+ * Country code conforms to [ISO 3166-1 alpha-2]
1578
+ */
1579
+ country?: string | null;
1580
+ line1?: string | null;
1581
+ line2?: string | null;
1582
+ /**
1583
+ * Locality or City.
1584
+ */
1585
+ locality?: string | null;
1586
+ /**
1587
+ * The postal code of the address.
1588
+ */
1589
+ postal_code?: string | null;
1590
+ /**
1591
+ * Region or State.
1592
+ */
1593
+ region?: string | null;
1594
+ }
1595
+ interface RoutingDetail {
1596
+ routing_number: string;
1597
+ routing_number_type: 'aba' | 'au_bsb' | 'se_bankgiro_clearing_code' | 'br_codigo' | 'ca_cpa' | 'chips' | 'cnaps' | 'gb_sort_code' | 'in_ifsc' | 'my_branch_code' | 'swift' | 'jp_zengin_code';
1598
+ payment_type?: 'ach' | 'au_becs' | 'se_bankgirot' | 'bacs' | 'book' | 'card' | 'check' | 'eft' | 'cross_border' | 'interac' | 'masav' | 'neft' | 'nics' | 'provxchange' | 'rtp' | 'sen' | 'sic' | 'sepa' | 'signet' | 'wire' | 'zengin';
1599
+ }
1879
1600
  }
1880
- }
1881
1601
  }
1882
1602
  export declare namespace PaymentOrders {
1883
- export import PaymentOrder = API.PaymentOrder;
1884
- export import PaymentOrderSubtype = API.PaymentOrderSubtype;
1885
- export import PaymentOrderType = API.PaymentOrderType;
1886
- type PaymentOrdersPage = _PaymentOrdersPage;
1887
- export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
1888
- export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
1889
- export import PaymentOrderListParams = API.PaymentOrderListParams;
1890
- export import PaymentOrderCreateAsyncParams = API.PaymentOrderCreateAsyncParams;
1891
- export import Reversals = API.Reversals;
1892
- export import Reversal = API.Reversal;
1893
- export import ReversalsPage = API.ReversalsPage;
1894
- export import ReversalCreateParams = API.ReversalCreateParams;
1895
- export import ReversalListParams = API.ReversalListParams;
1603
+ export import PaymentOrder = API.PaymentOrder;
1604
+ export import PaymentOrderSubtype = API.PaymentOrderSubtype;
1605
+ export import PaymentOrderType = API.PaymentOrderType;
1606
+ type PaymentOrdersPage = _PaymentOrdersPage;
1607
+ export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
1608
+ export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
1609
+ export import PaymentOrderListParams = API.PaymentOrderListParams;
1610
+ export import PaymentOrderCreateAsyncParams = API.PaymentOrderCreateAsyncParams;
1611
+ export import Reversals = API.Reversals;
1612
+ export import Reversal = API.Reversal;
1613
+ export import ReversalsPage = API.ReversalsPage;
1614
+ export import ReversalCreateParams = API.ReversalCreateParams;
1615
+ export import ReversalListParams = API.ReversalListParams;
1896
1616
  }
1897
1617
  export {};
1898
- //# sourceMappingURL=payment-orders.d.ts.map
1618
+ //# sourceMappingURL=payment-orders.d.ts.map