-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpayments.ts
More file actions
866 lines (752 loc) · 21.4 KB
/
Copy pathpayments.ts
File metadata and controls
866 lines (752 loc) · 21.4 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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import * as AccountActivityAPI from './account-activity';
import * as BalancesAPI from './balances';
import { APIPromise } from '../core/api-promise';
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';
export class Payments extends APIResource {
/**
* Initiates a payment between a financial account and an external bank account.
*
* @example
* ```ts
* const payment = await client.payments.create({
* amount: 1,
* external_bank_account_token:
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* financial_account_token:
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* method: 'ACH_NEXT_DAY',
* method_attributes: { sec_code: 'CCD' },
* type: 'COLLECTION',
* });
* ```
*/
create(body: PaymentCreateParams, options?: RequestOptions): APIPromise<PaymentCreateResponse> {
return this._client.post('/v1/payments', { body, ...options });
}
/**
* Get the payment by token.
*
* @example
* ```ts
* const payment = await client.payments.retrieve(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* );
* ```
*/
retrieve(paymentToken: string, options?: RequestOptions): APIPromise<Payment> {
return this._client.get(path`/v1/payments/${paymentToken}`, options);
}
/**
* List all the payments for the provided search criteria.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const payment of client.payments.list()) {
* // ...
* }
* ```
*/
list(
query: PaymentListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<PaymentsCursorPage, Payment> {
return this._client.getAPIList('/v1/payments', CursorPage<Payment>, { query, ...options });
}
/**
* Retry an origination which has been returned.
*
* @example
* ```ts
* const response = await client.payments.retry(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* );
* ```
*/
retry(paymentToken: string, options?: RequestOptions): APIPromise<PaymentRetryResponse> {
return this._client.post(path`/v1/payments/${paymentToken}/retry`, options);
}
/**
* Return an ACH payment with a specified return reason code. Returns must be
* initiated within the time window specified by NACHA rules for each return code
* (typically 2 banking days for most codes, 60 calendar days for unauthorized
* debits). For a complete list of return codes and their meanings, see the
* [ACH Return Reasons documentation](https://docs.lithic.com/docs/ach-overview#ach-return-reasons).
*
* Note:
*
* - This endpoint does not modify the state of the financial account associated
* with the payment. If you would like to change the account state, use the
* [Update financial account status](https://docs.lithic.com/reference/updatefinancialaccountstatus)
* endpoint.
* - By default this endpoint is not enabled for your account. Please contact your
* implementations manager to enable this feature.
*
* @example
* ```ts
* const payment = await client.payments.return(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* {
* financial_account_token:
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* return_reason_code: 'R01',
* },
* );
* ```
*/
return(paymentToken: string, body: PaymentReturnParams, options?: RequestOptions): APIPromise<Payment> {
return this._client.post(path`/v1/payments/${paymentToken}/return`, { body, ...options });
}
/**
* Simulate payment lifecycle event
*
* @example
* ```ts
* const response = await client.payments.simulateAction(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { event_type: 'ACH_ORIGINATION_REVIEWED' },
* );
* ```
*/
simulateAction(
paymentToken: string,
body: PaymentSimulateActionParams,
options?: RequestOptions,
): APIPromise<PaymentSimulateActionResponse> {
return this._client.post(path`/v1/simulate/payments/${paymentToken}/action`, { body, ...options });
}
/**
* Simulates a receipt of a Payment.
*
* @example
* ```ts
* const response = await client.payments.simulateReceipt({
* token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* amount: 0,
* financial_account_token:
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* receipt_type: 'RECEIPT_CREDIT',
* });
* ```
*/
simulateReceipt(
body: PaymentSimulateReceiptParams,
options?: RequestOptions,
): APIPromise<PaymentSimulateReceiptResponse> {
return this._client.post('/v1/simulate/payments/receipt', { body, ...options });
}
/**
* Simulates a release of a Payment.
*
* @example
* ```ts
* const response = await client.payments.simulateRelease({
* payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* });
* ```
*/
simulateRelease(
body: PaymentSimulateReleaseParams,
options?: RequestOptions,
): APIPromise<PaymentSimulateReleaseResponse> {
return this._client.post('/v1/simulate/payments/release', { body, ...options });
}
/**
* Simulates a return of a Payment.
*
* @example
* ```ts
* const response = await client.payments.simulateReturn({
* payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* });
* ```
*/
simulateReturn(
body: PaymentSimulateReturnParams,
options?: RequestOptions,
): APIPromise<PaymentSimulateReturnResponse> {
return this._client.post('/v1/simulate/payments/return', { body, ...options });
}
}
export type PaymentsCursorPage = CursorPage<Payment>;
/**
* Payment transaction
*/
export interface Payment {
/**
* Unique identifier for the transaction
*/
token: string;
/**
* Transaction category
*/
category:
| 'ACH'
| 'WIRE'
| 'BALANCE_OR_FUNDING'
| 'FEE'
| 'REWARD'
| 'ADJUSTMENT'
| 'DERECOGNITION'
| 'DISPUTE'
| 'CARD'
| 'EXTERNAL_ACH'
| 'EXTERNAL_CHECK'
| 'EXTERNAL_FEDNOW'
| 'EXTERNAL_RTP'
| 'EXTERNAL_TRANSFER'
| 'EXTERNAL_WIRE'
| 'MANAGEMENT_ADJUSTMENT'
| 'MANAGEMENT_DISPUTE'
| 'MANAGEMENT_FEE'
| 'MANAGEMENT_REWARD'
| 'MANAGEMENT_DISBURSEMENT'
| 'HOLD'
| 'PROGRAM_FUNDING';
/**
* ISO 8601 timestamp of when the transaction was created
*/
created: string;
/**
* Transaction descriptor
*/
descriptor: string;
/**
* Transfer direction
*/
direction: 'CREDIT' | 'DEBIT';
/**
* List of transaction events
*/
events: Array<Payment.Event>;
/**
* PAYMENT - Payment Transaction
*/
family: 'PAYMENT';
/**
* Financial account token
*/
financial_account_token: string;
/**
* Transfer method
*/
method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE';
/**
* Method-specific attributes
*/
method_attributes: Payment.ACHMethodAttributes | Payment.WireMethodAttributes;
/**
* Pending amount in cents
*/
pending_amount: number;
/**
* Account tokens related to a payment transaction
*/
related_account_tokens: Payment.RelatedAccountTokens | null;
/**
* Transaction result
*/
result: 'APPROVED' | 'DECLINED';
/**
* Settled amount in cents
*/
settled_amount: number;
/**
* Transaction source
*/
source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER';
/**
* The status of the transaction
*/
status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';
/**
* ISO 8601 timestamp of when the transaction was last updated
*/
updated: string;
/**
* Currency of the transaction in ISO 4217 format
*/
currency?: string;
/**
* Expected release date for the transaction
*/
expected_release_date?: string | null;
/**
* External bank account token
*/
external_bank_account_token?: string | null;
/**
* Key-value pairs for tagging resources. Tags allow you to associate arbitrary
* metadata with a resource for your own purposes.
*/
tags?: { [key: string]: string };
type?:
| 'ORIGINATION_CREDIT'
| 'ORIGINATION_DEBIT'
| 'RECEIPT_CREDIT'
| 'RECEIPT_DEBIT'
| 'WIRE_INBOUND_PAYMENT'
| 'WIRE_INBOUND_ADMIN'
| 'WIRE_OUTBOUND_PAYMENT'
| 'WIRE_OUTBOUND_ADMIN'
| 'WIRE_INBOUND_DRAWDOWN_REQUEST';
/**
* User-defined identifier
*/
user_defined_id?: string | null;
}
export namespace Payment {
/**
* Note: Inbound wire transfers are coming soon (availability varies by partner
* bank). Wire-related fields below are a preview. To learn more, contact your
* customer success manager.
*
* Payment Event
*/
export interface Event {
/**
* Globally unique identifier.
*/
token: string;
/**
* Amount of the financial event that has been settled in the currency's smallest
* unit (e.g., cents).
*/
amount: number;
/**
* Date and time when the financial event occurred. UTC time zone.
*/
created: string;
/**
* APPROVED financial events were successful while DECLINED financial events were
* declined by user, Lithic, or the network.
*/
result: 'APPROVED' | 'DECLINED';
/**
* Note: Inbound wire transfers are coming soon (availability varies by partner
* bank). Wire-related event types below are a preview. To learn more, contact your
* customer success manager.
*
* Event types:
*
* ACH events:
*
* - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending
* approval/release from an ACH hold.
* - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process.
* - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled.
* - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to
* the Federal Reserve.
* - `ACH_ORIGINATION_SETTLED` - ACH origination has settled.
* - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to
* available balance.
* - `ACH_ORIGINATION_REJECTED` - ACH origination was rejected and not sent to the
* Federal Reserve.
* - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder.
* - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled.
* - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available
* balance.
* - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to
* available balance.
* - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt.
* - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository
* Financial Institution.
* - `ACH_RETURN_SETTLED` - ACH return settled by the Receiving Depository
* Financial Institution.
* - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository
* Financial Institution.
*
* Wire transfer events:
*
* - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the
* Federal Reserve and pending release to available balance.
* - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from
* pending to available balance.
* - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds
* frozen for regulatory review.
*
* Wire return events:
*
* - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return
* funds from an inbound wire transfer.
* - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve
* and pending acceptance.
* - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal
* Reserve and funds returned to sender.
* - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal
* Reserve.
*/
type:
| 'ACH_ORIGINATION_CANCELLED'
| 'ACH_ORIGINATION_INITIATED'
| 'ACH_ORIGINATION_PROCESSED'
| 'ACH_ORIGINATION_REJECTED'
| 'ACH_ORIGINATION_RELEASED'
| 'ACH_ORIGINATION_REVIEWED'
| 'ACH_ORIGINATION_SETTLED'
| 'ACH_RECEIPT_PROCESSED'
| 'ACH_RECEIPT_RELEASED'
| 'ACH_RECEIPT_RELEASED_EARLY'
| 'ACH_RECEIPT_SETTLED'
| 'ACH_RETURN_INITIATED'
| 'ACH_RETURN_PROCESSED'
| 'ACH_RETURN_REJECTED'
| 'ACH_RETURN_SETTLED'
| 'WIRE_TRANSFER_INBOUND_RECEIVED'
| 'WIRE_TRANSFER_INBOUND_SETTLED'
| 'WIRE_TRANSFER_INBOUND_BLOCKED'
| 'WIRE_RETURN_OUTBOUND_INITIATED'
| 'WIRE_RETURN_OUTBOUND_SENT'
| 'WIRE_RETURN_OUTBOUND_SETTLED'
| 'WIRE_RETURN_OUTBOUND_REJECTED';
/**
* More detailed reasons for the event
*/
detailed_results?: Array<
| 'APPROVED'
| 'DECLINED'
| 'FUNDS_INSUFFICIENT'
| 'ACCOUNT_INVALID'
| 'PROGRAM_TRANSACTION_LIMIT_EXCEEDED'
| 'PROGRAM_DAILY_LIMIT_EXCEEDED'
| 'PROGRAM_MONTHLY_LIMIT_EXCEEDED'
>;
/**
* Payment event external ID. For ACH transactions, this is the ACH trace number.
* For inbound wire transfers, this is the IMAD (Input Message Accountability
* Data).
*/
external_id?: string | null;
}
export interface ACHMethodAttributes {
/**
* SEC code for ACH transaction
*/
sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX';
/**
* Number of days the ACH transaction is on hold
*/
ach_hold_period?: number | null;
/**
* Addenda information
*/
addenda?: string | null;
/**
* Company ID for the ACH transaction
*/
company_id?: string | null;
/**
* Value to override the configured company name with. Can only be used if allowed
* to override
*/
override_company_name?: string | null;
/**
* Receipt routing number
*/
receipt_routing_number?: string | null;
/**
* Number of retries attempted
*/
retries?: number | null;
/**
* Return reason code if the transaction was returned
*/
return_reason_code?: string | null;
/**
* Trace numbers for the ACH transaction
*/
trace_numbers?: Array<string>;
}
export interface WireMethodAttributes {
/**
* Type of wire message
*/
wire_message_type: string | null;
/**
* Type of wire transfer
*/
wire_network: 'FEDWIRE' | 'SWIFT';
creditor?: AccountActivityAPI.WirePartyDetails;
debtor?: AccountActivityAPI.WirePartyDetails;
/**
* Point to point reference identifier, as assigned by the instructing party, used
* for tracking the message through the Fedwire system
*/
message_id?: string | null;
/**
* Payment details or invoice reference
*/
remittance_information?: string | null;
}
/**
* Account tokens related to a payment transaction
*/
export interface RelatedAccountTokens {
/**
* Globally unique identifier for the account
*/
account_token: string | null;
/**
* Globally unique identifier for the business account
*/
business_account_token: string | null;
}
}
/**
* Payment transaction
*/
export interface PaymentCreateResponse extends Payment {
/**
* Balance
*/
balance?: BalancesAPI.Balance;
}
/**
* Payment transaction
*/
export interface PaymentRetryResponse extends Payment {
/**
* Balance
*/
balance?: BalancesAPI.Balance;
}
export interface PaymentSimulateActionResponse {
/**
* Debugging Request Id
*/
debugging_request_id: string;
/**
* Request Result
*/
result: 'APPROVED' | 'DECLINED';
/**
* Transaction Event Token
*/
transaction_event_token: string;
}
export interface PaymentSimulateReceiptResponse {
/**
* Debugging Request Id
*/
debugging_request_id: string;
/**
* Request Result
*/
result: 'APPROVED' | 'DECLINED';
/**
* Transaction Event Token
*/
transaction_event_token: string;
}
export interface PaymentSimulateReleaseResponse {
/**
* Debugging Request Id
*/
debugging_request_id: string;
/**
* Request Result
*/
result: 'APPROVED' | 'DECLINED';
/**
* Transaction Event Token
*/
transaction_event_token: string;
}
export interface PaymentSimulateReturnResponse {
/**
* Debugging Request Id
*/
debugging_request_id: string;
/**
* Request Result
*/
result: 'APPROVED' | 'DECLINED';
/**
* Transaction Event Token
*/
transaction_event_token: string;
}
export interface PaymentCreateParams {
amount: number;
external_bank_account_token: string;
financial_account_token: string;
method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY';
method_attributes: PaymentCreateParams.MethodAttributes;
type: 'COLLECTION' | 'PAYMENT';
/**
* Customer-provided token that will serve as an idempotency token. This token will
* become the transaction token.
*/
token?: string;
/**
* Optional hold to settle when this payment is initiated.
*/
hold?: PaymentCreateParams.Hold;
memo?: string;
user_defined_id?: string;
}
export namespace PaymentCreateParams {
export interface MethodAttributes {
sec_code: 'CCD' | 'PPD' | 'WEB';
/**
* Number of days to hold the ACH payment
*/
ach_hold_period?: number;
addenda?: string | null;
/**
* Value to override the configured company name with. Can only be used if allowed
* to override
*/
override_company_name?: string | null;
}
/**
* Optional hold to settle when this payment is initiated.
*/
export interface Hold {
/**
* Token of the hold to settle when this payment is initiated.
*/
token: string;
}
}
export interface PaymentListParams extends CursorPageParams {
account_token?: string;
/**
* Date string in RFC 3339 format. Only entries created after the specified time
* will be included. UTC time zone.
*/
begin?: string;
business_account_token?: string;
category?: 'ACH';
/**
* Date string in RFC 3339 format. Only entries created before the specified time
* will be included. UTC time zone.
*/
end?: string;
financial_account_token?: string;
result?: 'APPROVED' | 'DECLINED';
status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED';
}
export interface PaymentReturnParams {
/**
* Globally unique identifier for the financial account
*/
financial_account_token: string;
/**
* ACH return reason code indicating the reason for returning the payment.
* Supported codes include R01-R53 and R80-R85. For a complete list of return codes
* and their meanings, see
* [ACH Return Reasons](https://docs.lithic.com/docs/ach-overview#ach-return-reasons)
*/
return_reason_code: string;
/**
* Optional additional information about the return. Limited to 44 characters
*/
addenda?: string | null;
/**
* Date of death in YYYY-MM-DD format. Required when using return codes **R14**
* (representative payee deceased) or **R15** (beneficiary or account holder
* deceased)
*/
date_of_death?: string | null;
/**
* Optional memo for the return. Limited to 10 characters
*/
memo?: string | null;
}
export interface PaymentSimulateActionParams {
/**
* Event Type
*/
event_type:
| 'ACH_ORIGINATION_REVIEWED'
| 'ACH_ORIGINATION_RELEASED'
| 'ACH_ORIGINATION_PROCESSED'
| 'ACH_ORIGINATION_SETTLED'
| 'ACH_RECEIPT_SETTLED'
| 'ACH_RECEIPT_RELEASED'
| 'ACH_RECEIPT_RELEASED_EARLY'
| 'ACH_RETURN_INITIATED'
| 'ACH_RETURN_PROCESSED'
| 'ACH_RETURN_SETTLED';
/**
* Date of Death for ACH Return
*/
date_of_death?: string;
/**
* Decline reason
*/
decline_reason?:
| 'PROGRAM_TRANSACTION_LIMIT_EXCEEDED'
| 'PROGRAM_DAILY_LIMIT_EXCEEDED'
| 'PROGRAM_MONTHLY_LIMIT_EXCEEDED';
/**
* Return Addenda
*/
return_addenda?: string;
/**
* Return Reason Code
*/
return_reason_code?: string;
}
export interface PaymentSimulateReceiptParams {
/**
* Customer-generated payment token used to uniquely identify the simulated payment
*/
token: string;
/**
* Amount
*/
amount: number;
/**
* Financial Account Token
*/
financial_account_token: string;
/**
* Receipt Type
*/
receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT';
/**
* Memo
*/
memo?: string;
}
export interface PaymentSimulateReleaseParams {
/**
* Payment Token
*/
payment_token: string;
}
export interface PaymentSimulateReturnParams {
/**
* Payment Token
*/
payment_token: string;
/**
* Return Reason Code
*/
return_reason_code?: string;
}
export declare namespace Payments {
export {
type Payment as Payment,
type PaymentCreateResponse as PaymentCreateResponse,
type PaymentRetryResponse as PaymentRetryResponse,
type PaymentSimulateActionResponse as PaymentSimulateActionResponse,
type PaymentSimulateReceiptResponse as PaymentSimulateReceiptResponse,
type PaymentSimulateReleaseResponse as PaymentSimulateReleaseResponse,
type PaymentSimulateReturnResponse as PaymentSimulateReturnResponse,
type PaymentsCursorPage as PaymentsCursorPage,
type PaymentCreateParams as PaymentCreateParams,
type PaymentListParams as PaymentListParams,
type PaymentReturnParams as PaymentReturnParams,
type PaymentSimulateActionParams as PaymentSimulateActionParams,
type PaymentSimulateReceiptParams as PaymentSimulateReceiptParams,
type PaymentSimulateReleaseParams as PaymentSimulateReleaseParams,
type PaymentSimulateReturnParams as PaymentSimulateReturnParams,
};
}