chargebee 2.41.0 → 3.0.0-beta.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +11 -15
  2. package/LICENSE +1 -1
  3. package/README.md +90 -170
  4. package/cjs/RequestWrapper.js +84 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +80 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +90 -55
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +24 -35
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +230 -747
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4336
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +276 -911
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2935
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,948 +1,313 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
2
4
  declare module 'chargebee' {
3
5
  export interface Transaction {
4
-
5
- /**
6
- * @description Uniquely identifies the transaction.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description Identifier of the customer for which this transaction is made
14
-
15
- */
16
-
17
- customer_id?:string;
18
-
19
- /**
20
- * @description Identifier of the subscription for which this transaction is made.
21
-
22
- */
23
-
24
- subscription_id?:string;
25
-
26
- /**
27
- * @description The gateway account used for this transaction
28
-
29
- */
30
-
31
- gateway_account_id?:string;
32
-
33
- /**
34
- * @description Identifier of the payment source for which this transaction is made
35
-
36
- */
37
-
38
- payment_source_id?:string;
39
-
40
- /**
41
- * @description The payment method of this transaction \* unionpay - Unionpay \* upi - upi \* check - Check \* custom - Custom \* amazon_payments - Amazon Payments \* boleto - boleto \* direct_debit - Direct Debit \* sepa_instant_transfer - Sepa Instant Transfer \* apple_pay - Apple Pay \* wechat_pay - WeChat Pay \* bancontact - Bancontact \* faster_payments - Faster Payments \* venmo - Venmo \* bank_transfer - Bank Transfer \* paypal_express_checkout - Paypal Express Checkout \* other - Payment Methods other than the above types \* ach_credit - ACH Credit \* sepa_credit - SEPA Credit \* card - Card \* ideal - IDEAL \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) &#x3D; &#x60;refund&#x60;. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* google_pay - Google Pay \* netbanking_emandates - netbanking_emandates \* pay_to - PayTo \* dotpay - Dotpay \* alipay - Alipay \* sofort - Sofort \* giropay - giropay \* cash - Cash
42
-
43
- */
44
-
45
- payment_method:PaymentMethod;
46
-
47
- /**
48
- * @description The reference number for this transaction. For example, the check number when [payment_method](transactions#transaction_payment_method) &#x3D; &#x60;check&#x60;.
49
-
50
- */
51
-
52
- reference_number?:string;
53
-
54
- /**
55
- * @description Gateway through which this transaction was done. Applicable only for &#x27;Card&#x27; Payment Method \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* pay_com - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* bank_of_america - Bank of America Gateway \* gocardless - GoCardless is a payment service provider. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* paypal_pro - PayPal Pro Account is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* mollie - Mollie is a payment gateway. \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
56
-
57
- */
58
-
59
- gateway:Gateway;
60
-
61
- /**
62
- * @description Type of the transaction. \* authorization - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer&#x27;s [payment_source](payment_sources). \* payment - The transaction represents capture of [amount](transactions#transaction_amount) from the customer&#x27;s [payment_source](payment_sources). \* refund - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer&#x27;s [payment_source](payment_sources). \* payment_reversal - Indicates a reversal transaction.
63
-
64
- */
65
-
66
- type:'authorization' | 'payment_reversal' | 'payment' | 'refund';
67
-
68
- /**
69
- * @description Indicates when this transaction occurred.
70
-
71
- */
72
-
73
- date?:number;
74
-
75
- /**
76
- * @description Indicates the time at which the final status of the transaction has been marked.
77
-
78
- */
79
-
80
- settled_at?:number;
81
-
82
- /**
83
- * @description Exchange rate used for base currency conversion
84
-
85
- */
86
-
87
- exchange_rate?:number;
88
-
89
- /**
90
- * @description The currency code (ISO 4217 format) for the transaction.
91
-
92
- */
93
-
94
- currency_code:string;
95
-
96
- /**
97
- * @description Amount for this transaction.
98
-
99
- */
100
-
101
- amount?:number;
102
-
103
- /**
104
- * @description The id with which this transaction is referred in gateway.
105
-
106
- */
107
-
108
- id_at_gateway?:string;
109
-
110
- /**
111
- * @description The status of this transaction. \* in_progress - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* timeout - Transaction failed because of Gateway not accepting the connection. \* success - The transaction is successful. \* voided - The transaction got voided or authorization expired at gateway. \* needs_attention - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually \* failure - Transaction failed. Refer the &#x27;error_code&#x27; and &#x27;error_text&#x27; fields to know the reason for failure
112
-
113
- */
114
-
115
- status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
116
-
117
- /**
118
- * @description Indicates whether or not the transaction has been identified as fraudulent. \* suspicious - The transaction has been identified as potentially fraudulent by the gateway \* safe - The transaction has been marked as safe \* fraudulent - The transaction has been marked as fraudulent
119
-
120
- */
121
-
122
- fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
123
-
124
- /**
125
- * @description Marker for on-session payments (3DS). null indicates &#x27;merchant&#x27;. \* merchant - Payment initiated on stored payment method by the merchant \* customer - Customer initiated 3DS payment
126
-
127
- */
128
-
129
- initiator_type?:'merchant' | 'customer';
130
-
131
- /**
132
- * @description Indicates whether this transaction has gone through 3DS. Applicable only for &#x27;on-session&#x27; payments \&amp; verifications.If 3DS is not enforced by the gateway/bank or if the customers&#x27; card is not enrolled, this will be false.
133
-
134
- */
135
-
136
- three_d_secure?:boolean;
137
-
138
- /**
139
- * @description Type of authorization transaction. \* verification - The transaction has been created for payment method verification. \* blocking_funds - The transaction has been created to block the funds from payment method.
140
-
141
- */
142
-
143
- authorization_reason?:'blocking_funds' | 'verification';
144
-
145
- /**
146
- * @description Error code received from the payment gateway on failure.
147
-
148
- */
149
-
150
- error_code?:string;
151
-
152
- /**
153
- * @description Error message received from the payment gateway on failure.
154
-
155
- */
156
-
157
- error_text?:string;
158
-
159
- /**
160
- * @description Timestamp indicating when the payment was voided or authorization expired at gateway.
161
-
162
- */
163
-
164
- voided_at?:number;
165
-
166
- /**
167
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
168
-
169
- */
170
-
171
- resource_version?:number;
172
-
173
- /**
174
- * @description Timestamp indicating when this transaction was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.
175
-
176
- */
177
-
178
- updated_at?:number;
179
-
180
- /**
181
- * @description Short description why the transaction was marked as fraud/suspicious
182
-
183
- */
184
-
185
- fraud_reason?:string;
186
-
187
- custom_payment_method_id?:string;
188
-
189
- /**
190
- * @description This is the part of the &#x60;amount&#x60; which has not been invoiced yet and is therefore added to [excess_payments](customers#customer_excess_payments) for the customer. Applicable only for a transaction of &#x60;type&#x60; &#x3D; &#x60;payment&#x60;.
191
-
192
- */
193
-
194
- amount_unused?:number;
195
-
196
- /**
197
- * @description The masked card number used for this transaction. Applicable only for &#x27;Card&#x27; Payment Method
198
-
199
- */
200
-
201
- masked_card_number?:string;
202
-
203
- /**
204
- * @description This is the &#x60;id&#x60; of the offline transaction that is being refunded or reversed. Applicable only for transaction of &#x60;type&#x60; &#x3D; &#x60;refund&#x60; or &#x60;payment_reversal&#x60;.
205
-
206
- */
207
-
208
- reference_transaction_id?:string;
209
-
210
- /**
211
- * @description This is the &#x60;id&#x60; of the transaction (always of &#x60;type&#x60; &#x3D; &#x60;payment&#x60;) being refunded. Applicable only for transaction of &#x60;type&#x60; &#x3D; &#x60;refund&#x60;.
212
-
213
- */
214
-
215
- refunded_txn_id?:string;
216
-
217
- /**
218
- * @description This is the &#x60;id&#x60; of the transaction (always of &#x60;type&#x60; &#x3D; &#x60;authorization&#x60;) which authorizes the payment being captured. Applicable only for transaction of &#x60;type&#x60; &#x3D; &#x60;payment&#x60;.
219
-
220
- */
221
-
222
- reference_authorization_id?:string;
223
-
224
- /**
225
- * @description This is the part of the authorized &#x60;amount&#x60; that is yet to be captured. The payment capture is recorded as a transaction of of &#x60;type&#x60; &#x3D; &#x60;payment&#x60;. Applicable only for a transaction of &#x60;type&#x60; &#x3D; &#x60;authorization&#x60;.
226
-
227
- */
228
-
229
- amount_capturable?:number;
230
-
231
- /**
232
- * @description Reversal transaction id. Applicable only for payment transactions.
233
-
234
- */
235
-
236
- reversal_transaction_id?:string;
237
-
238
- /**
239
- * @description Indicates that this resource has been deleted.
240
-
241
- */
242
-
243
- deleted:boolean;
244
-
245
- /**
246
- * @description First 6 digits of the card payment method.
247
-
248
- */
249
-
250
- iin?:string;
251
-
252
- /**
253
- * @description Last 4 digits of the card payment method.
254
-
255
- */
256
-
257
- last4?:string;
258
-
259
- /**
260
- * @description A unique id used to track this transaction across various systems you integrate with. This id is passed to the payment gateway when the transaction is initiated. Supported only for the [Exact payment gateway](https://www.chargebee.com/docs/exact-direct.html).
261
-
262
- */
263
-
264
- merchant_reference_id?:string;
265
-
266
- /**
267
- * @description The unique ID of the [business entity](/docs/api?prod_cat_ver&#x3D;2#mbe) of this &#x60;transaction&#x60;. This is always the same as the business entity of the [customer](/docs/api/transactions?prod_cat_ver&#x3D;2#transaction_customer_id).
268
-
269
- */
270
-
271
- business_entity_id?:string;
272
-
273
- /**
274
- * @description Payment method details of the corresponding transaction
275
-
276
- */
277
-
278
- payment_method_details?:string;
279
-
280
- custom_payment_method_name?:string;
281
-
282
- /**
283
- * @description Applicable only for &#x27;Payment&#x27; transactions. The list of invoices this &#x27;payment&#x27; transaction is applied to.
284
-
285
- */
286
-
287
- linked_invoices?:Transaction.InvoiceTransaction[];
288
-
289
- /**
290
- * @description Applicable only for &#x27;Refund&#x27; transactions. The list of Credit Notes this &#x27;refund&#x27; transaction is associated with.
291
-
292
- */
293
-
294
- linked_credit_notes?:Transaction.CreditNoteTransaction[];
295
-
296
- /**
297
- * @description Applicable only for Payment transactions. It only returns values when the transaction is not associated with an invoice, and that there is a refund for the transaction.
298
-
299
- */
300
-
301
- linked_refunds?:Transaction.TxnRefundsAndReversal[];
302
-
303
- /**
304
- * @description The list of payments captured for this authorization transaction.
305
-
306
- */
307
-
308
- linked_payments?:Transaction.LinkedPayment[];
309
-
310
- /**
311
- * @description Comprehensive information regarding the error experienced during an unsuccessful or declined transaction. Learn more about [gateway error references](gateway_error_references)
312
-
313
- */
314
-
315
- error_detail?:Transaction.GatewayErrorDetail;
6
+ id: string;
7
+ customer_id?: string;
8
+ subscription_id?: string;
9
+ gateway_account_id?: string;
10
+ payment_source_id?: string;
11
+ payment_method: PaymentMethod;
12
+ reference_number?: string;
13
+ gateway: Gateway;
14
+ type: 'authorization' | 'payment' | 'refund' | 'payment_reversal';
15
+ date?: number;
16
+ settled_at?: number;
17
+ exchange_rate?: number;
18
+ currency_code: string;
19
+ amount?: number;
20
+ id_at_gateway?: string;
21
+ status?:
22
+ | 'in_progress'
23
+ | 'success'
24
+ | 'voided'
25
+ | 'failure'
26
+ | 'timeout'
27
+ | 'needs_attention';
28
+ fraud_flag?: 'safe' | 'suspicious' | 'fraudulent';
29
+ initiator_type?: 'customer' | 'merchant';
30
+ three_d_secure?: boolean;
31
+ authorization_reason?: 'blocking_funds' | 'verification';
32
+ error_code?: string;
33
+ error_text?: string;
34
+ voided_at?: number;
35
+ resource_version?: number;
36
+ updated_at?: number;
37
+ fraud_reason?: string;
38
+ custom_payment_method_id?: string;
39
+ amount_unused?: number;
40
+ masked_card_number?: string;
41
+ reference_transaction_id?: string;
42
+ refunded_txn_id?: string;
43
+ reference_authorization_id?: string;
44
+ amount_capturable?: number;
45
+ reversal_transaction_id?: string;
46
+ linked_invoices?: Transaction.LinkedInvoice[];
47
+ linked_credit_notes?: Transaction.LinkedCreditNote[];
48
+ linked_refunds?: Transaction.LinkedRefund[];
49
+ linked_payments?: Transaction.LinkedPayment[];
50
+ deleted: boolean;
51
+ iin?: string;
52
+ last4?: string;
53
+ merchant_reference_id?: string;
54
+ business_entity_id?: string;
55
+ payment_method_details?: string;
56
+ error_detail?: Transaction.GatewayErrorDetail;
57
+ custom_payment_method_name?: string;
316
58
  }
317
- export namespace Transaction {
318
- export class TransactionResource {
319
- /**
320
- * @description Authorizes a specific amount in customer&#x27;s Credit card, which can be collected within a span of time. Read more on authorization and capture [here](https://www.chargebee.com/docs/stripe.html#auth-and-capture).
321
-
322
- */
323
-
324
- create_authorization(input:CreateAuthorizationInputParam):ChargebeeRequest<CreateAuthorizationResponse>;
325
-
326
- /**
327
- * @description This API voids the specific authorization transaction in order to release the blocked funds from the customer&#x27;s card. Voiding an already captured or voided transaction is not possible.
328
-
329
- */
330
-
331
- void_transaction(transaction_id:string):ChargebeeRequest<VoidTransactionResponse>;
332
-
333
- /**
334
- * @description Records a refund made offline. Applicable only for &#x60;transaction&#x60;s of [type](transactions#transaction_type) &#x3D; &#x60;payment&#x60;.
335
-
336
- */
337
-
338
- record_refund(transaction_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
339
-
340
- /**
341
- * @description Refunds an online payment. Applicable only for &#x60;transaction&#x60;s of [type](transactions#transaction_type) &#x3D; &#x60;payment&#x60;. You can only refund a &#x60;transaction&#x60; whose [status](transactions#transaction_status)&#x60; &#x60; is &#x60;success&#x60;.
342
-
343
- */
344
-
345
- refund(transaction_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
346
-
347
- /**
348
- * @description Lists all the transactions.
349
59
 
350
- */
351
-
352
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
353
-
354
- /**
355
- * @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \&amp; automatic) made for this invoice.
356
-
357
- */
358
-
359
- payments_for_invoice(invoice_id:string, input?:PaymentsForInvoiceInputParam):ChargebeeRequest<PaymentsForInvoiceResponse>;
360
-
361
- /**
362
- * @description Retrieve a transaction identified by its unique id.
363
-
364
- */
365
-
366
- retrieve(transaction_id:string):ChargebeeRequest<RetrieveResponse>;
367
-
368
- /**
369
- * @description This API deletes an offline transaction. However, to delete an offline transaction all payment allocations associated with the transaction must be removed.
370
-
371
- */
372
-
373
- delete_offline_transaction(transaction_id:string, input?:DeleteOfflineTransactionInputParam):ChargebeeRequest<DeleteOfflineTransactionResponse>;
374
-
375
- reconcile(transaction_id:string, input?:ReconcileInputParam):ChargebeeRequest<ReconcileResponse>;
376
- }
377
- export interface CreateAuthorizationResponse {
378
- transaction:Transaction;
60
+ export namespace Transaction {
61
+ export class TransactionResource {
62
+ createAuthorization(
63
+ input: CreateAuthorizationInputParam,
64
+ headers?: ChargebeeRequestHeader,
65
+ ): Promise<ChargebeeResponse<CreateAuthorizationResponse>>;
66
+
67
+ voidTransaction(
68
+ transaction_id: string,
69
+ headers?: ChargebeeRequestHeader,
70
+ ): Promise<ChargebeeResponse<VoidTransactionResponse>>;
71
+
72
+ recordRefund(
73
+ transaction_id: string,
74
+ input: RecordRefundInputParam,
75
+ headers?: ChargebeeRequestHeader,
76
+ ): Promise<ChargebeeResponse<RecordRefundResponse>>;
77
+
78
+ reconcile(
79
+ transaction_id: string,
80
+ input?: ReconcileInputParam,
81
+ headers?: ChargebeeRequestHeader,
82
+ ): Promise<ChargebeeResponse<ReconcileResponse>>;
83
+
84
+ refund(
85
+ transaction_id: string,
86
+ input?: RefundInputParam,
87
+ headers?: ChargebeeRequestHeader,
88
+ ): Promise<ChargebeeResponse<RefundResponse>>;
89
+
90
+ list(
91
+ input?: ListInputParam,
92
+ headers?: ChargebeeRequestHeader,
93
+ ): Promise<ChargebeeResponse<ListResponse>>;
94
+
95
+ transactionsForCustomer(
96
+ customer_id: string,
97
+ input?: TransactionsForCustomerInputParam,
98
+ headers?: ChargebeeRequestHeader,
99
+ ): Promise<ChargebeeResponse<TransactionsForCustomerResponse>>;
100
+
101
+ transactionsForSubscription(
102
+ subscription_id: string,
103
+ input?: TransactionsForSubscriptionInputParam,
104
+ headers?: ChargebeeRequestHeader,
105
+ ): Promise<ChargebeeResponse<TransactionsForSubscriptionResponse>>;
106
+
107
+ paymentsForInvoice(
108
+ invoice_id: string,
109
+ input?: PaymentsForInvoiceInputParam,
110
+ headers?: ChargebeeRequestHeader,
111
+ ): Promise<ChargebeeResponse<PaymentsForInvoiceResponse>>;
112
+
113
+ retrieve(
114
+ transaction_id: string,
115
+ headers?: ChargebeeRequestHeader,
116
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
117
+
118
+ deleteOfflineTransaction(
119
+ transaction_id: string,
120
+ input?: DeleteOfflineTransactionInputParam,
121
+ headers?: ChargebeeRequestHeader,
122
+ ): Promise<ChargebeeResponse<DeleteOfflineTransactionResponse>>;
379
123
  }
380
- export interface CreateAuthorizationInputParam {
381
-
382
- /**
383
- * @description Identifier of the customer.
384
-
385
- */
386
-
387
- customer_id:string;
388
-
389
- /**
390
- * @description Payment source to be used for authorizing the transaction.
391
-
392
- */
393
-
394
- payment_source_id?:string;
395
-
396
- /**
397
- * @description The currency code (ISO 4217 format) of the transaction amount.
398
-
399
- */
400
-
401
- currency_code?:string;
402
-
403
- /**
404
- * @description The amount to be blocked.
405
124
 
406
- */
407
-
408
- amount:number;
125
+ export interface CreateAuthorizationResponse {
126
+ transaction: Transaction;
409
127
  }
410
- export interface VoidTransactionResponse {
411
- transaction:Transaction;
412
- }
413
-
414
- export interface RecordRefundResponse {
415
- transaction:Transaction;
416
- }
417
- export interface RecordRefundInputParam {
418
-
419
- /**
420
- * @description The amount to be recorded as refunded. Must not exceed [amount_unused](transactions#transaction_amount_unused). If not passed then all of [amount_unused](transactions#transaction_amount_unused) is recorded as refunded.
421
-
422
- */
423
-
424
- amount?:number;
425
-
426
- /**
427
- * @description The payment method used to make the refund. \* card - Card \* alipay - Alipay \* sofort - Sofort \* play_store - Play Store \* custom - Custom \* upi - upi \* ach_credit - ACH Credit \* amazon_payments - Amazon Payments \* apple_pay - Apple Pay \* ideal - IDEAL \* giropay - giropay \* boleto - boleto \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) &#x3D; &#x60;refund&#x60;. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* wechat_pay - WeChat Pay \* sepa_credit - SEPA Credit \* google_pay - Google Pay \* cash - Cash \* netbanking_emandates - netbanking_emandates \* unionpay - Unionpay \* bancontact - Bancontact \* bank_transfer - Bank Transfer \* paypal_express_checkout - Paypal Express Checkout \* app_store - App Store \* check - Check \* direct_debit - Direct Debit \* dotpay - Dotpay \* other - Payment Methods other than the above types
428
128
 
429
- */
430
-
431
- payment_method:PaymentMethod;
432
-
433
- /**
434
- * @description The date when the refund was made.
435
-
436
- */
437
-
438
- date:number;
439
-
440
- /**
441
- * @description The reference number for this transaction. For example, the check number when &#x60;payment_method&#x60; &#x3D; &#x60;check&#x60;.
442
-
443
- */
444
-
445
- reference_number?:string;
446
-
447
- /**
448
- * @description Records a refund made offline. Applicable only for &#x60;transaction&#x60;s of [type](transactions#transaction_type) &#x3D; &#x60;payment&#x60;.
449
-
450
- */
451
-
452
- custom_payment_method_id?:string;
453
-
454
- /**
455
- * @description Remarks, if any, on the refund.
456
-
457
- */
458
-
459
- comment?:string;
129
+ export interface VoidTransactionResponse {
130
+ transaction: Transaction;
460
131
  }
461
- export interface RefundResponse {
462
- transaction:Transaction;
463
- }
464
- export interface RefundInputParam {
465
-
466
- /**
467
- * @description The amount to be refunded. Must not exceed [amount_unused](transactions#transaction_amount_unused). If not passed then all of [amount_unused](transactions#transaction_amount_unused) is refunded.
468
132
 
469
- */
470
-
471
- amount?:number;
472
-
473
- /**
474
- * @description Remarks, if any, on the refund.
475
-
476
- */
477
-
478
- comment?:string;
133
+ export interface RecordRefundResponse {
134
+ transaction: Transaction;
479
135
  }
480
- export interface ListResponse {
481
- /**
482
- * @description Lists all the transactions.
483
-
484
- */
485
-
486
- list:{transaction:Transaction}[];
487
-
488
- /**
489
- * @description Lists all the transactions.
490
136
 
491
- */
492
-
493
- next_offset?:string;
137
+ export interface ReconcileResponse {
138
+ transaction: Transaction;
494
139
  }
495
- export interface ListInputParam {
496
- [key : string]: any;
497
- /**
498
- * @description Lists all the transactions.
499
-
500
- */
501
-
502
- limit?:number;
503
-
504
- /**
505
- * @description Lists all the transactions.
506
-
507
- */
508
-
509
- offset?:string;
510
-
511
- /**
512
- * @description Lists all the transactions.
513
-
514
- */
515
-
516
- include_deleted?:boolean;
517
-
518
- /**
519
- * @description Lists all the transactions.
520
-
521
- */
522
-
523
- id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
524
-
525
- /**
526
- * @description Lists all the transactions.
527
-
528
- */
529
-
530
- customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
531
-
532
- /**
533
- * @description Lists all the transactions.
534
-
535
- */
536
-
537
- subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
538
-
539
- /**
540
- * @description Lists all the transactions.
541
-
542
- */
543
-
544
- payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
545
-
546
- /**
547
- * @description Lists all the transactions.
548
-
549
- */
550
-
551
- payment_method?:{in?:string,is?:'other' | 'netbanking_emandates' | 'klarna_pay_now' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'automated_bank_transfer' | 'chargeback' | 'wechat_pay' | 'pay_to' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'faster_payments' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',is_not?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'automated_bank_transfer' | 'chargeback' | 'wechat_pay' | 'pay_to' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'faster_payments' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',not_in?:string};
552
-
553
- /**
554
- * @description Lists all the transactions.
555
140
 
556
- */
557
-
558
- gateway?:{in?:string,is?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'ebanx' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'dlocal' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay' | 'pay_com',is_not?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'ebanx' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'dlocal' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay' | 'pay_com',not_in?:string};
559
-
560
- /**
561
- * @description Lists all the transactions.
562
-
563
- */
564
-
565
- gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
566
-
567
- /**
568
- * @description Lists all the transactions.
569
-
570
- */
571
-
572
- id_at_gateway?:{is?:string,is_not?:string,starts_with?:string};
573
-
574
- /**
575
- * @description Lists all the transactions.
576
-
577
- */
578
-
579
- reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
580
-
581
- /**
582
- * @description Lists all the transactions.
583
-
584
- */
585
-
586
- type?:{in?:string,is?:'authorization' | 'payment_reversal' | 'payment' | 'refund',is_not?:'authorization' | 'payment_reversal' | 'payment' | 'refund',not_in?:string};
587
-
588
- /**
589
- * @description Lists all the transactions.
590
-
591
- */
592
-
593
- date?:{after?:string,before?:string,between?:string,on?:string};
594
-
595
- /**
596
- * @description Lists all the transactions.
141
+ export interface RefundResponse {
142
+ transaction: Transaction;
143
+ }
597
144
 
598
- */
599
-
600
- amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
601
-
602
- /**
603
- * @description Lists all the transactions.
145
+ export interface ListResponse {
146
+ list: { transaction: Transaction }[];
147
+ next_offset?: string;
148
+ }
604
149
 
605
- */
606
-
607
- amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
608
-
609
- /**
610
- * @description Lists all the transactions.
150
+ export interface TransactionsForCustomerResponse {
151
+ list: { transaction: Transaction }[];
152
+ next_offset?: string;
153
+ }
611
154
 
612
- */
613
-
614
- status?:{in?:string,is?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',is_not?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',not_in?:string};
615
-
616
- /**
617
- * @description Lists all the transactions.
155
+ export interface TransactionsForSubscriptionResponse {
156
+ list: { transaction: Transaction }[];
157
+ next_offset?: string;
158
+ }
618
159
 
619
- */
620
-
621
- updated_at?:{after?:string,before?:string,between?:string,on?:string};
622
-
623
- /**
624
- * @description Lists all the transactions.
160
+ export interface PaymentsForInvoiceResponse {
161
+ list: { transaction: Transaction }[];
162
+ next_offset?: string;
163
+ }
625
164
 
626
- */
627
-
628
- sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
165
+ export interface RetrieveResponse {
166
+ transaction: Transaction;
629
167
  }
630
- export interface PaymentsForInvoiceResponse {
631
- /**
632
- * @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \&amp; automatic) made for this invoice.
633
168
 
634
- */
635
-
636
- list:{transaction:Transaction}[];
637
-
638
- /**
639
- * @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \&amp; automatic) made for this invoice.
169
+ export interface DeleteOfflineTransactionResponse {
170
+ transaction: Transaction;
171
+ }
640
172
 
641
- */
642
-
643
- next_offset?:string;
173
+ export interface LinkedInvoice {
174
+ invoice_id: string;
175
+ applied_amount: number;
176
+ applied_at: number;
177
+ invoice_date?: number;
178
+ invoice_total?: number;
179
+ invoice_status:
180
+ | 'paid'
181
+ | 'posted'
182
+ | 'payment_due'
183
+ | 'not_paid'
184
+ | 'voided'
185
+ | 'pending';
644
186
  }
645
- export interface ReconcileResponse {
646
- transaction:Transaction;
187
+ export interface LinkedCreditNote {
188
+ cn_id: string;
189
+ applied_amount: number;
190
+ applied_at: number;
191
+ cn_reason_code?:
192
+ | 'write_off'
193
+ | 'subscription_change'
194
+ | 'subscription_cancellation'
195
+ | 'subscription_pause'
196
+ | 'chargeback'
197
+ | 'product_unsatisfactory'
198
+ | 'service_unsatisfactory'
199
+ | 'order_change'
200
+ | 'order_cancellation'
201
+ | 'waiver'
202
+ | 'other'
203
+ | 'fraudulent';
204
+ cn_create_reason_code?: string;
205
+ cn_date?: number;
206
+ cn_total?: number;
207
+ cn_status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
208
+ cn_reference_invoice_id: string;
647
209
  }
648
- export interface ReconcileInputParam {
649
-
650
- id_at_gateway?:string;
651
-
652
- customer_id?:string;
653
-
654
- status?:'success' | 'failure';
210
+ export interface LinkedRefund {
211
+ txn_id: string;
212
+ txn_status:
213
+ | 'in_progress'
214
+ | 'success'
215
+ | 'voided'
216
+ | 'failure'
217
+ | 'timeout'
218
+ | 'needs_attention';
219
+ txn_date: number;
220
+ txn_amount: number;
655
221
  }
656
- export interface PaymentsForInvoiceInputParam {
657
- [key : string]: any;
658
- /**
659
- * @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \&amp; automatic) made for this invoice.
660
-
661
- */
662
-
663
- limit?:number;
664
-
665
- /**
666
- * @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \&amp; automatic) made for this invoice.
222
+ export interface LinkedPayment {
223
+ id: string;
224
+ status?:
225
+ | 'in_progress'
226
+ | 'success'
227
+ | 'voided'
228
+ | 'failure'
229
+ | 'timeout'
230
+ | 'needs_attention';
231
+ amount?: number;
232
+ date?: number;
233
+ }
234
+ export interface GatewayErrorDetail {
235
+ request_id?: string;
236
+ error_category?: string;
237
+ error_code?: string;
238
+ error_message?: string;
239
+ decline_code?: string;
240
+ decline_message?: string;
241
+ network_error_code?: string;
242
+ network_error_message?: string;
243
+ error_field?: string;
244
+ recommendation_code?: string;
245
+ recommendation_message?: string;
246
+ processor_error_code?: string;
247
+ processor_error_message?: string;
248
+ }
249
+ // REQUEST PARAMS
250
+ //---------------
667
251
 
668
- */
669
-
670
- offset?:string;
252
+ export interface CreateAuthorizationInputParam {
253
+ customer_id: string;
254
+ payment_source_id?: string;
255
+ currency_code?: string;
256
+ amount: number;
671
257
  }
672
- export interface RetrieveResponse {
673
- transaction:Transaction;
258
+ export interface RecordRefundInputParam {
259
+ amount?: number;
260
+ payment_method: PaymentMethod;
261
+ date: number;
262
+ reference_number?: string;
263
+ custom_payment_method_id?: string;
264
+ comment?: string;
674
265
  }
675
-
676
- export interface DeleteOfflineTransactionResponse {
677
- transaction:Transaction;
266
+ export interface ReconcileInputParam {
267
+ id_at_gateway?: string;
268
+ customer_id?: string;
269
+ status?: 'success' | 'failure';
678
270
  }
679
- export interface DeleteOfflineTransactionInputParam {
680
-
681
- /**
682
- * @description Reason for deleting this transaction. This comment will be added to the associated entity.
683
-
684
- */
685
-
686
- comment?:string;
271
+ export interface RefundInputParam {
272
+ amount?: number;
273
+ comment?: string;
687
274
  }
688
- export interface InvoiceTransaction {
689
- /**
690
- * @description Identifier for the invoice.
691
-
692
- */
693
-
694
- invoice_id:string;
695
-
696
- /**
697
- * @description The transaction amount applied to this invoice
698
-
699
- */
700
-
701
- applied_amount:number;
702
-
703
- /**
704
- * @description Timestamp at which the transaction is applied.
705
-
706
- */
707
-
708
- applied_at:number;
709
-
710
- /**
711
- * @description The date this invoice is issued.
712
-
713
- */
714
-
715
- invoice_date?:number;
716
-
717
- /**
718
- * @description Total amount of the invoice
719
-
720
- */
721
-
722
- invoice_total?:number;
723
-
724
- /**
725
- * @description Current status of this invoice. \* pending -
726
- The [invoice](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this &#x60;status&#x60; when it has line items that belong to items that are &#x60;metered&#x60; or when the &#x60;subscription.create_pending_invoices&#x60;attribute is set to &#x60;true&#x60;.
727
- The [invoice](/docs/api/invoices?prod_cat_ver&#x3D;1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this &#x60;status&#x60; when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site. \* voided - Indicates a voided invoice. \* payment_due - Indicates the payment is not yet collected and is being retried as per retry settings. \* paid - Indicates a paid invoice. \* posted - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period \* not_paid - Indicates the payment is not made and all attempts to collect is failed.
728
-
729
- */
730
-
731
- invoice_status:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
275
+ export interface ListInputParam {
276
+ limit?: number;
277
+ offset?: string;
278
+ include_deleted?: boolean;
279
+ id?: filter.String;
280
+ customer_id?: filter.String;
281
+ subscription_id?: filter.String;
282
+ payment_source_id?: filter.String;
283
+ payment_method?: filter.Enum;
284
+ gateway?: filter.Enum;
285
+ gateway_account_id?: filter.String;
286
+ id_at_gateway?: filter.String;
287
+ reference_number?: filter.String;
288
+ type?: filter.Enum;
289
+ date?: filter.Timestamp;
290
+ amount?: filter.Number;
291
+ amount_capturable?: filter.Number;
292
+ status?: filter.Enum;
293
+ updated_at?: filter.Timestamp;
294
+ 'sort_by[asc]'?: string;
295
+ 'sort_by[desc]'?: string;
732
296
  }
733
- export interface CreditNoteTransaction {
734
- /**
735
- * @description Identifier for the credit-notes.
736
-
737
- */
738
-
739
- cn_id:string;
740
-
741
- /**
742
- * @description The transaction amount applied to this invoice
743
-
744
- */
745
-
746
- applied_amount:number;
747
-
748
- /**
749
- * @description Timestamp at which the transaction is applied.
750
-
751
- */
752
-
753
- applied_at:number;
754
-
755
- /**
756
- * @description Credit note reason code. Deprecated use the cn_create_reason_code parameter instead \* service_unsatisfactory - Service Unsatisfactory \* other - Can be set when none of the above reason codes are applicable \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* fraudulent - FRAUDULENT \* order_change - Order Change \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* chargeback - Can be set when you are recording your customer Chargebacks \* waiver - Waiver \* order_cancellation - Order Cancellation \* product_unsatisfactory - Product Unsatisfactory
757
-
758
- */
759
-
760
- cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
761
-
762
- /**
763
- * @description Credit note reason code
764
-
765
- */
766
-
767
- cn_create_reason_code?:string;
768
-
769
- /**
770
- * @description The date this credit note is created.
771
-
772
- */
773
-
774
- cn_date?:number;
775
-
776
- /**
777
- * @description Total amount of the credit note
778
-
779
- */
780
-
781
- cn_total?:number;
782
-
783
- /**
784
- * @description The status of this Credit Note. \* voided - When the Credit Note has been cancelled. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* adjusted - When the Credit Note has been adjusted against an invoice.
785
-
786
- */
787
-
788
- cn_status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
789
-
790
- /**
791
- * @description The invoice number. Acts as a identifier for invoice and typically generated sequentially.
792
-
793
- */
794
-
795
- cn_reference_invoice_id:string;
297
+ export interface TransactionsForCustomerInputParam {
298
+ limit?: number;
299
+ offset?: string;
796
300
  }
797
- export interface TxnRefundsAndReversal {
798
- /**
799
- * @description Uniquely identifies the transaction.
800
-
801
- */
802
-
803
- txn_id:string;
804
-
805
- /**
806
- * @description The status of this transaction. \* needs_attention - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually \* voided - The transaction got voided or authorization expired at gateway. \* timeout - Transaction failed because of Gateway not accepting the connection. \* success - The transaction is successful. \* failure - Transaction failed. Refer the &#x27;error_code&#x27; and &#x27;error_text&#x27; fields to know the reason for failure \* in_progress - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.
807
-
808
- */
809
-
810
- txn_status:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
811
-
812
- /**
813
- * @description Indicates when this refund occured.
814
-
815
- */
816
-
817
- txn_date:number;
818
-
819
- /**
820
- * @description Amount of this refund transaction.
821
-
822
- */
823
-
824
- txn_amount:number;
301
+ export interface TransactionsForSubscriptionInputParam {
302
+ limit?: number;
303
+ offset?: string;
825
304
  }
826
- export interface LinkedPayment {
827
- /**
828
- * @description Uniquely identifies the transaction.
829
-
830
- */
831
-
832
- id:string;
833
-
834
- /**
835
- * @description The status of this transaction. \* needs_attention - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually \* success - The transaction is successful. \* voided - The transaction got voided or authorization expired at gateway. \* in_progress - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* failure - Transaction failed. Refer the &#x27;error_code&#x27; and &#x27;error_text&#x27; fields to know the reason for failure \* timeout - Transaction failed because of Gateway not accepting the connection.
836
-
837
- */
838
-
839
- status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
840
-
841
- /**
842
- * @description Amount for this transaction.
843
-
844
- */
845
-
846
- amount?:number;
847
-
848
- /**
849
- * @description Indicates when this transaction occurred.
850
-
851
- */
852
-
853
- date?:number;
305
+ export interface PaymentsForInvoiceInputParam {
306
+ limit?: number;
307
+ offset?: string;
854
308
  }
855
- export interface GatewayErrorDetail {
856
- /**
857
- * @description This is a unique identifier assigned by the payment gateway. It is used to track the request at the payment gateway
858
-
859
- */
860
-
861
- request_id?:string;
862
-
863
- /**
864
- * @description This parameter categorizes the type of error that occurred for the request. It helps in understanding whether the error is due to API error, validation, processing, network issues, and more
865
-
866
- */
867
-
868
- error_category?:string;
869
-
870
- /**
871
- * @description A gateway-specific code that corresponds to the particular error encountered for the request. This code can be used for identifying the error in a standardized manner across the gateway&#x27;s services
872
-
873
- */
874
-
875
- error_code?:string;
876
-
877
- /**
878
- * @description A message provided by the gateway that describes the nature of the error encountered
879
-
880
- */
881
-
882
- error_message?:string;
883
-
884
- /**
885
- * @description When a transaction is declined, this code is provided by the gateway to specify the reason for the decline
886
-
887
- */
888
-
889
- decline_code?:string;
890
-
891
- /**
892
- * @description This message gives a descriptive explanation of the reason for the transaction&#x27;s decline
893
-
894
- */
895
-
896
- decline_message?:string;
897
-
898
- /**
899
- * @description This code represents errors that originate from the payment network (such as Visa, MasterCard, and more). It is different from the gateway error code and is specific to the network&#x27;s error-handling system
900
-
901
- */
902
-
903
- network_error_code?:string;
904
-
905
- /**
906
- * @description This the network related error message from the gateway, this is a detailed message provided by the payment network explaining the nature of the network error encountered
907
-
908
- */
909
-
910
- network_error_message?:string;
911
-
912
- /**
913
- * @description This parameter indicates which specific data field or attribute in the request caused the error
914
-
915
- */
916
-
917
- error_field?:string;
918
-
919
- /**
920
- * @description After an error has occurred, the gateway or payment network may provide a recommendation code. This code suggests a course of action or remedy that you can follow to resolve the issue
921
-
922
- */
923
-
924
- recommendation_code?:string;
925
-
926
- /**
927
- * @description This message is intended to provide guidance or suggestions on action or remedy that you can follow to resolve the issue
928
-
929
- */
930
-
931
- recommendation_message?:string;
932
-
933
- /**
934
- * @description This code is provided by the payment processor (the entity that handles the transaction between the bank accounts and the payment networks) and indicates errors that occur at this stage of the payment process
935
-
936
- */
937
-
938
- processor_error_code?:string;
939
-
940
- /**
941
- * @description This message describes the specific error that the payment processor encountered
942
-
943
- */
944
-
945
- processor_error_message?:string;
309
+ export interface DeleteOfflineTransactionInputParam {
310
+ comment?: string;
946
311
  }
947
312
  }
948
- }
313
+ }