chargebee 2.25.3 → 2.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +55 -49
  3. package/lib/chargebee.js +1 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +1 -0
  6. package/types/resources/Address.d.ts +245 -5
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  8. package/types/resources/AttachedItem.d.ts +305 -13
  9. package/types/resources/Card.d.ts +485 -13
  10. package/types/resources/Comment.d.ts +177 -11
  11. package/types/resources/Contact.d.ts +54 -0
  12. package/types/resources/ContractTerm.d.ts +83 -0
  13. package/types/resources/Coupon.d.ts +665 -20
  14. package/types/resources/CouponCode.d.ts +56 -5
  15. package/types/resources/CouponSet.d.ts +224 -17
  16. package/types/resources/CreditNote.d.ts +1202 -44
  17. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  18. package/types/resources/Customer.d.ts +2132 -73
  19. package/types/resources/DifferentialPrice.d.ts +266 -15
  20. package/types/resources/Discount.d.ts +107 -0
  21. package/types/resources/Download.d.ts +18 -0
  22. package/types/resources/EntitlementOverride.d.ts +101 -7
  23. package/types/resources/Estimate.d.ts +1181 -27
  24. package/types/resources/Event.d.ts +145 -8
  25. package/types/resources/Export.d.ts +703 -32
  26. package/types/resources/Feature.d.ts +356 -22
  27. package/types/resources/Gift.d.ts +351 -24
  28. package/types/resources/Hierarchy.d.ts +30 -0
  29. package/types/resources/HostedPage.d.ts +1212 -37
  30. package/types/resources/ImpactedItem.d.ts +41 -1
  31. package/types/resources/ImpactedSubscription.d.ts +36 -1
  32. package/types/resources/InAppSubscription.d.ts +636 -9
  33. package/types/resources/Invoice.d.ts +2293 -93
  34. package/types/resources/InvoiceEstimate.d.ts +75 -6
  35. package/types/resources/Item.d.ts +542 -16
  36. package/types/resources/ItemEntitlement.d.ts +172 -13
  37. package/types/resources/ItemFamily.d.ts +173 -15
  38. package/types/resources/ItemPrice.d.ts +971 -26
  39. package/types/resources/Media.d.ts +24 -0
  40. package/types/resources/NonSubscription.d.ts +51 -3
  41. package/types/resources/Order.d.ts +1224 -32
  42. package/types/resources/PaymentIntent.d.ts +318 -8
  43. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  44. package/types/resources/PaymentSource.d.ts +1259 -55
  45. package/types/resources/PaymentVoucher.d.ts +262 -14
  46. package/types/resources/PortalSession.d.ts +187 -10
  47. package/types/resources/PromotionalCredit.d.ts +351 -16
  48. package/types/resources/Purchase.d.ts +274 -5
  49. package/types/resources/Quote.d.ts +1595 -62
  50. package/types/resources/QuoteLineGroup.d.ts +134 -5
  51. package/types/resources/QuotedCharge.d.ts +63 -5
  52. package/types/resources/QuotedSubscription.d.ts +192 -5
  53. package/types/resources/ResourceMigration.d.ts +73 -3
  54. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  55. package/types/resources/Subscription.d.ts +3462 -137
  56. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  57. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  58. package/types/resources/TaxWithheld.d.ts +32 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  60. package/types/resources/TimeMachine.d.ts +99 -7
  61. package/types/resources/Token.d.ts +179 -7
  62. package/types/resources/Transaction.d.ts +597 -25
  63. package/types/resources/UnbilledCharge.d.ts +355 -14
  64. package/types/resources/Usage.d.ts +259 -13
  65. package/types/resources/VirtualBankAccount.d.ts +255 -17
