@augustusbank/typescript-sdk 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/client.d.mts +8 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -8
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-programs.d.mts +21 -16
- package/resources/account-programs.d.mts.map +1 -1
- package/resources/account-programs.d.ts +21 -16
- 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 +21 -6
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +21 -6
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +2 -2
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +2 -2
- package/resources/accounts.mjs.map +1 -1
- package/resources/counterparties.d.mts +16 -16
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +16 -16
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/deposits.d.mts +10 -0
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +10 -0
- 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 +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +22 -406
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +22 -406
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +2 -4
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +2 -4
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/index.d.mts +1 -1
- package/resources/quotes/index.d.mts.map +1 -1
- package/resources/quotes/index.d.ts +1 -1
- package/resources/quotes/index.d.ts.map +1 -1
- package/resources/quotes/index.js.map +1 -1
- package/resources/quotes/index.mjs.map +1 -1
- package/resources/quotes/quotes.d.mts +0 -57
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +0 -57
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js +0 -7
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs +0 -7
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/simulations/account-programs.d.mts +11 -72
- package/resources/simulations/account-programs.d.mts.map +1 -1
- package/resources/simulations/account-programs.d.ts +11 -72
- package/resources/simulations/account-programs.d.ts.map +1 -1
- package/resources/simulations/account-programs.js +1 -2
- package/resources/simulations/account-programs.js.map +1 -1
- package/resources/simulations/account-programs.mjs +1 -2
- package/resources/simulations/account-programs.mjs.map +1 -1
- package/resources/simulations/accounts.d.mts +16 -72
- package/resources/simulations/accounts.d.mts.map +1 -1
- package/resources/simulations/accounts.d.ts +16 -72
- package/resources/simulations/accounts.d.ts.map +1 -1
- package/resources/simulations/accounts.js +3 -3
- package/resources/simulations/accounts.js.map +1 -1
- package/resources/simulations/accounts.mjs +3 -3
- package/resources/simulations/accounts.mjs.map +1 -1
- 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 +14 -30
- package/resources/simulations/deposits.d.mts.map +1 -1
- package/resources/simulations/deposits.d.ts +14 -30
- package/resources/simulations/deposits.d.ts.map +1 -1
- package/resources/simulations/index.d.mts +3 -1
- package/resources/simulations/index.d.mts.map +1 -1
- package/resources/simulations/index.d.ts +3 -1
- package/resources/simulations/index.d.ts.map +1 -1
- package/resources/simulations/index.js +5 -1
- package/resources/simulations/index.js.map +1 -1
- package/resources/simulations/index.mjs +2 -0
- package/resources/simulations/index.mjs.map +1 -1
- package/resources/simulations/payouts.d.mts +33 -17
- package/resources/simulations/payouts.d.mts.map +1 -1
- package/resources/simulations/payouts.d.ts +33 -17
- package/resources/simulations/payouts.d.ts.map +1 -1
- package/resources/simulations/payouts.js +16 -0
- package/resources/simulations/payouts.js.map +1 -1
- package/resources/simulations/payouts.mjs +16 -0
- package/resources/simulations/payouts.mjs.map +1 -1
- package/resources/simulations/returns.d.mts +92 -0
- package/resources/simulations/returns.d.mts.map +1 -0
- package/resources/simulations/returns.d.ts +92 -0
- package/resources/simulations/returns.d.ts.map +1 -0
- package/resources/simulations/returns.js +55 -0
- package/resources/simulations/returns.js.map +1 -0
- package/resources/simulations/returns.mjs +51 -0
- package/resources/simulations/returns.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +10 -2
- package/resources/simulations/simulations.d.mts.map +1 -1
- package/resources/simulations/simulations.d.ts +10 -2
- package/resources/simulations/simulations.d.ts.map +1 -1
- package/resources/simulations/simulations.js +8 -0
- package/resources/simulations/simulations.js.map +1 -1
- package/resources/simulations/simulations.mjs +9 -1
- package/resources/simulations/simulations.mjs.map +1 -1
- package/resources/transactions.d.mts +60 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +60 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +9 -9
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +9 -9
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +1 -1
- package/resources/webhook-subscriptions.mjs +1 -1
- package/resources/webhooks.d.mts +245 -30
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +245 -30
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +18 -10
- package/src/resources/account-programs.ts +29 -18
- package/src/resources/accounts.ts +29 -6
- package/src/resources/counterparties.ts +16 -16
- package/src/resources/deposits.ts +12 -0
- package/src/resources/events.ts +18 -12
- package/src/resources/index.ts +9 -5
- package/src/resources/payouts.ts +36 -1993
- package/src/resources/quotes/index.ts +1 -1
- package/src/resources/quotes/quotes.ts +0 -84
- package/src/resources/simulations/account-programs.ts +12 -87
- package/src/resources/simulations/accounts.ts +18 -87
- package/src/resources/simulations/conversions.ts +70 -0
- package/src/resources/simulations/deposits.ts +27 -35
- package/src/resources/simulations/index.ts +11 -0
- package/src/resources/simulations/payouts.ts +43 -18
- package/src/resources/simulations/returns.ts +123 -0
- package/src/resources/simulations/simulations.ts +40 -1
- package/src/resources/transactions.ts +70 -0
- package/src/resources/webhook-subscriptions.ts +49 -33
- package/src/resources/webhooks.ts +360 -36
- 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/resources/webhooks.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Webhooks extends APIResource {
|
|
|
5
5
|
key?: string;
|
|
6
6
|
}): UnwrapWebhookEvent;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface PayoutInitiatedWebhookEvent {
|
|
9
9
|
/**
|
|
10
10
|
* Unique identifier for the event. Stable across retries.
|
|
11
11
|
*/
|
|
@@ -21,13 +21,13 @@ export interface PayoutCreatedWebhookEvent {
|
|
|
21
21
|
/**
|
|
22
22
|
* Full resource snapshot at the time of the event.
|
|
23
23
|
*/
|
|
24
|
-
payload:
|
|
24
|
+
payload: PayoutInitiatedWebhookEvent.Payload;
|
|
25
25
|
/**
|
|
26
26
|
* Event type in resource.action format.
|
|
27
27
|
*/
|
|
28
|
-
type: 'payout.
|
|
28
|
+
type: 'payout.initiated';
|
|
29
29
|
}
|
|
30
|
-
export declare namespace
|
|
30
|
+
export declare namespace PayoutInitiatedWebhookEvent {
|
|
31
31
|
/**
|
|
32
32
|
* Full resource snapshot at the time of the event.
|
|
33
33
|
*/
|
|
@@ -79,9 +79,10 @@ export declare namespace PayoutCreatedWebhookEvent {
|
|
|
79
79
|
*/
|
|
80
80
|
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
83
|
+
* for SWIFT payments.
|
|
83
84
|
*/
|
|
84
|
-
|
|
85
|
+
tracking_reference: string | null;
|
|
85
86
|
/**
|
|
86
87
|
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
87
88
|
* rails support this field.
|
|
@@ -117,7 +118,7 @@ export declare namespace PayoutCreatedWebhookEvent {
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
|
-
export interface
|
|
121
|
+
export interface PayoutSubmittedWebhookEvent {
|
|
121
122
|
/**
|
|
122
123
|
* Unique identifier for the event. Stable across retries.
|
|
123
124
|
*/
|
|
@@ -133,13 +134,13 @@ export interface PayoutInitiatedWebhookEvent {
|
|
|
133
134
|
/**
|
|
134
135
|
* Full resource snapshot at the time of the event.
|
|
135
136
|
*/
|
|
136
|
-
payload:
|
|
137
|
+
payload: PayoutSubmittedWebhookEvent.Payload;
|
|
137
138
|
/**
|
|
138
139
|
* Event type in resource.action format.
|
|
139
140
|
*/
|
|
140
|
-
type: 'payout.
|
|
141
|
+
type: 'payout.submitted';
|
|
141
142
|
}
|
|
142
|
-
export declare namespace
|
|
143
|
+
export declare namespace PayoutSubmittedWebhookEvent {
|
|
143
144
|
/**
|
|
144
145
|
* Full resource snapshot at the time of the event.
|
|
145
146
|
*/
|
|
@@ -191,9 +192,10 @@ export declare namespace PayoutInitiatedWebhookEvent {
|
|
|
191
192
|
*/
|
|
192
193
|
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
193
194
|
/**
|
|
194
|
-
*
|
|
195
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
196
|
+
* for SWIFT payments.
|
|
195
197
|
*/
|
|
196
|
-
|
|
198
|
+
tracking_reference: string | null;
|
|
197
199
|
/**
|
|
198
200
|
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
199
201
|
* rails support this field.
|
|
@@ -229,7 +231,7 @@ export declare namespace PayoutInitiatedWebhookEvent {
|
|
|
229
231
|
}
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
|
-
export interface
|
|
234
|
+
export interface PayoutSentWebhookEvent {
|
|
233
235
|
/**
|
|
234
236
|
* Unique identifier for the event. Stable across retries.
|
|
235
237
|
*/
|
|
@@ -245,13 +247,13 @@ export interface PayoutPaidWebhookEvent {
|
|
|
245
247
|
/**
|
|
246
248
|
* Full resource snapshot at the time of the event.
|
|
247
249
|
*/
|
|
248
|
-
payload:
|
|
250
|
+
payload: PayoutSentWebhookEvent.Payload;
|
|
249
251
|
/**
|
|
250
252
|
* Event type in resource.action format.
|
|
251
253
|
*/
|
|
252
|
-
type: 'payout.
|
|
254
|
+
type: 'payout.sent';
|
|
253
255
|
}
|
|
254
|
-
export declare namespace
|
|
256
|
+
export declare namespace PayoutSentWebhookEvent {
|
|
255
257
|
/**
|
|
256
258
|
* Full resource snapshot at the time of the event.
|
|
257
259
|
*/
|
|
@@ -303,9 +305,10 @@ export declare namespace PayoutPaidWebhookEvent {
|
|
|
303
305
|
*/
|
|
304
306
|
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
305
307
|
/**
|
|
306
|
-
*
|
|
308
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
309
|
+
* for SWIFT payments.
|
|
307
310
|
*/
|
|
308
|
-
|
|
311
|
+
tracking_reference: string | null;
|
|
309
312
|
/**
|
|
310
313
|
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
311
314
|
* rails support this field.
|
|
@@ -415,9 +418,123 @@ export declare namespace PayoutFailedWebhookEvent {
|
|
|
415
418
|
*/
|
|
416
419
|
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
417
420
|
/**
|
|
418
|
-
*
|
|
421
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
422
|
+
* for SWIFT payments.
|
|
419
423
|
*/
|
|
420
|
-
|
|
424
|
+
tracking_reference: string | null;
|
|
425
|
+
/**
|
|
426
|
+
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
427
|
+
* rails support this field.
|
|
428
|
+
*/
|
|
429
|
+
tx_hash: string | null;
|
|
430
|
+
/**
|
|
431
|
+
* Resource type discriminator.
|
|
432
|
+
*/
|
|
433
|
+
type: 'payout';
|
|
434
|
+
/**
|
|
435
|
+
* Unstructured remittance information attached to the transfer. Not all rails
|
|
436
|
+
* support this field.
|
|
437
|
+
*/
|
|
438
|
+
unstructured_remittance_information: string | null;
|
|
439
|
+
}
|
|
440
|
+
namespace Payload {
|
|
441
|
+
/**
|
|
442
|
+
* Failure details when status is failed, otherwise null.
|
|
443
|
+
*/
|
|
444
|
+
interface Failure {
|
|
445
|
+
/**
|
|
446
|
+
* Failure code.
|
|
447
|
+
*/
|
|
448
|
+
code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
|
|
449
|
+
/**
|
|
450
|
+
* Human-readable description of the failure.
|
|
451
|
+
*/
|
|
452
|
+
message: string;
|
|
453
|
+
/**
|
|
454
|
+
* Whether the payout can be retried.
|
|
455
|
+
*/
|
|
456
|
+
retry: boolean;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
export interface PayoutReturnedWebhookEvent {
|
|
461
|
+
/**
|
|
462
|
+
* Unique identifier for the event. Stable across retries.
|
|
463
|
+
*/
|
|
464
|
+
id: string;
|
|
465
|
+
/**
|
|
466
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
467
|
+
*/
|
|
468
|
+
api_version: string;
|
|
469
|
+
/**
|
|
470
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
471
|
+
*/
|
|
472
|
+
date: string;
|
|
473
|
+
/**
|
|
474
|
+
* Full resource snapshot at the time of the event.
|
|
475
|
+
*/
|
|
476
|
+
payload: PayoutReturnedWebhookEvent.Payload;
|
|
477
|
+
/**
|
|
478
|
+
* Event type in resource.action format.
|
|
479
|
+
*/
|
|
480
|
+
type: 'payout.returned';
|
|
481
|
+
}
|
|
482
|
+
export declare namespace PayoutReturnedWebhookEvent {
|
|
483
|
+
/**
|
|
484
|
+
* Full resource snapshot at the time of the event.
|
|
485
|
+
*/
|
|
486
|
+
interface Payload {
|
|
487
|
+
/**
|
|
488
|
+
* Unique identifier of the payout.
|
|
489
|
+
*/
|
|
490
|
+
id: string;
|
|
491
|
+
/**
|
|
492
|
+
* ID of the account that was debited.
|
|
493
|
+
*/
|
|
494
|
+
account_id: string;
|
|
495
|
+
/**
|
|
496
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
497
|
+
*/
|
|
498
|
+
amount: string;
|
|
499
|
+
/**
|
|
500
|
+
* ID of the counterparty that receives the money.
|
|
501
|
+
*/
|
|
502
|
+
counterparty_id: string;
|
|
503
|
+
/**
|
|
504
|
+
* Currency code (ISO 4217 or crypto).
|
|
505
|
+
*/
|
|
506
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
507
|
+
/**
|
|
508
|
+
* Failure details when status is failed, otherwise null.
|
|
509
|
+
*/
|
|
510
|
+
failure: Payload.Failure | null;
|
|
511
|
+
/**
|
|
512
|
+
* ISO 8601 UTC timestamp when the payout was initiated.
|
|
513
|
+
*/
|
|
514
|
+
initiated_at: string;
|
|
515
|
+
/**
|
|
516
|
+
* Key-value pairs stored with the payout.
|
|
517
|
+
*/
|
|
518
|
+
metadata: {
|
|
519
|
+
[key: string]: string;
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Payment scheme or blockchain used for the payout, or null when unknown.
|
|
523
|
+
*/
|
|
524
|
+
rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
|
|
525
|
+
/**
|
|
526
|
+
* ISO 8601 UTC timestamp when the payout was sent.
|
|
527
|
+
*/
|
|
528
|
+
sent_at: string | null;
|
|
529
|
+
/**
|
|
530
|
+
* Current status of the payout.
|
|
531
|
+
*/
|
|
532
|
+
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
533
|
+
/**
|
|
534
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
535
|
+
* for SWIFT payments.
|
|
536
|
+
*/
|
|
537
|
+
tracking_reference: string | null;
|
|
421
538
|
/**
|
|
422
539
|
* Transaction hash for crypto payouts, or null when not known. Only blockchain
|
|
423
540
|
* rails support this field.
|
|
@@ -546,7 +663,100 @@ export declare namespace ReturnInitiatedWebhookEvent {
|
|
|
546
663
|
}
|
|
547
664
|
}
|
|
548
665
|
}
|
|
549
|
-
export interface
|
|
666
|
+
export interface ReturnSubmittedWebhookEvent {
|
|
667
|
+
/**
|
|
668
|
+
* Unique identifier for the event. Stable across retries.
|
|
669
|
+
*/
|
|
670
|
+
id: string;
|
|
671
|
+
/**
|
|
672
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
673
|
+
*/
|
|
674
|
+
api_version: string;
|
|
675
|
+
/**
|
|
676
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
677
|
+
*/
|
|
678
|
+
date: string;
|
|
679
|
+
/**
|
|
680
|
+
* Full resource snapshot at the time of the event.
|
|
681
|
+
*/
|
|
682
|
+
payload: ReturnSubmittedWebhookEvent.Payload;
|
|
683
|
+
/**
|
|
684
|
+
* Event type in resource.action format.
|
|
685
|
+
*/
|
|
686
|
+
type: 'return.submitted';
|
|
687
|
+
}
|
|
688
|
+
export declare namespace ReturnSubmittedWebhookEvent {
|
|
689
|
+
/**
|
|
690
|
+
* Full resource snapshot at the time of the event.
|
|
691
|
+
*/
|
|
692
|
+
interface Payload {
|
|
693
|
+
/**
|
|
694
|
+
* Unique identifier of the return.
|
|
695
|
+
*/
|
|
696
|
+
id: string;
|
|
697
|
+
/**
|
|
698
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
699
|
+
*/
|
|
700
|
+
amount: string;
|
|
701
|
+
/**
|
|
702
|
+
* Currency code (ISO 4217 or crypto).
|
|
703
|
+
*/
|
|
704
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
705
|
+
/**
|
|
706
|
+
* ID of the parent deposit.
|
|
707
|
+
*/
|
|
708
|
+
deposit_id: string;
|
|
709
|
+
/**
|
|
710
|
+
* Failure details when status is failed, otherwise null.
|
|
711
|
+
*/
|
|
712
|
+
failure: Payload.Failure | null;
|
|
713
|
+
/**
|
|
714
|
+
* ISO 8601 UTC timestamp when the return was initiated.
|
|
715
|
+
*/
|
|
716
|
+
initiated_at: string;
|
|
717
|
+
/**
|
|
718
|
+
* Payment scheme or blockchain used for the return, or null when unknown.
|
|
719
|
+
*/
|
|
720
|
+
rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
|
|
721
|
+
/**
|
|
722
|
+
* ISO 8601 UTC timestamp when the return was sent.
|
|
723
|
+
*/
|
|
724
|
+
sent_at: string | null;
|
|
725
|
+
/**
|
|
726
|
+
* Current status of the return.
|
|
727
|
+
*/
|
|
728
|
+
status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
|
|
729
|
+
/**
|
|
730
|
+
* Transaction hash for crypto returns, or null when not known. Only blockchain
|
|
731
|
+
* rails support this field.
|
|
732
|
+
*/
|
|
733
|
+
tx_hash: string | null;
|
|
734
|
+
/**
|
|
735
|
+
* Resource type discriminator.
|
|
736
|
+
*/
|
|
737
|
+
type: 'return';
|
|
738
|
+
}
|
|
739
|
+
namespace Payload {
|
|
740
|
+
/**
|
|
741
|
+
* Failure details when status is failed, otherwise null.
|
|
742
|
+
*/
|
|
743
|
+
interface Failure {
|
|
744
|
+
/**
|
|
745
|
+
* Failure code.
|
|
746
|
+
*/
|
|
747
|
+
code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
|
|
748
|
+
/**
|
|
749
|
+
* Human-readable description of the failure.
|
|
750
|
+
*/
|
|
751
|
+
message: string;
|
|
752
|
+
/**
|
|
753
|
+
* Whether the return can be retried.
|
|
754
|
+
*/
|
|
755
|
+
retry: boolean;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
export interface ReturnSentWebhookEvent {
|
|
550
760
|
/**
|
|
551
761
|
* Unique identifier for the event. Stable across retries.
|
|
552
762
|
*/
|
|
@@ -562,13 +772,13 @@ export interface ReturnPaidWebhookEvent {
|
|
|
562
772
|
/**
|
|
563
773
|
* Full resource snapshot at the time of the event.
|
|
564
774
|
*/
|
|
565
|
-
payload:
|
|
775
|
+
payload: ReturnSentWebhookEvent.Payload;
|
|
566
776
|
/**
|
|
567
777
|
* Event type in resource.action format.
|
|
568
778
|
*/
|
|
569
|
-
type: 'return.
|
|
779
|
+
type: 'return.sent';
|
|
570
780
|
}
|
|
571
|
-
export declare namespace
|
|
781
|
+
export declare namespace ReturnSentWebhookEvent {
|
|
572
782
|
/**
|
|
573
783
|
* Full resource snapshot at the time of the event.
|
|
574
784
|
*/
|
|
@@ -825,7 +1035,7 @@ export declare namespace ReturnReturnedWebhookEvent {
|
|
|
825
1035
|
}
|
|
826
1036
|
}
|
|
827
1037
|
}
|
|
828
|
-
export interface
|
|
1038
|
+
export interface DepositSettledWebhookEvent {
|
|
829
1039
|
/**
|
|
830
1040
|
* Unique identifier for the event. Stable across retries.
|
|
831
1041
|
*/
|
|
@@ -841,13 +1051,13 @@ export interface DepositReceivedWebhookEvent {
|
|
|
841
1051
|
/**
|
|
842
1052
|
* Full resource snapshot at the time of the event.
|
|
843
1053
|
*/
|
|
844
|
-
payload:
|
|
1054
|
+
payload: DepositSettledWebhookEvent.Payload;
|
|
845
1055
|
/**
|
|
846
1056
|
* Event type in resource.action format.
|
|
847
1057
|
*/
|
|
848
|
-
type: 'deposit.
|
|
1058
|
+
type: 'deposit.settled';
|
|
849
1059
|
}
|
|
850
|
-
export declare namespace
|
|
1060
|
+
export declare namespace DepositSettledWebhookEvent {
|
|
851
1061
|
/**
|
|
852
1062
|
* Full resource snapshot at the time of the event.
|
|
853
1063
|
*/
|
|
@@ -888,6 +1098,11 @@ export declare namespace DepositReceivedWebhookEvent {
|
|
|
888
1098
|
* Current status of the deposit.
|
|
889
1099
|
*/
|
|
890
1100
|
status: 'settled';
|
|
1101
|
+
/**
|
|
1102
|
+
* Reference used to track the payment across the payment network, such as the UETR
|
|
1103
|
+
* for SWIFT payments.
|
|
1104
|
+
*/
|
|
1105
|
+
tracking_reference: string | null;
|
|
891
1106
|
/**
|
|
892
1107
|
* Transaction hash for crypto deposits, or null when not known. Only blockchain
|
|
893
1108
|
* rails support this field.
|
|
@@ -2673,8 +2888,8 @@ export declare namespace PingTestWebhookEvent {
|
|
|
2673
2888
|
type: 'ping';
|
|
2674
2889
|
}
|
|
2675
2890
|
}
|
|
2676
|
-
export type UnwrapWebhookEvent =
|
|
2891
|
+
export type UnwrapWebhookEvent = PayoutInitiatedWebhookEvent | PayoutSubmittedWebhookEvent | PayoutSentWebhookEvent | PayoutFailedWebhookEvent | PayoutReturnedWebhookEvent | ReturnInitiatedWebhookEvent | ReturnSubmittedWebhookEvent | ReturnSentWebhookEvent | ReturnFailedWebhookEvent | ReturnReturnedWebhookEvent | DepositSettledWebhookEvent | ConversionCreatedWebhookEvent | ConversionCompletedWebhookEvent | ConversionFailedWebhookEvent | AccountHolderActiveWebhookEvent | AccountHolderClosedWebhookEvent | PingTestWebhookEvent;
|
|
2677
2892
|
export declare namespace Webhooks {
|
|
2678
|
-
export { type
|
|
2893
|
+
export { type PayoutInitiatedWebhookEvent as PayoutInitiatedWebhookEvent, type PayoutSubmittedWebhookEvent as PayoutSubmittedWebhookEvent, type PayoutSentWebhookEvent as PayoutSentWebhookEvent, type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent, type PayoutReturnedWebhookEvent as PayoutReturnedWebhookEvent, type ReturnInitiatedWebhookEvent as ReturnInitiatedWebhookEvent, type ReturnSubmittedWebhookEvent as ReturnSubmittedWebhookEvent, type ReturnSentWebhookEvent as ReturnSentWebhookEvent, type ReturnFailedWebhookEvent as ReturnFailedWebhookEvent, type ReturnReturnedWebhookEvent as ReturnReturnedWebhookEvent, type DepositSettledWebhookEvent as DepositSettledWebhookEvent, type ConversionCreatedWebhookEvent as ConversionCreatedWebhookEvent, type ConversionCompletedWebhookEvent as ConversionCompletedWebhookEvent, type ConversionFailedWebhookEvent as ConversionFailedWebhookEvent, type AccountHolderActiveWebhookEvent as AccountHolderActiveWebhookEvent, type AccountHolderClosedWebhookEvent as AccountHolderClosedWebhookEvent, type PingTestWebhookEvent as PingTestWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
|
|
2679
2894
|
}
|
|
2680
2895
|
//# sourceMappingURL=webhooks.d.ts.map
|