-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtransactions.ts
More file actions
4977 lines (4419 loc) · 185 KB
/
transactions.ts
File metadata and controls
4977 lines (4419 loc) · 185 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { Page, type PageParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';
export class Transactions extends APIResource {
/**
* Retrieve a Transaction
*
* @example
* ```ts
* const transaction = await client.transactions.retrieve(
* 'transaction_uyrp7fld2ium70oa7oi',
* );
* ```
*/
retrieve(transactionID: string, options?: RequestOptions): APIPromise<Transaction> {
return this._client.get(path`/transactions/${transactionID}`, options);
}
/**
* List Transactions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const transaction of client.transactions.list()) {
* // ...
* }
* ```
*/
list(
query: TransactionListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<TransactionsPage, Transaction> {
return this._client.getAPIList('/transactions', Page<Transaction>, { query, ...options });
}
}
export type TransactionsPage = Page<Transaction>;
/**
* Transactions are the immutable additions and removals of money from your bank
* account. They're the equivalent of line items on your bank statement. To learn
* more, see [Transactions and Transfers](/documentation/transactions-transfers).
*/
export interface Transaction {
/**
* The Transaction identifier.
*/
id: string;
/**
* The identifier for the Account the Transaction belongs to.
*/
account_id: string;
/**
* The Transaction amount in the minor unit of its currency. For dollars, for
* example, this is cents.
*/
amount: number;
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the
* Transaction occurred.
*/
created_at: string;
/**
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
* Transaction's currency. This will match the currency on the Transaction's
* Account.
*
* - `USD` - US Dollar (USD)
*/
currency: 'USD';
/**
* An informational message describing this transaction. Use the fields in `source`
* to get more detailed information. This field appears as the line-item on the
* statement.
*/
description: string;
/**
* The identifier for the route this Transaction came through. Routes are things
* like cards and ACH details.
*/
route_id: string | null;
/**
* The type of the route this Transaction came through.
*
* - `account_number` - An Account Number.
* - `card` - A Card.
* - `lockbox` - A Lockbox.
*/
route_type: 'account_number' | 'card' | 'lockbox' | null;
/**
* This is an object giving more details on the network-level event that caused the
* Transaction. Note that for backwards compatibility reasons, additional
* undocumented keys may appear in this object. These should be treated as
* deprecated and will be removed in the future.
*/
source: Transaction.Source;
/**
* A constant representing the object's type. For this resource it will always be
* `transaction`.
*/
type: 'transaction';
[k: string]: unknown;
}
export namespace Transaction {
/**
* This is an object giving more details on the network-level event that caused the
* Transaction. Note that for backwards compatibility reasons, additional
* undocumented keys may appear in this object. These should be treated as
* deprecated and will be removed in the future.
*/
export interface Source {
/**
* The type of the resource. We may add additional possible values for this enum
* over time; your application should be able to handle such additions gracefully.
*
* - `account_transfer_intention` - Account Transfer Intention: details will be
* under the `account_transfer_intention` object.
* - `ach_transfer_intention` - ACH Transfer Intention: details will be under the
* `ach_transfer_intention` object.
* - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the
* `ach_transfer_rejection` object.
* - `ach_transfer_return` - ACH Transfer Return: details will be under the
* `ach_transfer_return` object.
* - `cashback_payment` - Cashback Payment: details will be under the
* `cashback_payment` object.
* - `card_dispute_acceptance` - Legacy Card Dispute Acceptance: details will be
* under the `card_dispute_acceptance` object.
* - `card_dispute_financial` - Card Dispute Financial: details will be under the
* `card_dispute_financial` object.
* - `card_dispute_loss` - Legacy Card Dispute Loss: details will be under the
* `card_dispute_loss` object.
* - `card_refund` - Card Refund: details will be under the `card_refund` object.
* - `card_settlement` - Card Settlement: details will be under the
* `card_settlement` object.
* - `card_financial` - Card Financial: details will be under the `card_financial`
* object.
* - `card_revenue_payment` - Card Revenue Payment: details will be under the
* `card_revenue_payment` object.
* - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under
* the `check_deposit_acceptance` object.
* - `check_deposit_return` - Check Deposit Return: details will be under the
* `check_deposit_return` object.
* - `fednow_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details
* will be under the `fednow_transfer_acknowledgement` object.
* - `check_transfer_deposit` - Check Transfer Deposit: details will be under the
* `check_transfer_deposit` object.
* - `fee_payment` - Fee Payment: details will be under the `fee_payment` object.
* - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under
* the `inbound_ach_transfer` object.
* - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return
* Intention: details will be under the `inbound_ach_transfer_return_intention`
* object.
* - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return
* Intention: details will be under the `inbound_check_deposit_return_intention`
* object.
* - `inbound_check_adjustment` - Inbound Check Adjustment: details will be under
* the `inbound_check_adjustment` object.
* - `inbound_fednow_transfer_confirmation` - Inbound FedNow Transfer Confirmation:
* details will be under the `inbound_fednow_transfer_confirmation` object.
* - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time
* Payments Transfer Confirmation: details will be under the
* `inbound_real_time_payments_transfer_confirmation` object.
* - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the
* `inbound_wire_reversal` object.
* - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be
* under the `inbound_wire_transfer` object.
* - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention:
* details will be under the `inbound_wire_transfer_reversal` object.
* - `interest_payment` - Interest Payment: details will be under the
* `interest_payment` object.
* - `internal_source` - Internal Source: details will be under the
* `internal_source` object.
* - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer
* Acknowledgement: details will be under the
* `real_time_payments_transfer_acknowledgement` object.
* - `sample_funds` - Sample Funds: details will be under the `sample_funds`
* object.
* - `wire_transfer_intention` - Wire Transfer Intention: details will be under the
* `wire_transfer_intention` object.
* - `swift_transfer_intention` - Swift Transfer Intention: details will be under
* the `swift_transfer_intention` object.
* - `swift_transfer_return` - Swift Transfer Return: details will be under the
* `swift_transfer_return` object.
* - `card_push_transfer_acceptance` - Card Push Transfer Acceptance: details will
* be under the `card_push_transfer_acceptance` object.
* - `account_revenue_payment` - Account Revenue Payment: details will be under the
* `account_revenue_payment` object.
* - `blockchain_onramp_transfer_intention` - Blockchain On-Ramp Transfer
* Intention: details will be under the `blockchain_onramp_transfer_intention`
* object.
* - `blockchain_offramp_transfer_settlement` - Blockchain Off-Ramp Transfer
* Settlement: details will be under the `blockchain_offramp_transfer_settlement`
* object.
* - `other` - The Transaction was made for an undocumented or deprecated reason.
*/
category:
| 'account_transfer_intention'
| 'ach_transfer_intention'
| 'ach_transfer_rejection'
| 'ach_transfer_return'
| 'cashback_payment'
| 'card_dispute_acceptance'
| 'card_dispute_financial'
| 'card_dispute_loss'
| 'card_refund'
| 'card_settlement'
| 'card_financial'
| 'card_revenue_payment'
| 'check_deposit_acceptance'
| 'check_deposit_return'
| 'fednow_transfer_acknowledgement'
| 'check_transfer_deposit'
| 'fee_payment'
| 'inbound_ach_transfer'
| 'inbound_ach_transfer_return_intention'
| 'inbound_check_deposit_return_intention'
| 'inbound_check_adjustment'
| 'inbound_fednow_transfer_confirmation'
| 'inbound_real_time_payments_transfer_confirmation'
| 'inbound_wire_reversal'
| 'inbound_wire_transfer'
| 'inbound_wire_transfer_reversal'
| 'interest_payment'
| 'internal_source'
| 'real_time_payments_transfer_acknowledgement'
| 'sample_funds'
| 'wire_transfer_intention'
| 'swift_transfer_intention'
| 'swift_transfer_return'
| 'card_push_transfer_acceptance'
| 'account_revenue_payment'
| 'blockchain_onramp_transfer_intention'
| 'blockchain_offramp_transfer_settlement'
| 'other';
/**
* An Account Revenue Payment object. This field will be present in the JSON
* response if and only if `category` is equal to `account_revenue_payment`. An
* Account Revenue Payment represents a payment made to an account from the bank.
* Account revenue is a type of non-interest income.
*/
account_revenue_payment?: Source.AccountRevenuePayment | null;
/**
* An Account Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `account_transfer_intention`. Two
* Account Transfer Intentions are created from each Account Transfer. One
* decrements the source account, and the other increments the destination account.
*/
account_transfer_intention?: Source.AccountTransferIntention | null;
/**
* An ACH Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `ach_transfer_intention`. An ACH
* Transfer Intention is created from an ACH Transfer. It reflects the intention to
* move money into or out of an Increase account via the ACH network.
*/
ach_transfer_intention?: Source.ACHTransferIntention | null;
/**
* An ACH Transfer Rejection object. This field will be present in the JSON
* response if and only if `category` is equal to `ach_transfer_rejection`. An ACH
* Transfer Rejection is created when an ACH Transfer is rejected by Increase. It
* offsets the ACH Transfer Intention. These rejections are rare.
*/
ach_transfer_rejection?: Source.ACHTransferRejection | null;
/**
* An ACH Transfer Return object. This field will be present in the JSON response
* if and only if `category` is equal to `ach_transfer_return`. An ACH Transfer
* Return is created when an ACH Transfer is returned by the receiving bank. It
* offsets the ACH Transfer Intention. ACH Transfer Returns usually occur within
* the first two business days after the transfer is initiated, but can occur much
* later.
*/
ach_transfer_return?: Source.ACHTransferReturn | null;
/**
* A Blockchain Off-Ramp Transfer Settlement object. This field will be present in
* the JSON response if and only if `category` is equal to
* `blockchain_offramp_transfer_settlement`.
*/
blockchain_offramp_transfer_settlement?: Source.BlockchainOfframpTransferSettlement | null;
/**
* A Blockchain On-Ramp Transfer Intention object. This field will be present in
* the JSON response if and only if `category` is equal to
* `blockchain_onramp_transfer_intention`.
*/
blockchain_onramp_transfer_intention?: Source.BlockchainOnrampTransferIntention | null;
/**
* A Legacy Card Dispute Acceptance object. This field will be present in the JSON
* response if and only if `category` is equal to `card_dispute_acceptance`.
* Contains the details of a successful Card Dispute.
*/
card_dispute_acceptance?: Source.CardDisputeAcceptance | null;
/**
* A Card Dispute Financial object. This field will be present in the JSON response
* if and only if `category` is equal to `card_dispute_financial`. Financial event
* related to a Card Dispute.
*/
card_dispute_financial?: Source.CardDisputeFinancial | null;
/**
* A Legacy Card Dispute Loss object. This field will be present in the JSON
* response if and only if `category` is equal to `card_dispute_loss`. Contains the
* details of a lost Card Dispute.
*/
card_dispute_loss?: Source.CardDisputeLoss | null;
/**
* A Card Financial object. This field will be present in the JSON response if and
* only if `category` is equal to `card_financial`. Card Financials are temporary
* holds placed on a customer's funds with the intent to later clear a transaction.
*/
card_financial?: Source.CardFinancial | null;
/**
* A Card Push Transfer Acceptance object. This field will be present in the JSON
* response if and only if `category` is equal to `card_push_transfer_acceptance`.
* A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer
* sent from Increase is accepted by the receiving bank.
*/
card_push_transfer_acceptance?: Source.CardPushTransferAcceptance | null;
/**
* A Card Refund object. This field will be present in the JSON response if and
* only if `category` is equal to `card_refund`. Card Refunds move money back to
* the cardholder. While they are usually connected to a Card Settlement, an
* acquirer can also refund money directly to a card without relation to a
* transaction.
*/
card_refund?: Source.CardRefund | null;
/**
* A Card Revenue Payment object. This field will be present in the JSON response
* if and only if `category` is equal to `card_revenue_payment`. Card Revenue
* Payments reflect earnings from fees on card transactions.
*/
card_revenue_payment?: Source.CardRevenuePayment | null;
/**
* A Card Settlement object. This field will be present in the JSON response if and
* only if `category` is equal to `card_settlement`. Card Settlements are card
* transactions that have cleared and settled. While a settlement is usually
* preceded by an authorization, an acquirer can also directly clear a transaction
* without first authorizing it.
*/
card_settlement?: Source.CardSettlement | null;
/**
* A Cashback Payment object. This field will be present in the JSON response if
* and only if `category` is equal to `cashback_payment`. A Cashback Payment
* represents the cashback paid to a cardholder for a given period. Cashback is
* usually paid monthly for the prior month's transactions.
*/
cashback_payment?: Source.CashbackPayment | null;
/**
* A Check Deposit Acceptance object. This field will be present in the JSON
* response if and only if `category` is equal to `check_deposit_acceptance`. A
* Check Deposit Acceptance is created when a Check Deposit is processed and its
* details confirmed. Check Deposits may be returned by the receiving bank, which
* will appear as a Check Deposit Return.
*/
check_deposit_acceptance?: Source.CheckDepositAcceptance | null;
/**
* A Check Deposit Return object. This field will be present in the JSON response
* if and only if `category` is equal to `check_deposit_return`. A Check Deposit
* Return is created when a Check Deposit is returned by the bank holding the
* account it was drawn against. Check Deposits may be returned for a variety of
* reasons, including insufficient funds or a mismatched account number. Usually,
* checks are returned within the first 7 days after the deposit is made.
*/
check_deposit_return?: Source.CheckDepositReturn | null;
/**
* A Check Transfer Deposit object. This field will be present in the JSON response
* if and only if `category` is equal to `check_transfer_deposit`. An Inbound Check
* is a check drawn on an Increase account that has been deposited by an external
* bank account. These types of checks are not pre-registered.
*/
check_transfer_deposit?: Source.CheckTransferDeposit | null;
/**
* A FedNow Transfer Acknowledgement object. This field will be present in the JSON
* response if and only if `category` is equal to
* `fednow_transfer_acknowledgement`. A FedNow Transfer Acknowledgement is created
* when a FedNow Transfer sent from Increase is acknowledged by the receiving bank.
*/
fednow_transfer_acknowledgement?: Source.FednowTransferAcknowledgement | null;
/**
* A Fee Payment object. This field will be present in the JSON response if and
* only if `category` is equal to `fee_payment`. A Fee Payment represents a payment
* made to Increase.
*/
fee_payment?: Source.FeePayment | null;
/**
* An Inbound ACH Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `inbound_ach_transfer`. An
* Inbound ACH Transfer Intention is created when an ACH transfer is initiated at
* another bank and received by Increase.
*/
inbound_ach_transfer?: Source.InboundACHTransfer | null;
/**
* An Inbound ACH Transfer Return Intention object. This field will be present in
* the JSON response if and only if `category` is equal to
* `inbound_ach_transfer_return_intention`. An Inbound ACH Transfer Return
* Intention is created when an ACH transfer is initiated at another bank and
* returned by Increase.
*/
inbound_ach_transfer_return_intention?: Source.InboundACHTransferReturnIntention | null;
/**
* An Inbound Check Adjustment object. This field will be present in the JSON
* response if and only if `category` is equal to `inbound_check_adjustment`. An
* Inbound Check Adjustment is created when Increase receives an adjustment for a
* check or return deposited through Check21.
*/
inbound_check_adjustment?: Source.InboundCheckAdjustment | null;
/**
* An Inbound Check Deposit Return Intention object. This field will be present in
* the JSON response if and only if `category` is equal to
* `inbound_check_deposit_return_intention`. An Inbound Check Deposit Return
* Intention is created when Increase receives an Inbound Check and the User
* requests that it be returned.
*/
inbound_check_deposit_return_intention?: Source.InboundCheckDepositReturnIntention | null;
/**
* An Inbound FedNow Transfer Confirmation object. This field will be present in
* the JSON response if and only if `category` is equal to
* `inbound_fednow_transfer_confirmation`. An Inbound FedNow Transfer Confirmation
* is created when a FedNow transfer is initiated at another bank and received by
* Increase.
*/
inbound_fednow_transfer_confirmation?: Source.InboundFednowTransferConfirmation | null;
/**
* An Inbound Real-Time Payments Transfer Confirmation object. This field will be
* present in the JSON response if and only if `category` is equal to
* `inbound_real_time_payments_transfer_confirmation`. An Inbound Real-Time
* Payments Transfer Confirmation is created when a Real-Time Payments transfer is
* initiated at another bank and received by Increase.
*/
inbound_real_time_payments_transfer_confirmation?: Source.InboundRealTimePaymentsTransferConfirmation | null;
/**
* An Inbound Wire Reversal object. This field will be present in the JSON response
* if and only if `category` is equal to `inbound_wire_reversal`. An Inbound Wire
* Reversal represents a reversal of a wire transfer that was initiated via
* Increase. The other bank is sending the money back. This most often happens when
* the original destination account details were incorrect.
*/
inbound_wire_reversal?: Source.InboundWireReversal | null;
/**
* An Inbound Wire Transfer Intention object. This field will be present in the
* JSON response if and only if `category` is equal to `inbound_wire_transfer`. An
* Inbound Wire Transfer Intention is created when a wire transfer is initiated at
* another bank and received by Increase.
*/
inbound_wire_transfer?: Source.InboundWireTransfer | null;
/**
* An Inbound Wire Transfer Reversal Intention object. This field will be present
* in the JSON response if and only if `category` is equal to
* `inbound_wire_transfer_reversal`. An Inbound Wire Transfer Reversal Intention is
* created when Increase has received a wire and the User requests that it be
* reversed.
*/
inbound_wire_transfer_reversal?: Source.InboundWireTransferReversal | null;
/**
* An Interest Payment object. This field will be present in the JSON response if
* and only if `category` is equal to `interest_payment`. An Interest Payment
* represents a payment of interest on an account. Interest is usually paid
* monthly.
*/
interest_payment?: Source.InterestPayment | null;
/**
* An Internal Source object. This field will be present in the JSON response if
* and only if `category` is equal to `internal_source`. A transaction between the
* user and Increase. See the `reason` attribute for more information.
*/
internal_source?: Source.InternalSource | null;
/**
* If the category of this Transaction source is equal to `other`, this field will
* contain an empty object, otherwise it will contain null.
*/
other?: Source.Other | null;
/**
* A Real-Time Payments Transfer Acknowledgement object. This field will be present
* in the JSON response if and only if `category` is equal to
* `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer
* Acknowledgement is created when a Real-Time Payments Transfer sent from Increase
* is acknowledged by the receiving bank.
*/
real_time_payments_transfer_acknowledgement?: Source.RealTimePaymentsTransferAcknowledgement | null;
/**
* A Sample Funds object. This field will be present in the JSON response if and
* only if `category` is equal to `sample_funds`. Sample funds for testing
* purposes.
*/
sample_funds?: Source.SampleFunds | null;
/**
* A Swift Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `swift_transfer_intention`. A
* Swift Transfer initiated via Increase.
*/
swift_transfer_intention?: Source.SwiftTransferIntention | null;
/**
* A Swift Transfer Return object. This field will be present in the JSON response
* if and only if `category` is equal to `swift_transfer_return`. A Swift Transfer
* Return is created when a Swift Transfer is returned by the receiving bank.
*/
swift_transfer_return?: Source.SwiftTransferReturn | null;
/**
* A Wire Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `wire_transfer_intention`. A Wire
* Transfer initiated via Increase and sent to a different bank.
*/
wire_transfer_intention?: Source.WireTransferIntention | null;
[k: string]: unknown;
}
export namespace Source {
/**
* An Account Revenue Payment object. This field will be present in the JSON
* response if and only if `category` is equal to `account_revenue_payment`. An
* Account Revenue Payment represents a payment made to an account from the bank.
* Account revenue is a type of non-interest income.
*/
export interface AccountRevenuePayment {
/**
* The account on which the account revenue was accrued.
*/
accrued_on_account_id: string;
/**
* The end of the period for which this transaction paid account revenue.
*/
period_end: string;
/**
* The start of the period for which this transaction paid account revenue.
*/
period_start: string;
[k: string]: unknown;
}
/**
* An Account Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `account_transfer_intention`. Two
* Account Transfer Intentions are created from each Account Transfer. One
* decrements the source account, and the other increments the destination account.
*/
export interface AccountTransferIntention {
/**
* The pending amount in the minor unit of the transaction's currency. For dollars,
* for example, this is cents.
*/
amount: number;
/**
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
* account currency.
*
* - `USD` - US Dollar (USD)
*/
currency: 'USD';
/**
* The description you chose to give the transfer.
*/
description: string;
/**
* The identifier of the Account to where the Account Transfer was sent.
*/
destination_account_id: string;
/**
* The identifier of the Account from where the Account Transfer was sent.
*/
source_account_id: string;
/**
* The identifier of the Account Transfer that led to this Pending Transaction.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* An ACH Transfer Intention object. This field will be present in the JSON
* response if and only if `category` is equal to `ach_transfer_intention`. An ACH
* Transfer Intention is created from an ACH Transfer. It reflects the intention to
* move money into or out of an Increase account via the ACH network.
*/
export interface ACHTransferIntention {
/**
* The account number for the destination account.
*/
account_number: string;
/**
* The amount in the minor unit of the transaction's currency. For dollars, for
* example, this is cents.
*/
amount: number;
/**
* The American Bankers' Association (ABA) Routing Transit Number (RTN) for the
* destination account.
*/
routing_number: string;
/**
* A description set when the ACH Transfer was created.
*/
statement_descriptor: string;
/**
* The identifier of the ACH Transfer that led to this Transaction.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* An ACH Transfer Rejection object. This field will be present in the JSON
* response if and only if `category` is equal to `ach_transfer_rejection`. An ACH
* Transfer Rejection is created when an ACH Transfer is rejected by Increase. It
* offsets the ACH Transfer Intention. These rejections are rare.
*/
export interface ACHTransferRejection {
/**
* The identifier of the ACH Transfer that led to this Transaction.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* An ACH Transfer Return object. This field will be present in the JSON response
* if and only if `category` is equal to `ach_transfer_return`. An ACH Transfer
* Return is created when an ACH Transfer is returned by the receiving bank. It
* offsets the ACH Transfer Intention. ACH Transfer Returns usually occur within
* the first two business days after the transfer is initiated, but can occur much
* later.
*/
export interface ACHTransferReturn {
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
* the transfer was created.
*/
created_at: string;
/**
* The three character ACH return code, in the range R01 to R85.
*/
raw_return_reason_code: string;
/**
* Why the ACH Transfer was returned. This reason code is sent by the receiving
* bank back to Increase.
*
* - `insufficient_fund` - Code R01. Insufficient funds in the receiving account.
* Sometimes abbreviated to "NSF."
* - `no_account` - Code R03. The account does not exist or the receiving bank was
* unable to locate it.
* - `account_closed` - Code R02. The account is closed at the receiving bank.
* - `invalid_account_number_structure` - Code R04. The account number is invalid
* at the receiving bank.
* - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return
* code has two separate meanings. (1) The receiving bank froze the account or
* (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank
* to return the entry.
* - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the
* credit transfer.
* - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05.
* The receiving bank rejected because of an incorrect Standard Entry Class code.
* Consumer accounts cannot be debited as `corporate_credit_or_debit` or
* `corporate_trade_exchange`.
* - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer
* at the receiving bank reversed the transfer.
* - `payment_stopped` - Code R08. The receiving bank stopped payment on this
* transfer.
* - `non_transaction_account` - Code R20. The account is not eligible for ACH,
* such as a savings account with transaction limits.
* - `uncollected_funds` - Code R09. The receiving bank account does not have
* enough available balance for the transfer.
* - `routing_number_check_digit_error` - Code R28. The routing number is
* incorrect.
* - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10.
* The customer at the receiving bank reversed the transfer.
* - `amount_field_error` - Code R19. The amount field is incorrect or too large.
* - `authorization_revoked_by_customer` - Code R07. The customer revoked their
* authorization for a previously authorized transfer.
* - `invalid_ach_routing_number` - Code R13. The routing number is invalid.
* - `file_record_edit_criteria` - Code R17. The receiving bank is unable to
* process a field in the transfer.
* - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual
* name field was invalid.
* - `returned_per_odfi_request` - Code R06. The originating financial institution
* asked for this transfer to be returned. The receiving bank is complying with
* the request.
* - `limited_participation_dfi` - Code R34. The receiving bank's regulatory
* supervisor has limited their participation in the ACH network.
* - `incorrectly_coded_outbound_international_payment` - Code R85. The outbound
* international ACH transfer was incorrect.
* - `account_sold_to_another_dfi` - Code R12. A rare return reason. The account
* was sold to another bank.
* - `addenda_error` - Code R25. The addenda record is incorrect or missing.
* - `beneficiary_or_account_holder_deceased` - Code R15. A rare return reason. The
* account holder is deceased.
* - `customer_advised_not_within_authorization_terms` - Code R11. A rare return
* reason. The customer authorized some payment to the sender, but this payment
* was not in error.
* - `corrected_return` - Code R74. A rare return reason. Sent in response to a
* return that was returned with code `field_error`. The latest return should
* include the corrected field(s).
* - `duplicate_entry` - Code R24. A rare return reason. The receiving bank
* received an exact duplicate entry with the same trace number and amount.
* - `duplicate_return` - Code R67. A rare return reason. The return this message
* refers to was a duplicate.
* - `enr_duplicate_enrollment` - Code R47. A rare return reason. Only used for US
* Government agency non-monetary automatic enrollment messages.
* - `enr_invalid_dfi_account_number` - Code R43. A rare return reason. Only used
* for US Government agency non-monetary automatic enrollment messages.
* - `enr_invalid_individual_id_number` - Code R44. A rare return reason. Only used
* for US Government agency non-monetary automatic enrollment messages.
* - `enr_invalid_representative_payee_indicator` - Code R46. A rare return reason.
* Only used for US Government agency non-monetary automatic enrollment messages.
* - `enr_invalid_transaction_code` - Code R41. A rare return reason. Only used for
* US Government agency non-monetary automatic enrollment messages.
* - `enr_return_of_enr_entry` - Code R40. A rare return reason. Only used for US
* Government agency non-monetary automatic enrollment messages.
* - `enr_routing_number_check_digit_error` - Code R42. A rare return reason. Only
* used for US Government agency non-monetary automatic enrollment messages.
* - `entry_not_processed_by_gateway` - Code R84. A rare return reason. The
* International ACH Transfer cannot be processed by the gateway.
* - `field_error` - Code R69. A rare return reason. One or more of the fields in
* the ACH were malformed.
* - `foreign_receiving_dfi_unable_to_settle` - Code R83. A rare return reason. The
* Foreign receiving bank was unable to settle this ACH transfer.
* - `iat_entry_coding_error` - Code R80. A rare return reason. The International
* ACH Transfer is malformed.
* - `improper_effective_entry_date` - Code R18. A rare return reason. The ACH has
* an improper effective entry date field.
* - `improper_source_document_source_document_presented` - Code R39. A rare return
* reason. The source document related to this ACH, usually an ACH check
* conversion, was presented to the bank.
* - `invalid_company_id` - Code R21. A rare return reason. The Company ID field of
* the ACH was invalid.
* - `invalid_foreign_receiving_dfi_identification` - Code R82. A rare return
* reason. The foreign receiving bank identifier for an International ACH
* Transfer was invalid.
* - `invalid_individual_id_number` - Code R22. A rare return reason. The
* Individual ID number field of the ACH was invalid.
* - `item_and_rck_entry_presented_for_payment` - Code R53. A rare return reason.
* Both the Represented Check ("RCK") entry and the original check were presented
* to the bank.
* - `item_related_to_rck_entry_is_ineligible` - Code R51. A rare return reason.
* The Represented Check ("RCK") entry is ineligible.
* - `mandatory_field_error` - Code R26. A rare return reason. The ACH is missing a
* required field.
* - `misrouted_dishonored_return` - Code R71. A rare return reason. The receiving
* bank does not recognize the routing number in a dishonored return entry.
* - `misrouted_return` - Code R61. A rare return reason. The receiving bank does
* not recognize the routing number in a return entry.
* - `no_errors_found` - Code R76. A rare return reason. Sent in response to a
* return, the bank does not find the errors alleged by the returning bank.
* - `non_acceptance_of_r62_dishonored_return` - Code R77. A rare return reason.
* The receiving bank does not accept the return of the erroneous debit. The
* funds are not available at the receiving bank.
* - `non_participant_in_iat_program` - Code R81. A rare return reason. The
* receiving bank does not accept International ACH Transfers.
* - `permissible_return_entry` - Code R31. A rare return reason. A return that has
* been agreed to be accepted by the receiving bank, despite falling outside of
* the usual return timeframe.
* - `permissible_return_entry_not_accepted` - Code R70. A rare return reason. The
* receiving bank had not approved this return.
* - `rdfi_non_settlement` - Code R32. A rare return reason. The receiving bank
* could not settle this transaction.
* - `rdfi_participant_in_check_truncation_program` - Code R30. A rare return
* reason. The receiving bank does not accept Check Truncation ACH transfers.
* - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - Code
* R14. A rare return reason. The payee is deceased.
* - `return_not_a_duplicate` - Code R75. A rare return reason. The originating
* bank disputes that an earlier `duplicate_entry` return was actually a
* duplicate.
* - `return_of_erroneous_or_reversing_debit` - Code R62. A rare return reason. The
* originating financial institution made a mistake and this return corrects it.
* - `return_of_improper_credit_entry` - Code R36. A rare return reason. Return of
* a malformed credit entry.
* - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a
* malformed debit entry.
* - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed
* check ("XCK") entry.
* - `source_document_presented_for_payment` - Code R37. A rare return reason. The
* source document related to this ACH, usually an ACH check conversion, was
* presented to the bank.
* - `state_law_affecting_rck_acceptance` - Code R50. A rare return reason. State
* law prevents the bank from accepting the Represented Check ("RCK") entry.
* - `stop_payment_on_item_related_to_rck_entry` - Code R52. A rare return reason.
* A stop payment was issued on a Represented Check ("RCK") entry.
* - `stop_payment_on_source_document` - Code R38. A rare return reason. The source
* attached to the ACH, usually an ACH check conversion, includes a stop payment.
* - `timely_original_return` - Code R73. A rare return reason. The bank receiving
* an `untimely_return` believes it was on time.
* - `trace_number_error` - Code R27. A rare return reason. An ACH return's trace
* number does not match an originated ACH.
* - `untimely_dishonored_return` - Code R72. A rare return reason. The dishonored
* return was sent too late.
* - `untimely_return` - Code R68. A rare return reason. The return was sent too
* late.
*/
return_reason_code:
| 'insufficient_fund'
| 'no_account'
| 'account_closed'
| 'invalid_account_number_structure'
| 'account_frozen_entry_returned_per_ofac_instruction'
| 'credit_entry_refused_by_receiver'
| 'unauthorized_debit_to_consumer_account_using_corporate_sec_code'
| 'corporate_customer_advised_not_authorized'
| 'payment_stopped'
| 'non_transaction_account'
| 'uncollected_funds'
| 'routing_number_check_digit_error'
| 'customer_advised_unauthorized_improper_ineligible_or_incomplete'
| 'amount_field_error'
| 'authorization_revoked_by_customer'
| 'invalid_ach_routing_number'
| 'file_record_edit_criteria'
| 'enr_invalid_individual_name'
| 'returned_per_odfi_request'
| 'limited_participation_dfi'
| 'incorrectly_coded_outbound_international_payment'
| 'account_sold_to_another_dfi'
| 'addenda_error'
| 'beneficiary_or_account_holder_deceased'
| 'customer_advised_not_within_authorization_terms'
| 'corrected_return'
| 'duplicate_entry'
| 'duplicate_return'
| 'enr_duplicate_enrollment'
| 'enr_invalid_dfi_account_number'
| 'enr_invalid_individual_id_number'
| 'enr_invalid_representative_payee_indicator'
| 'enr_invalid_transaction_code'
| 'enr_return_of_enr_entry'
| 'enr_routing_number_check_digit_error'
| 'entry_not_processed_by_gateway'
| 'field_error'
| 'foreign_receiving_dfi_unable_to_settle'
| 'iat_entry_coding_error'
| 'improper_effective_entry_date'
| 'improper_source_document_source_document_presented'
| 'invalid_company_id'
| 'invalid_foreign_receiving_dfi_identification'
| 'invalid_individual_id_number'
| 'item_and_rck_entry_presented_for_payment'
| 'item_related_to_rck_entry_is_ineligible'
| 'mandatory_field_error'
| 'misrouted_dishonored_return'
| 'misrouted_return'
| 'no_errors_found'
| 'non_acceptance_of_r62_dishonored_return'
| 'non_participant_in_iat_program'
| 'permissible_return_entry'
| 'permissible_return_entry_not_accepted'
| 'rdfi_non_settlement'
| 'rdfi_participant_in_check_truncation_program'
| 'representative_payee_deceased_or_unable_to_continue_in_that_capacity'
| 'return_not_a_duplicate'
| 'return_of_erroneous_or_reversing_debit'
| 'return_of_improper_credit_entry'
| 'return_of_improper_debit_entry'
| 'return_of_xck_entry'
| 'source_document_presented_for_payment'
| 'state_law_affecting_rck_acceptance'
| 'stop_payment_on_item_related_to_rck_entry'
| 'stop_payment_on_source_document'
| 'timely_original_return'
| 'trace_number_error'
| 'untimely_dishonored_return'
| 'untimely_return';
/**
* A 15 digit number that was generated by the bank that initiated the return. The
* trace number of the return is different than that of the original transfer. ACH
* trace numbers are not unique, but along with the amount and date this number can
* be used to identify the ACH return at the bank that initiated it.
*/
trace_number: string;
/**
* The identifier of the Transaction associated with this return.
*/
transaction_id: string;
/**
* The identifier of the ACH Transfer associated with this return.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* A Blockchain Off-Ramp Transfer Settlement object. This field will be present in
* the JSON response if and only if `category` is equal to
* `blockchain_offramp_transfer_settlement`.
*/
export interface BlockchainOfframpTransferSettlement {
/**
* The identifier of the Blockchain Address the funds were received at.
*/
source_blockchain_address_id: string;
/**
* The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* A Blockchain On-Ramp Transfer Intention object. This field will be present in
* the JSON response if and only if `category` is equal to
* `blockchain_onramp_transfer_intention`.
*/
export interface BlockchainOnrampTransferIntention {
/**
* The blockchain address the funds were sent to.
*/
destination_blockchain_address: string;
/**
* The identifier of the Blockchain On-Ramp Transfer that led to this Transaction.
*/
transfer_id: string;
[k: string]: unknown;
}
/**
* A Legacy Card Dispute Acceptance object. This field will be present in the JSON
* response if and only if `category` is equal to `card_dispute_acceptance`.
* Contains the details of a successful Card Dispute.
*/
export interface CardDisputeAcceptance {
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
* the Card Dispute was accepted.
*/
accepted_at: string;
/**
* The identifier of the Transaction that was created to return the disputed funds