@@ -1,165 +1,737 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface Transaction {
4
+
5
+ /**
6
+ * @description Uniquely identifies the transaction.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description Identifier of the customer for which this transaction is made
14
+
15
+ */
16
+
5
17
  customer_id?:string;
18
+
19
+ /**
20
+ * @description Identifier of the subscription for which this transaction is made.
21
+
22
+ */
23
+
6
24
  subscription_id?:string;
25
+
26
+ /**
27
+ * @description The gateway account used for this transaction
28
+
29
+ */
30
+
7
31
  gateway_account_id?:string;
32
+
33
+ /**
34
+ * @description Identifier of the payment source for which this transaction is made
35
+
36
+ */
37
+
8
38
  payment_source_id?:string;
39
+
40
+ /**
41
+ * @description The payment method of this transaction \* unionpay - Unionpay \* bank_transfer - Bank Transfer \* paypal_express_checkout - Paypal Express Checkout \* other - Payment Methods other than the above types \* upi - upi \* ach_credit - ACH Credit \* sepa_credit - SEPA Credit \* check - Check \* card - Card \* amazon_payments - Amazon Payments \* 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 \* direct_debit - Direct Debit \* dotpay - Dotpay \* alipay - Alipay \* sofort - Sofort \* apple_pay - Apple Pay \* giropay - giropay \* wechat_pay - WeChat Pay \* cash - Cash \* bancontact - Bancontact
42
+
43
+ */
44
+
9
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
+
10
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. \* 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. \* 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. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* 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. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account 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. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway
56
+
57
+ */
58
+
11
59
  gateway:Gateway;
60
+
61
+ /**
62
+ * @description Type of the transaction. \* refund - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer&#x27;s [payment_source](payment_sources). \* authorization - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer&#x27;s [payment_source](payment_sources). \* payment_reversal - Indicates a reversal transaction. \* payment - The transaction represents capture of [amount](transactions#transaction_amount) from the customer&#x27;s [payment_source](payment_sources).
63
+
64
+ */
65
+
12
66
  type:'authorization' | 'payment_reversal' | 'payment' | 'refund';
67
+
68
+ /**
69
+ * @description Indicates when this transaction occurred.
70
+
71
+ */
72
+
13
73
  date?:number;
74
+
75
+ /**
76
+ * @description Indicates the time at which the final status of the transaction has been marked.
77
+
78
+ */
79
+
14
80
  settled_at?:number;
81
+
82
+ /**
83
+ * @description Exchange rate used for base currency conversion
84
+
85
+ */
86
+
15
87
  exchange_rate?:number;
88
+
89
+ /**
90
+ * @description The currency code (ISO 4217 format) for the transaction.
91
+
92
+ */
93
+
16
94
  currency_code:string;
95
+
96
+ /**
97
+ * @description Amount for this transaction.
98
+
99
+ */
100
+
17
101
  amount?:number;
102
+
103
+ /**
104
+ * @description The id with which this transaction is referred in gateway.
105
+
106
+ */
107
+
18
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. \* failure - Transaction failed. Refer the &#x27;error_code&#x27; and &#x27;error_text&#x27; fields to know the reason for failure \* 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
112
+
113
+ */
114
+
19
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. \* fraudulent - The transaction has been marked as fraudulent \* suspicious - The transaction has been identified as potentially fraudulent by the gateway \* safe - The transaction has been marked as safe
119
+
120
+ */
121
+
20
122
  fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
123
+
124
+ /**
125
+ * @description Marker for on-session payments (3DS). null indicates &#x27;merchant&#x27;. \* customer - Customer initiated 3DS payment \* merchant - Payment initiated on stored payment method by the merchant
126
+
127
+ */
128
+
21
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
+
22
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
+
23
143
  authorization_reason?:'blocking_funds' | 'verification';
144
+
145
+ /**
146
+ * @description Error code received from the payment gateway on failure.
147
+
148
+ */
149
+
24
150
  error_code?:string;
151
+
152
+ /**
153
+ * @description Error message received from the payment gateway on failure.
154
+
155
+ */
156
+
25
157
  error_text?:string;
158
+
159
+ /**
160
+ * @description Timestamp indicating when the payment was voided or authorization expired at gateway.
161
+
162
+ */
163
+
26
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
+
27
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
+
28
178
  updated_at?:number;
179
+
180
+ /**
181
+ * @description Short description why the transaction was marked as fraud/suspicious
182
+
183
+ */
184
+
29
185
  fraud_reason?:string;
186
+
187
+ /**
188
+ * @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;.
189
+
190
+ */
191
+
30
192
  amount_unused?:number;
193
+
194
+ /**
195
+ * @description The masked card number used for this transaction. Applicable only for &#x27;Card&#x27; Payment Method
196
+
197
+ */
198
+
31
199
  masked_card_number?:string;
200
+
201
+ /**
202
+ * @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;.
203
+
204
+ */
205
+
32
206
  reference_transaction_id?:string;
207
+
208
+ /**
209
+ * @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;.
210
+
211
+ */
212
+
33
213
  refunded_txn_id?:string;
214
+
215
+ /**
216
+ * @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;.
217
+
218
+ */
219
+
34
220
  reference_authorization_id?:string;
221
+
222
+ /**
223
+ * @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;.
224
+
225
+ */
226
+
35
227
  amount_capturable?:number;
228
+
229
+ /**
230
+ * @description Reversal transaction id. Applicable only for payment transactions.
231
+
232
+ */
233
+
36
234
  reversal_transaction_id?:string;
235
+
236
+ /**
237
+ * @description Indicates that this resource has been deleted.
238
+
239
+ */
240
+
37
241
  deleted:boolean;
242
+
243
+ /**
244
+ * @description First 6 digits of the card payment method.
245
+
246
+ */
247
+
38
248
  iin?:string;
249
+
250
+ /**
251
+ * @description Last 4 digits of the card payment method.
252
+
253
+ */
254
+
39
255
  last4?:string;
256
+
257
+ /**
258
+ * @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).
259
+
260
+ */
261
+
40
262
  merchant_reference_id?:string;
263
+
264
+ /**
265
+ * @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).
266
+
267
+ */
268
+
41
269
  business_entity_id?:string;
270
+
271
+ /**
272
+ * @description Payment method details of the corresponding transaction
273
+
274
+ */
275
+
42
276
  payment_method_details?:string;
277
+
278
+ /**
279
+ * @description Applicable only for &#x27;Payment&#x27; transactions. The list of invoices this &#x27;payment&#x27; transaction is applied to.
280
+
281
+ */
282
+
43
283
  linked_invoices?:Transaction.InvoiceTransaction[];
284
+
285
+ /**
286
+ * @description Applicable only for &#x27;Refund&#x27; transactions. The list of Credit Notes this &#x27;refund&#x27; transaction is associated with.
287
+
288
+ */
289
+
44
290
  linked_credit_notes?:Transaction.CreditNoteTransaction[];
291
+
292
+ /**
293
+ * @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.
294
+
295
+ */
296
+
45
297
  linked_refunds?:Transaction.TxnRefundsAndReversal[];
298
+
299
+ /**
300
+ * @description The list of payments captured for this authorization transaction.
301
+
302
+ */
303
+
46
304
  linked_payments?:Transaction.LinkedPayment[];
47
305
  }
