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