modern-treasury 0.0.1
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/.eslintrc.js +10 -0
- package/.prettierrc +6 -0
- package/LICENSE +7 -0
- package/README.md +198 -0
- package/build +10 -0
- package/core.ts +746 -0
- package/dist/cjs/core.d.ts +215 -0
- package/dist/cjs/core.js +815 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/index.d.ts +118 -0
- package/dist/cjs/index.js +128 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +14 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +11 -0
- package/dist/cjs/resource.js +16 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/counterparties.d.ts +500 -0
- package/dist/cjs/resources/counterparties.js +57 -0
- package/dist/cjs/resources/counterparties.js.map +1 -0
- package/dist/cjs/resources/documents.d.ts +66 -0
- package/dist/cjs/resources/documents.js +23 -0
- package/dist/cjs/resources/documents.js.map +1 -0
- package/dist/cjs/resources/events.d.ts +53 -0
- package/dist/cjs/resources/events.js +22 -0
- package/dist/cjs/resources/events.js.map +1 -0
- package/dist/cjs/resources/expected-payments.d.ts +928 -0
- package/dist/cjs/resources/expected-payments.js +31 -0
- package/dist/cjs/resources/expected-payments.js.map +1 -0
- package/dist/cjs/resources/external-accounts.d.ts +597 -0
- package/dist/cjs/resources/external-accounts.js +51 -0
- package/dist/cjs/resources/external-accounts.js.map +1 -0
- package/dist/cjs/resources/incoming-payment-details.d.ts +487 -0
- package/dist/cjs/resources/incoming-payment-details.js +35 -0
- package/dist/cjs/resources/incoming-payment-details.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +15 -0
- package/dist/cjs/resources/index.js +46 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/internal-accounts.d.ts +666 -0
- package/dist/cjs/resources/internal-accounts.js +31 -0
- package/dist/cjs/resources/internal-accounts.js.map +1 -0
- package/dist/cjs/resources/line-items.d.ts +90 -0
- package/dist/cjs/resources/line-items.js +38 -0
- package/dist/cjs/resources/line-items.js.map +1 -0
- package/dist/cjs/resources/paper-items.d.ts +279 -0
- package/dist/cjs/resources/paper-items.js +25 -0
- package/dist/cjs/resources/paper-items.js.map +1 -0
- package/dist/cjs/resources/payment-orders/index.d.ts +2 -0
- package/dist/cjs/resources/payment-orders/index.js +33 -0
- package/dist/cjs/resources/payment-orders/index.js.map +1 -0
- package/dist/cjs/resources/payment-orders/payment-orders.d.ts +2180 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js +56 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -0
- package/dist/cjs/resources/payment-orders/reversals.d.ts +46 -0
- package/dist/cjs/resources/payment-orders/reversals.js +23 -0
- package/dist/cjs/resources/payment-orders/reversals.js.map +1 -0
- package/dist/cjs/resources/returns.d.ts +487 -0
- package/dist/cjs/resources/returns.js +31 -0
- package/dist/cjs/resources/returns.js.map +1 -0
- package/dist/cjs/resources/top-level.d.ts +3 -0
- package/dist/cjs/resources/top-level.js +4 -0
- package/dist/cjs/resources/top-level.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +377 -0
- package/dist/cjs/resources/transactions.js +31 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/validations.d.ts +97 -0
- package/dist/cjs/resources/validations.js +16 -0
- package/dist/cjs/resources/validations.js.map +1 -0
- package/dist/cjs/resources/webhooks.d.ts +31 -0
- package/dist/cjs/resources/webhooks.js +44 -0
- package/dist/cjs/resources/webhooks.js.map +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js +275 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/documents.test.js +78 -0
- package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/events.test.js +100 -0
- package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js +176 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js +248 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js +130 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js +144 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.js +123 -0
- package/dist/cjs/tests/api-resources/line-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js +96 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js +77 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/returns.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/returns.test.js +116 -0
- package/dist/cjs/tests/api-resources/returns.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.js +59 -0
- package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.js +134 -0
- package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/validations.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/validations.test.js +62 -0
- package/dist/cjs/tests/api-resources/validations.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js +100 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +1 -0
- package/dist/cjs/tests/form.test.js +61 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +1 -0
- package/dist/cjs/tests/index.test.js +57 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +1 -0
- package/dist/cjs/tests/responses.test.js +60 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/index.ts +175 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +36 -0
- package/resource.ts +22 -0
- package/resources/counterparties.ts +666 -0
- package/resources/documents.ts +97 -0
- package/resources/events.ts +86 -0
- package/resources/expected-payments.ts +1016 -0
- package/resources/external-accounts.ts +762 -0
- package/resources/incoming-payment-details.ts +592 -0
- package/resources/index.ts +16 -0
- package/resources/internal-accounts.ts +774 -0
- package/resources/line-items.ts +138 -0
- package/resources/paper-items.ts +317 -0
- package/resources/payment-orders/index.ts +3 -0
- package/resources/payment-orders/payment-orders.ts +2486 -0
- package/resources/payment-orders/reversals.ts +72 -0
- package/resources/returns.ts +545 -0
- package/resources/top-level.ts +5 -0
- package/resources/transactions.ts +441 -0
- package/resources/validations.ts +115 -0
- package/resources/webhooks.ts +48 -0
- package/tests/api-resources/counterparties.test.ts +237 -0
- package/tests/api-resources/documents.test.ts +40 -0
- package/tests/api-resources/events.test.ts +62 -0
- package/tests/api-resources/expected-payments.test.ts +138 -0
- package/tests/api-resources/external-accounts.test.ts +210 -0
- package/tests/api-resources/incoming-payment-details.test.ts +92 -0
- package/tests/api-resources/internal-accounts.test.ts +103 -0
- package/tests/api-resources/line-items.test.ts +85 -0
- package/tests/api-resources/paper-items.test.ts +58 -0
- package/tests/api-resources/payment-orders/payment-orders.test.ts +39 -0
- package/tests/api-resources/returns.test.ts +78 -0
- package/tests/api-resources/top-level.test.ts +21 -0
- package/tests/api-resources/transactions.test.ts +96 -0
- package/tests/api-resources/validations.test.ts +24 -0
- package/tests/api-resources/webhooks.test.ts +102 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +62 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,2486 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import { isRequestOptions } from '~/core';
|
|
6
|
+
import { Reversals } from './reversals';
|
|
7
|
+
import { Page, PageParams } from '~/pagination';
|
|
8
|
+
import * as Returns from '~/resources/returns';
|
|
9
|
+
|
|
10
|
+
export class PaymentOrders extends APIResource {
|
|
11
|
+
reversals: Reversals = new Reversals(this.client);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create a new Payment Order
|
|
15
|
+
*/
|
|
16
|
+
create(
|
|
17
|
+
body: PaymentOrderCreateParams,
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Promise<Core.APIResponse<PaymentOrder>> {
|
|
20
|
+
return this.post('/api/payment_orders', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get details on a single payment order
|
|
25
|
+
*/
|
|
26
|
+
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaymentOrder>> {
|
|
27
|
+
return this.get(`/api/payment_orders/${id}`, options);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Update a payment order
|
|
32
|
+
*/
|
|
33
|
+
update(
|
|
34
|
+
id: string,
|
|
35
|
+
body?: PaymentOrderUpdateParams,
|
|
36
|
+
options?: Core.RequestOptions,
|
|
37
|
+
): Promise<Core.APIResponse<PaymentOrder>>;
|
|
38
|
+
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaymentOrder>>;
|
|
39
|
+
update(
|
|
40
|
+
id: string,
|
|
41
|
+
body: PaymentOrderUpdateParams | Core.RequestOptions = {},
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Promise<Core.APIResponse<PaymentOrder>> {
|
|
44
|
+
if (isRequestOptions(body)) {
|
|
45
|
+
return this.update(id, {}, body);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return this.patch(`/api/payment_orders/${id}`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get a list of all payment orders
|
|
53
|
+
*/
|
|
54
|
+
list(query?: PaymentOrderListParams, options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage>;
|
|
55
|
+
list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage>;
|
|
56
|
+
list(
|
|
57
|
+
query: PaymentOrderListParams | Core.RequestOptions = {},
|
|
58
|
+
options?: Core.RequestOptions,
|
|
59
|
+
): Core.PagePromise<PaymentOrdersPage> {
|
|
60
|
+
if (isRequestOptions(query)) {
|
|
61
|
+
return this.list({}, query);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return this.getAPIList('/api/payment_orders', PaymentOrdersPage, { query, ...options });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Create a new payment order asynchronously
|
|
69
|
+
*/
|
|
70
|
+
createAsync(body: PaymentOrderCreateAsyncParams, options?: Core.RequestOptions): Promise<void> {
|
|
71
|
+
return this.post('/api/payment_orders/create_async', {
|
|
72
|
+
body,
|
|
73
|
+
...options,
|
|
74
|
+
headers: { Accept: '', ...options?.headers },
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export class PaymentOrdersPage extends Page<PaymentOrder> {}
|
|
80
|
+
|
|
81
|
+
export interface PaymentOrder {
|
|
82
|
+
/**
|
|
83
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
84
|
+
* accessible if your accounting system has been connected.
|
|
85
|
+
*/
|
|
86
|
+
accounting_category_id?: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
90
|
+
* accessible if your accounting system has been connected.
|
|
91
|
+
*/
|
|
92
|
+
accounting_ledger_class_id?: string | null;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
96
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
97
|
+
*/
|
|
98
|
+
amount?: number;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
102
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
103
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
104
|
+
*/
|
|
105
|
+
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* If the payment order is tied to a specific Counterparty, their id will appear,
|
|
109
|
+
* otherwise `null`.
|
|
110
|
+
*/
|
|
111
|
+
counterparty_id?: string | null;
|
|
112
|
+
|
|
113
|
+
created_at?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Defaults to the currency of the originating account.
|
|
117
|
+
*/
|
|
118
|
+
currency?:
|
|
119
|
+
| 'AED'
|
|
120
|
+
| 'AFN'
|
|
121
|
+
| 'ALL'
|
|
122
|
+
| 'AMD'
|
|
123
|
+
| 'ANG'
|
|
124
|
+
| 'AOA'
|
|
125
|
+
| 'ARS'
|
|
126
|
+
| 'AUD'
|
|
127
|
+
| 'AWG'
|
|
128
|
+
| 'AZN'
|
|
129
|
+
| 'BAM'
|
|
130
|
+
| 'BBD'
|
|
131
|
+
| 'BCH'
|
|
132
|
+
| 'BDT'
|
|
133
|
+
| 'BGN'
|
|
134
|
+
| 'BHD'
|
|
135
|
+
| 'BIF'
|
|
136
|
+
| 'BMD'
|
|
137
|
+
| 'BND'
|
|
138
|
+
| 'BOB'
|
|
139
|
+
| 'BRL'
|
|
140
|
+
| 'BSD'
|
|
141
|
+
| 'BTC'
|
|
142
|
+
| 'BTN'
|
|
143
|
+
| 'BWP'
|
|
144
|
+
| 'BYN'
|
|
145
|
+
| 'BYR'
|
|
146
|
+
| 'BZD'
|
|
147
|
+
| 'CAD'
|
|
148
|
+
| 'CDF'
|
|
149
|
+
| 'CHF'
|
|
150
|
+
| 'CLF'
|
|
151
|
+
| 'CLP'
|
|
152
|
+
| 'CNH'
|
|
153
|
+
| 'CNY'
|
|
154
|
+
| 'COP'
|
|
155
|
+
| 'CRC'
|
|
156
|
+
| 'CUC'
|
|
157
|
+
| 'CUP'
|
|
158
|
+
| 'CVE'
|
|
159
|
+
| 'CZK'
|
|
160
|
+
| 'DJF'
|
|
161
|
+
| 'DKK'
|
|
162
|
+
| 'DOP'
|
|
163
|
+
| 'DZD'
|
|
164
|
+
| 'EEK'
|
|
165
|
+
| 'EGP'
|
|
166
|
+
| 'ERN'
|
|
167
|
+
| 'ETB'
|
|
168
|
+
| 'EUR'
|
|
169
|
+
| 'FJD'
|
|
170
|
+
| 'FKP'
|
|
171
|
+
| 'GBP'
|
|
172
|
+
| 'GBX'
|
|
173
|
+
| 'GEL'
|
|
174
|
+
| 'GGP'
|
|
175
|
+
| 'GHS'
|
|
176
|
+
| 'GIP'
|
|
177
|
+
| 'GMD'
|
|
178
|
+
| 'GNF'
|
|
179
|
+
| 'GTQ'
|
|
180
|
+
| 'GYD'
|
|
181
|
+
| 'HKD'
|
|
182
|
+
| 'HNL'
|
|
183
|
+
| 'HRK'
|
|
184
|
+
| 'HTG'
|
|
185
|
+
| 'HUF'
|
|
186
|
+
| 'IDR'
|
|
187
|
+
| 'ILS'
|
|
188
|
+
| 'IMP'
|
|
189
|
+
| 'INR'
|
|
190
|
+
| 'IQD'
|
|
191
|
+
| 'IRR'
|
|
192
|
+
| 'ISK'
|
|
193
|
+
| 'JEP'
|
|
194
|
+
| 'JMD'
|
|
195
|
+
| 'JOD'
|
|
196
|
+
| 'JPY'
|
|
197
|
+
| 'KES'
|
|
198
|
+
| 'KGS'
|
|
199
|
+
| 'KHR'
|
|
200
|
+
| 'KMF'
|
|
201
|
+
| 'KPW'
|
|
202
|
+
| 'KRW'
|
|
203
|
+
| 'KWD'
|
|
204
|
+
| 'KYD'
|
|
205
|
+
| 'KZT'
|
|
206
|
+
| 'LAK'
|
|
207
|
+
| 'LBP'
|
|
208
|
+
| 'LKR'
|
|
209
|
+
| 'LRD'
|
|
210
|
+
| 'LSL'
|
|
211
|
+
| 'LTL'
|
|
212
|
+
| 'LVL'
|
|
213
|
+
| 'LYD'
|
|
214
|
+
| 'MAD'
|
|
215
|
+
| 'MDL'
|
|
216
|
+
| 'MGA'
|
|
217
|
+
| 'MKD'
|
|
218
|
+
| 'MMK'
|
|
219
|
+
| 'MNT'
|
|
220
|
+
| 'MOP'
|
|
221
|
+
| 'MRO'
|
|
222
|
+
| 'MRU'
|
|
223
|
+
| 'MTL'
|
|
224
|
+
| 'MUR'
|
|
225
|
+
| 'MVR'
|
|
226
|
+
| 'MWK'
|
|
227
|
+
| 'MXN'
|
|
228
|
+
| 'MYR'
|
|
229
|
+
| 'MZN'
|
|
230
|
+
| 'NAD'
|
|
231
|
+
| 'NGN'
|
|
232
|
+
| 'NIO'
|
|
233
|
+
| 'NOK'
|
|
234
|
+
| 'NPR'
|
|
235
|
+
| 'NZD'
|
|
236
|
+
| 'OMR'
|
|
237
|
+
| 'PAB'
|
|
238
|
+
| 'PEN'
|
|
239
|
+
| 'PGK'
|
|
240
|
+
| 'PHP'
|
|
241
|
+
| 'PKR'
|
|
242
|
+
| 'PLN'
|
|
243
|
+
| 'PYG'
|
|
244
|
+
| 'QAR'
|
|
245
|
+
| 'RON'
|
|
246
|
+
| 'RSD'
|
|
247
|
+
| 'RUB'
|
|
248
|
+
| 'RWF'
|
|
249
|
+
| 'SAR'
|
|
250
|
+
| 'SBD'
|
|
251
|
+
| 'SCR'
|
|
252
|
+
| 'SDG'
|
|
253
|
+
| 'SEK'
|
|
254
|
+
| 'SGD'
|
|
255
|
+
| 'SHP'
|
|
256
|
+
| 'SKK'
|
|
257
|
+
| 'SLL'
|
|
258
|
+
| 'SOS'
|
|
259
|
+
| 'SRD'
|
|
260
|
+
| 'SSP'
|
|
261
|
+
| 'STD'
|
|
262
|
+
| 'SVC'
|
|
263
|
+
| 'SYP'
|
|
264
|
+
| 'SZL'
|
|
265
|
+
| 'THB'
|
|
266
|
+
| 'TJS'
|
|
267
|
+
| 'TMM'
|
|
268
|
+
| 'TMT'
|
|
269
|
+
| 'TND'
|
|
270
|
+
| 'TOP'
|
|
271
|
+
| 'TRY'
|
|
272
|
+
| 'TTD'
|
|
273
|
+
| 'TWD'
|
|
274
|
+
| 'TZS'
|
|
275
|
+
| 'UAH'
|
|
276
|
+
| 'UGX'
|
|
277
|
+
| 'USD'
|
|
278
|
+
| 'UYU'
|
|
279
|
+
| 'UZS'
|
|
280
|
+
| 'VEF'
|
|
281
|
+
| 'VES'
|
|
282
|
+
| 'VND'
|
|
283
|
+
| 'VUV'
|
|
284
|
+
| 'WST'
|
|
285
|
+
| 'XAF'
|
|
286
|
+
| 'XAG'
|
|
287
|
+
| 'XAU'
|
|
288
|
+
| 'XBA'
|
|
289
|
+
| 'XBB'
|
|
290
|
+
| 'XBC'
|
|
291
|
+
| 'XBD'
|
|
292
|
+
| 'XCD'
|
|
293
|
+
| 'XDR'
|
|
294
|
+
| 'XFU'
|
|
295
|
+
| 'XOF'
|
|
296
|
+
| 'XPD'
|
|
297
|
+
| 'XPF'
|
|
298
|
+
| 'XPT'
|
|
299
|
+
| 'XTS'
|
|
300
|
+
| 'YER'
|
|
301
|
+
| 'ZAR'
|
|
302
|
+
| 'ZMK'
|
|
303
|
+
| 'ZMW'
|
|
304
|
+
| 'ZWD'
|
|
305
|
+
| 'ZWL'
|
|
306
|
+
| 'ZWN'
|
|
307
|
+
| 'ZWR';
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* If the payment order's status is `returned`, this will include the return
|
|
311
|
+
* object's data.
|
|
312
|
+
*/
|
|
313
|
+
current_return?: Returns.ReturnObject | null;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* The ID of the compliance decision for the payment order, if transaction
|
|
317
|
+
* monitoring is enabled.
|
|
318
|
+
*/
|
|
319
|
+
decision_id?: string | null;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* An optional description for internal use.
|
|
323
|
+
*/
|
|
324
|
+
description?: string | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
328
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
329
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
330
|
+
* rtp, and check payments will always be `credit`.
|
|
331
|
+
*/
|
|
332
|
+
direction?: 'credit' | 'debit';
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
336
|
+
* current business day or the next business day if the current day is a bank
|
|
337
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
338
|
+
*/
|
|
339
|
+
effective_date?: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
343
|
+
* generated by your financial institution.
|
|
344
|
+
*/
|
|
345
|
+
foreign_exchange_contract?: string | null;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
349
|
+
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
350
|
+
* currency matches the originating account currency.
|
|
351
|
+
*/
|
|
352
|
+
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
353
|
+
|
|
354
|
+
id?: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The ID of the ledger transaction linked to the payment order.
|
|
358
|
+
*/
|
|
359
|
+
ledger_transaction_id?: string | null;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* This field will be true if this object exists in the live environment or false
|
|
363
|
+
* if it exists in the test environment.
|
|
364
|
+
*/
|
|
365
|
+
live_mode?: boolean;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
369
|
+
* strings.
|
|
370
|
+
*/
|
|
371
|
+
metadata?: Record<string, string>;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
375
|
+
* that this setting must also be turned on in your organization settings page.
|
|
376
|
+
*/
|
|
377
|
+
nsf_protected?: boolean;
|
|
378
|
+
|
|
379
|
+
object?: string;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* The ID of one of your organization's internal accounts.
|
|
383
|
+
*/
|
|
384
|
+
originating_account_id?: string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* If present, this will replace your default company name on receiver's bank
|
|
388
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
389
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
390
|
+
* will be truncated.
|
|
391
|
+
*/
|
|
392
|
+
originating_party_name?: string | null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
396
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
397
|
+
* an overnight check rather than standard mail.
|
|
398
|
+
*/
|
|
399
|
+
priority?: 'high' | 'normal';
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
403
|
+
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
404
|
+
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
405
|
+
* CPA Code that will be attached to the payment.
|
|
406
|
+
*/
|
|
407
|
+
purpose?: string | null;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* The receiving account ID. Can be an `external_account` or `internal_account`.
|
|
411
|
+
*/
|
|
412
|
+
receiving_account_id?: string;
|
|
413
|
+
|
|
414
|
+
receiving_account_type?: 'internal_account' | 'external_account';
|
|
415
|
+
|
|
416
|
+
reference_numbers?: Array<PaymentOrder.ReferenceNumbers>;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
420
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
421
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
422
|
+
*/
|
|
423
|
+
remittance_information?: string | null;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
427
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
428
|
+
*/
|
|
429
|
+
send_remittance_advice?: boolean | null;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
433
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
434
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
435
|
+
* account will be included automatically by the bank, so you can use the
|
|
436
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
437
|
+
* characters.
|
|
438
|
+
*/
|
|
439
|
+
statement_descriptor?: string | null;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* The current status of the payment order.
|
|
443
|
+
*/
|
|
444
|
+
status?:
|
|
445
|
+
| 'approved'
|
|
446
|
+
| 'cancelled'
|
|
447
|
+
| 'completed'
|
|
448
|
+
| 'denied'
|
|
449
|
+
| 'failed'
|
|
450
|
+
| 'needs_approval'
|
|
451
|
+
| 'pending'
|
|
452
|
+
| 'processing'
|
|
453
|
+
| 'returned'
|
|
454
|
+
| 'reversed'
|
|
455
|
+
| 'sent';
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* An additional layer of classification for the type of payment order you are
|
|
459
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
460
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
461
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
462
|
+
*/
|
|
463
|
+
subtype?: 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The IDs of all the transactions associated to this payment order. Usually, you
|
|
467
|
+
* will only have a single transaction ID. However, if a payment order initially
|
|
468
|
+
* results in a Return, but gets redrafted and is later successfully completed, it
|
|
469
|
+
* can have many transactions.
|
|
470
|
+
*/
|
|
471
|
+
transaction_ids?: Array<string>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* A flag that determines whether a payment order should go through transaction
|
|
475
|
+
* monitoring.
|
|
476
|
+
*/
|
|
477
|
+
transaction_monitoring_enabled?: boolean;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
481
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
482
|
+
*/
|
|
483
|
+
type?:
|
|
484
|
+
| 'ach'
|
|
485
|
+
| 'au_becs'
|
|
486
|
+
| 'bacs'
|
|
487
|
+
| 'book'
|
|
488
|
+
| 'card'
|
|
489
|
+
| 'check'
|
|
490
|
+
| 'eft'
|
|
491
|
+
| 'interac'
|
|
492
|
+
| 'provxchange'
|
|
493
|
+
| 'rtp'
|
|
494
|
+
| 'sen'
|
|
495
|
+
| 'sepa'
|
|
496
|
+
| 'signet'
|
|
497
|
+
| 'wire';
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Identifier of the ultimate originator of the payment order.
|
|
501
|
+
*/
|
|
502
|
+
ultimate_originating_party_identifier?: string | null;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Name of the ultimate originator of the payment order.
|
|
506
|
+
*/
|
|
507
|
+
ultimate_originating_party_name?: string | null;
|
|
508
|
+
|
|
509
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
510
|
+
|
|
511
|
+
ultimate_receiving_party_name?: string | null;
|
|
512
|
+
|
|
513
|
+
updated_at?: string;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* This field will be populated if a vendor (e.g. Currencycloud) failure occurs.
|
|
517
|
+
* Logic shouldn't be built on its value as it is free-form.
|
|
518
|
+
*/
|
|
519
|
+
vendor_failure_reason?: string | null;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export namespace PaymentOrder {
|
|
523
|
+
export interface ReferenceNumbers {
|
|
524
|
+
created_at?: string;
|
|
525
|
+
|
|
526
|
+
id?: string;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* This field will be true if this object exists in the live environment or false
|
|
530
|
+
* if it exists in the test environment.
|
|
531
|
+
*/
|
|
532
|
+
live_mode?: boolean;
|
|
533
|
+
|
|
534
|
+
object?: string;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The vendor reference number.
|
|
538
|
+
*/
|
|
539
|
+
reference_number?: string;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* The type of the reference number. Referring to the vendor payment id.
|
|
543
|
+
*/
|
|
544
|
+
reference_number_type?:
|
|
545
|
+
| 'ach_original_trace_number'
|
|
546
|
+
| 'ach_trace_number'
|
|
547
|
+
| 'bankprov_payment_id'
|
|
548
|
+
| 'bnk_dev_prenotification_id'
|
|
549
|
+
| 'bnk_dev_transfer_id'
|
|
550
|
+
| 'bofa_end_to_end_id'
|
|
551
|
+
| 'bofa_transaction_id'
|
|
552
|
+
| 'check_number'
|
|
553
|
+
| 'cross_river_payment_id'
|
|
554
|
+
| 'cross_river_transaction_id'
|
|
555
|
+
| 'currencycloud_conversion_id'
|
|
556
|
+
| 'currencycloud_payment_id'
|
|
557
|
+
| 'dwolla_transaction_id'
|
|
558
|
+
| 'eft_trace_number'
|
|
559
|
+
| 'fedwire_imad'
|
|
560
|
+
| 'fedwire_omad'
|
|
561
|
+
| 'first_republic_internal_id'
|
|
562
|
+
| 'goldman_sachs_collection_request_id'
|
|
563
|
+
| 'goldman_sachs_end_to_end_id'
|
|
564
|
+
| 'goldman_sachs_payment_request_id'
|
|
565
|
+
| 'goldman_sachs_request_id'
|
|
566
|
+
| 'goldman_sachs_unique_payment_id'
|
|
567
|
+
| 'jpmc_ccn'
|
|
568
|
+
| 'jpmc_end_to_end_id'
|
|
569
|
+
| 'jpmc_firm_root_id'
|
|
570
|
+
| 'jpmc_p3_id'
|
|
571
|
+
| 'jpmc_payment_information_id'
|
|
572
|
+
| 'lob_check_id'
|
|
573
|
+
| 'other'
|
|
574
|
+
| 'partial_swift_mir'
|
|
575
|
+
| 'pnc_clearing_reference'
|
|
576
|
+
| 'pnc_instruction_id'
|
|
577
|
+
| 'pnc_multipayment_id'
|
|
578
|
+
| 'pnc_payment_trace_id'
|
|
579
|
+
| 'rtp_instruction_id'
|
|
580
|
+
| 'signet_api_reference_id'
|
|
581
|
+
| 'signet_confirmation_id'
|
|
582
|
+
| 'signet_request_id'
|
|
583
|
+
| 'silvergate_payment_id'
|
|
584
|
+
| 'swift_mir'
|
|
585
|
+
| 'swift_uetr'
|
|
586
|
+
| 'usbank_transaction_id'
|
|
587
|
+
| 'wells_fargo_payment_id'
|
|
588
|
+
| 'wells_fargo_trace_number';
|
|
589
|
+
|
|
590
|
+
updated_at?: string;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export interface PaymentOrderCreateParams {
|
|
595
|
+
/**
|
|
596
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
597
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
598
|
+
*/
|
|
599
|
+
amount: number;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
603
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
604
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
605
|
+
* rtp, and check payments will always be `credit`.
|
|
606
|
+
*/
|
|
607
|
+
direction: 'credit' | 'debit';
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The ID of one of your organization's internal accounts.
|
|
611
|
+
*/
|
|
612
|
+
originating_account_id: string;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
616
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
617
|
+
*/
|
|
618
|
+
type:
|
|
619
|
+
| 'ach'
|
|
620
|
+
| 'au_becs'
|
|
621
|
+
| 'bacs'
|
|
622
|
+
| 'book'
|
|
623
|
+
| 'card'
|
|
624
|
+
| 'check'
|
|
625
|
+
| 'eft'
|
|
626
|
+
| 'interac'
|
|
627
|
+
| 'provxchange'
|
|
628
|
+
| 'rtp'
|
|
629
|
+
| 'sen'
|
|
630
|
+
| 'sepa'
|
|
631
|
+
| 'signet'
|
|
632
|
+
| 'wire';
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
636
|
+
* accessible if your accounting system has been connected.
|
|
637
|
+
*/
|
|
638
|
+
accounting_category_id?: string | null;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
642
|
+
* accessible if your accounting system has been connected.
|
|
643
|
+
*/
|
|
644
|
+
accounting_ledger_class_id?: string | null;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
648
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
649
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
650
|
+
*/
|
|
651
|
+
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Defaults to the currency of the originating account.
|
|
655
|
+
*/
|
|
656
|
+
currency?:
|
|
657
|
+
| 'AED'
|
|
658
|
+
| 'AFN'
|
|
659
|
+
| 'ALL'
|
|
660
|
+
| 'AMD'
|
|
661
|
+
| 'ANG'
|
|
662
|
+
| 'AOA'
|
|
663
|
+
| 'ARS'
|
|
664
|
+
| 'AUD'
|
|
665
|
+
| 'AWG'
|
|
666
|
+
| 'AZN'
|
|
667
|
+
| 'BAM'
|
|
668
|
+
| 'BBD'
|
|
669
|
+
| 'BCH'
|
|
670
|
+
| 'BDT'
|
|
671
|
+
| 'BGN'
|
|
672
|
+
| 'BHD'
|
|
673
|
+
| 'BIF'
|
|
674
|
+
| 'BMD'
|
|
675
|
+
| 'BND'
|
|
676
|
+
| 'BOB'
|
|
677
|
+
| 'BRL'
|
|
678
|
+
| 'BSD'
|
|
679
|
+
| 'BTC'
|
|
680
|
+
| 'BTN'
|
|
681
|
+
| 'BWP'
|
|
682
|
+
| 'BYN'
|
|
683
|
+
| 'BYR'
|
|
684
|
+
| 'BZD'
|
|
685
|
+
| 'CAD'
|
|
686
|
+
| 'CDF'
|
|
687
|
+
| 'CHF'
|
|
688
|
+
| 'CLF'
|
|
689
|
+
| 'CLP'
|
|
690
|
+
| 'CNH'
|
|
691
|
+
| 'CNY'
|
|
692
|
+
| 'COP'
|
|
693
|
+
| 'CRC'
|
|
694
|
+
| 'CUC'
|
|
695
|
+
| 'CUP'
|
|
696
|
+
| 'CVE'
|
|
697
|
+
| 'CZK'
|
|
698
|
+
| 'DJF'
|
|
699
|
+
| 'DKK'
|
|
700
|
+
| 'DOP'
|
|
701
|
+
| 'DZD'
|
|
702
|
+
| 'EEK'
|
|
703
|
+
| 'EGP'
|
|
704
|
+
| 'ERN'
|
|
705
|
+
| 'ETB'
|
|
706
|
+
| 'EUR'
|
|
707
|
+
| 'FJD'
|
|
708
|
+
| 'FKP'
|
|
709
|
+
| 'GBP'
|
|
710
|
+
| 'GBX'
|
|
711
|
+
| 'GEL'
|
|
712
|
+
| 'GGP'
|
|
713
|
+
| 'GHS'
|
|
714
|
+
| 'GIP'
|
|
715
|
+
| 'GMD'
|
|
716
|
+
| 'GNF'
|
|
717
|
+
| 'GTQ'
|
|
718
|
+
| 'GYD'
|
|
719
|
+
| 'HKD'
|
|
720
|
+
| 'HNL'
|
|
721
|
+
| 'HRK'
|
|
722
|
+
| 'HTG'
|
|
723
|
+
| 'HUF'
|
|
724
|
+
| 'IDR'
|
|
725
|
+
| 'ILS'
|
|
726
|
+
| 'IMP'
|
|
727
|
+
| 'INR'
|
|
728
|
+
| 'IQD'
|
|
729
|
+
| 'IRR'
|
|
730
|
+
| 'ISK'
|
|
731
|
+
| 'JEP'
|
|
732
|
+
| 'JMD'
|
|
733
|
+
| 'JOD'
|
|
734
|
+
| 'JPY'
|
|
735
|
+
| 'KES'
|
|
736
|
+
| 'KGS'
|
|
737
|
+
| 'KHR'
|
|
738
|
+
| 'KMF'
|
|
739
|
+
| 'KPW'
|
|
740
|
+
| 'KRW'
|
|
741
|
+
| 'KWD'
|
|
742
|
+
| 'KYD'
|
|
743
|
+
| 'KZT'
|
|
744
|
+
| 'LAK'
|
|
745
|
+
| 'LBP'
|
|
746
|
+
| 'LKR'
|
|
747
|
+
| 'LRD'
|
|
748
|
+
| 'LSL'
|
|
749
|
+
| 'LTL'
|
|
750
|
+
| 'LVL'
|
|
751
|
+
| 'LYD'
|
|
752
|
+
| 'MAD'
|
|
753
|
+
| 'MDL'
|
|
754
|
+
| 'MGA'
|
|
755
|
+
| 'MKD'
|
|
756
|
+
| 'MMK'
|
|
757
|
+
| 'MNT'
|
|
758
|
+
| 'MOP'
|
|
759
|
+
| 'MRO'
|
|
760
|
+
| 'MRU'
|
|
761
|
+
| 'MTL'
|
|
762
|
+
| 'MUR'
|
|
763
|
+
| 'MVR'
|
|
764
|
+
| 'MWK'
|
|
765
|
+
| 'MXN'
|
|
766
|
+
| 'MYR'
|
|
767
|
+
| 'MZN'
|
|
768
|
+
| 'NAD'
|
|
769
|
+
| 'NGN'
|
|
770
|
+
| 'NIO'
|
|
771
|
+
| 'NOK'
|
|
772
|
+
| 'NPR'
|
|
773
|
+
| 'NZD'
|
|
774
|
+
| 'OMR'
|
|
775
|
+
| 'PAB'
|
|
776
|
+
| 'PEN'
|
|
777
|
+
| 'PGK'
|
|
778
|
+
| 'PHP'
|
|
779
|
+
| 'PKR'
|
|
780
|
+
| 'PLN'
|
|
781
|
+
| 'PYG'
|
|
782
|
+
| 'QAR'
|
|
783
|
+
| 'RON'
|
|
784
|
+
| 'RSD'
|
|
785
|
+
| 'RUB'
|
|
786
|
+
| 'RWF'
|
|
787
|
+
| 'SAR'
|
|
788
|
+
| 'SBD'
|
|
789
|
+
| 'SCR'
|
|
790
|
+
| 'SDG'
|
|
791
|
+
| 'SEK'
|
|
792
|
+
| 'SGD'
|
|
793
|
+
| 'SHP'
|
|
794
|
+
| 'SKK'
|
|
795
|
+
| 'SLL'
|
|
796
|
+
| 'SOS'
|
|
797
|
+
| 'SRD'
|
|
798
|
+
| 'SSP'
|
|
799
|
+
| 'STD'
|
|
800
|
+
| 'SVC'
|
|
801
|
+
| 'SYP'
|
|
802
|
+
| 'SZL'
|
|
803
|
+
| 'THB'
|
|
804
|
+
| 'TJS'
|
|
805
|
+
| 'TMM'
|
|
806
|
+
| 'TMT'
|
|
807
|
+
| 'TND'
|
|
808
|
+
| 'TOP'
|
|
809
|
+
| 'TRY'
|
|
810
|
+
| 'TTD'
|
|
811
|
+
| 'TWD'
|
|
812
|
+
| 'TZS'
|
|
813
|
+
| 'UAH'
|
|
814
|
+
| 'UGX'
|
|
815
|
+
| 'USD'
|
|
816
|
+
| 'UYU'
|
|
817
|
+
| 'UZS'
|
|
818
|
+
| 'VEF'
|
|
819
|
+
| 'VES'
|
|
820
|
+
| 'VND'
|
|
821
|
+
| 'VUV'
|
|
822
|
+
| 'WST'
|
|
823
|
+
| 'XAF'
|
|
824
|
+
| 'XAG'
|
|
825
|
+
| 'XAU'
|
|
826
|
+
| 'XBA'
|
|
827
|
+
| 'XBB'
|
|
828
|
+
| 'XBC'
|
|
829
|
+
| 'XBD'
|
|
830
|
+
| 'XCD'
|
|
831
|
+
| 'XDR'
|
|
832
|
+
| 'XFU'
|
|
833
|
+
| 'XOF'
|
|
834
|
+
| 'XPD'
|
|
835
|
+
| 'XPF'
|
|
836
|
+
| 'XPT'
|
|
837
|
+
| 'XTS'
|
|
838
|
+
| 'YER'
|
|
839
|
+
| 'ZAR'
|
|
840
|
+
| 'ZMK'
|
|
841
|
+
| 'ZMW'
|
|
842
|
+
| 'ZWD'
|
|
843
|
+
| 'ZWL'
|
|
844
|
+
| 'ZWN'
|
|
845
|
+
| 'ZWR';
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* An optional description for internal use.
|
|
849
|
+
*/
|
|
850
|
+
description?: string | null;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* An array of documents to be attached to the payment order. Note that if you
|
|
854
|
+
* attach documents, the request's content type must be `multipart/form-data`.
|
|
855
|
+
*/
|
|
856
|
+
documents?: Array<PaymentOrderCreateParams.Documents>;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
860
|
+
* current business day or the next business day if the current day is a bank
|
|
861
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
862
|
+
*/
|
|
863
|
+
effective_date?: string;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* A payment type to fallback to if the original type is not valid for the
|
|
867
|
+
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
868
|
+
* (type=rtp and fallback_type=ach)
|
|
869
|
+
*/
|
|
870
|
+
fallback_type?: 'ach';
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
874
|
+
* generated by your financial institution.
|
|
875
|
+
*/
|
|
876
|
+
foreign_exchange_contract?: string | null;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
880
|
+
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
881
|
+
* currency matches the originating account currency.
|
|
882
|
+
*/
|
|
883
|
+
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Specifies a ledger transaction object that will be created with the payment
|
|
887
|
+
* order. If the ledger transaction cannot be created, then the payment order
|
|
888
|
+
* creation will fail. The resulting ledger transaction will mirror the status of
|
|
889
|
+
* the payment order.
|
|
890
|
+
*/
|
|
891
|
+
ledger_transaction?: PaymentOrderCreateParams.LedgerTransaction;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* An array of line items that must sum up to the amount of the payment order.
|
|
895
|
+
*/
|
|
896
|
+
line_items?: Array<PaymentOrderCreateParams.LineItems>;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
900
|
+
* strings.
|
|
901
|
+
*/
|
|
902
|
+
metadata?: Record<string, string>;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
906
|
+
* that this setting must also be turned on in your organization settings page.
|
|
907
|
+
*/
|
|
908
|
+
nsf_protected?: boolean;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* If present, this will replace your default company name on receiver's bank
|
|
912
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
913
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
914
|
+
* will be truncated.
|
|
915
|
+
*/
|
|
916
|
+
originating_party_name?: string | null;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
920
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
921
|
+
* an overnight check rather than standard mail.
|
|
922
|
+
*/
|
|
923
|
+
priority?: 'high' | 'normal';
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
927
|
+
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
928
|
+
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
929
|
+
* CPA Code that will be attached to the payment.
|
|
930
|
+
*/
|
|
931
|
+
purpose?: string | null;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
935
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
936
|
+
* internal account.
|
|
937
|
+
*/
|
|
938
|
+
receiving_account?: PaymentOrderCreateParams.ReceivingAccount;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
942
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
943
|
+
* internal account.
|
|
944
|
+
*/
|
|
945
|
+
receiving_account_id?: string;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
949
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
950
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
951
|
+
*/
|
|
952
|
+
remittance_information?: string | null;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
956
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
957
|
+
*/
|
|
958
|
+
send_remittance_advice?: boolean | null;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
962
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
963
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
964
|
+
* account will be included automatically by the bank, so you can use the
|
|
965
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
966
|
+
* characters.
|
|
967
|
+
*/
|
|
968
|
+
statement_descriptor?: string | null;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* An additional layer of classification for the type of payment order you are
|
|
972
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
973
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
974
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
975
|
+
*/
|
|
976
|
+
subtype?: 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* A flag that determines whether a payment order should go through transaction
|
|
980
|
+
* monitoring.
|
|
981
|
+
*/
|
|
982
|
+
transaction_monitoring_enabled?: boolean;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Identifier of the ultimate originator of the payment order.
|
|
986
|
+
*/
|
|
987
|
+
ultimate_originating_party_identifier?: string | null;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Name of the ultimate originator of the payment order.
|
|
991
|
+
*/
|
|
992
|
+
ultimate_originating_party_name?: string | null;
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Identifier of the ultimate funds recipient.
|
|
996
|
+
*/
|
|
997
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Name of the ultimate funds recipient.
|
|
1001
|
+
*/
|
|
1002
|
+
ultimate_receiving_party_name?: string | null;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
export namespace PaymentOrderCreateParams {
|
|
1006
|
+
export interface ReceivingAccount {
|
|
1007
|
+
account_details?: Array<ReceivingAccount.AccountDetails>;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Can be `checking`, `savings` or `other`.
|
|
1011
|
+
*/
|
|
1012
|
+
account_type?: 'checking' | 'other' | 'savings';
|
|
1013
|
+
|
|
1014
|
+
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1018
|
+
* strings.
|
|
1019
|
+
*/
|
|
1020
|
+
metadata?: Record<string, string>;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
1024
|
+
* affect any payments
|
|
1025
|
+
*/
|
|
1026
|
+
name?: string | null;
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Required if receiving wire payments.
|
|
1030
|
+
*/
|
|
1031
|
+
party_address?: ReceivingAccount.PartyAddress;
|
|
1032
|
+
|
|
1033
|
+
party_identifier?: string;
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
1037
|
+
*/
|
|
1038
|
+
party_name?: string;
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Either `individual` or `business`.
|
|
1042
|
+
*/
|
|
1043
|
+
party_type?: 'business' | 'individual' | null;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
|
|
1047
|
+
* you can pass the processor token in this field.
|
|
1048
|
+
*/
|
|
1049
|
+
plaid_processor_token?: string;
|
|
1050
|
+
|
|
1051
|
+
routing_details?: Array<ReceivingAccount.RoutingDetails>;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
export namespace ReceivingAccount {
|
|
1055
|
+
export interface PartyAddress {
|
|
1056
|
+
/**
|
|
1057
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
1058
|
+
*/
|
|
1059
|
+
country?: string | null;
|
|
1060
|
+
|
|
1061
|
+
line1?: string | null;
|
|
1062
|
+
|
|
1063
|
+
line2?: string | null;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Locality or City.
|
|
1067
|
+
*/
|
|
1068
|
+
locality?: string | null;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* The postal code of the address.
|
|
1072
|
+
*/
|
|
1073
|
+
postal_code?: string | null;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Region or State.
|
|
1077
|
+
*/
|
|
1078
|
+
region?: string | null;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export interface AccountDetails {
|
|
1082
|
+
account_number: string;
|
|
1083
|
+
|
|
1084
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
export interface RoutingDetails {
|
|
1088
|
+
routing_number: string;
|
|
1089
|
+
|
|
1090
|
+
routing_number_type:
|
|
1091
|
+
| 'aba'
|
|
1092
|
+
| 'swift'
|
|
1093
|
+
| 'au_bsb'
|
|
1094
|
+
| 'ca_cpa'
|
|
1095
|
+
| 'cnaps'
|
|
1096
|
+
| 'gb_sort_code'
|
|
1097
|
+
| 'in_ifsc'
|
|
1098
|
+
| 'my_branch_code'
|
|
1099
|
+
| 'br_codigo';
|
|
1100
|
+
|
|
1101
|
+
payment_type?:
|
|
1102
|
+
| 'ach'
|
|
1103
|
+
| 'au_becs'
|
|
1104
|
+
| 'bacs'
|
|
1105
|
+
| 'book'
|
|
1106
|
+
| 'card'
|
|
1107
|
+
| 'check'
|
|
1108
|
+
| 'eft'
|
|
1109
|
+
| 'interac'
|
|
1110
|
+
| 'provxchange'
|
|
1111
|
+
| 'rtp'
|
|
1112
|
+
| 'sen'
|
|
1113
|
+
| 'sepa'
|
|
1114
|
+
| 'signet'
|
|
1115
|
+
| 'wire';
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export interface ContactDetails {
|
|
1119
|
+
contact_identifier?: string;
|
|
1120
|
+
|
|
1121
|
+
contact_identifier_type?: 'email' | 'phone_number';
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
export interface LedgerTransaction {
|
|
1126
|
+
/**
|
|
1127
|
+
* Format: yyyy-mm-dd.
|
|
1128
|
+
*/
|
|
1129
|
+
effective_date: string;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Must be unique within the ledger.
|
|
1133
|
+
*/
|
|
1134
|
+
external_id: string;
|
|
1135
|
+
|
|
1136
|
+
ledger_entries: Array<LedgerTransaction.LedgerEntries>;
|
|
1137
|
+
|
|
1138
|
+
description?: string;
|
|
1139
|
+
|
|
1140
|
+
ledgerable_id?: string;
|
|
1141
|
+
|
|
1142
|
+
ledgerable_type?:
|
|
1143
|
+
| 'counterparty'
|
|
1144
|
+
| 'expected_payment'
|
|
1145
|
+
| 'incoming_payment_detail'
|
|
1146
|
+
| 'internal_account'
|
|
1147
|
+
| 'line_item'
|
|
1148
|
+
| 'paper_item'
|
|
1149
|
+
| 'payment_order'
|
|
1150
|
+
| 'payment_order_attempt'
|
|
1151
|
+
| 'return'
|
|
1152
|
+
| 'reversal';
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1156
|
+
* strings.
|
|
1157
|
+
*/
|
|
1158
|
+
metadata?: Record<string, string>;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* To post a ledger transaction at creation, use `posted`.
|
|
1162
|
+
*/
|
|
1163
|
+
status?: 'archived' | 'pending' | 'posted';
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
export namespace LedgerTransaction {
|
|
1167
|
+
export interface LedgerEntries {
|
|
1168
|
+
amount?: number;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1172
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
1173
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1174
|
+
* rtp, and check payments will always be `credit`.
|
|
1175
|
+
*/
|
|
1176
|
+
direction?: 'credit' | 'debit';
|
|
1177
|
+
|
|
1178
|
+
ledger_account_id?: string;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Lock version of the ledger account. This can be passed when creating a ledger
|
|
1182
|
+
* transaction to only succeed if no ledger transactions have posted since the
|
|
1183
|
+
* given version. See our post about Designing the Ledgers API with Optimistic
|
|
1184
|
+
* Locking for more details.
|
|
1185
|
+
*/
|
|
1186
|
+
lock_version?: number;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export interface LineItems {
|
|
1191
|
+
/**
|
|
1192
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
1193
|
+
* as 1000.
|
|
1194
|
+
*/
|
|
1195
|
+
amount: number;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
1199
|
+
* accessible if your accounting system has been connected.
|
|
1200
|
+
*/
|
|
1201
|
+
accounting_category_id?: string | null;
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* A free-form description of the line item.
|
|
1205
|
+
*/
|
|
1206
|
+
description?: string | null;
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1210
|
+
* strings.
|
|
1211
|
+
*/
|
|
1212
|
+
metadata?: Record<string, string>;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
export interface Documents {
|
|
1216
|
+
file: string;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* A category given to the document, can be `null`.
|
|
1220
|
+
*/
|
|
1221
|
+
document_type?: string;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
export interface PaymentOrderUpdateParams {
|
|
1226
|
+
/**
|
|
1227
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
1228
|
+
* accessible if your accounting system has been connected.
|
|
1229
|
+
*/
|
|
1230
|
+
accounting_category_id?: string | null;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
1234
|
+
* accessible if your accounting system has been connected.
|
|
1235
|
+
*/
|
|
1236
|
+
accounting_ledger_class_id?: string | null;
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
1240
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
1241
|
+
*/
|
|
1242
|
+
amount?: number;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
1246
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
1247
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
1248
|
+
*/
|
|
1249
|
+
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* Required when receiving_account_id is passed the ID of an external account.
|
|
1253
|
+
*/
|
|
1254
|
+
counterparty_id?: string | null;
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Defaults to the currency of the originating account.
|
|
1258
|
+
*/
|
|
1259
|
+
currency?:
|
|
1260
|
+
| 'AED'
|
|
1261
|
+
| 'AFN'
|
|
1262
|
+
| 'ALL'
|
|
1263
|
+
| 'AMD'
|
|
1264
|
+
| 'ANG'
|
|
1265
|
+
| 'AOA'
|
|
1266
|
+
| 'ARS'
|
|
1267
|
+
| 'AUD'
|
|
1268
|
+
| 'AWG'
|
|
1269
|
+
| 'AZN'
|
|
1270
|
+
| 'BAM'
|
|
1271
|
+
| 'BBD'
|
|
1272
|
+
| 'BCH'
|
|
1273
|
+
| 'BDT'
|
|
1274
|
+
| 'BGN'
|
|
1275
|
+
| 'BHD'
|
|
1276
|
+
| 'BIF'
|
|
1277
|
+
| 'BMD'
|
|
1278
|
+
| 'BND'
|
|
1279
|
+
| 'BOB'
|
|
1280
|
+
| 'BRL'
|
|
1281
|
+
| 'BSD'
|
|
1282
|
+
| 'BTC'
|
|
1283
|
+
| 'BTN'
|
|
1284
|
+
| 'BWP'
|
|
1285
|
+
| 'BYN'
|
|
1286
|
+
| 'BYR'
|
|
1287
|
+
| 'BZD'
|
|
1288
|
+
| 'CAD'
|
|
1289
|
+
| 'CDF'
|
|
1290
|
+
| 'CHF'
|
|
1291
|
+
| 'CLF'
|
|
1292
|
+
| 'CLP'
|
|
1293
|
+
| 'CNH'
|
|
1294
|
+
| 'CNY'
|
|
1295
|
+
| 'COP'
|
|
1296
|
+
| 'CRC'
|
|
1297
|
+
| 'CUC'
|
|
1298
|
+
| 'CUP'
|
|
1299
|
+
| 'CVE'
|
|
1300
|
+
| 'CZK'
|
|
1301
|
+
| 'DJF'
|
|
1302
|
+
| 'DKK'
|
|
1303
|
+
| 'DOP'
|
|
1304
|
+
| 'DZD'
|
|
1305
|
+
| 'EEK'
|
|
1306
|
+
| 'EGP'
|
|
1307
|
+
| 'ERN'
|
|
1308
|
+
| 'ETB'
|
|
1309
|
+
| 'EUR'
|
|
1310
|
+
| 'FJD'
|
|
1311
|
+
| 'FKP'
|
|
1312
|
+
| 'GBP'
|
|
1313
|
+
| 'GBX'
|
|
1314
|
+
| 'GEL'
|
|
1315
|
+
| 'GGP'
|
|
1316
|
+
| 'GHS'
|
|
1317
|
+
| 'GIP'
|
|
1318
|
+
| 'GMD'
|
|
1319
|
+
| 'GNF'
|
|
1320
|
+
| 'GTQ'
|
|
1321
|
+
| 'GYD'
|
|
1322
|
+
| 'HKD'
|
|
1323
|
+
| 'HNL'
|
|
1324
|
+
| 'HRK'
|
|
1325
|
+
| 'HTG'
|
|
1326
|
+
| 'HUF'
|
|
1327
|
+
| 'IDR'
|
|
1328
|
+
| 'ILS'
|
|
1329
|
+
| 'IMP'
|
|
1330
|
+
| 'INR'
|
|
1331
|
+
| 'IQD'
|
|
1332
|
+
| 'IRR'
|
|
1333
|
+
| 'ISK'
|
|
1334
|
+
| 'JEP'
|
|
1335
|
+
| 'JMD'
|
|
1336
|
+
| 'JOD'
|
|
1337
|
+
| 'JPY'
|
|
1338
|
+
| 'KES'
|
|
1339
|
+
| 'KGS'
|
|
1340
|
+
| 'KHR'
|
|
1341
|
+
| 'KMF'
|
|
1342
|
+
| 'KPW'
|
|
1343
|
+
| 'KRW'
|
|
1344
|
+
| 'KWD'
|
|
1345
|
+
| 'KYD'
|
|
1346
|
+
| 'KZT'
|
|
1347
|
+
| 'LAK'
|
|
1348
|
+
| 'LBP'
|
|
1349
|
+
| 'LKR'
|
|
1350
|
+
| 'LRD'
|
|
1351
|
+
| 'LSL'
|
|
1352
|
+
| 'LTL'
|
|
1353
|
+
| 'LVL'
|
|
1354
|
+
| 'LYD'
|
|
1355
|
+
| 'MAD'
|
|
1356
|
+
| 'MDL'
|
|
1357
|
+
| 'MGA'
|
|
1358
|
+
| 'MKD'
|
|
1359
|
+
| 'MMK'
|
|
1360
|
+
| 'MNT'
|
|
1361
|
+
| 'MOP'
|
|
1362
|
+
| 'MRO'
|
|
1363
|
+
| 'MRU'
|
|
1364
|
+
| 'MTL'
|
|
1365
|
+
| 'MUR'
|
|
1366
|
+
| 'MVR'
|
|
1367
|
+
| 'MWK'
|
|
1368
|
+
| 'MXN'
|
|
1369
|
+
| 'MYR'
|
|
1370
|
+
| 'MZN'
|
|
1371
|
+
| 'NAD'
|
|
1372
|
+
| 'NGN'
|
|
1373
|
+
| 'NIO'
|
|
1374
|
+
| 'NOK'
|
|
1375
|
+
| 'NPR'
|
|
1376
|
+
| 'NZD'
|
|
1377
|
+
| 'OMR'
|
|
1378
|
+
| 'PAB'
|
|
1379
|
+
| 'PEN'
|
|
1380
|
+
| 'PGK'
|
|
1381
|
+
| 'PHP'
|
|
1382
|
+
| 'PKR'
|
|
1383
|
+
| 'PLN'
|
|
1384
|
+
| 'PYG'
|
|
1385
|
+
| 'QAR'
|
|
1386
|
+
| 'RON'
|
|
1387
|
+
| 'RSD'
|
|
1388
|
+
| 'RUB'
|
|
1389
|
+
| 'RWF'
|
|
1390
|
+
| 'SAR'
|
|
1391
|
+
| 'SBD'
|
|
1392
|
+
| 'SCR'
|
|
1393
|
+
| 'SDG'
|
|
1394
|
+
| 'SEK'
|
|
1395
|
+
| 'SGD'
|
|
1396
|
+
| 'SHP'
|
|
1397
|
+
| 'SKK'
|
|
1398
|
+
| 'SLL'
|
|
1399
|
+
| 'SOS'
|
|
1400
|
+
| 'SRD'
|
|
1401
|
+
| 'SSP'
|
|
1402
|
+
| 'STD'
|
|
1403
|
+
| 'SVC'
|
|
1404
|
+
| 'SYP'
|
|
1405
|
+
| 'SZL'
|
|
1406
|
+
| 'THB'
|
|
1407
|
+
| 'TJS'
|
|
1408
|
+
| 'TMM'
|
|
1409
|
+
| 'TMT'
|
|
1410
|
+
| 'TND'
|
|
1411
|
+
| 'TOP'
|
|
1412
|
+
| 'TRY'
|
|
1413
|
+
| 'TTD'
|
|
1414
|
+
| 'TWD'
|
|
1415
|
+
| 'TZS'
|
|
1416
|
+
| 'UAH'
|
|
1417
|
+
| 'UGX'
|
|
1418
|
+
| 'USD'
|
|
1419
|
+
| 'UYU'
|
|
1420
|
+
| 'UZS'
|
|
1421
|
+
| 'VEF'
|
|
1422
|
+
| 'VES'
|
|
1423
|
+
| 'VND'
|
|
1424
|
+
| 'VUV'
|
|
1425
|
+
| 'WST'
|
|
1426
|
+
| 'XAF'
|
|
1427
|
+
| 'XAG'
|
|
1428
|
+
| 'XAU'
|
|
1429
|
+
| 'XBA'
|
|
1430
|
+
| 'XBB'
|
|
1431
|
+
| 'XBC'
|
|
1432
|
+
| 'XBD'
|
|
1433
|
+
| 'XCD'
|
|
1434
|
+
| 'XDR'
|
|
1435
|
+
| 'XFU'
|
|
1436
|
+
| 'XOF'
|
|
1437
|
+
| 'XPD'
|
|
1438
|
+
| 'XPF'
|
|
1439
|
+
| 'XPT'
|
|
1440
|
+
| 'XTS'
|
|
1441
|
+
| 'YER'
|
|
1442
|
+
| 'ZAR'
|
|
1443
|
+
| 'ZMK'
|
|
1444
|
+
| 'ZMW'
|
|
1445
|
+
| 'ZWD'
|
|
1446
|
+
| 'ZWL'
|
|
1447
|
+
| 'ZWN'
|
|
1448
|
+
| 'ZWR';
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* An optional description for internal use.
|
|
1452
|
+
*/
|
|
1453
|
+
description?: string | null;
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1457
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
1458
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1459
|
+
* rtp, and check payments will always be `credit`.
|
|
1460
|
+
*/
|
|
1461
|
+
direction?: 'credit' | 'debit';
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
1465
|
+
* current business day or the next business day if the current day is a bank
|
|
1466
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
1467
|
+
*/
|
|
1468
|
+
effective_date?: string;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* A payment type to fallback to if the original type is not valid for the
|
|
1472
|
+
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
1473
|
+
* (type=rtp and fallback_type=ach)
|
|
1474
|
+
*/
|
|
1475
|
+
fallback_type?: 'ach';
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
1479
|
+
* generated by your financial institution.
|
|
1480
|
+
*/
|
|
1481
|
+
foreign_exchange_contract?: string | null;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
1485
|
+
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
1486
|
+
* currency matches the originating account currency.
|
|
1487
|
+
*/
|
|
1488
|
+
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* An array of line items that must sum up to the amount of the payment order.
|
|
1492
|
+
*/
|
|
1493
|
+
line_items?: Array<PaymentOrderUpdateParams.LineItems>;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1497
|
+
* strings.
|
|
1498
|
+
*/
|
|
1499
|
+
metadata?: Record<string, string>;
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
1503
|
+
* that this setting must also be turned on in your organization settings page.
|
|
1504
|
+
*/
|
|
1505
|
+
nsf_protected?: boolean;
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* The ID of one of your organization's internal accounts.
|
|
1509
|
+
*/
|
|
1510
|
+
originating_account_id?: string;
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* If present, this will replace your default company name on receiver's bank
|
|
1514
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
1515
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
1516
|
+
* will be truncated.
|
|
1517
|
+
*/
|
|
1518
|
+
originating_party_name?: string | null;
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
1522
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
1523
|
+
* an overnight check rather than standard mail.
|
|
1524
|
+
*/
|
|
1525
|
+
priority?: 'high' | 'normal';
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
1529
|
+
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
1530
|
+
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
1531
|
+
* CPA Code that will be attached to the payment.
|
|
1532
|
+
*/
|
|
1533
|
+
purpose?: string | null;
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
1537
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
1538
|
+
* internal account.
|
|
1539
|
+
*/
|
|
1540
|
+
receiving_account?: PaymentOrderUpdateParams.ReceivingAccount;
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
1544
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
1545
|
+
* internal account.
|
|
1546
|
+
*/
|
|
1547
|
+
receiving_account_id?: string;
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
1551
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
1552
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
1553
|
+
*/
|
|
1554
|
+
remittance_information?: string | null;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
1558
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
1559
|
+
*/
|
|
1560
|
+
send_remittance_advice?: boolean | null;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
1564
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
1565
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
1566
|
+
* account will be included automatically by the bank, so you can use the
|
|
1567
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
1568
|
+
* characters.
|
|
1569
|
+
*/
|
|
1570
|
+
statement_descriptor?: string | null;
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* To cancel a payment order, use `cancelled`. To redraft a returned payment order,
|
|
1574
|
+
* use `approved`. To undo approval on a denied or approved payment order, use
|
|
1575
|
+
* `needs_approval`.
|
|
1576
|
+
*/
|
|
1577
|
+
status?:
|
|
1578
|
+
| 'approved'
|
|
1579
|
+
| 'cancelled'
|
|
1580
|
+
| 'completed'
|
|
1581
|
+
| 'denied'
|
|
1582
|
+
| 'failed'
|
|
1583
|
+
| 'needs_approval'
|
|
1584
|
+
| 'pending'
|
|
1585
|
+
| 'processing'
|
|
1586
|
+
| 'returned'
|
|
1587
|
+
| 'reversed'
|
|
1588
|
+
| 'sent';
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* An additional layer of classification for the type of payment order you are
|
|
1592
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
1593
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
1594
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
1595
|
+
*/
|
|
1596
|
+
subtype?: 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
1600
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
1601
|
+
*/
|
|
1602
|
+
type?:
|
|
1603
|
+
| 'ach'
|
|
1604
|
+
| 'au_becs'
|
|
1605
|
+
| 'bacs'
|
|
1606
|
+
| 'book'
|
|
1607
|
+
| 'card'
|
|
1608
|
+
| 'check'
|
|
1609
|
+
| 'eft'
|
|
1610
|
+
| 'interac'
|
|
1611
|
+
| 'provxchange'
|
|
1612
|
+
| 'rtp'
|
|
1613
|
+
| 'sen'
|
|
1614
|
+
| 'sepa'
|
|
1615
|
+
| 'signet'
|
|
1616
|
+
| 'wire';
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* This represents the identifier by which the person is known to the receiver when
|
|
1620
|
+
* using the CIE subtype for ACH payments. Only the first 22 characters of this
|
|
1621
|
+
* string will be used. Any additional characters will be truncated.
|
|
1622
|
+
*/
|
|
1623
|
+
ultimate_originating_party_identifier?: string | null;
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* This represents the name of the person that the payment is on behalf of when
|
|
1627
|
+
* using the CIE subtype for ACH payments. Only the first 15 characters of this
|
|
1628
|
+
* string will be used. Any additional characters will be truncated.
|
|
1629
|
+
*/
|
|
1630
|
+
ultimate_originating_party_name?: string | null;
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* This represents the name of the merchant that the payment is being sent to when
|
|
1634
|
+
* using the CIE subtype for ACH payments. Only the first 22 characters of this
|
|
1635
|
+
* string will be used. Any additional characters will be truncated.
|
|
1636
|
+
*/
|
|
1637
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* This represents the identifier by which the merchant is known to the person
|
|
1641
|
+
* initiating an ACH payment with CIE subtype. Only the first 15 characters of this
|
|
1642
|
+
* string will be used. Any additional characters will be truncated.
|
|
1643
|
+
*/
|
|
1644
|
+
ultimate_receiving_party_name?: string | null;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
export namespace PaymentOrderUpdateParams {
|
|
1648
|
+
export interface ReceivingAccount {
|
|
1649
|
+
account_details?: Array<ReceivingAccount.AccountDetails>;
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Can be `checking`, `savings` or `other`.
|
|
1653
|
+
*/
|
|
1654
|
+
account_type?: 'checking' | 'other' | 'savings';
|
|
1655
|
+
|
|
1656
|
+
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1660
|
+
* strings.
|
|
1661
|
+
*/
|
|
1662
|
+
metadata?: Record<string, string>;
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
1666
|
+
* affect any payments
|
|
1667
|
+
*/
|
|
1668
|
+
name?: string | null;
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* Required if receiving wire payments.
|
|
1672
|
+
*/
|
|
1673
|
+
party_address?: ReceivingAccount.PartyAddress;
|
|
1674
|
+
|
|
1675
|
+
party_identifier?: string;
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
1679
|
+
*/
|
|
1680
|
+
party_name?: string;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Either `individual` or `business`.
|
|
1684
|
+
*/
|
|
1685
|
+
party_type?: 'business' | 'individual' | null;
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
|
|
1689
|
+
* you can pass the processor token in this field.
|
|
1690
|
+
*/
|
|
1691
|
+
plaid_processor_token?: string;
|
|
1692
|
+
|
|
1693
|
+
routing_details?: Array<ReceivingAccount.RoutingDetails>;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
export namespace ReceivingAccount {
|
|
1697
|
+
export interface PartyAddress {
|
|
1698
|
+
/**
|
|
1699
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
1700
|
+
*/
|
|
1701
|
+
country?: string | null;
|
|
1702
|
+
|
|
1703
|
+
line1?: string | null;
|
|
1704
|
+
|
|
1705
|
+
line2?: string | null;
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* Locality or City.
|
|
1709
|
+
*/
|
|
1710
|
+
locality?: string | null;
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* The postal code of the address.
|
|
1714
|
+
*/
|
|
1715
|
+
postal_code?: string | null;
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Region or State.
|
|
1719
|
+
*/
|
|
1720
|
+
region?: string | null;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export interface AccountDetails {
|
|
1724
|
+
account_number: string;
|
|
1725
|
+
|
|
1726
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
export interface RoutingDetails {
|
|
1730
|
+
routing_number: string;
|
|
1731
|
+
|
|
1732
|
+
routing_number_type:
|
|
1733
|
+
| 'aba'
|
|
1734
|
+
| 'swift'
|
|
1735
|
+
| 'au_bsb'
|
|
1736
|
+
| 'ca_cpa'
|
|
1737
|
+
| 'cnaps'
|
|
1738
|
+
| 'gb_sort_code'
|
|
1739
|
+
| 'in_ifsc'
|
|
1740
|
+
| 'my_branch_code'
|
|
1741
|
+
| 'br_codigo';
|
|
1742
|
+
|
|
1743
|
+
payment_type?:
|
|
1744
|
+
| 'ach'
|
|
1745
|
+
| 'au_becs'
|
|
1746
|
+
| 'bacs'
|
|
1747
|
+
| 'book'
|
|
1748
|
+
| 'card'
|
|
1749
|
+
| 'check'
|
|
1750
|
+
| 'eft'
|
|
1751
|
+
| 'interac'
|
|
1752
|
+
| 'provxchange'
|
|
1753
|
+
| 'rtp'
|
|
1754
|
+
| 'sen'
|
|
1755
|
+
| 'sepa'
|
|
1756
|
+
| 'signet'
|
|
1757
|
+
| 'wire';
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
export interface ContactDetails {
|
|
1761
|
+
contact_identifier?: string;
|
|
1762
|
+
|
|
1763
|
+
contact_identifier_type?: 'email' | 'phone_number';
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
export interface LineItems {
|
|
1768
|
+
/**
|
|
1769
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
1770
|
+
* as 1000.
|
|
1771
|
+
*/
|
|
1772
|
+
amount: number;
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
1776
|
+
* accessible if your accounting system has been connected.
|
|
1777
|
+
*/
|
|
1778
|
+
accounting_category_id?: string | null;
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* A free-form description of the line item.
|
|
1782
|
+
*/
|
|
1783
|
+
description?: string | null;
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1787
|
+
* strings.
|
|
1788
|
+
*/
|
|
1789
|
+
metadata?: Record<string, string>;
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export interface PaymentOrderListParams extends PageParams {
|
|
1794
|
+
counterparty_id?: string;
|
|
1795
|
+
|
|
1796
|
+
direction?: 'credit' | 'debit';
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* An inclusive upper bound for searching effective_date
|
|
1800
|
+
*/
|
|
1801
|
+
effective_date_end?: string;
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* An inclusive lower bound for searching effective_date
|
|
1805
|
+
*/
|
|
1806
|
+
effective_date_start?: string;
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* For example, if you want to query for records with metadata key `Type` and value
|
|
1810
|
+
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
1811
|
+
* parameters.
|
|
1812
|
+
*/
|
|
1813
|
+
metadata?: Record<string, string>;
|
|
1814
|
+
|
|
1815
|
+
originating_account_id?: string;
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Query for records with the provided reference number
|
|
1819
|
+
*/
|
|
1820
|
+
reference_number?: string;
|
|
1821
|
+
|
|
1822
|
+
status?:
|
|
1823
|
+
| 'approved'
|
|
1824
|
+
| 'cancelled'
|
|
1825
|
+
| 'completed'
|
|
1826
|
+
| 'denied'
|
|
1827
|
+
| 'failed'
|
|
1828
|
+
| 'needs_approval'
|
|
1829
|
+
| 'pending'
|
|
1830
|
+
| 'processing'
|
|
1831
|
+
| 'returned'
|
|
1832
|
+
| 'reversed'
|
|
1833
|
+
| 'sent';
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* The ID of a transaction that the payment order has been reconciled to.
|
|
1837
|
+
*/
|
|
1838
|
+
transaction_id?: string;
|
|
1839
|
+
|
|
1840
|
+
type?:
|
|
1841
|
+
| 'ach'
|
|
1842
|
+
| 'au_becs'
|
|
1843
|
+
| 'bacs'
|
|
1844
|
+
| 'book'
|
|
1845
|
+
| 'card'
|
|
1846
|
+
| 'check'
|
|
1847
|
+
| 'eft'
|
|
1848
|
+
| 'interac'
|
|
1849
|
+
| 'provxchange'
|
|
1850
|
+
| 'rtp'
|
|
1851
|
+
| 'sen'
|
|
1852
|
+
| 'sepa'
|
|
1853
|
+
| 'signet'
|
|
1854
|
+
| 'wire';
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
export interface PaymentOrderCreateAsyncParams {
|
|
1858
|
+
/**
|
|
1859
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
1860
|
+
* 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
1861
|
+
*/
|
|
1862
|
+
amount: number;
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
1866
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
1867
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
1868
|
+
* rtp, and check payments will always be `credit`.
|
|
1869
|
+
*/
|
|
1870
|
+
direction: 'credit' | 'debit';
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* The ID of one of your organization's internal accounts.
|
|
1874
|
+
*/
|
|
1875
|
+
originating_account_id: string;
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
1879
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
1880
|
+
*/
|
|
1881
|
+
type:
|
|
1882
|
+
| 'ach'
|
|
1883
|
+
| 'au_becs'
|
|
1884
|
+
| 'bacs'
|
|
1885
|
+
| 'book'
|
|
1886
|
+
| 'card'
|
|
1887
|
+
| 'check'
|
|
1888
|
+
| 'eft'
|
|
1889
|
+
| 'interac'
|
|
1890
|
+
| 'provxchange'
|
|
1891
|
+
| 'rtp'
|
|
1892
|
+
| 'sen'
|
|
1893
|
+
| 'sepa'
|
|
1894
|
+
| 'signet'
|
|
1895
|
+
| 'wire';
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
1899
|
+
* accessible if your accounting system has been connected.
|
|
1900
|
+
*/
|
|
1901
|
+
accounting_category_id?: string | null;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* The ID of one of your accounting ledger classes. Note that these will only be
|
|
1905
|
+
* accessible if your accounting system has been connected.
|
|
1906
|
+
*/
|
|
1907
|
+
accounting_ledger_class_id?: string | null;
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* The party that will pay the fees for the payment order. Only applies to wire
|
|
1911
|
+
* payment orders. Can be one of shared, sender, or receiver, which correspond
|
|
1912
|
+
* respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
|
|
1913
|
+
*/
|
|
1914
|
+
charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
|
|
1915
|
+
|
|
1916
|
+
/**
|
|
1917
|
+
* Defaults to the currency of the originating account.
|
|
1918
|
+
*/
|
|
1919
|
+
currency?:
|
|
1920
|
+
| 'AED'
|
|
1921
|
+
| 'AFN'
|
|
1922
|
+
| 'ALL'
|
|
1923
|
+
| 'AMD'
|
|
1924
|
+
| 'ANG'
|
|
1925
|
+
| 'AOA'
|
|
1926
|
+
| 'ARS'
|
|
1927
|
+
| 'AUD'
|
|
1928
|
+
| 'AWG'
|
|
1929
|
+
| 'AZN'
|
|
1930
|
+
| 'BAM'
|
|
1931
|
+
| 'BBD'
|
|
1932
|
+
| 'BCH'
|
|
1933
|
+
| 'BDT'
|
|
1934
|
+
| 'BGN'
|
|
1935
|
+
| 'BHD'
|
|
1936
|
+
| 'BIF'
|
|
1937
|
+
| 'BMD'
|
|
1938
|
+
| 'BND'
|
|
1939
|
+
| 'BOB'
|
|
1940
|
+
| 'BRL'
|
|
1941
|
+
| 'BSD'
|
|
1942
|
+
| 'BTC'
|
|
1943
|
+
| 'BTN'
|
|
1944
|
+
| 'BWP'
|
|
1945
|
+
| 'BYN'
|
|
1946
|
+
| 'BYR'
|
|
1947
|
+
| 'BZD'
|
|
1948
|
+
| 'CAD'
|
|
1949
|
+
| 'CDF'
|
|
1950
|
+
| 'CHF'
|
|
1951
|
+
| 'CLF'
|
|
1952
|
+
| 'CLP'
|
|
1953
|
+
| 'CNH'
|
|
1954
|
+
| 'CNY'
|
|
1955
|
+
| 'COP'
|
|
1956
|
+
| 'CRC'
|
|
1957
|
+
| 'CUC'
|
|
1958
|
+
| 'CUP'
|
|
1959
|
+
| 'CVE'
|
|
1960
|
+
| 'CZK'
|
|
1961
|
+
| 'DJF'
|
|
1962
|
+
| 'DKK'
|
|
1963
|
+
| 'DOP'
|
|
1964
|
+
| 'DZD'
|
|
1965
|
+
| 'EEK'
|
|
1966
|
+
| 'EGP'
|
|
1967
|
+
| 'ERN'
|
|
1968
|
+
| 'ETB'
|
|
1969
|
+
| 'EUR'
|
|
1970
|
+
| 'FJD'
|
|
1971
|
+
| 'FKP'
|
|
1972
|
+
| 'GBP'
|
|
1973
|
+
| 'GBX'
|
|
1974
|
+
| 'GEL'
|
|
1975
|
+
| 'GGP'
|
|
1976
|
+
| 'GHS'
|
|
1977
|
+
| 'GIP'
|
|
1978
|
+
| 'GMD'
|
|
1979
|
+
| 'GNF'
|
|
1980
|
+
| 'GTQ'
|
|
1981
|
+
| 'GYD'
|
|
1982
|
+
| 'HKD'
|
|
1983
|
+
| 'HNL'
|
|
1984
|
+
| 'HRK'
|
|
1985
|
+
| 'HTG'
|
|
1986
|
+
| 'HUF'
|
|
1987
|
+
| 'IDR'
|
|
1988
|
+
| 'ILS'
|
|
1989
|
+
| 'IMP'
|
|
1990
|
+
| 'INR'
|
|
1991
|
+
| 'IQD'
|
|
1992
|
+
| 'IRR'
|
|
1993
|
+
| 'ISK'
|
|
1994
|
+
| 'JEP'
|
|
1995
|
+
| 'JMD'
|
|
1996
|
+
| 'JOD'
|
|
1997
|
+
| 'JPY'
|
|
1998
|
+
| 'KES'
|
|
1999
|
+
| 'KGS'
|
|
2000
|
+
| 'KHR'
|
|
2001
|
+
| 'KMF'
|
|
2002
|
+
| 'KPW'
|
|
2003
|
+
| 'KRW'
|
|
2004
|
+
| 'KWD'
|
|
2005
|
+
| 'KYD'
|
|
2006
|
+
| 'KZT'
|
|
2007
|
+
| 'LAK'
|
|
2008
|
+
| 'LBP'
|
|
2009
|
+
| 'LKR'
|
|
2010
|
+
| 'LRD'
|
|
2011
|
+
| 'LSL'
|
|
2012
|
+
| 'LTL'
|
|
2013
|
+
| 'LVL'
|
|
2014
|
+
| 'LYD'
|
|
2015
|
+
| 'MAD'
|
|
2016
|
+
| 'MDL'
|
|
2017
|
+
| 'MGA'
|
|
2018
|
+
| 'MKD'
|
|
2019
|
+
| 'MMK'
|
|
2020
|
+
| 'MNT'
|
|
2021
|
+
| 'MOP'
|
|
2022
|
+
| 'MRO'
|
|
2023
|
+
| 'MRU'
|
|
2024
|
+
| 'MTL'
|
|
2025
|
+
| 'MUR'
|
|
2026
|
+
| 'MVR'
|
|
2027
|
+
| 'MWK'
|
|
2028
|
+
| 'MXN'
|
|
2029
|
+
| 'MYR'
|
|
2030
|
+
| 'MZN'
|
|
2031
|
+
| 'NAD'
|
|
2032
|
+
| 'NGN'
|
|
2033
|
+
| 'NIO'
|
|
2034
|
+
| 'NOK'
|
|
2035
|
+
| 'NPR'
|
|
2036
|
+
| 'NZD'
|
|
2037
|
+
| 'OMR'
|
|
2038
|
+
| 'PAB'
|
|
2039
|
+
| 'PEN'
|
|
2040
|
+
| 'PGK'
|
|
2041
|
+
| 'PHP'
|
|
2042
|
+
| 'PKR'
|
|
2043
|
+
| 'PLN'
|
|
2044
|
+
| 'PYG'
|
|
2045
|
+
| 'QAR'
|
|
2046
|
+
| 'RON'
|
|
2047
|
+
| 'RSD'
|
|
2048
|
+
| 'RUB'
|
|
2049
|
+
| 'RWF'
|
|
2050
|
+
| 'SAR'
|
|
2051
|
+
| 'SBD'
|
|
2052
|
+
| 'SCR'
|
|
2053
|
+
| 'SDG'
|
|
2054
|
+
| 'SEK'
|
|
2055
|
+
| 'SGD'
|
|
2056
|
+
| 'SHP'
|
|
2057
|
+
| 'SKK'
|
|
2058
|
+
| 'SLL'
|
|
2059
|
+
| 'SOS'
|
|
2060
|
+
| 'SRD'
|
|
2061
|
+
| 'SSP'
|
|
2062
|
+
| 'STD'
|
|
2063
|
+
| 'SVC'
|
|
2064
|
+
| 'SYP'
|
|
2065
|
+
| 'SZL'
|
|
2066
|
+
| 'THB'
|
|
2067
|
+
| 'TJS'
|
|
2068
|
+
| 'TMM'
|
|
2069
|
+
| 'TMT'
|
|
2070
|
+
| 'TND'
|
|
2071
|
+
| 'TOP'
|
|
2072
|
+
| 'TRY'
|
|
2073
|
+
| 'TTD'
|
|
2074
|
+
| 'TWD'
|
|
2075
|
+
| 'TZS'
|
|
2076
|
+
| 'UAH'
|
|
2077
|
+
| 'UGX'
|
|
2078
|
+
| 'USD'
|
|
2079
|
+
| 'UYU'
|
|
2080
|
+
| 'UZS'
|
|
2081
|
+
| 'VEF'
|
|
2082
|
+
| 'VES'
|
|
2083
|
+
| 'VND'
|
|
2084
|
+
| 'VUV'
|
|
2085
|
+
| 'WST'
|
|
2086
|
+
| 'XAF'
|
|
2087
|
+
| 'XAG'
|
|
2088
|
+
| 'XAU'
|
|
2089
|
+
| 'XBA'
|
|
2090
|
+
| 'XBB'
|
|
2091
|
+
| 'XBC'
|
|
2092
|
+
| 'XBD'
|
|
2093
|
+
| 'XCD'
|
|
2094
|
+
| 'XDR'
|
|
2095
|
+
| 'XFU'
|
|
2096
|
+
| 'XOF'
|
|
2097
|
+
| 'XPD'
|
|
2098
|
+
| 'XPF'
|
|
2099
|
+
| 'XPT'
|
|
2100
|
+
| 'XTS'
|
|
2101
|
+
| 'YER'
|
|
2102
|
+
| 'ZAR'
|
|
2103
|
+
| 'ZMK'
|
|
2104
|
+
| 'ZMW'
|
|
2105
|
+
| 'ZWD'
|
|
2106
|
+
| 'ZWL'
|
|
2107
|
+
| 'ZWN'
|
|
2108
|
+
| 'ZWR';
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* An optional description for internal use.
|
|
2112
|
+
*/
|
|
2113
|
+
description?: string | null;
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* An array of documents to be attached to the payment order. Note that if you
|
|
2117
|
+
* attach documents, the request's content type must be `multipart/form-data`.
|
|
2118
|
+
*/
|
|
2119
|
+
documents?: Array<PaymentOrderCreateAsyncParams.Documents>;
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
2123
|
+
* current business day or the next business day if the current day is a bank
|
|
2124
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
2125
|
+
*/
|
|
2126
|
+
effective_date?: string;
|
|
2127
|
+
|
|
2128
|
+
/**
|
|
2129
|
+
* A payment type to fallback to if the original type is not valid for the
|
|
2130
|
+
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
2131
|
+
* (type=rtp and fallback_type=ach)
|
|
2132
|
+
*/
|
|
2133
|
+
fallback_type?: 'ach';
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* If present, indicates a specific foreign exchange contract number that has been
|
|
2137
|
+
* generated by your financial institution.
|
|
2138
|
+
*/
|
|
2139
|
+
foreign_exchange_contract?: string | null;
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Indicates the type of FX transfer to initiate, can be either
|
|
2143
|
+
* `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
|
|
2144
|
+
* currency matches the originating account currency.
|
|
2145
|
+
*/
|
|
2146
|
+
foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* Specifies a ledger transaction object that will be created with the payment
|
|
2150
|
+
* order. If the ledger transaction cannot be created, then the payment order
|
|
2151
|
+
* creation will fail. The resulting ledger transaction will mirror the status of
|
|
2152
|
+
* the payment order.
|
|
2153
|
+
*/
|
|
2154
|
+
ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* An array of line items that must sum up to the amount of the payment order.
|
|
2158
|
+
*/
|
|
2159
|
+
line_items?: Array<PaymentOrderCreateAsyncParams.LineItems>;
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2163
|
+
* strings.
|
|
2164
|
+
*/
|
|
2165
|
+
metadata?: Record<string, string>;
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* A boolean to determine if NSF Protection is enabled for this payment order. Note
|
|
2169
|
+
* that this setting must also be turned on in your organization settings page.
|
|
2170
|
+
*/
|
|
2171
|
+
nsf_protected?: boolean;
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* If present, this will replace your default company name on receiver's bank
|
|
2175
|
+
* statement. This field can only be used for ACH payments currently. For ACH, only
|
|
2176
|
+
* the first 16 characters of this string will be used. Any additional characters
|
|
2177
|
+
* will be truncated.
|
|
2178
|
+
*/
|
|
2179
|
+
originating_party_name?: string | null;
|
|
2180
|
+
|
|
2181
|
+
/**
|
|
2182
|
+
* Either `normal` or `high`. For ACH and EFT payments, `high` represents a
|
|
2183
|
+
* same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
|
|
2184
|
+
* an overnight check rather than standard mail.
|
|
2185
|
+
*/
|
|
2186
|
+
priority?: 'high' | 'normal';
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* For `wire`, this is usually the purpose which is transmitted via the
|
|
2190
|
+
* "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
|
|
2191
|
+
* this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
|
|
2192
|
+
* CPA Code that will be attached to the payment.
|
|
2193
|
+
*/
|
|
2194
|
+
purpose?: string | null;
|
|
2195
|
+
|
|
2196
|
+
/**
|
|
2197
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
2198
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
2199
|
+
* internal account.
|
|
2200
|
+
*/
|
|
2201
|
+
receiving_account?: PaymentOrderCreateAsyncParams.ReceivingAccount;
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
2205
|
+
* `receiving_account_id`, you may pass the id of an external account or an
|
|
2206
|
+
* internal account.
|
|
2207
|
+
*/
|
|
2208
|
+
receiving_account_id?: string;
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
2212
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
2213
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
2214
|
+
*/
|
|
2215
|
+
remittance_information?: string | null;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Send an email to the counterparty when the payment order is sent to the bank. If
|
|
2219
|
+
* `null`, `send_remittance_advice` on the Counterparty is used.
|
|
2220
|
+
*/
|
|
2221
|
+
send_remittance_advice?: boolean | null;
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* An optional descriptor which will appear in the receiver's statement. For
|
|
2225
|
+
* `check` payments this field will be used as the memo line. For `ach` the maximum
|
|
2226
|
+
* length is 10 characters. Note that for ACH payments, the name on your bank
|
|
2227
|
+
* account will be included automatically by the bank, so you can use the
|
|
2228
|
+
* characters for other useful information. For `eft` the maximum length is 15
|
|
2229
|
+
* characters.
|
|
2230
|
+
*/
|
|
2231
|
+
statement_descriptor?: string | null;
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* An additional layer of classification for the type of payment order you are
|
|
2235
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
2236
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
2237
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
2238
|
+
*/
|
|
2239
|
+
subtype?: 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
|
|
2240
|
+
|
|
2241
|
+
/**
|
|
2242
|
+
* A flag that determines whether a payment order should go through transaction
|
|
2243
|
+
* monitoring.
|
|
2244
|
+
*/
|
|
2245
|
+
transaction_monitoring_enabled?: boolean;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* Identifier of the ultimate originator of the payment order.
|
|
2249
|
+
*/
|
|
2250
|
+
ultimate_originating_party_identifier?: string | null;
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Name of the ultimate originator of the payment order.
|
|
2254
|
+
*/
|
|
2255
|
+
ultimate_originating_party_name?: string | null;
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* Identifier of the ultimate funds recipient.
|
|
2259
|
+
*/
|
|
2260
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Name of the ultimate funds recipient.
|
|
2264
|
+
*/
|
|
2265
|
+
ultimate_receiving_party_name?: string | null;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
export namespace PaymentOrderCreateAsyncParams {
|
|
2269
|
+
export interface ReceivingAccount {
|
|
2270
|
+
account_details?: Array<ReceivingAccount.AccountDetails>;
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* Can be `checking`, `savings` or `other`.
|
|
2274
|
+
*/
|
|
2275
|
+
account_type?: 'checking' | 'other' | 'savings';
|
|
2276
|
+
|
|
2277
|
+
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2281
|
+
* strings.
|
|
2282
|
+
*/
|
|
2283
|
+
metadata?: Record<string, string>;
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
2287
|
+
* affect any payments
|
|
2288
|
+
*/
|
|
2289
|
+
name?: string | null;
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* Required if receiving wire payments.
|
|
2293
|
+
*/
|
|
2294
|
+
party_address?: ReceivingAccount.PartyAddress;
|
|
2295
|
+
|
|
2296
|
+
party_identifier?: string;
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
2300
|
+
*/
|
|
2301
|
+
party_name?: string;
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* Either `individual` or `business`.
|
|
2305
|
+
*/
|
|
2306
|
+
party_type?: 'business' | 'individual' | null;
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
|
|
2310
|
+
* you can pass the processor token in this field.
|
|
2311
|
+
*/
|
|
2312
|
+
plaid_processor_token?: string;
|
|
2313
|
+
|
|
2314
|
+
routing_details?: Array<ReceivingAccount.RoutingDetails>;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
export namespace ReceivingAccount {
|
|
2318
|
+
export interface PartyAddress {
|
|
2319
|
+
/**
|
|
2320
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2321
|
+
*/
|
|
2322
|
+
country?: string | null;
|
|
2323
|
+
|
|
2324
|
+
line1?: string | null;
|
|
2325
|
+
|
|
2326
|
+
line2?: string | null;
|
|
2327
|
+
|
|
2328
|
+
/**
|
|
2329
|
+
* Locality or City.
|
|
2330
|
+
*/
|
|
2331
|
+
locality?: string | null;
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* The postal code of the address.
|
|
2335
|
+
*/
|
|
2336
|
+
postal_code?: string | null;
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* Region or State.
|
|
2340
|
+
*/
|
|
2341
|
+
region?: string | null;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
export interface AccountDetails {
|
|
2345
|
+
account_number: string;
|
|
2346
|
+
|
|
2347
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
export interface RoutingDetails {
|
|
2351
|
+
routing_number: string;
|
|
2352
|
+
|
|
2353
|
+
routing_number_type:
|
|
2354
|
+
| 'aba'
|
|
2355
|
+
| 'swift'
|
|
2356
|
+
| 'au_bsb'
|
|
2357
|
+
| 'ca_cpa'
|
|
2358
|
+
| 'cnaps'
|
|
2359
|
+
| 'gb_sort_code'
|
|
2360
|
+
| 'in_ifsc'
|
|
2361
|
+
| 'my_branch_code'
|
|
2362
|
+
| 'br_codigo';
|
|
2363
|
+
|
|
2364
|
+
payment_type?:
|
|
2365
|
+
| 'ach'
|
|
2366
|
+
| 'au_becs'
|
|
2367
|
+
| 'bacs'
|
|
2368
|
+
| 'book'
|
|
2369
|
+
| 'card'
|
|
2370
|
+
| 'check'
|
|
2371
|
+
| 'eft'
|
|
2372
|
+
| 'interac'
|
|
2373
|
+
| 'provxchange'
|
|
2374
|
+
| 'rtp'
|
|
2375
|
+
| 'sen'
|
|
2376
|
+
| 'sepa'
|
|
2377
|
+
| 'signet'
|
|
2378
|
+
| 'wire';
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
export interface ContactDetails {
|
|
2382
|
+
contact_identifier?: string;
|
|
2383
|
+
|
|
2384
|
+
contact_identifier_type?: 'email' | 'phone_number';
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
export interface LedgerTransaction {
|
|
2389
|
+
/**
|
|
2390
|
+
* Format: yyyy-mm-dd.
|
|
2391
|
+
*/
|
|
2392
|
+
effective_date: string;
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Must be unique within the ledger.
|
|
2396
|
+
*/
|
|
2397
|
+
external_id: string;
|
|
2398
|
+
|
|
2399
|
+
ledger_entries: Array<LedgerTransaction.LedgerEntries>;
|
|
2400
|
+
|
|
2401
|
+
description?: string;
|
|
2402
|
+
|
|
2403
|
+
ledgerable_id?: string;
|
|
2404
|
+
|
|
2405
|
+
ledgerable_type?:
|
|
2406
|
+
| 'counterparty'
|
|
2407
|
+
| 'expected_payment'
|
|
2408
|
+
| 'incoming_payment_detail'
|
|
2409
|
+
| 'internal_account'
|
|
2410
|
+
| 'line_item'
|
|
2411
|
+
| 'paper_item'
|
|
2412
|
+
| 'payment_order'
|
|
2413
|
+
| 'payment_order_attempt'
|
|
2414
|
+
| 'return'
|
|
2415
|
+
| 'reversal';
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2419
|
+
* strings.
|
|
2420
|
+
*/
|
|
2421
|
+
metadata?: Record<string, string>;
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* To post a ledger transaction at creation, use `posted`.
|
|
2425
|
+
*/
|
|
2426
|
+
status?: 'archived' | 'pending' | 'posted';
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
export namespace LedgerTransaction {
|
|
2430
|
+
export interface LedgerEntries {
|
|
2431
|
+
amount?: number;
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* One of `credit`, `debit`. Describes the direction money is flowing in the
|
|
2435
|
+
* transaction. A `credit` moves money from your account to someone else's. A
|
|
2436
|
+
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
2437
|
+
* rtp, and check payments will always be `credit`.
|
|
2438
|
+
*/
|
|
2439
|
+
direction?: 'credit' | 'debit';
|
|
2440
|
+
|
|
2441
|
+
ledger_account_id?: string;
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* Lock version of the ledger account. This can be passed when creating a ledger
|
|
2445
|
+
* transaction to only succeed if no ledger transactions have posted since the
|
|
2446
|
+
* given version. See our post about Designing the Ledgers API with Optimistic
|
|
2447
|
+
* Locking for more details.
|
|
2448
|
+
*/
|
|
2449
|
+
lock_version?: number;
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
export interface LineItems {
|
|
2454
|
+
/**
|
|
2455
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
2456
|
+
* as 1000.
|
|
2457
|
+
*/
|
|
2458
|
+
amount: number;
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
2462
|
+
* accessible if your accounting system has been connected.
|
|
2463
|
+
*/
|
|
2464
|
+
accounting_category_id?: string | null;
|
|
2465
|
+
|
|
2466
|
+
/**
|
|
2467
|
+
* A free-form description of the line item.
|
|
2468
|
+
*/
|
|
2469
|
+
description?: string | null;
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2473
|
+
* strings.
|
|
2474
|
+
*/
|
|
2475
|
+
metadata?: Record<string, string>;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
export interface Documents {
|
|
2479
|
+
file: string;
|
|
2480
|
+
|
|
2481
|
+
/**
|
|
2482
|
+
* A category given to the document, can be `null`.
|
|
2483
|
+
*/
|
|
2484
|
+
document_type?: string;
|
|
2485
|
+
}
|
|
2486
|
+
}
|