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.
- package/CHANGELOG.md +33 -0
- package/README.md +8 -4
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/{src/_shims/ReadableStream-node.ts → _shims/auto/runtime-bun.d.ts} +2 -3
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +99 -0
- package/_shims/{ReadableStream.js → auto/types.js} +0 -2
- package/{src/_shims/ReadableStream.js → _shims/auto/types.mjs} +0 -2
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +79 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +87 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +54 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +35 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +39 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +35 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +70 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +63 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +82 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +170 -223
- package/core.d.ts.map +1 -1
- package/core.js +678 -731
- package/core.js.map +1 -1
- package/core.mjs +672 -682
- package/core.mjs.map +1 -1
- package/error.d.ts +32 -32
- package/error.d.ts.map +1 -1
- package/error.js +95 -106
- package/error.js.map +1 -1
- package/error.mjs +91 -91
- package/error.mjs.map +1 -1
- package/index.d.mts +323 -333
- package/index.d.ts +323 -333
- package/index.d.ts.map +1 -1
- package/index.js +190 -243
- package/index.js.map +1 -1
- package/index.mjs +167 -190
- package/index.mjs.map +1 -1
- package/package.json +32 -58
- package/pagination.d.ts +11 -11
- package/pagination.js +30 -26
- package/pagination.mjs +28 -24
- package/resource.d.ts +10 -10
- package/resource.js +12 -12
- package/resource.mjs +10 -10
- package/resources/account-collection-flows.d.ts +71 -116
- package/resources/account-collection-flows.js +52 -62
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +47 -55
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +59 -81
- package/resources/account-details.js +47 -50
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +42 -45
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.d.ts +42 -44
- package/resources/connections.js +15 -13
- package/resources/connections.mjs +10 -8
- package/resources/counterparties.d.ts +400 -466
- package/resources/counterparties.js +63 -71
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +58 -66
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +88 -120
- package/resources/documents.js +36 -42
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +30 -36
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +56 -55
- package/resources/events.js +21 -19
- package/resources/events.mjs +16 -14
- package/resources/expected-payments.d.ts +321 -373
- package/resources/expected-payments.js +46 -51
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +41 -44
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +295 -373
- package/resources/external-accounts.js +76 -91
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +71 -84
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +200 -222
- package/resources/incoming-payment-details.js +42 -47
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +37 -40
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +35 -212
- package/resources/index.js +111 -484
- package/resources/index.mjs +34 -37
- package/resources/internal-accounts/balance-reports.d.ts +74 -113
- package/resources/internal-accounts/balance-reports.js +21 -23
- package/resources/internal-accounts/balance-reports.mjs +16 -18
- package/resources/internal-accounts/index.d.ts +3 -15
- package/resources/internal-accounts/index.js +10 -34
- package/resources/internal-accounts/index.mjs +3 -3
- package/resources/internal-accounts/internal-accounts.d.ts +203 -233
- package/resources/internal-accounts/internal-accounts.js +65 -86
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +41 -45
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/index.d.ts +3 -17
- package/resources/invoices/index.js +9 -29
- package/resources/invoices/index.mjs +3 -3
- package/resources/invoices/invoices.d.ts +509 -549
- package/resources/invoices/invoices.js +74 -95
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +50 -54
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +119 -133
- package/resources/invoices/line-items.js +49 -52
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +44 -47
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-balance-monitors.d.ts +213 -224
- package/resources/ledger-account-balance-monitors.js +49 -55
- package/resources/ledger-account-balance-monitors.js.map +1 -1
- package/resources/ledger-account-balance-monitors.mjs +44 -49
- package/resources/ledger-account-balance-monitors.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +255 -276
- package/resources/ledger-account-categories.js +84 -89
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +79 -82
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +151 -160
- package/resources/ledger-account-payouts.js +45 -50
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +40 -43
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +455 -461
- package/resources/ledger-account-statements.js +26 -32
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs +23 -27
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +347 -357
- package/resources/ledger-accounts.js +45 -48
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +40 -43
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts +244 -250
- package/resources/ledger-entries.js +20 -18
- package/resources/ledger-entries.mjs +15 -13
- package/resources/ledger-event-handlers.d.ts +369 -376
- package/resources/ledger-event-handlers.js +44 -49
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +39 -42
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/index.d.ts +3 -16
- package/resources/ledger-transactions/index.js +10 -34
- package/resources/ledger-transactions/index.mjs +3 -3
- package/resources/ledger-transactions/ledger-transactions.d.ts +335 -389
- package/resources/ledger-transactions/ledger-transactions.js +70 -91
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +46 -50
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +199 -214
- package/resources/ledger-transactions/versions.js +18 -16
- package/resources/ledger-transactions/versions.mjs +13 -11
- package/resources/ledgerable-events.d.ts +96 -99
- package/resources/ledgerable-events.js +27 -33
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +24 -28
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +98 -97
- package/resources/ledgers.js +46 -49
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +41 -44
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.d.ts +78 -101
- package/resources/line-items.js +29 -27
- package/resources/line-items.mjs +24 -22
- package/resources/paper-items.d.ts +91 -93
- package/resources/paper-items.js +21 -19
- package/resources/paper-items.mjs +16 -14
- package/resources/payment-flows.d.ts +132 -138
- package/resources/payment-flows.js +49 -57
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +44 -52
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/index.d.ts +3 -13
- package/resources/payment-orders/index.js +9 -29
- package/resources/payment-orders/index.mjs +3 -3
- package/resources/payment-orders/payment-orders.d.ts +1416 -1696
- package/resources/payment-orders/payment-orders.js +80 -109
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +55 -67
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +153 -183
- package/resources/payment-orders/reversals.js +38 -41
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +33 -36
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts +61 -118
- package/resources/payment-references.js +26 -26
- package/resources/payment-references.mjs +21 -19
- package/resources/returns.d.ts +167 -324
- package/resources/returns.js +35 -38
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +30 -33
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +83 -173
- package/resources/routing-details.js +47 -50
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +42 -45
- package/resources/routing-details.mjs.map +1 -1
- package/resources/shared.d.ts +4 -194
- package/resources/shared.js +3 -3
- package/resources/shared.mjs +1 -1
- package/resources/top-level.d.ts +4 -4
- package/resources/top-level.js +5 -4
- package/resources/top-level.mjs +3 -2
- package/resources/transactions/index.d.ts +3 -14
- package/resources/transactions/index.js +10 -34
- package/resources/transactions/index.mjs +3 -3
- package/resources/transactions/line-items.d.ts +69 -78
- package/resources/transactions/line-items.js +21 -19
- package/resources/transactions/line-items.mjs +16 -14
- package/resources/transactions/transactions.d.ts +163 -211
- package/resources/transactions/transactions.js +51 -67
- package/resources/transactions/transactions.mjs +27 -26
- package/resources/validations.d.ts +67 -111
- package/resources/validations.js +13 -12
- package/resources/validations.mjs +10 -9
- package/resources/virtual-accounts.d.ts +161 -201
- package/resources/virtual-accounts.js +46 -51
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +41 -44
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.d.ts +21 -28
- package/resources/webhooks.js +35 -37
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +30 -31
- package/resources/webhooks.mjs.map +1 -1
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +99 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +79 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +79 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +64 -0
- package/src/_shims/web-runtime.ts +91 -0
- package/src/_shims/web-types.d.ts +82 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +72 -43
- package/src/error.ts +4 -2
- package/src/index.ts +10 -8
- package/src/pagination.ts +1 -1
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +5 -5
- package/src/resources/account-details.ts +6 -6
- package/src/resources/connections.ts +5 -5
- package/src/resources/counterparties.ts +8 -8
- package/src/resources/documents.ts +6 -6
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +6 -6
- package/src/resources/external-accounts.ts +8 -8
- package/src/resources/incoming-payment-details.ts +7 -7
- package/src/resources/index.ts +34 -40
- package/src/resources/internal-accounts/balance-reports.ts +6 -6
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +10 -10
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +8 -8
- package/src/resources/invoices/line-items.ts +5 -5
- package/src/resources/ledger-account-balance-monitors.ts +5 -5
- package/src/resources/ledger-account-categories.ts +5 -5
- package/src/resources/ledger-account-payouts.ts +5 -5
- package/src/resources/ledger-account-statements.ts +3 -3
- package/src/resources/ledger-accounts.ts +5 -5
- package/src/resources/ledger-entries.ts +5 -5
- package/src/resources/ledger-event-handlers.ts +5 -5
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +7 -7
- package/src/resources/ledger-transactions/versions.ts +5 -5
- package/src/resources/ledgerable-events.ts +3 -3
- package/src/resources/ledgers.ts +5 -5
- package/src/resources/line-items.ts +5 -5
- package/src/resources/paper-items.ts +6 -6
- package/src/resources/payment-flows.ts +5 -5
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +10 -10
- package/src/resources/payment-orders/reversals.ts +5 -5
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +6 -6
- package/src/resources/routing-details.ts +6 -6
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +2 -7
- package/src/resources/transactions/line-items.ts +5 -5
- package/src/resources/transactions/transactions.ts +7 -7
- package/src/resources/validations.ts +3 -3
- package/src/resources/virtual-accounts.ts +7 -7
- package/src/resources/webhooks.ts +3 -3
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/uploads.ts +12 -16
- package/src/version.ts +1 -1
- package/uploads.d.ts +23 -39
- package/uploads.d.ts.map +1 -1
- package/uploads.js +111 -157
- package/uploads.js.map +1 -1
- package/uploads.mjs +107 -133
- package/uploads.mjs.map +1 -1
- package/version.d.ts +2 -2
- package/version.js +4 -4
- package/version.mjs +2 -2
- package/_shims/ReadableStream-node.d.ts +0 -6
- package/_shims/ReadableStream-node.d.ts.map +0 -1
- package/_shims/ReadableStream-node.js +0 -14
- package/_shims/ReadableStream-node.js.map +0 -1
- package/_shims/ReadableStream-node.mjs +0 -3
- package/_shims/ReadableStream-node.mjs.map +0 -1
- package/_shims/ReadableStream.d.ts +0 -38
- package/_shims/ReadableStream.mjs +0 -7
- package/_shims/agent-node.d.ts +0 -7
- package/_shims/agent-node.d.ts.map +0 -1
- package/_shims/agent-node.js +0 -28
- package/_shims/agent-node.js.map +0 -1
- package/_shims/agent-node.mjs +0 -16
- package/_shims/agent-node.mjs.map +0 -1
- package/_shims/agent.d.ts +0 -9
- package/_shims/agent.d.ts.map +0 -1
- package/_shims/agent.js +0 -14
- package/_shims/agent.js.map +0 -1
- package/_shims/agent.mjs +0 -10
- package/_shims/agent.mjs.map +0 -1
- package/_shims/fetch-node.d.ts +0 -64
- package/_shims/fetch-node.js +0 -12
- package/_shims/fetch-node.mjs +0 -14
- package/_shims/fetch.d.ts +0 -60
- package/_shims/fetch.js +0 -13
- package/_shims/fetch.mjs +0 -15
- package/_shims/fileFromPath-node.d.ts +0 -17
- package/_shims/fileFromPath-node.d.ts.map +0 -1
- package/_shims/fileFromPath-node.js +0 -17
- package/_shims/fileFromPath-node.js.map +0 -1
- package/_shims/fileFromPath-node.mjs +0 -13
- package/_shims/fileFromPath-node.mjs.map +0 -1
- package/_shims/fileFromPath.d.ts +0 -22
- package/_shims/fileFromPath.d.ts.map +0 -1
- package/_shims/fileFromPath.js +0 -16
- package/_shims/fileFromPath.js.map +0 -1
- package/_shims/fileFromPath.mjs +0 -12
- package/_shims/fileFromPath.mjs.map +0 -1
- package/_shims/form-data-node.d.ts +0 -45
- package/_shims/form-data-node.js +0 -11
- package/_shims/form-data-node.mjs +0 -9
- package/_shims/form-data.d.ts +0 -43
- package/_shims/form-data.js +0 -17
- package/_shims/form-data.mjs +0 -20
- package/_shims/getMultipartRequestOptions-node.d.ts +0 -10
- package/_shims/getMultipartRequestOptions-node.d.ts.map +0 -1
- package/_shims/getMultipartRequestOptions-node.js +0 -22
- package/_shims/getMultipartRequestOptions-node.js.map +0 -1
- package/_shims/getMultipartRequestOptions-node.mjs +0 -18
- package/_shims/getMultipartRequestOptions-node.mjs.map +0 -1
- package/_shims/getMultipartRequestOptions.d.ts +0 -10
- package/_shims/getMultipartRequestOptions.d.ts.map +0 -1
- package/_shims/getMultipartRequestOptions.js +0 -12
- package/_shims/getMultipartRequestOptions.js.map +0 -1
- package/_shims/getMultipartRequestOptions.mjs +0 -8
- package/_shims/getMultipartRequestOptions.mjs.map +0 -1
- package/_shims/node-readable-node.d.ts +0 -8
- package/_shims/node-readable-node.d.ts.map +0 -1
- package/_shims/node-readable-node.js +0 -9
- package/_shims/node-readable-node.js.map +0 -1
- package/_shims/node-readable-node.mjs +0 -5
- package/_shims/node-readable-node.mjs.map +0 -1
- package/_shims/node-readable.d.ts +0 -23
- package/_shims/node-readable.d.ts.map +0 -1
- package/_shims/node-readable.js +0 -11
- package/_shims/node-readable.js.map +0 -1
- package/_shims/node-readable.mjs +0 -7
- package/_shims/node-readable.mjs.map +0 -1
- package/src/_shims/ReadableStream.d.ts +0 -38
- package/src/_shims/ReadableStream.mjs +0 -7
- package/src/_shims/agent-node.ts +0 -22
- package/src/_shims/agent.ts +0 -12
- package/src/_shims/fetch-node.d.ts +0 -64
- package/src/_shims/fetch-node.js +0 -12
- package/src/_shims/fetch-node.mjs +0 -14
- package/src/_shims/fetch.d.ts +0 -60
- package/src/_shims/fetch.js +0 -13
- package/src/_shims/fetch.mjs +0 -15
- package/src/_shims/fileFromPath-node.ts +0 -29
- package/src/_shims/fileFromPath.ts +0 -29
- package/src/_shims/form-data-node.d.ts +0 -45
- package/src/_shims/form-data-node.js +0 -11
- package/src/_shims/form-data-node.mjs +0 -9
- package/src/_shims/form-data.d.ts +0 -43
- package/src/_shims/form-data.js +0 -17
- package/src/_shims/form-data.mjs +0 -20
- package/src/_shims/getMultipartRequestOptions-node.ts +0 -25
- package/src/_shims/getMultipartRequestOptions.ts +0 -14
- package/src/_shims/node-readable-node.ts +0 -10
- 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
|
|
7
|
-
import * as API from
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: string,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
45
|
+
accounting_category_id: string | null;
|
|
262
46
|
/**
|
|
263
|
-
* The ID of one of
|
|
264
|
-
*
|
|
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
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
*
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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
|
-
|
|
578
|
-
/**
|
|
579
|
-
* The ID of one of
|
|
580
|
-
*
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
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
|
-
*
|
|
625
|
-
*
|
|
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
|
-
|
|
334
|
+
documents?: Array<PaymentOrderCreateParams.Document>;
|
|
628
335
|
/**
|
|
629
|
-
*
|
|
630
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
344
|
+
expires_at?: string | null;
|
|
638
345
|
/**
|
|
639
|
-
*
|
|
640
|
-
*
|
|
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
|
-
|
|
350
|
+
fallback_type?: 'ach';
|
|
643
351
|
/**
|
|
644
|
-
* If
|
|
645
|
-
*
|
|
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
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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
|
-
*
|
|
666
|
-
|
|
667
|
-
|
|
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
|
-
*
|
|
727
|
-
*
|
|
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
|
-
|
|
389
|
+
originating_party_name?: string | null;
|
|
730
390
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
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
|
-
|
|
395
|
+
priority?: 'high' | 'normal';
|
|
735
396
|
/**
|
|
736
|
-
*
|
|
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
|
-
|
|
402
|
+
purpose?: string | null;
|
|
739
403
|
/**
|
|
740
|
-
*
|
|
741
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
756
|
-
contact_details?: Array<ReceivingAccount.ContactDetail>;
|
|
414
|
+
receiving_account_id?: string;
|
|
757
415
|
/**
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
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
|
-
|
|
420
|
+
remittance_information?: string | null;
|
|
765
421
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
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
|
-
|
|
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
|
|
772
|
-
*
|
|
443
|
+
* A flag that determines whether a payment order should go through transaction
|
|
444
|
+
* monitoring.
|
|
773
445
|
*/
|
|
774
|
-
|
|
446
|
+
transaction_monitoring_enabled?: boolean;
|
|
775
447
|
/**
|
|
776
|
-
*
|
|
448
|
+
* Identifier of the ultimate originator of the payment order.
|
|
777
449
|
*/
|
|
778
|
-
|
|
779
|
-
party_identifier?: string;
|
|
450
|
+
ultimate_originating_party_identifier?: string | null;
|
|
780
451
|
/**
|
|
781
|
-
*
|
|
452
|
+
* Name of the ultimate originator of the payment order.
|
|
782
453
|
*/
|
|
783
|
-
|
|
454
|
+
ultimate_originating_party_name?: string | null;
|
|
784
455
|
/**
|
|
785
|
-
*
|
|
456
|
+
* Identifier of the ultimate funds recipient.
|
|
786
457
|
*/
|
|
787
|
-
|
|
458
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
788
459
|
/**
|
|
789
|
-
*
|
|
790
|
-
* you can pass the processor token in this field.
|
|
460
|
+
* Name of the ultimate funds recipient.
|
|
791
461
|
*/
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
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
|
|
801
|
-
|
|
802
|
-
|
|
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
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
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
|
-
*
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
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
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
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
|
-
|
|
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
|
-
|
|
761
|
+
accounting_category_id?: string | null;
|
|
1117
762
|
/**
|
|
1118
|
-
* The ID of one of
|
|
1119
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
771
|
+
amount?: number;
|
|
1130
772
|
/**
|
|
1131
|
-
* The
|
|
1132
|
-
*
|
|
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
|
-
|
|
777
|
+
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
1135
778
|
/**
|
|
1136
|
-
*
|
|
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
|
-
*
|
|
1141
|
-
*
|
|
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
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
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
|
-
*
|
|
804
|
+
* RFP payments require an expires_at. This value must be past the effective_date.
|
|
1154
805
|
*/
|
|
1155
|
-
|
|
1156
|
-
contact_details?: Array<ReceivingAccount.ContactDetail>;
|
|
806
|
+
expires_at?: string | null;
|
|
1157
807
|
/**
|
|
1158
|
-
*
|
|
1159
|
-
* account.
|
|
1160
|
-
*
|
|
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
|
-
|
|
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
|
|
1172
|
-
*
|
|
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
|
-
|
|
837
|
+
nsf_protected?: boolean;
|
|
1175
838
|
/**
|
|
1176
|
-
*
|
|
839
|
+
* The ID of one of your organization's internal accounts.
|
|
1177
840
|
*/
|
|
1178
|
-
|
|
1179
|
-
party_identifier?: string;
|
|
841
|
+
originating_account_id?: string;
|
|
1180
842
|
/**
|
|
1181
|
-
* If this
|
|
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
|
-
|
|
848
|
+
originating_party_name?: string | null;
|
|
1184
849
|
/**
|
|
1185
|
-
* Either `
|
|
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
|
-
|
|
854
|
+
priority?: 'high' | 'normal';
|
|
1188
855
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
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
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
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
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
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
|
-
*
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
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
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
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
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
| '
|
|
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
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
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
|
-
|
|
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
|
|
1569
|
-
*
|
|
1570
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
1187
|
+
* Defaults to the currency of the originating account.
|
|
1583
1188
|
*/
|
|
1584
|
-
|
|
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
|
-
*
|
|
1591
|
-
*
|
|
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
|
-
|
|
1199
|
+
effective_date?: string;
|
|
1594
1200
|
/**
|
|
1595
|
-
*
|
|
1596
|
-
* purposes.
|
|
1201
|
+
* RFP payments require an expires_at. This value must be past the effective_date.
|
|
1597
1202
|
*/
|
|
1598
|
-
|
|
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
|
-
*
|
|
1601
|
-
*
|
|
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
|
-
|
|
1220
|
+
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
1604
1221
|
/**
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
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
|
-
|
|
1227
|
+
ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
|
|
1609
1228
|
/**
|
|
1610
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
1632
|
-
|
|
1633
|
-
|
|
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
|
-
*
|
|
1693
|
-
*
|
|
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
|
-
|
|
1248
|
+
originating_party_name?: string | null;
|
|
1696
1249
|
/**
|
|
1697
|
-
*
|
|
1698
|
-
*
|
|
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
|
-
|
|
1254
|
+
priority?: 'high' | 'normal';
|
|
1701
1255
|
/**
|
|
1702
|
-
*
|
|
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
|
-
|
|
1261
|
+
purpose?: string | null;
|
|
1705
1262
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
1722
|
-
contact_details?: Array<ReceivingAccount.ContactDetail>;
|
|
1273
|
+
receiving_account_id?: string;
|
|
1723
1274
|
/**
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
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
|
-
|
|
1279
|
+
remittance_information?: string | null;
|
|
1731
1280
|
/**
|
|
1732
|
-
*
|
|
1733
|
-
*
|
|
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
|
-
|
|
1284
|
+
send_remittance_advice?: boolean | null;
|
|
1736
1285
|
/**
|
|
1737
|
-
*
|
|
1738
|
-
*
|
|
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
|
-
|
|
1293
|
+
statement_descriptor?: string | null;
|
|
1741
1294
|
/**
|
|
1742
|
-
*
|
|
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
|
-
|
|
1745
|
-
party_identifier?: string;
|
|
1300
|
+
subtype?: PaymentOrderSubtype | null;
|
|
1746
1301
|
/**
|
|
1747
|
-
*
|
|
1302
|
+
* A flag that determines whether a payment order should go through transaction
|
|
1303
|
+
* monitoring.
|
|
1748
1304
|
*/
|
|
1749
|
-
|
|
1305
|
+
transaction_monitoring_enabled?: boolean;
|
|
1750
1306
|
/**
|
|
1751
|
-
*
|
|
1307
|
+
* Identifier of the ultimate originator of the payment order.
|
|
1752
1308
|
*/
|
|
1753
|
-
|
|
1309
|
+
ultimate_originating_party_identifier?: string | null;
|
|
1754
1310
|
/**
|
|
1755
|
-
*
|
|
1756
|
-
* you can pass the processor token in this field.
|
|
1311
|
+
* Name of the ultimate originator of the payment order.
|
|
1757
1312
|
*/
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
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
|
|
1772
|
-
*
|
|
1773
|
-
*
|
|
1774
|
-
*
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
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
|
-
*
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
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
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
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
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
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
|