chargebee 2.28.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +59 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -14
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentReferenceNumber.d.ts +1 -1
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +655 -366
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +0 -116
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
- package/types/resources/Media.d.ts +0 -33
- package/types/resources/NonSubscription.d.ts +0 -65
|
@@ -38,7 +38,7 @@ declare module 'chargebee' {
|
|
|
38
38
|
payment_source_id?:string;
|
|
39
39
|
|
|
40
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 \*
|
|
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 \* apple_pay - Apple Pay \* wechat_pay - WeChat Pay \* bancontact - Bancontact \* 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) = `refund`. 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 \* dotpay - Dotpay \* alipay - Alipay \* sofort - Sofort \* giropay - giropay \* cash - Cash
|
|
42
42
|
|
|
43
43
|
*/
|
|
44
44
|
|
|
@@ -52,14 +52,14 @@ declare module 'chargebee' {
|
|
|
52
52
|
reference_number?:string;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* @description Gateway through which this transaction was done. Applicable only for 'Card' Payment Method \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \*
|
|
55
|
+
* @description Gateway through which this transaction was done. Applicable only for 'Card' 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. \* 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.
|
|
56
56
|
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
gateway:Gateway;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* @description Type of the transaction. \*
|
|
62
|
+
* @description Type of the transaction. \* authorization - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* payment - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* refund - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources). \* payment_reversal - Indicates a reversal transaction.
|
|
63
63
|
|
|
64
64
|
*/
|
|
65
65
|
|
|
@@ -108,21 +108,21 @@ declare module 'chargebee' {
|
|
|
108
108
|
id_at_gateway?:string;
|
|
109
109
|
|
|
110
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. \*
|
|
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 'error_code' and 'error_text' fields to know the reason for failure
|
|
112
112
|
|
|
113
113
|
*/
|
|
114
114
|
|
|
115
115
|
status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* @description Indicates whether or not the transaction has been identified as fraudulent. \*
|
|
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
119
|
|
|
120
120
|
*/
|
|
121
121
|
|
|
122
122
|
fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* @description Marker for on-session payments (3DS). null indicates 'merchant'. \*
|
|
125
|
+
* @description Marker for on-session payments (3DS). null indicates 'merchant'. \* merchant - Payment initiated on stored payment method by the merchant \* customer - Customer initiated 3DS payment
|
|
126
126
|
|
|
127
127
|
*/
|
|
128
128
|
|
|
@@ -306,39 +306,39 @@ declare module 'chargebee' {
|
|
|
306
306
|
export namespace Transaction {
|
|
307
307
|
export class TransactionResource {
|
|
308
308
|
/**
|
|
309
|
-
* @description
|
|
309
|
+
* @description Authorizes a specific amount in customer'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).
|
|
310
310
|
|
|
311
311
|
*/
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
create_authorization(input:CreateAuthorizationInputParam):ChargebeeRequest<CreateAuthorizationResponse>;
|
|
314
314
|
|
|
315
315
|
/**
|
|
316
|
-
* @description
|
|
316
|
+
* @description This API voids the specific authorization transaction in order to release the blocked funds from the customer's card. Voiding an already captured or voided transaction is not possible.
|
|
317
317
|
|
|
318
318
|
*/
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
void_transaction(transaction_id:string):ChargebeeRequest<VoidTransactionResponse>;
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
|
-
* @description
|
|
323
|
+
* @description Records a refund made offline. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`.
|
|
324
324
|
|
|
325
325
|
*/
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
record_refund(transaction_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* @description
|
|
330
|
+
* @description Refunds an online payment. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`. You can only refund a `transaction` whose [status](transactions#transaction_status)` ` is `success`.
|
|
331
331
|
|
|
332
332
|
*/
|
|
333
333
|
|
|
334
|
-
|
|
334
|
+
refund(transaction_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
* @description
|
|
337
|
+
* @description Lists all the transactions.
|
|
338
338
|
|
|
339
339
|
*/
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
344
|
* @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \& automatic) made for this invoice.
|
|
@@ -347,20 +347,57 @@ declare module 'chargebee' {
|
|
|
347
347
|
|
|
348
348
|
payments_for_invoice(invoice_id:string, input?:PaymentsForInvoiceInputParam):ChargebeeRequest<PaymentsForInvoiceResponse>;
|
|
349
349
|
|
|
350
|
+
/**
|
|
351
|
+
* @description Retrieve a transaction identified by its unique id.
|
|
352
|
+
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
retrieve(transaction_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
356
|
+
|
|
350
357
|
/**
|
|
351
358
|
* @description This API deletes an offline transaction. However, to delete an offline transaction all payment allocations associated with the transaction must be removed.
|
|
352
359
|
|
|
353
360
|
*/
|
|
354
361
|
|
|
355
362
|
delete_offline_transaction(transaction_id:string, input?:DeleteOfflineTransactionInputParam):ChargebeeRequest<DeleteOfflineTransactionResponse>;
|
|
363
|
+
}
|
|
364
|
+
export interface CreateAuthorizationResponse {
|
|
365
|
+
transaction:Transaction;
|
|
366
|
+
}
|
|
367
|
+
export interface CreateAuthorizationInputParam {
|
|
356
368
|
|
|
357
369
|
/**
|
|
358
|
-
* @description
|
|
370
|
+
* @description Identifier of the customer.
|
|
359
371
|
|
|
360
372
|
*/
|
|
361
|
-
|
|
362
|
-
|
|
373
|
+
|
|
374
|
+
customer_id:string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @description Payment source to be used for authorizing the transaction.
|
|
378
|
+
|
|
379
|
+
*/
|
|
380
|
+
|
|
381
|
+
payment_source_id?:string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* @description The currency code (ISO 4217 format) of the transaction amount.
|
|
385
|
+
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
currency_code?:string;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @description The amount to be blocked.
|
|
392
|
+
|
|
393
|
+
*/
|
|
394
|
+
|
|
395
|
+
amount:number;
|
|
396
|
+
}
|
|
397
|
+
export interface VoidTransactionResponse {
|
|
398
|
+
transaction:Transaction;
|
|
363
399
|
}
|
|
400
|
+
|
|
364
401
|
export interface RecordRefundResponse {
|
|
365
402
|
transaction:Transaction;
|
|
366
403
|
}
|
|
@@ -374,7 +411,7 @@ declare module 'chargebee' {
|
|
|
374
411
|
amount?:number;
|
|
375
412
|
|
|
376
413
|
/**
|
|
377
|
-
* @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) = `refund`. 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
|
|
414
|
+
* @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) = `refund`. 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
|
|
378
415
|
|
|
379
416
|
*/
|
|
380
417
|
|
|
@@ -401,6 +438,25 @@ declare module 'chargebee' {
|
|
|
401
438
|
|
|
402
439
|
comment?:string;
|
|
403
440
|
}
|
|
441
|
+
export interface RefundResponse {
|
|
442
|
+
transaction:Transaction;
|
|
443
|
+
}
|
|
444
|
+
export interface RefundInputParam {
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @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.
|
|
448
|
+
|
|
449
|
+
*/
|
|
450
|
+
|
|
451
|
+
amount?:number;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @description Remarks, if any, on the refund.
|
|
455
|
+
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
comment?:string;
|
|
459
|
+
}
|
|
404
460
|
export interface ListResponse {
|
|
405
461
|
/**
|
|
406
462
|
* @description Lists all the transactions.
|
|
@@ -419,126 +475,126 @@ declare module 'chargebee' {
|
|
|
419
475
|
export interface ListInputParam {
|
|
420
476
|
[key : string]: any;
|
|
421
477
|
/**
|
|
422
|
-
* @description
|
|
478
|
+
* @description Lists all the transactions.
|
|
423
479
|
|
|
424
480
|
*/
|
|
425
481
|
|
|
426
482
|
limit?:number;
|
|
427
483
|
|
|
428
484
|
/**
|
|
429
|
-
* @description
|
|
485
|
+
* @description Lists all the transactions.
|
|
430
486
|
|
|
431
487
|
*/
|
|
432
488
|
|
|
433
489
|
offset?:string;
|
|
434
490
|
|
|
435
491
|
/**
|
|
436
|
-
* @description
|
|
492
|
+
* @description Lists all the transactions.
|
|
437
493
|
|
|
438
494
|
*/
|
|
439
495
|
|
|
440
496
|
include_deleted?:boolean;
|
|
441
497
|
|
|
442
498
|
/**
|
|
443
|
-
* @description
|
|
499
|
+
* @description Lists all the transactions.
|
|
444
500
|
|
|
445
501
|
*/
|
|
446
502
|
|
|
447
503
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
448
504
|
|
|
449
505
|
/**
|
|
450
|
-
* @description
|
|
506
|
+
* @description Lists all the transactions.
|
|
451
507
|
|
|
452
508
|
*/
|
|
453
509
|
|
|
454
510
|
customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
455
511
|
|
|
456
512
|
/**
|
|
457
|
-
* @description
|
|
513
|
+
* @description Lists all the transactions.
|
|
458
514
|
|
|
459
515
|
*/
|
|
460
516
|
|
|
461
517
|
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
462
518
|
|
|
463
519
|
/**
|
|
464
|
-
* @description
|
|
520
|
+
* @description Lists all the transactions.
|
|
465
521
|
|
|
466
522
|
*/
|
|
467
523
|
|
|
468
524
|
payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
469
525
|
|
|
470
526
|
/**
|
|
471
|
-
* @description
|
|
527
|
+
* @description Lists all the transactions.
|
|
472
528
|
|
|
473
529
|
*/
|
|
474
530
|
|
|
475
|
-
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};
|
|
531
|
+
payment_method?:{in?:string,is?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | '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' | '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};
|
|
476
532
|
|
|
477
533
|
/**
|
|
478
|
-
* @description
|
|
534
|
+
* @description Lists all the transactions.
|
|
479
535
|
|
|
480
536
|
*/
|
|
481
537
|
|
|
482
|
-
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};
|
|
538
|
+
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' | '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' | '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};
|
|
483
539
|
|
|
484
540
|
/**
|
|
485
|
-
* @description
|
|
541
|
+
* @description Lists all the transactions.
|
|
486
542
|
|
|
487
543
|
*/
|
|
488
544
|
|
|
489
545
|
gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
490
546
|
|
|
491
547
|
/**
|
|
492
|
-
* @description
|
|
548
|
+
* @description Lists all the transactions.
|
|
493
549
|
|
|
494
550
|
*/
|
|
495
551
|
|
|
496
552
|
id_at_gateway?:{is?:string,is_not?:string,starts_with?:string};
|
|
497
553
|
|
|
498
554
|
/**
|
|
499
|
-
* @description
|
|
555
|
+
* @description Lists all the transactions.
|
|
500
556
|
|
|
501
557
|
*/
|
|
502
558
|
|
|
503
559
|
reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
504
560
|
|
|
505
561
|
/**
|
|
506
|
-
* @description
|
|
562
|
+
* @description Lists all the transactions.
|
|
507
563
|
|
|
508
564
|
*/
|
|
509
565
|
|
|
510
566
|
type?:{in?:string,is?:'authorization' | 'payment_reversal' | 'payment' | 'refund',is_not?:'authorization' | 'payment_reversal' | 'payment' | 'refund',not_in?:string};
|
|
511
567
|
|
|
512
568
|
/**
|
|
513
|
-
* @description
|
|
569
|
+
* @description Lists all the transactions.
|
|
514
570
|
|
|
515
571
|
*/
|
|
516
572
|
|
|
517
573
|
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
518
574
|
|
|
519
575
|
/**
|
|
520
|
-
* @description
|
|
576
|
+
* @description Lists all the transactions.
|
|
521
577
|
|
|
522
578
|
*/
|
|
523
579
|
|
|
524
580
|
amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
525
581
|
|
|
526
582
|
/**
|
|
527
|
-
* @description
|
|
583
|
+
* @description Lists all the transactions.
|
|
528
584
|
|
|
529
585
|
*/
|
|
530
586
|
|
|
531
587
|
amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
532
588
|
|
|
533
589
|
/**
|
|
534
|
-
* @description
|
|
590
|
+
* @description Lists all the transactions.
|
|
535
591
|
|
|
536
592
|
*/
|
|
537
593
|
|
|
538
594
|
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};
|
|
539
595
|
|
|
540
596
|
/**
|
|
541
|
-
* @description
|
|
597
|
+
* @description Lists all the transactions.
|
|
542
598
|
|
|
543
599
|
*/
|
|
544
600
|
|
|
@@ -551,47 +607,6 @@ declare module 'chargebee' {
|
|
|
551
607
|
|
|
552
608
|
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
553
609
|
}
|
|
554
|
-
export interface VoidTransactionResponse {
|
|
555
|
-
transaction:Transaction;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
export interface CreateAuthorizationResponse {
|
|
559
|
-
transaction:Transaction;
|
|
560
|
-
}
|
|
561
|
-
export interface CreateAuthorizationInputParam {
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* @description Identifier of the customer.
|
|
565
|
-
|
|
566
|
-
*/
|
|
567
|
-
|
|
568
|
-
customer_id:string;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* @description Payment source to be used for authorizing the transaction.
|
|
572
|
-
|
|
573
|
-
*/
|
|
574
|
-
|
|
575
|
-
payment_source_id?:string;
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* @description The currency code (ISO 4217 format) of the transaction amount.
|
|
579
|
-
|
|
580
|
-
*/
|
|
581
|
-
|
|
582
|
-
currency_code?:string;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* @description The amount to be blocked.
|
|
586
|
-
|
|
587
|
-
*/
|
|
588
|
-
|
|
589
|
-
amount:number;
|
|
590
|
-
}
|
|
591
|
-
export interface RetrieveResponse {
|
|
592
|
-
transaction:Transaction;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
610
|
export interface PaymentsForInvoiceResponse {
|
|
596
611
|
/**
|
|
597
612
|
* @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \& automatic) made for this invoice.
|
|
@@ -610,19 +625,23 @@ declare module 'chargebee' {
|
|
|
610
625
|
export interface PaymentsForInvoiceInputParam {
|
|
611
626
|
[key : string]: any;
|
|
612
627
|
/**
|
|
613
|
-
* @description
|
|
628
|
+
* @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \& automatic) made for this invoice.
|
|
614
629
|
|
|
615
630
|
*/
|
|
616
631
|
|
|
617
632
|
limit?:number;
|
|
618
633
|
|
|
619
634
|
/**
|
|
620
|
-
* @description
|
|
635
|
+
* @description Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \& automatic) made for this invoice.
|
|
621
636
|
|
|
622
637
|
*/
|
|
623
638
|
|
|
624
639
|
offset?:string;
|
|
625
640
|
}
|
|
641
|
+
export interface RetrieveResponse {
|
|
642
|
+
transaction:Transaction;
|
|
643
|
+
}
|
|
644
|
+
|
|
626
645
|
export interface DeleteOfflineTransactionResponse {
|
|
627
646
|
transaction:Transaction;
|
|
628
647
|
}
|
|
@@ -635,73 +654,171 @@ declare module 'chargebee' {
|
|
|
635
654
|
|
|
636
655
|
comment?:string;
|
|
637
656
|
}
|
|
638
|
-
export interface
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
export interface RefundInputParam {
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* @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.
|
|
657
|
+
export interface InvoiceTransaction {
|
|
658
|
+
/**
|
|
659
|
+
* @description Identifier for the invoice.
|
|
645
660
|
|
|
646
|
-
|
|
661
|
+
*/
|
|
647
662
|
|
|
648
|
-
|
|
663
|
+
invoice_id:string;
|
|
649
664
|
|
|
650
|
-
|
|
651
|
-
|
|
665
|
+
/**
|
|
666
|
+
* @description The transaction amount applied to this invoice
|
|
652
667
|
|
|
653
|
-
|
|
668
|
+
*/
|
|
654
669
|
|
|
655
|
-
|
|
656
|
-
}
|
|
657
|
-
export interface InvoiceTransaction {
|
|
658
|
-
invoice_id?:string;
|
|
670
|
+
applied_amount:number;
|
|
659
671
|
|
|
660
|
-
|
|
672
|
+
/**
|
|
673
|
+
* @description Timestamp at which the transaction is applied.
|
|
674
|
+
|
|
675
|
+
*/
|
|
676
|
+
|
|
677
|
+
applied_at:number;
|
|
661
678
|
|
|
662
|
-
|
|
679
|
+
/**
|
|
680
|
+
* @description The date this invoice is issued.
|
|
681
|
+
|
|
682
|
+
*/
|
|
663
683
|
|
|
664
684
|
invoice_date?:number;
|
|
665
685
|
|
|
686
|
+
/**
|
|
687
|
+
* @description Total amount of the invoice
|
|
688
|
+
|
|
689
|
+
*/
|
|
690
|
+
|
|
666
691
|
invoice_total?:number;
|
|
667
692
|
|
|
668
|
-
|
|
693
|
+
/**
|
|
694
|
+
* @description Current status of this invoice. \* pending -
|
|
695
|
+
The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`.
|
|
696
|
+
The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` 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.
|
|
697
|
+
|
|
698
|
+
*/
|
|
699
|
+
|
|
700
|
+
invoice_status:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
|
|
669
701
|
}
|
|
670
702
|
export interface CreditNoteTransaction {
|
|
671
|
-
|
|
703
|
+
/**
|
|
704
|
+
* @description Identifier for the credit-notes.
|
|
705
|
+
|
|
706
|
+
*/
|
|
707
|
+
|
|
708
|
+
cn_id:string;
|
|
672
709
|
|
|
673
|
-
|
|
710
|
+
/**
|
|
711
|
+
* @description The transaction amount applied to this invoice
|
|
712
|
+
|
|
713
|
+
*/
|
|
674
714
|
|
|
675
|
-
|
|
715
|
+
applied_amount:number;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @description Timestamp at which the transaction is applied.
|
|
719
|
+
|
|
720
|
+
*/
|
|
721
|
+
|
|
722
|
+
applied_at:number;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* @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
|
|
726
|
+
|
|
727
|
+
*/
|
|
676
728
|
|
|
677
729
|
cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
|
|
678
730
|
|
|
731
|
+
/**
|
|
732
|
+
* @description Credit note reason code
|
|
733
|
+
|
|
734
|
+
*/
|
|
735
|
+
|
|
679
736
|
cn_create_reason_code?:string;
|
|
680
737
|
|
|
738
|
+
/**
|
|
739
|
+
* @description The date this credit note is created.
|
|
740
|
+
|
|
741
|
+
*/
|
|
742
|
+
|
|
681
743
|
cn_date?:number;
|
|
682
744
|
|
|
745
|
+
/**
|
|
746
|
+
* @description Total amount of the credit note
|
|
747
|
+
|
|
748
|
+
*/
|
|
749
|
+
|
|
683
750
|
cn_total?:number;
|
|
684
751
|
|
|
685
|
-
|
|
752
|
+
/**
|
|
753
|
+
* @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.
|
|
754
|
+
|
|
755
|
+
*/
|
|
756
|
+
|
|
757
|
+
cn_status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
686
758
|
|
|
687
|
-
|
|
759
|
+
/**
|
|
760
|
+
* @description The invoice number. Acts as a identifier for invoice and typically generated sequentially.
|
|
761
|
+
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
cn_reference_invoice_id:string;
|
|
688
765
|
}
|
|
689
766
|
export interface TxnRefundsAndReversal {
|
|
690
|
-
|
|
767
|
+
/**
|
|
768
|
+
* @description Uniquely identifies the transaction.
|
|
769
|
+
|
|
770
|
+
*/
|
|
691
771
|
|
|
692
|
-
|
|
772
|
+
txn_id:string;
|
|
693
773
|
|
|
694
|
-
|
|
774
|
+
/**
|
|
775
|
+
* @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 'error_code' and 'error_text' 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.
|
|
776
|
+
|
|
777
|
+
*/
|
|
778
|
+
|
|
779
|
+
txn_status:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
695
780
|
|
|
696
|
-
|
|
781
|
+
/**
|
|
782
|
+
* @description Indicates when this refund occured.
|
|
783
|
+
|
|
784
|
+
*/
|
|
785
|
+
|
|
786
|
+
txn_date:number;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @description Amount of this refund transaction.
|
|
790
|
+
|
|
791
|
+
*/
|
|
792
|
+
|
|
793
|
+
txn_amount:number;
|
|
697
794
|
}
|
|
698
795
|
export interface LinkedPayment {
|
|
699
|
-
|
|
796
|
+
/**
|
|
797
|
+
* @description Uniquely identifies the transaction.
|
|
798
|
+
|
|
799
|
+
*/
|
|
800
|
+
|
|
801
|
+
id:string;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @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 'error_code' and 'error_text' fields to know the reason for failure \* timeout - Transaction failed because of Gateway not accepting the connection.
|
|
805
|
+
|
|
806
|
+
*/
|
|
700
807
|
|
|
701
808
|
status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
702
809
|
|
|
810
|
+
/**
|
|
811
|
+
* @description Amount for this transaction.
|
|
812
|
+
|
|
813
|
+
*/
|
|
814
|
+
|
|
703
815
|
amount?:number;
|
|
704
816
|
|
|
817
|
+
/**
|
|
818
|
+
* @description Indicates when this transaction occurred.
|
|
819
|
+
|
|
820
|
+
*/
|
|
821
|
+
|
|
705
822
|
date?:number;
|
|
706
823
|
}
|
|
707
824
|
}
|