48
306
  export namespace Transaction {
49
- export class TransactionResource {
307
+ export class TransactionResource {
308
+ /**
309
+ * @description Records a refund made offline. Applicable only for &#x60;transaction&#x60;s of [type](transactions#transaction_type) &#x3D; &#x60;payment&#x60;.
310
+
311
+ */
312
+
50
313
  record_refund(transaction_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
314
+
315
+ /**
316
+ * @description Lists all the transactions.
317
+
318
+ */
319
+
51
320
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
321
+
322
+ /**
323
+ * @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.
324
+
325
+ */
326
+
52
327
  void_transaction(transaction_id:string):ChargebeeRequest<VoidTransactionResponse>;
328
+
329
+ /**
330
+ * @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).
331
+
332
+ */
333
+
53
334
  create_authorization(input:CreateAuthorizationInputParam):ChargebeeRequest<CreateAuthorizationResponse>;
335
+
336
+ /**
337
+ * @description Retrieve a transaction identified by its unique id.
338
+
339
+ */
340
+
54
341
  retrieve(transaction_id:string):ChargebeeRequest<RetrieveResponse>;
342
+
343
+ /**
344
+ * @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.
345
+
346
+ */
347
+
55
348
  payments_for_invoice(invoice_id:string, input?:PaymentsForInvoiceInputParam):ChargebeeRequest<PaymentsForInvoiceResponse>;
349
+
350
+ /**
351
+ * @description This API deletes an offline transaction. However, to delete an offline transaction all payment allocations associated with the transaction must be removed.
352
+
353
+ */
354
+
56
355
  delete_offline_transaction(transaction_id:string, input?:DeleteOfflineTransactionInputParam):ChargebeeRequest<DeleteOfflineTransactionResponse>;
356
+
357
+ /**
358
+ * @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;.
359
+
360
+ */
361
+
57
362
  refund(transaction_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
58
363
  }
59
- export interface RecordRefundResponse {
60
- transaction:Transaction;
364
+ export interface RecordRefundResponse {
365
+ /**
366
+ * @description Records a refund made offline. Applicable only for &#x60;transaction&#x60;s of [type](transactions#transaction_type) &#x3D; &#x60;payment&#x60;.
367
+
368
+ */
369
+
370
+ transaction:Transaction;
61
371
  }
62
372
  export interface RecordRefundInputParam {
373
+
374
+ /**
375
+ * @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.
376
+
377
+ */
378
+
63
379
  amount?:number;
380
+
381
+ /**
382
+ * @description The payment method used to make the refund. \* card - Card \* alipay - Alipay \* sofort - Sofort \* play_store - Play Store \* upi - upi \* ach_credit - ACH Credit \* amazon_payments - Amazon Payments \* apple_pay - Apple Pay \* ideal - IDEAL \* giropay - giropay \* 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
383
+
384
+ */
385
+
64
386
  payment_method:PaymentMethod;
387
+
388
+ /**
389
+ * @description The date when the refund was made.
390
+
391
+ */
392
+
65
393
  date:number;
394
+
395
+ /**
396
+ * @description The reference number for this transaction. For example, the check number when &#x60;payment_method&#x60; &#x3D; &#x60;check&#x60;.
397
+
398
+ */
399
+
66
400
  reference_number?:string;
401
+
402
+ /**
403
+ * @description Remarks, if any, on the refund.
404
+
405
+ */
406
+
67
407
  comment?:string;
68
408
  }
69
- export interface ListResponse {
70
- list:{transaction:Transaction}[];
71
- next_offset?:string;
409
+ export interface ListResponse {
410
+ /**
411
+ * @description Lists all the transactions.
412
+
413
+ */
414
+
415
+ list:{transaction:Transaction}[];
416
+
417
+ /**
418
+ * @description Lists all the transactions.
419
+
420
+ */
421
+
422
+ next_offset?:string;
72
423
  }
73
424
  export interface ListInputParam {
74
- [key : string]: any;
425
+ [key : string]: any;
426
+ /**
427
+ * @description The number of resources to be returned.
428
+
429
+ */
430
+
75
431
  limit?:number;
432
+
433
+ /**
434
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
435
+
436
+ */
437
+
76
438
  offset?:string;
439
+
440
+ /**
441
+ * @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
442
+
443
+ */
444
+
77
445
  include_deleted?:boolean;
446
+
447
+ /**
448
+ * @description Uniquely identifies the transaction.
449
+
450
+ */
451
+
78
452
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
453
+
454
+ /**
455
+ * @description Identifier of the customer for which this transaction is made
456
+
457
+ */
458
+
79
459
  customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
460
+
461
+ /**
462
+ * @description Identifier of the subscription for which this transaction is made.
463
+
464
+ */
465
+
80
466
  subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
467
+
468
+ /**
469
+ * @description To filter based on Transaction payment source id.
470
+
471
+ */
472
+
81
473
  payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
474
+
475
+ /**
476
+ * @description The payment method of this transaction
477
+
478
+ */
479
+
82
480
  payment_method?:{in?:string,is?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',is_not?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',not_in?:string};
481
+
482
+ /**
483
+ * @description Gateway through which this transaction was done. Applicable only for &#x27;Card&#x27; Payment Method
484
+
485
+ */
486
+
83
487
  gateway?:{in?:string,is?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | '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' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',is_not?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | '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' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',not_in?:string};
488
+
489
+ /**
490
+ * @description The gateway account used for this transaction
491
+
492
+ */
493
+
84
494
  gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
495
+
496
+ /**
497
+ * @description The id with which this transaction is referred in gateway.
498
+
499
+ */
500
+
85
501
  id_at_gateway?:{is?:string,is_not?:string,starts_with?:string};
502
+
503
+ /**
504
+ * @description The reference number for this transaction. For example, the check number when [payment_method](transactions#transaction_payment_method) &#x3D; &#x60;check&#x60;.
505
+
506
+ */
507
+
86
508
  reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
509
+
510
+ /**
511
+ * @description Type of the transaction.
512
+
513
+ */
514
+
87
515
  type?:{in?:string,is?:'authorization' | 'payment_reversal' | 'payment' | 'refund',is_not?:'authorization' | 'payment_reversal' | 'payment' | 'refund',not_in?:string};
516
+
517
+ /**
518
+ * @description Indicates when this transaction occurred.
519
+
520
+ */
521
+
88
522
  date?:{after?:string,before?:string,between?:string,on?:string};
523
+
524
+ /**
525
+ * @description Amount for this transaction.
526
+
527
+ */
528
+
89
529
  amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
530
+
531
+ /**
532
+ * @description To filter based on transaction&#x27;s unused authorized/blocked amount.
533
+
534
+ */
535
+
90
536
  amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
537
+
538
+ /**
539
+ * @description The status of this transaction.
540
+
541
+ */
542
+
91
543
  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};
544
+
545
+ /**
546
+ * @description To filter based on &#x60;updated_at&#x60;. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the &#x60;sort_by&#x60; input parameter as &#x60;updated_at&#x60; for a faster response.
547
+
548
+ */
549
+
92
550
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
551
+
552
+ /**
553
+ * @description Lists all the transactions.
554
+
555
+ */
556
+
93
557
  sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
94
558
  }
95
- export interface VoidTransactionResponse {
96
- transaction:Transaction;
559
+ export interface VoidTransactionResponse {
560
+ /**
561
+ * @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.
562
+
563
+ */
564
+
565
+ transaction:Transaction;
97
566
  }
98
567
 
99
- export interface CreateAuthorizationResponse {
100
- transaction:Transaction;
568
+ export interface CreateAuthorizationResponse {
569
+ /**
570
+ * @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).
571
+
572
+ */
573
+
574
+ transaction:Transaction;
101
575
  }
102
576
  export interface CreateAuthorizationInputParam {
577
+
578
+ /**
579
+ * @description Identifier of the customer.
580
+
581
+ */
582
+
103
583
  customer_id:string;
584
+
585
+ /**
586
+ * @description Payment source to be used for authorizing the transaction.
587
+
588
+ */
589
+
104
590
  payment_source_id?:string;
591
+
592
+ /**
593
+ * @description The currency code (ISO 4217 format) of the transaction amount.
594
+
595
+ */
596
+
105
597
  currency_code?:string;
598
+
599
+ /**
600
+ * @description The amount to be blocked.
601
+
602
+ */
603
+
106
604
  amount:number;
107
605
  }
108
- export interface RetrieveResponse {
109
- transaction:Transaction;
606
+ export interface RetrieveResponse {
607
+ /**
608
+ * @description Retrieve a transaction identified by its unique id.
609
+
610
+ */
611
+
612
+ transaction:Transaction;
110
613
  }
111
614
 
112
- export interface PaymentsForInvoiceResponse {
113
- list:{transaction:Transaction}[];
114
- next_offset?:string;
615
+ export interface PaymentsForInvoiceResponse {
616
+ /**
617
+ * @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.
618
+
619
+ */
620
+
621
+ list:{transaction:Transaction}[];
622
+
623
+ /**
624
+ * @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.
625
+
626
+ */
627
+
628
+ next_offset?:string;
115
629
  }
116
630
  export interface PaymentsForInvoiceInputParam {
117
- [key : string]: any;
631
+ [key : string]: any;
632
+ /**
633
+ * @description The number of resources to be returned.
634
+
635
+ */
636
+
118
637
  limit?:number;
638
+
639
+ /**
640
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
641
+
642
+ */
643
+
119
644
  offset?:string;
120
645
  }
121
- export interface DeleteOfflineTransactionResponse {
122
- transaction:Transaction;
646
+ export interface DeleteOfflineTransactionResponse {
647
+ /**
648
+ * @description This API deletes an offline transaction. However, to delete an offline transaction all payment allocations associated with the transaction must be removed.
649
+
650
+ */
651
+
652
+ transaction:Transaction;
123
653
  }
124
654
  export interface DeleteOfflineTransactionInputParam {
655
+
656
+ /**
657
+ * @description Reason for deleting this transaction. This comment will be added to the associated entity.
658
+
659
+ */
660
+
125
661
  comment?:string;
126
662
  }
127
- export interface RefundResponse {
128
- transaction:Transaction;
663
+ export interface RefundResponse {
664
+ /**
665
+ * @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;.
666
+
667
+ */
668
+
669
+ transaction:Transaction;
129
670
  }
130
671
  export interface RefundInputParam {
672
+
673
+ /**
674
+ * @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.
675
+
676
+ */
677
+
131
678
  amount?:number;
679
+
680
+ /**
681
+ * @description Remarks, if any, on the refund.
682
+
683
+ */
684
+
132
685
  comment?:string;
133
686
  }
134
- export interface InvoiceTransaction {
687
+ export interface InvoiceTransaction {
135
688
  invoice_id?:string;
689
+
136
690
  applied_amount?:number;
691
+
137
692
  applied_at?:number;
693
+
138
694
  invoice_date?:number;
695
+
139
696
  invoice_total?:number;
697
+
140
698
  invoice_status?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
141
699
  }
142
- export interface CreditNoteTransaction {
700
+ export interface CreditNoteTransaction {
143
701
  cn_id?:string;
702
+
144
703
  applied_amount?:number;
704
+
145
705
  applied_at?:number;
706
+
146
707
  cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
708
+
147
709
  cn_create_reason_code?:string;
710
+
148
711
  cn_date?:number;
712
+
149
713
  cn_total?:number;
714
+
150
715
  cn_status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
716
+
151
717
  cn_reference_invoice_id?:string;
152
718
  }
153
- export interface TxnRefundsAndReversal {
719
+ export interface TxnRefundsAndReversal {
154
720
  txn_id?:string;
721
+
155
722
  txn_status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
723
+
156
724
  txn_date?:number;
725
+
157
726
  txn_amount?:number;
158
727
  }
159
- export interface LinkedPayment {
728
+ export interface LinkedPayment {
160
729
  id?:string;
730
+
161
731
  status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
732
+
162
733
  amount?:number;
734
+
163
735
  date?:number;
164
736
  }
165
737
  }