modern-treasury 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +43 -15
- package/_shims/ReadableStream-node.d.ts +6 -0
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/ReadableStream-node.js +14 -0
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/ReadableStream-node.mjs +3 -0
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/ReadableStream.d.ts +38 -0
- package/_shims/ReadableStream.js +5 -0
- package/_shims/ReadableStream.mjs +7 -0
- package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
- package/_shims/agent-node.d.ts.map +1 -0
- package/_shims/{agent.node.js → agent-node.js} +1 -1
- package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
- package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
- package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
- package/_shims/agent.d.ts +1 -1
- package/_shims/agent.js +1 -1
- package/_shims/agent.mjs +1 -1
- package/_shims/{fetch.node.d.ts → fetch-node.d.ts} +12 -1
- package/_shims/fetch.d.ts +9 -1
- package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
- package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
- package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
- package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
- package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
- package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
- package/_shims/fileFromPath.d.ts +2 -2
- package/_shims/fileFromPath.d.ts.map +1 -1
- package/_shims/fileFromPath.js +1 -1
- package/_shims/fileFromPath.mjs +1 -1
- package/_shims/form-data.js +17 -0
- package/_shims/form-data.mjs +20 -0
- package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
- package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
- package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
- package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
- package/_shims/getMultipartRequestOptions.d.ts +1 -1
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
- package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
- package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
- package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
- package/_shims/node-readable-node.js.map +1 -0
- package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
- package/_shims/node-readable-node.mjs.map +1 -0
- package/core.d.ts +91 -34
- package/core.d.ts.map +1 -1
- package/core.js +201 -70
- package/core.js.map +1 -1
- package/core.mjs +195 -70
- package/core.mjs.map +1 -1
- package/index.d.mts +19 -7
- package/index.d.ts +19 -7
- package/index.d.ts.map +1 -1
- package/index.js +23 -9
- package/index.js.map +1 -1
- package/index.mjs +23 -9
- package/index.mjs.map +1 -1
- package/package.json +32 -9
- package/pagination.d.ts +2 -2
- package/pagination.d.ts.map +1 -1
- package/pagination.js +5 -5
- package/pagination.js.map +1 -1
- package/pagination.mjs +5 -5
- package/pagination.mjs.map +1 -1
- package/resources/account-collection-flows.d.ts +8 -33
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +22 -17
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +22 -17
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +8 -13
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +10 -4
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +10 -4
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.d.ts +5 -2
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js +3 -3
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs +3 -3
- package/resources/connections.mjs.map +1 -1
- package/resources/counterparties.d.ts +37 -51
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +17 -5
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +17 -5
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +6 -17
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +13 -7
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +13 -7
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +3 -3
- package/resources/events.mjs +3 -3
- package/resources/expected-payments.d.ts +30 -39
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +10 -4
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +10 -4
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +27 -61
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +24 -6
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +24 -6
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +20 -21
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +10 -4
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +10 -4
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +0 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.d.ts +6 -3
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/balance-reports.js +3 -3
- package/resources/internal-accounts/balance-reports.js.map +1 -1
- package/resources/internal-accounts/balance-reports.mjs +3 -3
- package/resources/internal-accounts/balance-reports.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +16 -21
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +10 -4
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +10 -4
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +67 -42
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +10 -4
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +10 -4
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +32 -185
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +10 -4
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +10 -4
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +47 -87
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +21 -17
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +21 -17
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +33 -22
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +10 -4
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +10 -4
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +11 -16
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js +8 -2
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs +8 -2
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +30 -30
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +10 -4
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +10 -4
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts +20 -6
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-entries.js +3 -3
- package/resources/ledger-entries.js.map +1 -1
- package/resources/ledger-entries.mjs +3 -3
- package/resources/ledger-entries.mjs.map +1 -1
- package/resources/ledger-event-handlers.d.ts +12 -24
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +10 -4
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +10 -4
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +48 -37
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +13 -7
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +13 -7
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +4 -2
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledger-transactions/versions.js +3 -3
- package/resources/ledger-transactions/versions.js.map +1 -1
- package/resources/ledger-transactions/versions.mjs +3 -3
- package/resources/ledger-transactions/versions.mjs.map +1 -1
- package/resources/ledgerable-events.d.ts +13 -18
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +8 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +8 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +16 -20
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +10 -4
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +10 -4
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.d.ts +5 -5
- package/resources/line-items.d.ts.map +1 -1
- package/resources/line-items.js +3 -3
- package/resources/line-items.mjs +3 -3
- package/resources/paper-items.d.ts +6 -3
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/paper-items.js +3 -3
- package/resources/paper-items.js.map +1 -1
- package/resources/paper-items.mjs +3 -3
- package/resources/paper-items.mjs.map +1 -1
- package/resources/payment-flows.d.ts +18 -42
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +22 -17
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +22 -17
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +172 -191
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +21 -11
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +21 -11
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +21 -22
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +10 -4
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +10 -4
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts +3 -3
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/payment-references.js +3 -3
- package/resources/payment-references.mjs +3 -3
- package/resources/returns.d.ts +16 -19
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +10 -4
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +10 -4
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +9 -15
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +10 -4
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +10 -4
- package/resources/routing-details.mjs.map +1 -1
- package/resources/transactions/line-items.d.ts +5 -2
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/line-items.js +3 -3
- package/resources/transactions/line-items.js.map +1 -1
- package/resources/transactions/line-items.mjs +3 -3
- package/resources/transactions/line-items.mjs.map +1 -1
- package/resources/transactions/transactions.d.ts +8 -5
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js +3 -3
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs +3 -3
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/validations.d.ts +1 -1
- package/resources/validations.d.ts.map +1 -1
- package/resources/validations.js +1 -1
- package/resources/validations.mjs +1 -1
- package/resources/virtual-accounts.d.ts +19 -28
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +10 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +10 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.mjs +2 -2
- package/src/_shims/ReadableStream-node.ts +6 -0
- package/src/_shims/ReadableStream.d.ts +38 -0
- package/src/_shims/ReadableStream.js +5 -0
- package/src/_shims/ReadableStream.mjs +7 -0
- package/src/_shims/agent.ts +1 -1
- package/src/_shims/{fetch.node.d.ts → fetch-node.d.ts} +20 -9
- package/src/_shims/fetch.d.ts +18 -10
- package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
- package/src/_shims/fileFromPath.ts +2 -2
- package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
- package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
- package/src/_shims/form-data.js +17 -0
- package/src/_shims/form-data.mjs +20 -0
- package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
- package/src/_shims/getMultipartRequestOptions.ts +3 -3
- package/src/core.ts +275 -97
- package/src/error.ts +1 -1
- package/src/index.ts +31 -18
- package/src/pagination.ts +6 -6
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +29 -57
- package/src/resources/account-details.ts +22 -22
- package/src/resources/connections.ts +11 -8
- package/src/resources/counterparties.ts +61 -65
- package/src/resources/documents.ts +21 -30
- package/src/resources/events.ts +9 -9
- package/src/resources/expected-payments.ts +45 -49
- package/src/resources/external-accounts.ts +59 -78
- package/src/resources/incoming-payment-details.ts +38 -33
- package/src/resources/index.ts +39 -36
- package/src/resources/internal-accounts/balance-reports.ts +13 -10
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +35 -35
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +91 -54
- package/src/resources/invoices/line-items.ts +46 -228
- package/src/resources/ledger-account-categories.ts +67 -111
- package/src/resources/ledger-account-payouts.ts +49 -30
- package/src/resources/ledger-account-statements.ts +21 -21
- package/src/resources/ledger-accounts.ts +46 -40
- package/src/resources/ledger-entries.ts +29 -13
- package/src/resources/ledger-event-handlers.ts +25 -35
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +73 -53
- package/src/resources/ledger-transactions/versions.ts +10 -8
- package/src/resources/ledgerable-events.ts +23 -23
- package/src/resources/ledgers.ts +31 -29
- package/src/resources/line-items.ts +12 -12
- package/src/resources/paper-items.ts +13 -10
- package/src/resources/payment-flows.ts +39 -66
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +204 -216
- package/src/resources/payment-orders/reversals.ts +36 -31
- package/src/resources/payment-references.ts +9 -9
- package/src/resources/returns.ts +30 -28
- package/src/resources/routing-details.ts +23 -24
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +7 -2
- package/src/resources/transactions/line-items.ts +11 -8
- package/src/resources/transactions/transactions.ts +17 -14
- package/src/resources/validations.ts +4 -4
- package/src/resources/virtual-accounts.ts +35 -39
- package/src/resources/webhooks.ts +3 -3
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +6 -6
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +7 -7
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/agent.node.d.ts.map +0 -1
- package/_shims/formdata.js +0 -9
- package/_shims/formdata.mjs +0 -11
- package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
- package/_shims/node-readable.node.js.map +0 -1
- package/_shims/node-readable.node.mjs.map +0 -1
- package/src/_shims/fetch.deno.ts +0 -23
- package/src/_shims/formdata.deno.ts +0 -16
- package/src/_shims/formdata.js +0 -9
- package/src/_shims/formdata.mjs +0 -11
- /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
- /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
- /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
- /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as Returns from '../returns';
|
|
7
|
-
import * as ExternalAccounts from '../external-accounts';
|
|
8
|
-
import * as Shared from '../shared';
|
|
9
|
-
import { Reversals } from './reversals';
|
|
10
|
-
import * as API from './index';
|
|
11
|
-
import { type Uploadable, maybeMultipartFormRequestOptions } from '../../core';
|
|
12
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as Returns from '../returns.js';
|
|
7
|
+
import * as ExternalAccounts from '../external-accounts.js';
|
|
8
|
+
import * as Shared from '../shared.js';
|
|
9
|
+
import { Reversals } from './reversals.js';
|
|
10
|
+
import * as API from './index.js';
|
|
11
|
+
import { type Uploadable, maybeMultipartFormRequestOptions } from '../../core.js';
|
|
12
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
13
13
|
|
|
14
14
|
export class PaymentOrders extends APIResource {
|
|
15
15
|
reversals: Reversals = new Reversals(this.client);
|
|
@@ -17,21 +17,20 @@ export class PaymentOrders extends APIResource {
|
|
|
17
17
|
/**
|
|
18
18
|
* Create a new Payment Order
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
create(params: PaymentOrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder> {
|
|
21
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
22
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
23
|
+
if (idempotencyKey) {
|
|
24
|
+
console.warn(
|
|
25
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
26
|
+
);
|
|
27
|
+
}
|
|
25
28
|
return this.post(
|
|
26
29
|
'/api/payment_orders',
|
|
27
|
-
|
|
30
|
+
maybeMultipartFormRequestOptions({
|
|
28
31
|
body,
|
|
29
32
|
...options,
|
|
30
|
-
headers: {
|
|
31
|
-
'Content-Type': contentType?.toString() || '',
|
|
32
|
-
'Idempotency-Key': idempotencyKey || '',
|
|
33
|
-
...options?.headers,
|
|
34
|
-
},
|
|
33
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
35
34
|
}),
|
|
36
35
|
);
|
|
37
36
|
}
|
|
@@ -39,7 +38,7 @@ export class PaymentOrders extends APIResource {
|
|
|
39
38
|
/**
|
|
40
39
|
* Get details on a single payment order
|
|
41
40
|
*/
|
|
42
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
41
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder> {
|
|
43
42
|
return this.get(`/api/payment_orders/${id}`, options);
|
|
44
43
|
}
|
|
45
44
|
|
|
@@ -50,13 +49,13 @@ export class PaymentOrders extends APIResource {
|
|
|
50
49
|
id: string,
|
|
51
50
|
body?: PaymentOrderUpdateParams,
|
|
52
51
|
options?: Core.RequestOptions,
|
|
53
|
-
):
|
|
54
|
-
update(id: string, options?: Core.RequestOptions):
|
|
52
|
+
): Core.APIPromise<PaymentOrder>;
|
|
53
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
|
|
55
54
|
update(
|
|
56
55
|
id: string,
|
|
57
56
|
body: PaymentOrderUpdateParams | Core.RequestOptions = {},
|
|
58
57
|
options?: Core.RequestOptions,
|
|
59
|
-
):
|
|
58
|
+
): Core.APIPromise<PaymentOrder> {
|
|
60
59
|
if (isRequestOptions(body)) {
|
|
61
60
|
return this.update(id, {}, body);
|
|
62
61
|
}
|
|
@@ -66,12 +65,15 @@ export class PaymentOrders extends APIResource {
|
|
|
66
65
|
/**
|
|
67
66
|
* Get a list of all payment orders
|
|
68
67
|
*/
|
|
69
|
-
list(
|
|
70
|
-
|
|
68
|
+
list(
|
|
69
|
+
query?: PaymentOrderListParams,
|
|
70
|
+
options?: Core.RequestOptions,
|
|
71
|
+
): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
|
|
72
|
+
list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
|
|
71
73
|
list(
|
|
72
74
|
query: PaymentOrderListParams | Core.RequestOptions = {},
|
|
73
75
|
options?: Core.RequestOptions,
|
|
74
|
-
): Core.PagePromise<PaymentOrdersPage> {
|
|
76
|
+
): Core.PagePromise<PaymentOrdersPage, PaymentOrder> {
|
|
75
77
|
if (isRequestOptions(query)) {
|
|
76
78
|
return this.list({}, query);
|
|
77
79
|
}
|
|
@@ -84,12 +86,18 @@ export class PaymentOrders extends APIResource {
|
|
|
84
86
|
createAsync(
|
|
85
87
|
params: PaymentOrderCreateAsyncParams,
|
|
86
88
|
options?: Core.RequestOptions,
|
|
87
|
-
):
|
|
89
|
+
): Core.APIPromise<Shared.AsyncResponse> {
|
|
90
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
88
91
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
92
|
+
if (idempotencyKey) {
|
|
93
|
+
console.warn(
|
|
94
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
95
|
+
);
|
|
96
|
+
}
|
|
89
97
|
return this.post('/api/payment_orders/create_async', {
|
|
90
98
|
body,
|
|
91
99
|
...options,
|
|
92
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
100
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
93
101
|
});
|
|
94
102
|
}
|
|
95
103
|
}
|
|
@@ -491,149 +499,141 @@ export type PaymentOrderType =
|
|
|
491
499
|
|
|
492
500
|
export interface PaymentOrderCreateParams {
|
|
493
501
|
/**
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* is $100,000.
|
|
502
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
503
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
497
504
|
*/
|
|
498
505
|
amount: number;
|
|
499
506
|
|
|
500
507
|
/**
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
508
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
509
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
510
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
504
511
|
* rtp, and check payments will always be `credit`.
|
|
505
512
|
*/
|
|
506
513
|
direction: 'credit' | 'debit';
|
|
507
514
|
|
|
508
515
|
/**
|
|
509
|
-
*
|
|
516
|
+
* The ID of one of your organization's internal accounts.
|
|
510
517
|
*/
|
|
511
518
|
originating_account_id: string;
|
|
512
519
|
|
|
513
520
|
/**
|
|
514
|
-
*
|
|
515
|
-
* `
|
|
521
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
522
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
516
523
|
*/
|
|
517
524
|
type: PaymentOrderType;
|
|
518
525
|
|
|
519
|
-
/**
|
|
520
|
-
* Body param:
|
|
521
|
-
*/
|
|
522
526
|
accounting?: PaymentOrderCreateParams.Accounting;
|
|
523
527
|
|
|
524
528
|
/**
|
|
525
|
-
*
|
|
526
|
-
*
|
|
529
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
530
|
+
* accessible if your accounting system has been connected.
|
|
527
531
|
*/
|
|
528
532
|
accounting_category_id?: string | null;
|
|
529
533
|
|
|
530
534
|
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
535
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
536
|
+
* accessible if your accounting system has been connected.
|
|
533
537
|
*/
|
|
534
538
|
accounting_ledger_class_id?: string | null;
|
|
535
539
|
|
|
536
540
|
/**
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
541
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
542
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
543
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
540
544
|
*/
|
|
541
545
|
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
542
546
|
|
|
543
547
|
/**
|
|
544
|
-
*
|
|
548
|
+
* Defaults to the currency of the originating account.
|
|
545
549
|
*/
|
|
546
550
|
currency?: Shared.Currency | null;
|
|
547
551
|
|
|
548
552
|
/**
|
|
549
|
-
*
|
|
553
|
+
* An optional description for internal use.
|
|
550
554
|
*/
|
|
551
555
|
description?: string | null;
|
|
552
556
|
|
|
553
557
|
/**
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
* `multipart/form-data`.
|
|
558
|
+
* An array of documents to be attached to the payment order. Note that if you
|
|
559
|
+
* attach documents, the request's content type must be `multipart/form-data`.
|
|
557
560
|
*/
|
|
558
561
|
documents?: Array<PaymentOrderCreateParams.Document>;
|
|
559
562
|
|
|
560
563
|
/**
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
565
|
+
* current business day or the next business day if the current day is a bank
|
|
566
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
564
567
|
*/
|
|
565
568
|
effective_date?: string;
|
|
566
569
|
|
|
567
570
|
/**
|
|
568
|
-
*
|
|
569
|
-
* effective_date.
|
|
571
|
+
* RFP payments require an expires_at. This value must be past the effective_date.
|
|
570
572
|
*/
|
|
571
573
|
expires_at?: string | null;
|
|
572
574
|
|
|
573
575
|
/**
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
576
|
+
* A payment type to fallback to if the original type is not valid for the
|
|
577
|
+
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
578
|
+
* (type=rtp and fallback_type=ach)
|
|
577
579
|
*/
|
|
578
580
|
fallback_type?: 'ach';
|
|
579
581
|
|
|
580
582
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
584
|
+
* generated by your financial institution.
|
|
583
585
|
*/
|
|
584
586
|
foreign_exchange_contract?: string | null;
|
|
585
587
|
|
|
586
588
|
/**
|
|
587
|
-
*
|
|
589
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
588
590
|
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
589
591
|
* currency matches the originating account currency.
|
|
590
592
|
*/
|
|
591
593
|
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
592
594
|
|
|
593
595
|
/**
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
596
|
+
* Specifies a ledger transaction object that will be created with the payment
|
|
597
|
+
* order. If the ledger transaction cannot be created, then the payment order
|
|
598
|
+
* creation will fail. The resulting ledger transaction will mirror the status of
|
|
599
|
+
* the payment order.
|
|
598
600
|
*/
|
|
599
601
|
ledger_transaction?: PaymentOrderCreateParams.LedgerTransaction;
|
|
600
602
|
|
|
601
603
|
/**
|
|
602
|
-
*
|
|
603
|
-
* order.
|
|
604
|
+
* An array of line items that must sum up to the amount of the payment order.
|
|
604
605
|
*/
|
|
605
606
|
line_items?: Array<PaymentOrderCreateParams.LineItem>;
|
|
606
607
|
|
|
607
608
|
/**
|
|
608
|
-
*
|
|
609
|
-
*
|
|
609
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
610
|
+
* strings.
|
|
610
611
|
*/
|
|
611
612
|
metadata?: Record<string, string>;
|
|
612
613
|
|
|
613
614
|
/**
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
* settings page.
|
|
615
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
616
|
+
* that this setting must also be turned on in your organization settings page.
|
|
617
617
|
*/
|
|
618
618
|
nsf_protected?: boolean;
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
621
|
+
* If present, this will replace your default company name on receiver's bank
|
|
622
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
623
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
624
|
+
* will be truncated.
|
|
625
625
|
*/
|
|
626
626
|
originating_party_name?: string | null;
|
|
627
627
|
|
|
628
628
|
/**
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
629
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
630
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
631
|
+
* an overnight check rather than standard mail.
|
|
632
632
|
*/
|
|
633
633
|
priority?: 'high' | 'normal';
|
|
634
634
|
|
|
635
635
|
/**
|
|
636
|
-
*
|
|
636
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
637
637
|
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
638
638
|
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
639
639
|
* CPA Code that will be attached to the payment.
|
|
@@ -641,86 +641,75 @@ export interface PaymentOrderCreateParams {
|
|
|
641
641
|
purpose?: string | null;
|
|
642
642
|
|
|
643
643
|
/**
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
644
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
645
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
646
|
+
* internal account.
|
|
647
647
|
*/
|
|
648
648
|
receiving_account?: PaymentOrderCreateParams.ReceivingAccount;
|
|
649
649
|
|
|
650
650
|
/**
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
651
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
652
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
653
|
+
* internal account.
|
|
654
654
|
*/
|
|
655
655
|
receiving_account_id?: string;
|
|
656
656
|
|
|
657
657
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
658
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
659
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
660
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
661
661
|
*/
|
|
662
662
|
remittance_information?: string | null;
|
|
663
663
|
|
|
664
664
|
/**
|
|
665
|
-
*
|
|
666
|
-
*
|
|
665
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
666
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
667
667
|
*/
|
|
668
668
|
send_remittance_advice?: boolean | null;
|
|
669
669
|
|
|
670
670
|
/**
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
671
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
672
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
673
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
674
|
+
* account will be included automatically by the bank, so you can use the
|
|
675
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
676
676
|
* characters.
|
|
677
677
|
*/
|
|
678
678
|
statement_descriptor?: string | null;
|
|
679
679
|
|
|
680
680
|
/**
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
681
|
+
* An additional layer of classification for the type of payment order you are
|
|
682
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
683
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
684
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
685
685
|
*/
|
|
686
686
|
subtype?: PaymentOrderSubtype | null;
|
|
687
687
|
|
|
688
688
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
689
|
+
* A flag that determines whether a payment order should go through transaction
|
|
690
|
+
* monitoring.
|
|
691
691
|
*/
|
|
692
692
|
transaction_monitoring_enabled?: boolean;
|
|
693
693
|
|
|
694
694
|
/**
|
|
695
|
-
*
|
|
695
|
+
* Identifier of the ultimate originator of the payment order.
|
|
696
696
|
*/
|
|
697
697
|
ultimate_originating_party_identifier?: string | null;
|
|
698
698
|
|
|
699
699
|
/**
|
|
700
|
-
*
|
|
700
|
+
* Name of the ultimate originator of the payment order.
|
|
701
701
|
*/
|
|
702
702
|
ultimate_originating_party_name?: string | null;
|
|
703
703
|
|
|
704
704
|
/**
|
|
705
|
-
*
|
|
705
|
+
* Identifier of the ultimate funds recipient.
|
|
706
706
|
*/
|
|
707
707
|
ultimate_receiving_party_identifier?: string | null;
|
|
708
708
|
|
|
709
709
|
/**
|
|
710
|
-
*
|
|
710
|
+
* Name of the ultimate funds recipient.
|
|
711
711
|
*/
|
|
712
712
|
ultimate_receiving_party_name?: string | null;
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Header param:
|
|
716
|
-
*/
|
|
717
|
-
'Content-Type'?: 'application/json' | 'multipart/form-data';
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* Header param: This key should be something unique, preferably something like an
|
|
721
|
-
* UUID.
|
|
722
|
-
*/
|
|
723
|
-
'Idempotency-Key'?: string;
|
|
724
713
|
}
|
|
725
714
|
|
|
726
715
|
export namespace PaymentOrderCreateParams {
|
|
@@ -773,12 +762,6 @@ export namespace PaymentOrderCreateParams {
|
|
|
773
762
|
* the payment order.
|
|
774
763
|
*/
|
|
775
764
|
export interface LedgerTransaction {
|
|
776
|
-
/**
|
|
777
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
778
|
-
* reporting purposes.
|
|
779
|
-
*/
|
|
780
|
-
effective_at: string;
|
|
781
|
-
|
|
782
765
|
/**
|
|
783
766
|
* An array of ledger entry objects.
|
|
784
767
|
*/
|
|
@@ -789,6 +772,12 @@ export namespace PaymentOrderCreateParams {
|
|
|
789
772
|
*/
|
|
790
773
|
description?: string | null;
|
|
791
774
|
|
|
775
|
+
/**
|
|
776
|
+
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
777
|
+
* reporting purposes.
|
|
778
|
+
*/
|
|
779
|
+
effective_at?: string;
|
|
780
|
+
|
|
792
781
|
/**
|
|
793
782
|
* The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
794
783
|
* purposes.
|
|
@@ -872,6 +861,12 @@ export namespace PaymentOrderCreateParams {
|
|
|
872
861
|
*/
|
|
873
862
|
lock_version?: number | null;
|
|
874
863
|
|
|
864
|
+
/**
|
|
865
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
866
|
+
* strings.
|
|
867
|
+
*/
|
|
868
|
+
metadata?: Record<string, string>;
|
|
869
|
+
|
|
875
870
|
/**
|
|
876
871
|
* Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
877
872
|
* account’s pending balance. If any of these conditions would be false after the
|
|
@@ -1660,142 +1655,135 @@ export interface PaymentOrderListParams extends PageParams {
|
|
|
1660
1655
|
|
|
1661
1656
|
export interface PaymentOrderCreateAsyncParams {
|
|
1662
1657
|
/**
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1665
|
-
* is $100,000.
|
|
1658
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
1659
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
1666
1660
|
*/
|
|
1667
1661
|
amount: number;
|
|
1668
1662
|
|
|
1669
1663
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1664
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1665
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
1666
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1673
1667
|
* rtp, and check payments will always be `credit`.
|
|
1674
1668
|
*/
|
|
1675
1669
|
direction: 'credit' | 'debit';
|
|
1676
1670
|
|
|
1677
1671
|
/**
|
|
1678
|
-
*
|
|
1672
|
+
* The ID of one of your organization's internal accounts.
|
|
1679
1673
|
*/
|
|
1680
1674
|
originating_account_id: string;
|
|
1681
1675
|
|
|
1682
1676
|
/**
|
|
1683
|
-
*
|
|
1684
|
-
* `
|
|
1677
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
1678
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
1685
1679
|
*/
|
|
1686
1680
|
type: PaymentOrderType;
|
|
1687
1681
|
|
|
1688
|
-
/**
|
|
1689
|
-
* Body param:
|
|
1690
|
-
*/
|
|
1691
1682
|
accounting?: PaymentOrderCreateAsyncParams.Accounting;
|
|
1692
1683
|
|
|
1693
1684
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
1685
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
1686
|
+
* accessible if your accounting system has been connected.
|
|
1696
1687
|
*/
|
|
1697
1688
|
accounting_category_id?: string | null;
|
|
1698
1689
|
|
|
1699
1690
|
/**
|
|
1700
|
-
*
|
|
1701
|
-
*
|
|
1691
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
1692
|
+
* accessible if your accounting system has been connected.
|
|
1702
1693
|
*/
|
|
1703
1694
|
accounting_ledger_class_id?: string | null;
|
|
1704
1695
|
|
|
1705
1696
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1708
|
-
*
|
|
1697
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
1698
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
1699
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
1709
1700
|
*/
|
|
1710
1701
|
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
1711
1702
|
|
|
1712
1703
|
/**
|
|
1713
|
-
*
|
|
1704
|
+
* Defaults to the currency of the originating account.
|
|
1714
1705
|
*/
|
|
1715
1706
|
currency?: Shared.Currency | null;
|
|
1716
1707
|
|
|
1717
1708
|
/**
|
|
1718
|
-
*
|
|
1709
|
+
* An optional description for internal use.
|
|
1719
1710
|
*/
|
|
1720
1711
|
description?: string | null;
|
|
1721
1712
|
|
|
1722
1713
|
/**
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1714
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
1715
|
+
* current business day or the next business day if the current day is a bank
|
|
1716
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
1726
1717
|
*/
|
|
1727
1718
|
effective_date?: string;
|
|
1728
1719
|
|
|
1729
1720
|
/**
|
|
1730
|
-
*
|
|
1731
|
-
* effective_date.
|
|
1721
|
+
* RFP payments require an expires_at. This value must be past the effective_date.
|
|
1732
1722
|
*/
|
|
1733
1723
|
expires_at?: string | null;
|
|
1734
1724
|
|
|
1735
1725
|
/**
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1738
|
-
*
|
|
1726
|
+
* A payment type to fallback to if the original type is not valid for the
|
|
1727
|
+
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
1728
|
+
* (type=rtp and fallback_type=ach)
|
|
1739
1729
|
*/
|
|
1740
1730
|
fallback_type?: 'ach';
|
|
1741
1731
|
|
|
1742
1732
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
*
|
|
1733
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
1734
|
+
* generated by your financial institution.
|
|
1745
1735
|
*/
|
|
1746
1736
|
foreign_exchange_contract?: string | null;
|
|
1747
1737
|
|
|
1748
1738
|
/**
|
|
1749
|
-
*
|
|
1739
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
1750
1740
|
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
1751
1741
|
* currency matches the originating account currency.
|
|
1752
1742
|
*/
|
|
1753
1743
|
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
1754
1744
|
|
|
1755
1745
|
/**
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
*
|
|
1746
|
+
* Specifies a ledger transaction object that will be created with the payment
|
|
1747
|
+
* order. If the ledger transaction cannot be created, then the payment order
|
|
1748
|
+
* creation will fail. The resulting ledger transaction will mirror the status of
|
|
1749
|
+
* the payment order.
|
|
1760
1750
|
*/
|
|
1761
1751
|
ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
|
|
1762
1752
|
|
|
1763
1753
|
/**
|
|
1764
|
-
*
|
|
1765
|
-
* order.
|
|
1754
|
+
* An array of line items that must sum up to the amount of the payment order.
|
|
1766
1755
|
*/
|
|
1767
1756
|
line_items?: Array<PaymentOrderCreateAsyncParams.LineItem>;
|
|
1768
1757
|
|
|
1769
1758
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1759
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1760
|
+
* strings.
|
|
1772
1761
|
*/
|
|
1773
1762
|
metadata?: Record<string, string>;
|
|
1774
1763
|
|
|
1775
1764
|
/**
|
|
1776
|
-
*
|
|
1777
|
-
*
|
|
1778
|
-
* settings page.
|
|
1765
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
1766
|
+
* that this setting must also be turned on in your organization settings page.
|
|
1779
1767
|
*/
|
|
1780
1768
|
nsf_protected?: boolean;
|
|
1781
1769
|
|
|
1782
1770
|
/**
|
|
1783
|
-
*
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1771
|
+
* If present, this will replace your default company name on receiver's bank
|
|
1772
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
1773
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
1774
|
+
* will be truncated.
|
|
1787
1775
|
*/
|
|
1788
1776
|
originating_party_name?: string | null;
|
|
1789
1777
|
|
|
1790
1778
|
/**
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1779
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
1780
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
1781
|
+
* an overnight check rather than standard mail.
|
|
1794
1782
|
*/
|
|
1795
1783
|
priority?: 'high' | 'normal';
|
|
1796
1784
|
|
|
1797
1785
|
/**
|
|
1798
|
-
*
|
|
1786
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
1799
1787
|
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
1800
1788
|
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
1801
1789
|
* CPA Code that will be attached to the payment.
|
|
@@ -1803,81 +1791,75 @@ export interface PaymentOrderCreateAsyncParams {
|
|
|
1803
1791
|
purpose?: string | null;
|
|
1804
1792
|
|
|
1805
1793
|
/**
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
1808
|
-
*
|
|
1794
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
1795
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
1796
|
+
* internal account.
|
|
1809
1797
|
*/
|
|
1810
1798
|
receiving_account?: PaymentOrderCreateAsyncParams.ReceivingAccount;
|
|
1811
1799
|
|
|
1812
1800
|
/**
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1801
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
1802
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
1803
|
+
* internal account.
|
|
1816
1804
|
*/
|
|
1817
1805
|
receiving_account_id?: string;
|
|
1818
1806
|
|
|
1819
1807
|
/**
|
|
1820
|
-
*
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1808
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
1809
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
1810
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
1823
1811
|
*/
|
|
1824
1812
|
remittance_information?: string | null;
|
|
1825
1813
|
|
|
1826
1814
|
/**
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1815
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
1816
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
1829
1817
|
*/
|
|
1830
1818
|
send_remittance_advice?: boolean | null;
|
|
1831
1819
|
|
|
1832
1820
|
/**
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1821
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
1822
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
1823
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
1824
|
+
* account will be included automatically by the bank, so you can use the
|
|
1825
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
1838
1826
|
* characters.
|
|
1839
1827
|
*/
|
|
1840
1828
|
statement_descriptor?: string | null;
|
|
1841
1829
|
|
|
1842
1830
|
/**
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
*
|
|
1831
|
+
* An additional layer of classification for the type of payment order you are
|
|
1832
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
1833
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
1834
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
1847
1835
|
*/
|
|
1848
1836
|
subtype?: PaymentOrderSubtype | null;
|
|
1849
1837
|
|
|
1850
1838
|
/**
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
1839
|
+
* A flag that determines whether a payment order should go through transaction
|
|
1840
|
+
* monitoring.
|
|
1853
1841
|
*/
|
|
1854
1842
|
transaction_monitoring_enabled?: boolean;
|
|
1855
1843
|
|
|
1856
1844
|
/**
|
|
1857
|
-
*
|
|
1845
|
+
* Identifier of the ultimate originator of the payment order.
|
|
1858
1846
|
*/
|
|
1859
1847
|
ultimate_originating_party_identifier?: string | null;
|
|
1860
1848
|
|
|
1861
1849
|
/**
|
|
1862
|
-
*
|
|
1850
|
+
* Name of the ultimate originator of the payment order.
|
|
1863
1851
|
*/
|
|
1864
1852
|
ultimate_originating_party_name?: string | null;
|
|
1865
1853
|
|
|
1866
1854
|
/**
|
|
1867
|
-
*
|
|
1855
|
+
* Identifier of the ultimate funds recipient.
|
|
1868
1856
|
*/
|
|
1869
1857
|
ultimate_receiving_party_identifier?: string | null;
|
|
1870
1858
|
|
|
1871
1859
|
/**
|
|
1872
|
-
*
|
|
1860
|
+
* Name of the ultimate funds recipient.
|
|
1873
1861
|
*/
|
|
1874
1862
|
ultimate_receiving_party_name?: string | null;
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Header param: This key should be something unique, preferably something like an
|
|
1878
|
-
* UUID.
|
|
1879
|
-
*/
|
|
1880
|
-
'Idempotency-Key'?: string;
|
|
1881
1863
|
}
|
|
1882
1864
|
|
|
1883
1865
|
export namespace PaymentOrderCreateAsyncParams {
|
|
@@ -1903,12 +1885,6 @@ export namespace PaymentOrderCreateAsyncParams {
|
|
|
1903
1885
|
* the payment order.
|
|
1904
1886
|
*/
|
|
1905
1887
|
export interface LedgerTransaction {
|
|
1906
|
-
/**
|
|
1907
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
1908
|
-
* reporting purposes.
|
|
1909
|
-
*/
|
|
1910
|
-
effective_at: string;
|
|
1911
|
-
|
|
1912
1888
|
/**
|
|
1913
1889
|
* An array of ledger entry objects.
|
|
1914
1890
|
*/
|
|
@@ -1919,6 +1895,12 @@ export namespace PaymentOrderCreateAsyncParams {
|
|
|
1919
1895
|
*/
|
|
1920
1896
|
description?: string | null;
|
|
1921
1897
|
|
|
1898
|
+
/**
|
|
1899
|
+
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
1900
|
+
* reporting purposes.
|
|
1901
|
+
*/
|
|
1902
|
+
effective_at?: string;
|
|
1903
|
+
|
|
1922
1904
|
/**
|
|
1923
1905
|
* The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
1924
1906
|
* purposes.
|
|
@@ -2002,6 +1984,12 @@ export namespace PaymentOrderCreateAsyncParams {
|
|
|
2002
1984
|
*/
|
|
2003
1985
|
lock_version?: number | null;
|
|
2004
1986
|
|
|
1987
|
+
/**
|
|
1988
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1989
|
+
* strings.
|
|
1990
|
+
*/
|
|
1991
|
+
metadata?: Record<string, string>;
|
|
1992
|
+
|
|
2005
1993
|
/**
|
|
2006
1994
|
* Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
2007
1995
|
* account’s pending balance. If any of these conditions would be false after the
|