@augustusbank/typescript-sdk 0.21.0 → 0.22.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/CHANGELOG.md +39 -0
- package/client.d.mts +12 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -6
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-holders.d.mts +1555 -1184
- package/resources/account-holders.d.mts.map +1 -1
- package/resources/account-holders.d.ts +1555 -1184
- package/resources/account-holders.d.ts.map +1 -1
- package/resources/account-holders.js +59 -0
- package/resources/account-holders.js.map +1 -1
- package/resources/account-holders.mjs +59 -0
- package/resources/account-holders.mjs.map +1 -1
- package/resources/account-programs.d.mts +22 -17
- package/resources/account-programs.d.mts.map +1 -1
- package/resources/account-programs.d.ts +22 -17
- package/resources/account-programs.d.ts.map +1 -1
- package/resources/account-programs.js +2 -2
- package/resources/account-programs.js.map +1 -1
- package/resources/account-programs.mjs +2 -2
- package/resources/account-programs.mjs.map +1 -1
- package/resources/accounts.d.mts +226 -48
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +226 -48
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +55 -2
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +55 -2
- package/resources/accounts.mjs.map +1 -1
- package/resources/api-keys.d.mts +1 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-versions.d.mts +3 -0
- package/resources/api-versions.d.mts.map +1 -1
- package/resources/api-versions.d.ts +3 -0
- package/resources/api-versions.d.ts.map +1 -1
- package/resources/conversions.d.mts +36 -81
- package/resources/conversions.d.mts.map +1 -1
- package/resources/conversions.d.ts +36 -81
- package/resources/conversions.d.ts.map +1 -1
- package/resources/conversions.js +25 -1
- package/resources/conversions.js.map +1 -1
- package/resources/conversions.mjs +25 -1
- package/resources/conversions.mjs.map +1 -1
- package/resources/counterparties.d.mts +1042 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +1042 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +45 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +41 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/deposits.d.mts +48 -186
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +48 -186
- package/resources/deposits.d.ts.map +1 -1
- package/resources/events.d.mts +3 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +133 -335
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +133 -335
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +25 -0
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +25 -0
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/indicative.d.mts +7 -11
- package/resources/quotes/indicative.d.mts.map +1 -1
- package/resources/quotes/indicative.d.ts +7 -11
- package/resources/quotes/indicative.d.ts.map +1 -1
- package/resources/quotes/quotes.d.mts +4 -8
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +4 -8
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/returns.d.mts +84 -39
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +84 -39
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +22 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +22 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/scopes.d.mts +4 -1
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +4 -1
- package/resources/scopes.d.ts.map +1 -1
- package/resources/simulations/account-programs.d.mts +215 -0
- package/resources/simulations/account-programs.d.mts.map +1 -0
- package/resources/simulations/account-programs.d.ts +215 -0
- package/resources/simulations/account-programs.d.ts.map +1 -0
- package/resources/simulations/account-programs.js +96 -0
- package/resources/simulations/account-programs.js.map +1 -0
- package/resources/simulations/account-programs.mjs +92 -0
- package/resources/simulations/account-programs.mjs.map +1 -0
- package/resources/simulations/accounts.d.mts +209 -0
- package/resources/simulations/accounts.d.mts.map +1 -0
- package/resources/simulations/accounts.d.ts +209 -0
- package/resources/simulations/accounts.d.ts.map +1 -0
- package/resources/simulations/accounts.js +90 -0
- package/resources/simulations/accounts.js.map +1 -0
- package/resources/simulations/accounts.mjs +86 -0
- package/resources/simulations/accounts.mjs.map +1 -0
- package/resources/simulations/conversions.d.mts +54 -0
- package/resources/simulations/conversions.d.mts.map +1 -0
- package/resources/simulations/conversions.d.ts +54 -0
- package/resources/simulations/conversions.d.ts.map +1 -0
- package/resources/simulations/conversions.js +39 -0
- package/resources/simulations/conversions.js.map +1 -0
- package/resources/simulations/conversions.mjs +35 -0
- package/resources/simulations/conversions.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +202 -0
- package/resources/simulations/deposits.d.mts.map +1 -0
- package/resources/simulations/deposits.d.ts +202 -0
- package/resources/simulations/deposits.d.ts.map +1 -0
- package/resources/simulations/deposits.js +25 -0
- package/resources/simulations/deposits.js.map +1 -0
- package/resources/simulations/deposits.mjs +21 -0
- package/resources/simulations/deposits.mjs.map +1 -0
- package/resources/simulations/index.d.mts +7 -0
- package/resources/simulations/index.d.mts.map +1 -0
- package/resources/simulations/index.d.ts +7 -0
- package/resources/simulations/index.d.ts.map +1 -0
- package/resources/simulations/index.js +17 -0
- package/resources/simulations/index.js.map +1 -0
- package/resources/simulations/index.mjs +8 -0
- package/resources/simulations/index.mjs.map +1 -0
- package/resources/simulations/payouts.d.mts +62 -0
- package/resources/simulations/payouts.d.mts.map +1 -0
- package/resources/simulations/payouts.d.ts +62 -0
- package/resources/simulations/payouts.d.ts.map +1 -0
- package/resources/simulations/payouts.js +39 -0
- package/resources/simulations/payouts.js.map +1 -0
- package/resources/simulations/payouts.mjs +35 -0
- package/resources/simulations/payouts.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +26 -0
- package/resources/simulations/simulations.d.mts.map +1 -0
- package/resources/simulations/simulations.d.ts +26 -0
- package/resources/simulations/simulations.d.ts.map +1 -0
- package/resources/simulations/simulations.js +33 -0
- package/resources/simulations/simulations.js.map +1 -0
- package/resources/simulations/simulations.mjs +28 -0
- package/resources/simulations/simulations.mjs.map +1 -0
- package/resources/simulations.d.mts +2 -0
- package/resources/simulations.d.mts.map +1 -0
- package/resources/simulations.d.ts +2 -0
- package/resources/simulations.d.ts.map +1 -0
- package/resources/simulations.js +6 -0
- package/resources/simulations.js.map +1 -0
- package/resources/simulations.mjs +3 -0
- package/resources/simulations.mjs.map +1 -0
- package/resources/transactions.d.mts +342 -162
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +342 -162
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +61 -11
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +61 -11
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +49 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +49 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +976 -978
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +976 -978
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +48 -8
- package/src/resources/account-holders.ts +1701 -1282
- package/src/resources/account-programs.ts +30 -19
- package/src/resources/accounts.ts +265 -50
- package/src/resources/api-keys.ts +3 -0
- package/src/resources/api-versions.ts +3 -0
- package/src/resources/conversions.ts +36 -93
- package/src/resources/counterparties.ts +3127 -0
- package/src/resources/deposits.ts +66 -269
- package/src/resources/events.ts +18 -12
- package/src/resources/index.ts +21 -4
- package/src/resources/payouts.ts +204 -439
- package/src/resources/quotes/indicative.ts +7 -12
- package/src/resources/quotes/quotes.ts +4 -9
- package/src/resources/returns.ts +144 -40
- package/src/resources/scopes.ts +7 -1
- package/src/resources/simulations/account-programs.ts +282 -0
- package/src/resources/simulations/accounts.ts +265 -0
- package/src/resources/simulations/conversions.ts +70 -0
- package/src/resources/simulations/deposits.ts +522 -0
- package/src/resources/simulations/index.ts +33 -0
- package/src/resources/simulations/payouts.ts +80 -0
- package/src/resources/simulations/simulations.ts +92 -0
- package/src/resources/simulations.ts +3 -0
- package/src/resources/transactions.ts +954 -206
- package/src/resources/webhook-subscriptions.ts +102 -36
- package/src/resources/webhooks.ts +1283 -1153
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/payouts.ts
CHANGED
|
@@ -9,6 +9,16 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
export class Payouts extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Creates a new payout.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const payout = await client.payouts.create({
|
|
16
|
+
* account_id: '550e8400-e29b-41d4-a716-44665544000b',
|
|
17
|
+
* amount: '100.50',
|
|
18
|
+
* counterparty_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
19
|
+
* currency: 'EUR',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
12
22
|
*/
|
|
13
23
|
create(body: PayoutCreateParams, options?: RequestOptions): APIPromise<PayoutCreateResponse> {
|
|
14
24
|
return this._client.post('/v1/payouts', { body, ...options });
|
|
@@ -16,6 +26,13 @@ export class Payouts extends APIResource {
|
|
|
16
26
|
|
|
17
27
|
/**
|
|
18
28
|
* Retrieves a payout by ID.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const payout = await client.payouts.retrieve(
|
|
33
|
+
* '550e8400-e29b-41d4-a716-446655440003',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
19
36
|
*/
|
|
20
37
|
retrieve(id: string, options?: RequestOptions): APIPromise<PayoutRetrieveResponse> {
|
|
21
38
|
return this._client.get(path`/v1/payouts/${id}`, options);
|
|
@@ -23,6 +40,14 @@ export class Payouts extends APIResource {
|
|
|
23
40
|
|
|
24
41
|
/**
|
|
25
42
|
* Lists payouts for the merchant with cursor-based pagination.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const payoutListResponse of client.payouts.list()) {
|
|
48
|
+
* // ...
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
26
51
|
*/
|
|
27
52
|
list(
|
|
28
53
|
query: PayoutListParams | null | undefined = {},
|
|
@@ -40,34 +65,35 @@ export interface PayoutCreateResponse {
|
|
|
40
65
|
*/
|
|
41
66
|
id: string;
|
|
42
67
|
|
|
68
|
+
/**
|
|
69
|
+
* ID of the account that was debited.
|
|
70
|
+
*/
|
|
71
|
+
account_id: string;
|
|
72
|
+
|
|
43
73
|
/**
|
|
44
74
|
* Amount as a string decimal (e.g. "100.50").
|
|
45
75
|
*/
|
|
46
76
|
amount: string;
|
|
47
77
|
|
|
48
78
|
/**
|
|
49
|
-
*
|
|
79
|
+
* ID of the counterparty that receives the money.
|
|
50
80
|
*/
|
|
51
|
-
|
|
81
|
+
counterparty_id: string;
|
|
52
82
|
|
|
53
83
|
/**
|
|
54
|
-
* Currency code (ISO 4217
|
|
84
|
+
* Currency code (ISO 4217 or crypto).
|
|
55
85
|
*/
|
|
56
86
|
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
57
87
|
|
|
58
88
|
/**
|
|
59
|
-
*
|
|
89
|
+
* Failure details when status is failed, otherwise null.
|
|
60
90
|
*/
|
|
61
|
-
|
|
62
|
-
| PayoutCreateResponse.IbanFinancialAddress
|
|
63
|
-
| PayoutCreateResponse.SortCodeFinancialAddress
|
|
64
|
-
| PayoutCreateResponse.AbaFinancialAddress
|
|
65
|
-
| PayoutCreateResponse.CryptoWalletFinancialAddress;
|
|
91
|
+
failure: PayoutCreateResponse.Failure | null;
|
|
66
92
|
|
|
67
93
|
/**
|
|
68
|
-
*
|
|
94
|
+
* ISO 8601 UTC timestamp when the payout was initiated.
|
|
69
95
|
*/
|
|
70
|
-
|
|
96
|
+
initiated_at: string;
|
|
71
97
|
|
|
72
98
|
/**
|
|
73
99
|
* Key-value pairs stored with the payout.
|
|
@@ -75,19 +101,48 @@ export interface PayoutCreateResponse {
|
|
|
75
101
|
metadata: { [key: string]: string };
|
|
76
102
|
|
|
77
103
|
/**
|
|
78
|
-
* Payment
|
|
104
|
+
* Payment scheme or blockchain used for the payout, or null when unknown.
|
|
79
105
|
*/
|
|
80
|
-
|
|
106
|
+
rail:
|
|
107
|
+
| 'sepa'
|
|
108
|
+
| 'sepa_instant'
|
|
109
|
+
| 'faster_payments'
|
|
110
|
+
| 'swift'
|
|
111
|
+
| 'internal'
|
|
112
|
+
| 'target'
|
|
113
|
+
| 'ach'
|
|
114
|
+
| 'fedwire'
|
|
115
|
+
| 'bitcoin'
|
|
116
|
+
| 'bitcoin_testnet4'
|
|
117
|
+
| 'ethereum'
|
|
118
|
+
| 'ethereum_sepolia'
|
|
119
|
+
| 'solana'
|
|
120
|
+
| 'solana_devnet'
|
|
121
|
+
| 'polygon'
|
|
122
|
+
| 'polygon_amoy'
|
|
123
|
+
| null;
|
|
81
124
|
|
|
82
125
|
/**
|
|
83
|
-
*
|
|
126
|
+
* ISO 8601 UTC timestamp when the payout was sent.
|
|
84
127
|
*/
|
|
85
|
-
|
|
128
|
+
sent_at: string | null;
|
|
86
129
|
|
|
87
130
|
/**
|
|
88
131
|
* Current status of the payout.
|
|
89
132
|
*/
|
|
90
|
-
status: '
|
|
133
|
+
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
137
|
+
* for SWIFT payments.
|
|
138
|
+
*/
|
|
139
|
+
tracking_reference: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
143
|
+
* rails support this field.
|
|
144
|
+
*/
|
|
145
|
+
tx_hash: string | null;
|
|
91
146
|
|
|
92
147
|
/**
|
|
93
148
|
* Resource type discriminator.
|
|
@@ -95,103 +150,13 @@ export interface PayoutCreateResponse {
|
|
|
95
150
|
type: 'payout';
|
|
96
151
|
|
|
97
152
|
/**
|
|
98
|
-
*
|
|
153
|
+
* Unstructured remittance information attached to the transfer. Not all rails
|
|
154
|
+
* support this field.
|
|
99
155
|
*/
|
|
100
|
-
|
|
156
|
+
unstructured_remittance_information: string | null;
|
|
101
157
|
}
|
|
102
158
|
|
|
103
159
|
export namespace PayoutCreateResponse {
|
|
104
|
-
export interface IbanFinancialAddress {
|
|
105
|
-
/**
|
|
106
|
-
* Name of the account holder.
|
|
107
|
-
*/
|
|
108
|
-
account_holder_name: string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Bank Identifier Code, or null if not provided.
|
|
112
|
-
*/
|
|
113
|
-
bic: string | null;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* International Bank Account Number.
|
|
117
|
-
*/
|
|
118
|
-
iban: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Discriminator for IBAN financial address.
|
|
122
|
-
*/
|
|
123
|
-
type: 'iban';
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface SortCodeFinancialAddress {
|
|
127
|
-
/**
|
|
128
|
-
* Name of the account holder.
|
|
129
|
-
*/
|
|
130
|
-
account_holder_name: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* UK account number (8 digits).
|
|
134
|
-
*/
|
|
135
|
-
account_number: string;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* UK sort code (6 digits).
|
|
139
|
-
*/
|
|
140
|
-
sort_code: string;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Discriminator for UK sort code financial address.
|
|
144
|
-
*/
|
|
145
|
-
type: 'sort_code';
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface AbaFinancialAddress {
|
|
149
|
-
/**
|
|
150
|
-
* Name of the account holder.
|
|
151
|
-
*/
|
|
152
|
-
account_holder_name: string;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Bank account number.
|
|
156
|
-
*/
|
|
157
|
-
account_number: string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* ABA routing number (9 digits).
|
|
161
|
-
*/
|
|
162
|
-
routing_number: string;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Discriminator for ABA wire financial address.
|
|
166
|
-
*/
|
|
167
|
-
type: 'aba';
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface CryptoWalletFinancialAddress {
|
|
171
|
-
/**
|
|
172
|
-
* Wallet address on the specified blockchain.
|
|
173
|
-
*/
|
|
174
|
-
address: string;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Blockchain network for the crypto wallet.
|
|
178
|
-
*/
|
|
179
|
-
blockchain:
|
|
180
|
-
| 'bitcoin'
|
|
181
|
-
| 'ethereum'
|
|
182
|
-
| 'solana'
|
|
183
|
-
| 'polygon'
|
|
184
|
-
| 'bitcoin_testnet4'
|
|
185
|
-
| 'ethereum_sepolia'
|
|
186
|
-
| 'solana_devnet'
|
|
187
|
-
| 'polygon_amoy';
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Discriminator for crypto wallet financial address.
|
|
191
|
-
*/
|
|
192
|
-
type: 'crypto_wallet';
|
|
193
|
-
}
|
|
194
|
-
|
|
195
160
|
/**
|
|
196
161
|
* Failure details when status is failed, otherwise null.
|
|
197
162
|
*/
|
|
@@ -204,6 +169,7 @@ export namespace PayoutCreateResponse {
|
|
|
204
169
|
| 'account_blocked'
|
|
205
170
|
| 'insufficient_funds'
|
|
206
171
|
| 'invalid_account_format'
|
|
172
|
+
| 'invalid_routing_number'
|
|
207
173
|
| 'invalid_instruction'
|
|
208
174
|
| 'invalid_amount'
|
|
209
175
|
| 'invalid_time'
|
|
@@ -233,34 +199,35 @@ export interface PayoutRetrieveResponse {
|
|
|
233
199
|
*/
|
|
234
200
|
id: string;
|
|
235
201
|
|
|
202
|
+
/**
|
|
203
|
+
* ID of the account that was debited.
|
|
204
|
+
*/
|
|
205
|
+
account_id: string;
|
|
206
|
+
|
|
236
207
|
/**
|
|
237
208
|
* Amount as a string decimal (e.g. "100.50").
|
|
238
209
|
*/
|
|
239
210
|
amount: string;
|
|
240
211
|
|
|
241
212
|
/**
|
|
242
|
-
*
|
|
213
|
+
* ID of the counterparty that receives the money.
|
|
243
214
|
*/
|
|
244
|
-
|
|
215
|
+
counterparty_id: string;
|
|
245
216
|
|
|
246
217
|
/**
|
|
247
|
-
* Currency code (ISO 4217
|
|
218
|
+
* Currency code (ISO 4217 or crypto).
|
|
248
219
|
*/
|
|
249
220
|
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
250
221
|
|
|
251
222
|
/**
|
|
252
|
-
*
|
|
223
|
+
* Failure details when status is failed, otherwise null.
|
|
253
224
|
*/
|
|
254
|
-
|
|
255
|
-
| PayoutRetrieveResponse.IbanFinancialAddress
|
|
256
|
-
| PayoutRetrieveResponse.SortCodeFinancialAddress
|
|
257
|
-
| PayoutRetrieveResponse.AbaFinancialAddress
|
|
258
|
-
| PayoutRetrieveResponse.CryptoWalletFinancialAddress;
|
|
225
|
+
failure: PayoutRetrieveResponse.Failure | null;
|
|
259
226
|
|
|
260
227
|
/**
|
|
261
|
-
*
|
|
228
|
+
* ISO 8601 UTC timestamp when the payout was initiated.
|
|
262
229
|
*/
|
|
263
|
-
|
|
230
|
+
initiated_at: string;
|
|
264
231
|
|
|
265
232
|
/**
|
|
266
233
|
* Key-value pairs stored with the payout.
|
|
@@ -268,19 +235,48 @@ export interface PayoutRetrieveResponse {
|
|
|
268
235
|
metadata: { [key: string]: string };
|
|
269
236
|
|
|
270
237
|
/**
|
|
271
|
-
* Payment
|
|
238
|
+
* Payment scheme or blockchain used for the payout, or null when unknown.
|
|
272
239
|
*/
|
|
273
|
-
|
|
240
|
+
rail:
|
|
241
|
+
| 'sepa'
|
|
242
|
+
| 'sepa_instant'
|
|
243
|
+
| 'faster_payments'
|
|
244
|
+
| 'swift'
|
|
245
|
+
| 'internal'
|
|
246
|
+
| 'target'
|
|
247
|
+
| 'ach'
|
|
248
|
+
| 'fedwire'
|
|
249
|
+
| 'bitcoin'
|
|
250
|
+
| 'bitcoin_testnet4'
|
|
251
|
+
| 'ethereum'
|
|
252
|
+
| 'ethereum_sepolia'
|
|
253
|
+
| 'solana'
|
|
254
|
+
| 'solana_devnet'
|
|
255
|
+
| 'polygon'
|
|
256
|
+
| 'polygon_amoy'
|
|
257
|
+
| null;
|
|
274
258
|
|
|
275
259
|
/**
|
|
276
|
-
*
|
|
260
|
+
* ISO 8601 UTC timestamp when the payout was sent.
|
|
277
261
|
*/
|
|
278
|
-
|
|
262
|
+
sent_at: string | null;
|
|
279
263
|
|
|
280
264
|
/**
|
|
281
265
|
* Current status of the payout.
|
|
282
266
|
*/
|
|
283
|
-
status: '
|
|
267
|
+
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
271
|
+
* for SWIFT payments.
|
|
272
|
+
*/
|
|
273
|
+
tracking_reference: string | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
277
|
+
* rails support this field.
|
|
278
|
+
*/
|
|
279
|
+
tx_hash: string | null;
|
|
284
280
|
|
|
285
281
|
/**
|
|
286
282
|
* Resource type discriminator.
|
|
@@ -288,103 +284,13 @@ export interface PayoutRetrieveResponse {
|
|
|
288
284
|
type: 'payout';
|
|
289
285
|
|
|
290
286
|
/**
|
|
291
|
-
*
|
|
287
|
+
* Unstructured remittance information attached to the transfer. Not all rails
|
|
288
|
+
* support this field.
|
|
292
289
|
*/
|
|
293
|
-
|
|
290
|
+
unstructured_remittance_information: string | null;
|
|
294
291
|
}
|
|
295
292
|
|
|
296
293
|
export namespace PayoutRetrieveResponse {
|
|
297
|
-
export interface IbanFinancialAddress {
|
|
298
|
-
/**
|
|
299
|
-
* Name of the account holder.
|
|
300
|
-
*/
|
|
301
|
-
account_holder_name: string;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Bank Identifier Code, or null if not provided.
|
|
305
|
-
*/
|
|
306
|
-
bic: string | null;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* International Bank Account Number.
|
|
310
|
-
*/
|
|
311
|
-
iban: string;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Discriminator for IBAN financial address.
|
|
315
|
-
*/
|
|
316
|
-
type: 'iban';
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export interface SortCodeFinancialAddress {
|
|
320
|
-
/**
|
|
321
|
-
* Name of the account holder.
|
|
322
|
-
*/
|
|
323
|
-
account_holder_name: string;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* UK account number (8 digits).
|
|
327
|
-
*/
|
|
328
|
-
account_number: string;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* UK sort code (6 digits).
|
|
332
|
-
*/
|
|
333
|
-
sort_code: string;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Discriminator for UK sort code financial address.
|
|
337
|
-
*/
|
|
338
|
-
type: 'sort_code';
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export interface AbaFinancialAddress {
|
|
342
|
-
/**
|
|
343
|
-
* Name of the account holder.
|
|
344
|
-
*/
|
|
345
|
-
account_holder_name: string;
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Bank account number.
|
|
349
|
-
*/
|
|
350
|
-
account_number: string;
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* ABA routing number (9 digits).
|
|
354
|
-
*/
|
|
355
|
-
routing_number: string;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Discriminator for ABA wire financial address.
|
|
359
|
-
*/
|
|
360
|
-
type: 'aba';
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export interface CryptoWalletFinancialAddress {
|
|
364
|
-
/**
|
|
365
|
-
* Wallet address on the specified blockchain.
|
|
366
|
-
*/
|
|
367
|
-
address: string;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Blockchain network for the crypto wallet.
|
|
371
|
-
*/
|
|
372
|
-
blockchain:
|
|
373
|
-
| 'bitcoin'
|
|
374
|
-
| 'ethereum'
|
|
375
|
-
| 'solana'
|
|
376
|
-
| 'polygon'
|
|
377
|
-
| 'bitcoin_testnet4'
|
|
378
|
-
| 'ethereum_sepolia'
|
|
379
|
-
| 'solana_devnet'
|
|
380
|
-
| 'polygon_amoy';
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Discriminator for crypto wallet financial address.
|
|
384
|
-
*/
|
|
385
|
-
type: 'crypto_wallet';
|
|
386
|
-
}
|
|
387
|
-
|
|
388
294
|
/**
|
|
389
295
|
* Failure details when status is failed, otherwise null.
|
|
390
296
|
*/
|
|
@@ -397,6 +303,7 @@ export namespace PayoutRetrieveResponse {
|
|
|
397
303
|
| 'account_blocked'
|
|
398
304
|
| 'insufficient_funds'
|
|
399
305
|
| 'invalid_account_format'
|
|
306
|
+
| 'invalid_routing_number'
|
|
400
307
|
| 'invalid_instruction'
|
|
401
308
|
| 'invalid_amount'
|
|
402
309
|
| 'invalid_time'
|
|
@@ -426,34 +333,35 @@ export interface PayoutListResponse {
|
|
|
426
333
|
*/
|
|
427
334
|
id: string;
|
|
428
335
|
|
|
336
|
+
/**
|
|
337
|
+
* ID of the account that was debited.
|
|
338
|
+
*/
|
|
339
|
+
account_id: string;
|
|
340
|
+
|
|
429
341
|
/**
|
|
430
342
|
* Amount as a string decimal (e.g. "100.50").
|
|
431
343
|
*/
|
|
432
344
|
amount: string;
|
|
433
345
|
|
|
434
346
|
/**
|
|
435
|
-
*
|
|
347
|
+
* ID of the counterparty that receives the money.
|
|
436
348
|
*/
|
|
437
|
-
|
|
349
|
+
counterparty_id: string;
|
|
438
350
|
|
|
439
351
|
/**
|
|
440
|
-
* Currency code (ISO 4217
|
|
352
|
+
* Currency code (ISO 4217 or crypto).
|
|
441
353
|
*/
|
|
442
354
|
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
443
355
|
|
|
444
356
|
/**
|
|
445
|
-
*
|
|
357
|
+
* Failure details when status is failed, otherwise null.
|
|
446
358
|
*/
|
|
447
|
-
|
|
448
|
-
| PayoutListResponse.IbanFinancialAddress
|
|
449
|
-
| PayoutListResponse.SortCodeFinancialAddress
|
|
450
|
-
| PayoutListResponse.AbaFinancialAddress
|
|
451
|
-
| PayoutListResponse.CryptoWalletFinancialAddress;
|
|
359
|
+
failure: PayoutListResponse.Failure | null;
|
|
452
360
|
|
|
453
361
|
/**
|
|
454
|
-
*
|
|
362
|
+
* ISO 8601 UTC timestamp when the payout was initiated.
|
|
455
363
|
*/
|
|
456
|
-
|
|
364
|
+
initiated_at: string;
|
|
457
365
|
|
|
458
366
|
/**
|
|
459
367
|
* Key-value pairs stored with the payout.
|
|
@@ -461,19 +369,48 @@ export interface PayoutListResponse {
|
|
|
461
369
|
metadata: { [key: string]: string };
|
|
462
370
|
|
|
463
371
|
/**
|
|
464
|
-
* Payment
|
|
372
|
+
* Payment scheme or blockchain used for the payout, or null when unknown.
|
|
465
373
|
*/
|
|
466
|
-
|
|
374
|
+
rail:
|
|
375
|
+
| 'sepa'
|
|
376
|
+
| 'sepa_instant'
|
|
377
|
+
| 'faster_payments'
|
|
378
|
+
| 'swift'
|
|
379
|
+
| 'internal'
|
|
380
|
+
| 'target'
|
|
381
|
+
| 'ach'
|
|
382
|
+
| 'fedwire'
|
|
383
|
+
| 'bitcoin'
|
|
384
|
+
| 'bitcoin_testnet4'
|
|
385
|
+
| 'ethereum'
|
|
386
|
+
| 'ethereum_sepolia'
|
|
387
|
+
| 'solana'
|
|
388
|
+
| 'solana_devnet'
|
|
389
|
+
| 'polygon'
|
|
390
|
+
| 'polygon_amoy'
|
|
391
|
+
| null;
|
|
467
392
|
|
|
468
393
|
/**
|
|
469
|
-
*
|
|
394
|
+
* ISO 8601 UTC timestamp when the payout was sent.
|
|
470
395
|
*/
|
|
471
|
-
|
|
396
|
+
sent_at: string | null;
|
|
472
397
|
|
|
473
398
|
/**
|
|
474
399
|
* Current status of the payout.
|
|
475
400
|
*/
|
|
476
|
-
status: '
|
|
401
|
+
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
405
|
+
* for SWIFT payments.
|
|
406
|
+
*/
|
|
407
|
+
tracking_reference: string | null;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
411
|
+
* rails support this field.
|
|
412
|
+
*/
|
|
413
|
+
tx_hash: string | null;
|
|
477
414
|
|
|
478
415
|
/**
|
|
479
416
|
* Resource type discriminator.
|
|
@@ -481,103 +418,13 @@ export interface PayoutListResponse {
|
|
|
481
418
|
type: 'payout';
|
|
482
419
|
|
|
483
420
|
/**
|
|
484
|
-
*
|
|
421
|
+
* Unstructured remittance information attached to the transfer. Not all rails
|
|
422
|
+
* support this field.
|
|
485
423
|
*/
|
|
486
|
-
|
|
424
|
+
unstructured_remittance_information: string | null;
|
|
487
425
|
}
|
|
488
426
|
|
|
489
427
|
export namespace PayoutListResponse {
|
|
490
|
-
export interface IbanFinancialAddress {
|
|
491
|
-
/**
|
|
492
|
-
* Name of the account holder.
|
|
493
|
-
*/
|
|
494
|
-
account_holder_name: string;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Bank Identifier Code, or null if not provided.
|
|
498
|
-
*/
|
|
499
|
-
bic: string | null;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* International Bank Account Number.
|
|
503
|
-
*/
|
|
504
|
-
iban: string;
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Discriminator for IBAN financial address.
|
|
508
|
-
*/
|
|
509
|
-
type: 'iban';
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
export interface SortCodeFinancialAddress {
|
|
513
|
-
/**
|
|
514
|
-
* Name of the account holder.
|
|
515
|
-
*/
|
|
516
|
-
account_holder_name: string;
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* UK account number (8 digits).
|
|
520
|
-
*/
|
|
521
|
-
account_number: string;
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* UK sort code (6 digits).
|
|
525
|
-
*/
|
|
526
|
-
sort_code: string;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Discriminator for UK sort code financial address.
|
|
530
|
-
*/
|
|
531
|
-
type: 'sort_code';
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
export interface AbaFinancialAddress {
|
|
535
|
-
/**
|
|
536
|
-
* Name of the account holder.
|
|
537
|
-
*/
|
|
538
|
-
account_holder_name: string;
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Bank account number.
|
|
542
|
-
*/
|
|
543
|
-
account_number: string;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* ABA routing number (9 digits).
|
|
547
|
-
*/
|
|
548
|
-
routing_number: string;
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Discriminator for ABA wire financial address.
|
|
552
|
-
*/
|
|
553
|
-
type: 'aba';
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
export interface CryptoWalletFinancialAddress {
|
|
557
|
-
/**
|
|
558
|
-
* Wallet address on the specified blockchain.
|
|
559
|
-
*/
|
|
560
|
-
address: string;
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
* Blockchain network for the crypto wallet.
|
|
564
|
-
*/
|
|
565
|
-
blockchain:
|
|
566
|
-
| 'bitcoin'
|
|
567
|
-
| 'ethereum'
|
|
568
|
-
| 'solana'
|
|
569
|
-
| 'polygon'
|
|
570
|
-
| 'bitcoin_testnet4'
|
|
571
|
-
| 'ethereum_sepolia'
|
|
572
|
-
| 'solana_devnet'
|
|
573
|
-
| 'polygon_amoy';
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Discriminator for crypto wallet financial address.
|
|
577
|
-
*/
|
|
578
|
-
type: 'crypto_wallet';
|
|
579
|
-
}
|
|
580
|
-
|
|
581
428
|
/**
|
|
582
429
|
* Failure details when status is failed, otherwise null.
|
|
583
430
|
*/
|
|
@@ -590,6 +437,7 @@ export namespace PayoutListResponse {
|
|
|
590
437
|
| 'account_blocked'
|
|
591
438
|
| 'insufficient_funds'
|
|
592
439
|
| 'invalid_account_format'
|
|
440
|
+
| 'invalid_routing_number'
|
|
593
441
|
| 'invalid_instruction'
|
|
594
442
|
| 'invalid_amount'
|
|
595
443
|
| 'invalid_time'
|
|
@@ -615,136 +463,53 @@ export namespace PayoutListResponse {
|
|
|
615
463
|
|
|
616
464
|
export interface PayoutCreateParams {
|
|
617
465
|
/**
|
|
618
|
-
*
|
|
466
|
+
* ID of the account to debit.
|
|
619
467
|
*/
|
|
620
|
-
|
|
468
|
+
account_id: string;
|
|
621
469
|
|
|
622
470
|
/**
|
|
623
|
-
*
|
|
471
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
624
472
|
*/
|
|
625
|
-
|
|
473
|
+
amount: string;
|
|
626
474
|
|
|
627
475
|
/**
|
|
628
|
-
*
|
|
476
|
+
* ID of the saved counterparty that receives the money.
|
|
629
477
|
*/
|
|
630
|
-
|
|
631
|
-
| PayoutCreateParams.Iban
|
|
632
|
-
| PayoutCreateParams.SortCodeFinancialAddress
|
|
633
|
-
| PayoutCreateParams.AbaFinancialAddress
|
|
634
|
-
| PayoutCreateParams.CryptoWalletFinancialAddress;
|
|
478
|
+
counterparty_id: string;
|
|
635
479
|
|
|
636
480
|
/**
|
|
637
|
-
*
|
|
481
|
+
* Currency code (ISO 4217 or crypto).
|
|
638
482
|
*/
|
|
639
|
-
|
|
483
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
640
484
|
|
|
641
485
|
/**
|
|
642
|
-
*
|
|
486
|
+
* Key-value pairs stored with the payout.
|
|
643
487
|
*/
|
|
644
|
-
|
|
488
|
+
metadata?: { [key: string]: string } | null;
|
|
645
489
|
|
|
646
490
|
/**
|
|
647
|
-
*
|
|
491
|
+
* Settlement rail the counterparty is reachable on. Selected automatically when
|
|
492
|
+
* omitted. Validated against the counterparty financial address at runtime.
|
|
648
493
|
*/
|
|
649
|
-
|
|
494
|
+
rail?:
|
|
495
|
+
| 'sepa'
|
|
496
|
+
| 'sepa_instant'
|
|
497
|
+
| 'faster_payments'
|
|
498
|
+
| 'swift'
|
|
499
|
+
| 'ach'
|
|
500
|
+
| 'fedwire'
|
|
501
|
+
| 'ethereum'
|
|
502
|
+
| 'ethereum_sepolia'
|
|
503
|
+
| 'solana'
|
|
504
|
+
| 'solana_devnet'
|
|
505
|
+
| 'polygon'
|
|
506
|
+
| 'polygon_amoy';
|
|
650
507
|
|
|
651
508
|
/**
|
|
652
|
-
*
|
|
509
|
+
* Unstructured remittance information attached to the transfer. This appears on
|
|
510
|
+
* the counterparty's bank statement. Not supported by blockchain rails.
|
|
653
511
|
*/
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
export namespace PayoutCreateParams {
|
|
658
|
-
export interface Iban {
|
|
659
|
-
/**
|
|
660
|
-
* Name of the account holder.
|
|
661
|
-
*/
|
|
662
|
-
account_holder_name: string;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* International Bank Account Number.
|
|
666
|
-
*/
|
|
667
|
-
iban: string;
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* Discriminator for IBAN financial address.
|
|
671
|
-
*/
|
|
672
|
-
type: 'iban';
|
|
673
|
-
|
|
674
|
-
/**
|
|
675
|
-
* Bank Identifier Code.
|
|
676
|
-
*/
|
|
677
|
-
bic?: string;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
export interface SortCodeFinancialAddress {
|
|
681
|
-
/**
|
|
682
|
-
* Name of the account holder.
|
|
683
|
-
*/
|
|
684
|
-
account_holder_name: string;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* UK account number (8 digits).
|
|
688
|
-
*/
|
|
689
|
-
account_number: string;
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* UK sort code (6 digits).
|
|
693
|
-
*/
|
|
694
|
-
sort_code: string;
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Discriminator for UK sort code financial address.
|
|
698
|
-
*/
|
|
699
|
-
type: 'sort_code';
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
export interface AbaFinancialAddress {
|
|
703
|
-
/**
|
|
704
|
-
* Name of the account holder.
|
|
705
|
-
*/
|
|
706
|
-
account_holder_name: string;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Bank account number.
|
|
710
|
-
*/
|
|
711
|
-
account_number: string;
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* ABA routing number (9 digits).
|
|
715
|
-
*/
|
|
716
|
-
routing_number: string;
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Discriminator for ABA wire financial address.
|
|
720
|
-
*/
|
|
721
|
-
type: 'aba';
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
export interface CryptoWalletFinancialAddress {
|
|
725
|
-
/**
|
|
726
|
-
* Wallet address on the specified blockchain.
|
|
727
|
-
*/
|
|
728
|
-
address: string;
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* Blockchain network for the crypto wallet.
|
|
732
|
-
*/
|
|
733
|
-
blockchain:
|
|
734
|
-
| 'bitcoin'
|
|
735
|
-
| 'ethereum'
|
|
736
|
-
| 'solana'
|
|
737
|
-
| 'polygon'
|
|
738
|
-
| 'bitcoin_testnet4'
|
|
739
|
-
| 'ethereum_sepolia'
|
|
740
|
-
| 'solana_devnet'
|
|
741
|
-
| 'polygon_amoy';
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Discriminator for crypto wallet financial address.
|
|
745
|
-
*/
|
|
746
|
-
type: 'crypto_wallet';
|
|
747
|
-
}
|
|
512
|
+
unstructured_remittance_information?: string | null;
|
|
748
513
|
}
|
|
749
514
|
|
|
750
515
|
export interface PayoutListParams extends CursorPageParams {
|
|
@@ -759,7 +524,7 @@ export interface PayoutListParams extends CursorPageParams {
|
|
|
759
524
|
/**
|
|
760
525
|
* Filter by payout status.
|
|
761
526
|
*/
|
|
762
|
-
status?: '
|
|
527
|
+
status?: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
763
528
|
}
|
|
764
529
|
|
|
765
530
|
export namespace PayoutListParams {
|