chargebee 2.43.0 → 2.44.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/CHANGELOG.md +59 -0
- package/README.md +3 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +40 -0
- package/package.json +1 -1
- package/types/core.d.ts +2 -2
- package/types/index.d.ts +5 -0
- package/types/resources/AttachedItem.d.ts +4 -0
- package/types/resources/Card.d.ts +4 -0
- package/types/resources/Coupon.d.ts +204 -522
- package/types/resources/Customer.d.ts +2 -2
- package/types/resources/DifferentialPrice.d.ts +4 -0
- package/types/resources/Export.d.ts +16 -0
- package/types/resources/Invoice.d.ts +2 -2
- package/types/resources/Item.d.ts +17 -0
- package/types/resources/ItemFamily.d.ts +25 -100
- package/types/resources/ItemPrice.d.ts +17 -0
- package/types/resources/OmnichannelSubscription.d.ts +96 -0
- package/types/resources/OmnichannelTransaction.d.ts +26 -0
- package/types/resources/PaymentScheduleScheme.d.ts +3 -1
- package/types/resources/PaymentSource.d.ts +1 -1
- package/types/resources/PriceVariant.d.ts +6 -0
- package/types/resources/RecordedPurchase.d.ts +56 -0
- package/types/resources/Subscription.d.ts +728 -3248
- package/types/resources/Transaction.d.ts +99 -581
|
@@ -1,410 +1,137 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Transaction {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Uniquely identifies the transaction.
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Identifier of the customer for which this transaction is made
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
customer_id?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Identifier of the subscription for which this transaction is made.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
subscription_id?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The gateway account used for this transaction
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
gateway_account_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Identifier of the payment source for which this transaction is made
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
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) = `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 \* pay_to - PayTo \* dotpay - Dotpay \* alipay - Alipay \* sofort - Sofort \* giropay - giropay \* cash - Cash
|
|
42
16
|
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
17
|
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) = `check`.
|
|
49
18
|
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
19
|
reference_number?:string;
|
|
53
|
-
|
|
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. \* 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
20
|
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
21
|
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'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
22
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
type:'authorization' | 'payment_reversal' | 'payment' | 'refund';
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Indicates when this transaction occurred.
|
|
23
|
+
type:'authorization' | 'payment' | 'refund' | 'payment_reversal';
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
date?:number;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Indicates the time at which the final status of the transaction has been marked.
|
|
77
26
|
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
27
|
settled_at?:number;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Exchange rate used for base currency conversion
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
exchange_rate?:number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description The currency code (ISO 4217 format) for the transaction.
|
|
91
30
|
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
31
|
currency_code:string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description Amount for this transaction.
|
|
98
32
|
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
33
|
amount?:number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description The id with which this transaction is referred in gateway.
|
|
105
34
|
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
35
|
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 'error_code' and 'error_text' fields to know the reason for failure
|
|
112
36
|
|
|
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
|
|
37
|
+
status?:'in_progress' | 'success' | 'voided' | 'failure' | 'timeout' | 'needs_attention' | 'late_failure';
|
|
119
38
|
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
39
|
fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
|
|
123
|
-
|
|
124
|
-
/**
|
|
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
40
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
initiator_type?:'merchant' | 'customer';
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description Indicates whether this transaction has gone through 3DS. Applicable only for 'on-session' payments \& verifications.If 3DS is not enforced by the gateway/bank or if the customers' card is not enrolled, this will be false.
|
|
41
|
+
initiator_type?:'customer' | 'merchant';
|
|
133
42
|
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
43
|
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
44
|
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
45
|
authorization_reason?:'blocking_funds' | 'verification';
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description Error code received from the payment gateway on failure.
|
|
147
46
|
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
47
|
error_code?:string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Error message received from the payment gateway on failure.
|
|
154
48
|
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
49
|
error_text?:string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Timestamp indicating when the payment was voided or authorization expired at gateway.
|
|
161
50
|
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
51
|
voided_at?:number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @description Version number of this resource. The `resource_version` 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
52
|
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
53
|
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
54
|
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
55
|
updated_at?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description Short description why the transaction was marked as fraud/suspicious
|
|
182
56
|
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
57
|
fraud_reason?:string;
|
|
186
|
-
|
|
58
|
+
|
|
187
59
|
custom_payment_method_id?:string;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @description This is the part of the `amount` 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 `type` = `payment`.
|
|
191
60
|
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
61
|
amount_unused?:number;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* @description The masked card number used for this transaction. Applicable only for 'Card' Payment Method
|
|
198
62
|
|
|
199
|
-
*/
|
|
200
|
-
|
|
201
63
|
masked_card_number?:string;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @description This is the `id` of the offline transaction that is being refunded or reversed. Applicable only for transaction of `type` = `refund` or `payment_reversal`.
|
|
205
64
|
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
65
|
reference_transaction_id?:string;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* @description This is the `id` of the transaction (always of `type` = `payment`) being refunded. Applicable only for transaction of `type` = `refund`.
|
|
212
66
|
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
67
|
refunded_txn_id?:string;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @description This is the `id` of the transaction (always of `type` = `authorization`) which authorizes the payment being captured. Applicable only for transaction of `type` = `payment`.
|
|
219
68
|
|
|
220
|
-
*/
|
|
221
|
-
|
|
222
69
|
reference_authorization_id?:string;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* @description This is the part of the authorized `amount` that is yet to be captured. The payment capture is recorded as a transaction of of `type` = `payment`. Applicable only for a transaction of `type` = `authorization`.
|
|
226
70
|
|
|
227
|
-
*/
|
|
228
|
-
|
|
229
71
|
amount_capturable?:number;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @description Reversal transaction id. Applicable only for payment transactions.
|
|
233
72
|
|
|
234
|
-
*/
|
|
235
|
-
|
|
236
73
|
reversal_transaction_id?:string;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* @description Indicates that this resource has been deleted.
|
|
240
74
|
|
|
241
|
-
|
|
242
|
-
|
|
75
|
+
linked_invoices?:Transaction.LinkedInvoice[];
|
|
76
|
+
|
|
77
|
+
linked_credit_notes?:Transaction.LinkedCreditNote[];
|
|
78
|
+
|
|
79
|
+
linked_refunds?:Transaction.LinkedRefund[];
|
|
80
|
+
|
|
81
|
+
linked_payments?:Transaction.LinkedPayment[];
|
|
82
|
+
|
|
243
83
|
deleted:boolean;
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* @description First 6 digits of the card payment method.
|
|
247
84
|
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
85
|
iin?:string;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* @description Last 4 digits of the card payment method.
|
|
254
86
|
|
|
255
|
-
*/
|
|
256
|
-
|
|
257
87
|
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
88
|
|
|
262
|
-
*/
|
|
263
|
-
|
|
264
89
|
merchant_reference_id?:string;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @description The unique ID of the [business entity](/docs/api?prod_cat_ver=2#mbe) of this `transaction`. This is always the same as the business entity of the [customer](/docs/api/transactions?prod_cat_ver=2#transaction_customer_id).
|
|
268
90
|
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
91
|
business_entity_id?:string;
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* @description Payment method details of the corresponding transaction
|
|
275
92
|
|
|
276
|
-
*/
|
|
277
|
-
|
|
278
93
|
payment_method_details?:string;
|
|
279
|
-
|
|
280
|
-
custom_payment_method_name?:string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @description Applicable only for 'Payment' transactions. The list of invoices this 'payment' transaction is applied to.
|
|
284
|
-
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
linked_invoices?:Transaction.InvoiceTransaction[];
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @description Applicable only for 'Refund' transactions. The list of Credit Notes this 'refund' 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
94
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
linked_refunds?:Transaction.TxnRefundsAndReversal[];
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* @description The list of payments captured for this authorization transaction.
|
|
95
|
+
error_detail?:Transaction.GatewayErrorDetail;
|
|
305
96
|
|
|
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)
|
|
97
|
+
custom_payment_method_name?:string;
|
|
312
98
|
|
|
313
|
-
*/
|
|
314
|
-
|
|
315
|
-
error_detail?:Transaction.GatewayErrorDetail;
|
|
316
99
|
}
|
|
317
100
|
export namespace Transaction {
|
|
318
101
|
export class TransactionResource {
|
|
319
|
-
/**
|
|
320
|
-
* @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).
|
|
321
|
-
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
102
|
create_authorization(input:CreateAuthorizationInputParam):ChargebeeRequest<CreateAuthorizationResponse>;
|
|
325
103
|
|
|
326
|
-
/**
|
|
327
|
-
* @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.
|
|
328
|
-
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
104
|
void_transaction(transaction_id:string):ChargebeeRequest<VoidTransactionResponse>;
|
|
332
105
|
|
|
333
|
-
/**
|
|
334
|
-
* @description Records a refund made offline. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`.
|
|
335
|
-
|
|
336
|
-
*/
|
|
337
|
-
|
|
338
106
|
record_refund(transaction_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
|
|
339
107
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
*/
|
|
344
|
-
|
|
108
|
+
reconcile(transaction_id:string, input?:ReconcileInputParam):ChargebeeRequest<ReconcileResponse>;
|
|
109
|
+
|
|
345
110
|
refund(transaction_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
|
|
346
111
|
|
|
347
|
-
/**
|
|
348
|
-
* @description Lists all the transactions.
|
|
349
|
-
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
112
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
353
113
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
114
|
+
transactions_for_customer(customer_id:string, input?:TransactionsForCustomerInputParam):ChargebeeRequest<TransactionsForCustomerResponse>;
|
|
115
|
+
|
|
116
|
+
transactions_for_subscription(subscription_id:string, input?:TransactionsForSubscriptionInputParam):ChargebeeRequest<TransactionsForSubscriptionResponse>;
|
|
117
|
+
|
|
359
118
|
payments_for_invoice(invoice_id:string, input?:PaymentsForInvoiceInputParam):ChargebeeRequest<PaymentsForInvoiceResponse>;
|
|
360
119
|
|
|
361
|
-
/**
|
|
362
|
-
* @description Retrieve a transaction identified by its unique id.
|
|
363
|
-
|
|
364
|
-
*/
|
|
365
|
-
|
|
366
120
|
retrieve(transaction_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
367
121
|
|
|
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
122
|
delete_offline_transaction(transaction_id:string, input?:DeleteOfflineTransactionInputParam):ChargebeeRequest<DeleteOfflineTransactionResponse>;
|
|
374
|
-
|
|
375
|
-
reconcile(transaction_id:string, input?:ReconcileInputParam):ChargebeeRequest<ReconcileResponse>;
|
|
376
123
|
}
|
|
377
124
|
export interface CreateAuthorizationResponse {
|
|
378
125
|
transaction:Transaction;
|
|
379
126
|
}
|
|
380
127
|
export interface CreateAuthorizationInputParam {
|
|
381
128
|
|
|
382
|
-
/**
|
|
383
|
-
* @description Identifier of the customer.
|
|
384
|
-
|
|
385
|
-
*/
|
|
386
|
-
|
|
387
129
|
customer_id:string;
|
|
388
130
|
|
|
389
|
-
/**
|
|
390
|
-
* @description Payment source to be used for authorizing the transaction.
|
|
391
|
-
|
|
392
|
-
*/
|
|
393
|
-
|
|
394
131
|
payment_source_id?:string;
|
|
395
132
|
|
|
396
|
-
/**
|
|
397
|
-
* @description The currency code (ISO 4217 format) of the transaction amount.
|
|
398
|
-
|
|
399
|
-
*/
|
|
400
|
-
|
|
401
133
|
currency_code?:string;
|
|
402
134
|
|
|
403
|
-
/**
|
|
404
|
-
* @description The amount to be blocked.
|
|
405
|
-
|
|
406
|
-
*/
|
|
407
|
-
|
|
408
135
|
amount:number;
|
|
409
136
|
}
|
|
410
137
|
export interface VoidTransactionResponse {
|
|
@@ -416,254 +143,231 @@ declare module 'chargebee' {
|
|
|
416
143
|
}
|
|
417
144
|
export interface RecordRefundInputParam {
|
|
418
145
|
|
|
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
146
|
amount?:number;
|
|
425
147
|
|
|
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) = `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
|
|
428
|
-
|
|
429
|
-
*/
|
|
430
|
-
|
|
431
148
|
payment_method:PaymentMethod;
|
|
432
149
|
|
|
433
|
-
/**
|
|
434
|
-
* @description The date when the refund was made.
|
|
435
|
-
|
|
436
|
-
*/
|
|
437
|
-
|
|
438
150
|
date:number;
|
|
439
151
|
|
|
440
|
-
/**
|
|
441
|
-
* @description The reference number for this transaction. For example, the check number when `payment_method` = `check`.
|
|
442
|
-
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
152
|
reference_number?:string;
|
|
446
153
|
|
|
447
|
-
/**
|
|
448
|
-
* @description Records a refund made offline. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`.
|
|
449
|
-
|
|
450
|
-
*/
|
|
451
|
-
|
|
452
154
|
custom_payment_method_id?:string;
|
|
453
155
|
|
|
454
|
-
/**
|
|
455
|
-
* @description Remarks, if any, on the refund.
|
|
456
|
-
|
|
457
|
-
*/
|
|
458
|
-
|
|
459
156
|
comment?:string;
|
|
460
157
|
}
|
|
158
|
+
export interface ReconcileResponse {
|
|
159
|
+
transaction:Transaction;
|
|
160
|
+
}
|
|
161
|
+
export interface ReconcileInputParam {
|
|
162
|
+
|
|
163
|
+
id_at_gateway?:string;
|
|
164
|
+
|
|
165
|
+
customer_id?:string;
|
|
166
|
+
|
|
167
|
+
status?:'success' | 'failure';
|
|
168
|
+
}
|
|
461
169
|
export interface RefundResponse {
|
|
462
170
|
transaction:Transaction;
|
|
463
171
|
}
|
|
464
172
|
export interface RefundInputParam {
|
|
465
173
|
|
|
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
|
-
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
174
|
amount?:number;
|
|
472
175
|
|
|
473
|
-
/**
|
|
474
|
-
* @description Remarks, if any, on the refund.
|
|
475
|
-
|
|
476
|
-
*/
|
|
477
|
-
|
|
478
176
|
comment?:string;
|
|
479
177
|
}
|
|
480
178
|
export interface ListResponse {
|
|
481
|
-
/**
|
|
482
|
-
* @description Lists all the transactions.
|
|
483
|
-
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
179
|
list:{transaction:Transaction}[];
|
|
487
180
|
|
|
488
|
-
/**
|
|
489
|
-
* @description Lists all the transactions.
|
|
490
|
-
|
|
491
|
-
*/
|
|
492
|
-
|
|
493
181
|
next_offset?:string;
|
|
494
182
|
}
|
|
495
183
|
export interface ListInputParam {
|
|
496
184
|
[key : string]: any;
|
|
497
185
|
/**
|
|
498
|
-
* @description
|
|
186
|
+
* @description The number of resources to be returned.
|
|
499
187
|
|
|
500
188
|
*/
|
|
501
189
|
|
|
502
190
|
limit?:number;
|
|
503
191
|
|
|
504
192
|
/**
|
|
505
|
-
* @description
|
|
193
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
506
194
|
|
|
507
195
|
*/
|
|
508
196
|
|
|
509
197
|
offset?:string;
|
|
510
198
|
|
|
511
199
|
/**
|
|
512
|
-
* @description
|
|
200
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
513
201
|
|
|
514
202
|
*/
|
|
515
203
|
|
|
516
204
|
include_deleted?:boolean;
|
|
517
205
|
|
|
518
206
|
/**
|
|
519
|
-
* @description
|
|
207
|
+
* @description Uniquely identifies the transaction.
|
|
520
208
|
|
|
521
209
|
*/
|
|
522
210
|
|
|
523
211
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
524
212
|
|
|
525
213
|
/**
|
|
526
|
-
* @description
|
|
214
|
+
* @description Identifier of the customer for which this transaction is made
|
|
527
215
|
|
|
528
216
|
*/
|
|
529
217
|
|
|
530
218
|
customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
531
219
|
|
|
532
220
|
/**
|
|
533
|
-
* @description
|
|
221
|
+
* @description Identifier of the subscription for which this transaction is made.
|
|
534
222
|
|
|
535
223
|
*/
|
|
536
224
|
|
|
537
225
|
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
538
226
|
|
|
539
227
|
/**
|
|
540
|
-
* @description
|
|
228
|
+
* @description To filter based on Transaction payment source id.
|
|
541
229
|
|
|
542
230
|
*/
|
|
543
231
|
|
|
544
232
|
payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
545
233
|
|
|
546
234
|
/**
|
|
547
|
-
* @description
|
|
235
|
+
* @description The payment method of this transaction
|
|
548
236
|
|
|
549
237
|
*/
|
|
550
238
|
|
|
551
|
-
payment_method?:{in?:string,is?:'
|
|
239
|
+
payment_method?:{in?:string,is?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland',is_not?:'card' | 'cash' | 'check' | 'chargeback' | 'bank_transfer' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'other' | 'upi' | 'netbanking_emandates' | 'custom' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland',not_in?:string};
|
|
552
240
|
|
|
553
241
|
/**
|
|
554
|
-
* @description
|
|
242
|
+
* @description Gateway through which this transaction was done. Applicable only for 'Card' Payment Method
|
|
555
243
|
|
|
556
244
|
*/
|
|
557
245
|
|
|
558
|
-
gateway?:{in?:string,is?:'
|
|
246
|
+
gateway?:{in?:string,is?:'chargebee' | 'chargebee_payments' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'adyen' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'not_applicable',is_not?:'chargebee' | 'chargebee_payments' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'gocardless' | 'adyen' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'not_applicable',not_in?:string};
|
|
559
247
|
|
|
560
248
|
/**
|
|
561
|
-
* @description
|
|
249
|
+
* @description The gateway account used for this transaction
|
|
562
250
|
|
|
563
251
|
*/
|
|
564
252
|
|
|
565
253
|
gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
566
254
|
|
|
567
255
|
/**
|
|
568
|
-
* @description
|
|
256
|
+
* @description The id with which this transaction is referred in gateway.
|
|
569
257
|
|
|
570
258
|
*/
|
|
571
259
|
|
|
572
260
|
id_at_gateway?:{is?:string,is_not?:string,starts_with?:string};
|
|
573
261
|
|
|
574
262
|
/**
|
|
575
|
-
* @description
|
|
263
|
+
* @description The reference number for this transaction. For example, the check number when [payment_method](transactions#transaction_payment_method) = `check`.
|
|
576
264
|
|
|
577
265
|
*/
|
|
578
266
|
|
|
579
267
|
reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
580
268
|
|
|
581
269
|
/**
|
|
582
|
-
* @description
|
|
270
|
+
* @description Type of the transaction.
|
|
583
271
|
|
|
584
272
|
*/
|
|
585
273
|
|
|
586
|
-
type?:{in?:string,is?:'authorization' | '
|
|
274
|
+
type?:{in?:string,is?:'authorization' | 'payment' | 'refund' | 'payment_reversal',is_not?:'authorization' | 'payment' | 'refund' | 'payment_reversal',not_in?:string};
|
|
587
275
|
|
|
588
276
|
/**
|
|
589
|
-
* @description
|
|
277
|
+
* @description Indicates when this transaction occurred.
|
|
590
278
|
|
|
591
279
|
*/
|
|
592
280
|
|
|
593
281
|
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
594
282
|
|
|
595
283
|
/**
|
|
596
|
-
* @description
|
|
284
|
+
* @description Amount for this transaction.
|
|
597
285
|
|
|
598
286
|
*/
|
|
599
287
|
|
|
600
288
|
amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
601
289
|
|
|
602
290
|
/**
|
|
603
|
-
* @description
|
|
291
|
+
* @description To filter based on transaction's unused authorized/blocked amount.
|
|
604
292
|
|
|
605
293
|
*/
|
|
606
294
|
|
|
607
295
|
amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
608
296
|
|
|
609
297
|
/**
|
|
610
|
-
* @description
|
|
298
|
+
* @description The status of this transaction.
|
|
611
299
|
|
|
612
300
|
*/
|
|
613
301
|
|
|
614
|
-
status?:{in?:string,is?:'in_progress' | 'success' | '
|
|
302
|
+
status?:{in?:string,is?:'in_progress' | 'success' | 'voided' | 'failure' | 'timeout' | 'needs_attention' | 'late_failure',is_not?:'in_progress' | 'success' | 'voided' | 'failure' | 'timeout' | 'needs_attention' | 'late_failure',not_in?:string};
|
|
615
303
|
|
|
616
304
|
/**
|
|
617
|
-
* @description
|
|
305
|
+
* @description To filter based on `updated_at`. 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 `sort_by` input parameter as `updated_at` for a faster response.
|
|
618
306
|
|
|
619
307
|
*/
|
|
620
308
|
|
|
621
309
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
622
310
|
|
|
311
|
+
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
312
|
+
}
|
|
313
|
+
export interface TransactionsForCustomerResponse {
|
|
314
|
+
list:{transaction:Transaction}[];
|
|
315
|
+
|
|
316
|
+
next_offset?:string;
|
|
317
|
+
}
|
|
318
|
+
export interface TransactionsForCustomerInputParam {
|
|
319
|
+
[key : string]: any;
|
|
623
320
|
/**
|
|
624
|
-
* @description
|
|
321
|
+
* @description The number of resources to be returned.
|
|
625
322
|
|
|
626
323
|
*/
|
|
627
324
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
export interface PaymentsForInvoiceResponse {
|
|
325
|
+
limit?:number;
|
|
326
|
+
|
|
631
327
|
/**
|
|
632
|
-
* @description
|
|
328
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
633
329
|
|
|
634
330
|
*/
|
|
635
|
-
|
|
331
|
+
|
|
332
|
+
offset?:string;
|
|
333
|
+
}
|
|
334
|
+
export interface TransactionsForSubscriptionResponse {
|
|
636
335
|
list:{transaction:Transaction}[];
|
|
637
336
|
|
|
337
|
+
next_offset?:string;
|
|
338
|
+
}
|
|
339
|
+
export interface TransactionsForSubscriptionInputParam {
|
|
340
|
+
[key : string]: any;
|
|
638
341
|
/**
|
|
639
|
-
* @description
|
|
342
|
+
* @description The number of resources to be returned.
|
|
640
343
|
|
|
641
344
|
*/
|
|
345
|
+
|
|
346
|
+
limit?:number;
|
|
642
347
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
348
|
+
/**
|
|
349
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
350
|
+
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
offset?:string;
|
|
647
354
|
}
|
|
648
|
-
export interface
|
|
649
|
-
|
|
650
|
-
id_at_gateway?:string;
|
|
651
|
-
|
|
652
|
-
customer_id?:string;
|
|
355
|
+
export interface PaymentsForInvoiceResponse {
|
|
356
|
+
list:{transaction:Transaction}[];
|
|
653
357
|
|
|
654
|
-
|
|
358
|
+
next_offset?:string;
|
|
655
359
|
}
|
|
656
360
|
export interface PaymentsForInvoiceInputParam {
|
|
657
361
|
[key : string]: any;
|
|
658
362
|
/**
|
|
659
|
-
* @description
|
|
363
|
+
* @description The number of resources to be returned.
|
|
660
364
|
|
|
661
365
|
*/
|
|
662
366
|
|
|
663
367
|
limit?:number;
|
|
664
368
|
|
|
665
369
|
/**
|
|
666
|
-
* @description
|
|
370
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
667
371
|
|
|
668
372
|
*/
|
|
669
373
|
|
|
@@ -678,271 +382,85 @@ declare module 'chargebee' {
|
|
|
678
382
|
}
|
|
679
383
|
export interface DeleteOfflineTransactionInputParam {
|
|
680
384
|
|
|
681
|
-
/**
|
|
682
|
-
* @description Reason for deleting this transaction. This comment will be added to the associated entity.
|
|
683
|
-
|
|
684
|
-
*/
|
|
685
|
-
|
|
686
385
|
comment?:string;
|
|
687
386
|
}
|
|
688
|
-
export interface
|
|
689
|
-
/**
|
|
690
|
-
* @description Identifier for the invoice.
|
|
691
|
-
|
|
692
|
-
*/
|
|
693
|
-
|
|
387
|
+
export interface LinkedInvoice {
|
|
694
388
|
invoice_id:string;
|
|
695
389
|
|
|
696
|
-
/**
|
|
697
|
-
* @description The transaction amount applied to this invoice
|
|
698
|
-
|
|
699
|
-
*/
|
|
700
|
-
|
|
701
390
|
applied_amount:number;
|
|
702
391
|
|
|
703
|
-
/**
|
|
704
|
-
* @description Timestamp at which the transaction is applied.
|
|
705
|
-
|
|
706
|
-
*/
|
|
707
|
-
|
|
708
392
|
applied_at:number;
|
|
709
393
|
|
|
710
|
-
/**
|
|
711
|
-
* @description The date this invoice is issued.
|
|
712
|
-
|
|
713
|
-
*/
|
|
714
|
-
|
|
715
394
|
invoice_date?:number;
|
|
716
395
|
|
|
717
|
-
/**
|
|
718
|
-
* @description Total amount of the invoice
|
|
719
|
-
|
|
720
|
-
*/
|
|
721
|
-
|
|
722
396
|
invoice_total?:number;
|
|
723
397
|
|
|
724
|
-
|
|
725
|
-
* @description Current status of this invoice. \* pending -
|
|
726
|
-
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`.
|
|
727
|
-
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.
|
|
728
|
-
|
|
729
|
-
*/
|
|
730
|
-
|
|
731
|
-
invoice_status:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
|
|
398
|
+
invoice_status:'paid' | 'posted' | 'payment_due' | 'not_paid' | 'voided' | 'pending';
|
|
732
399
|
}
|
|
733
|
-
export interface
|
|
734
|
-
/**
|
|
735
|
-
* @description Identifier for the credit-notes.
|
|
736
|
-
|
|
737
|
-
*/
|
|
738
|
-
|
|
400
|
+
export interface LinkedCreditNote {
|
|
739
401
|
cn_id:string;
|
|
740
402
|
|
|
741
|
-
/**
|
|
742
|
-
* @description The transaction amount applied to this invoice
|
|
743
|
-
|
|
744
|
-
*/
|
|
745
|
-
|
|
746
403
|
applied_amount:number;
|
|
747
404
|
|
|
748
|
-
/**
|
|
749
|
-
* @description Timestamp at which the transaction is applied.
|
|
750
|
-
|
|
751
|
-
*/
|
|
752
|
-
|
|
753
405
|
applied_at:number;
|
|
754
406
|
|
|
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
|
-
*/
|
|
407
|
+
cn_reason_code?:'write_off' | 'subscription_change' | 'subscription_cancellation' | 'subscription_pause' | 'chargeback' | 'product_unsatisfactory' | 'service_unsatisfactory' | 'order_change' | 'order_cancellation' | 'waiver' | 'other' | 'fraudulent';
|
|
766
408
|
|
|
767
409
|
cn_create_reason_code?:string;
|
|
768
410
|
|
|
769
|
-
/**
|
|
770
|
-
* @description The date this credit note is created.
|
|
771
|
-
|
|
772
|
-
*/
|
|
773
|
-
|
|
774
411
|
cn_date?:number;
|
|
775
412
|
|
|
776
|
-
/**
|
|
777
|
-
* @description Total amount of the credit note
|
|
778
|
-
|
|
779
|
-
*/
|
|
780
|
-
|
|
781
413
|
cn_total?:number;
|
|
782
414
|
|
|
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
|
-
*/
|
|
415
|
+
cn_status:'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
794
416
|
|
|
795
|
-
cn_reference_invoice_id
|
|
417
|
+
cn_reference_invoice_id?:string;
|
|
796
418
|
}
|
|
797
|
-
export interface
|
|
798
|
-
/**
|
|
799
|
-
* @description Uniquely identifies the transaction.
|
|
800
|
-
|
|
801
|
-
*/
|
|
802
|
-
|
|
419
|
+
export interface LinkedRefund {
|
|
803
420
|
txn_id:string;
|
|
804
421
|
|
|
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 '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.
|
|
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
|
-
*/
|
|
422
|
+
txn_status:'in_progress' | 'success' | 'voided' | 'failure' | 'timeout' | 'needs_attention' | 'late_failure';
|
|
816
423
|
|
|
817
424
|
txn_date:number;
|
|
818
425
|
|
|
819
|
-
/**
|
|
820
|
-
* @description Amount of this refund transaction.
|
|
821
|
-
|
|
822
|
-
*/
|
|
823
|
-
|
|
824
426
|
txn_amount:number;
|
|
825
427
|
}
|
|
826
428
|
export interface LinkedPayment {
|
|
827
|
-
/**
|
|
828
|
-
* @description Uniquely identifies the transaction.
|
|
829
|
-
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
429
|
id:string;
|
|
833
430
|
|
|
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 'error_code' and 'error_text' 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
|
-
*/
|
|
431
|
+
status?:'in_progress' | 'success' | 'voided' | 'failure' | 'timeout' | 'needs_attention' | 'late_failure';
|
|
845
432
|
|
|
846
433
|
amount?:number;
|
|
847
434
|
|
|
848
|
-
/**
|
|
849
|
-
* @description Indicates when this transaction occurred.
|
|
850
|
-
|
|
851
|
-
*/
|
|
852
|
-
|
|
853
435
|
date?:number;
|
|
854
436
|
}
|
|
855
437
|
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
438
|
request_id?:string;
|
|
862
439
|
|
|
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
440
|
error_category?:string;
|
|
869
441
|
|
|
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's services
|
|
872
|
-
|
|
873
|
-
*/
|
|
874
|
-
|
|
875
442
|
error_code?:string;
|
|
876
443
|
|
|
877
|
-
/**
|
|
878
|
-
* @description A message provided by the gateway that describes the nature of the error encountered
|
|
879
|
-
|
|
880
|
-
*/
|
|
881
|
-
|
|
882
444
|
error_message?:string;
|
|
883
445
|
|
|
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
446
|
decline_code?:string;
|
|
890
447
|
|
|
891
|
-
/**
|
|
892
|
-
* @description This message gives a descriptive explanation of the reason for the transaction's decline
|
|
893
|
-
|
|
894
|
-
*/
|
|
895
|
-
|
|
896
448
|
decline_message?:string;
|
|
897
449
|
|
|
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's error-handling system
|
|
900
|
-
|
|
901
|
-
*/
|
|
902
|
-
|
|
903
450
|
network_error_code?:string;
|
|
904
451
|
|
|
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
452
|
network_error_message?:string;
|
|
911
453
|
|
|
912
|
-
/**
|
|
913
|
-
* @description This parameter indicates which specific data field or attribute in the request caused the error
|
|
914
|
-
|
|
915
|
-
*/
|
|
916
|
-
|
|
917
454
|
error_field?:string;
|
|
918
455
|
|
|
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
456
|
recommendation_code?:string;
|
|
925
457
|
|
|
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
458
|
recommendation_message?:string;
|
|
932
459
|
|
|
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
460
|
processor_error_code?:string;
|
|
939
461
|
|
|
940
|
-
/**
|
|
941
|
-
* @description This message describes the specific error that the payment processor encountered
|
|
942
|
-
|
|
943
|
-
*/
|
|
944
|
-
|
|
945
462
|
processor_error_message?:string;
|
|
463
|
+
|
|
946
464
|
}
|
|
947
465
|
}
|
|
948
466
|
}
|