@gofynd/fdk-client-javascript 1.4.8 → 1.4.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,93 +1,4 @@
1
1
  export = BillingPlatformModel;
2
- /**
3
- * @typedef CompanyInfo
4
- * @property {string} [company_name] - Name of the company
5
- * @property {string} [gstin] - Goods and Services Tax Identification Number
6
- * @property {string} [address] - Main address of the company
7
- * @property {AddressDetails} [address_details]
8
- * @property {string} [pan] - Permanent Account Number of the company
9
- * @property {string} [phone] - Contact phone number for the company
10
- * @property {string} [email] - Contact email address for the company
11
- * @property {string} [cin] - Corporate Identification Number
12
- */
13
- /**
14
- * @typedef AddressDetails
15
- * @property {string} [address_line_1] - First line of the address
16
- * @property {string} [address_line_2] - Second line of the address (optional)
17
- * @property {string} [city] - Company city
18
- * @property {string} [pincode] - Company pincode
19
- * @property {string} [state] - Company state
20
- * @property {string} [country] - Company country
21
- */
22
- /**
23
- * @typedef InvoiceData
24
- * @property {InvoiceDetailsData} [invoice]
25
- * @property {InvoiceItems[]} [invoice_items]
26
- * @property {CompanyInfo} [shopsense_details]
27
- */
28
- /**
29
- * @typedef InvoiceDetailsData
30
- * @property {number} [attemp] - Number of attempts made to collect the invoice payment
31
- * @property {Object} [documents] - Documents associated with the invoice
32
- * @property {Object} [payment] - Payment details related to the invoice
33
- * @property {Period} [period]
34
- * @property {Client} [client]
35
- * @property {Object} [discount] - Discount applied to the invoice
36
- * @property {Object} [taxation] - Taxation applied to the invoice
37
- * @property {string} [_id] - Unique identifier for the invoice
38
- * @property {boolean} [auto_advance] - Indicates if the invoice will
39
- * automatically advance to the next stage of collection
40
- * @property {string} [collection_method] - Method of collection (e.g.,
41
- * charge_automatically, send_invoice)
42
- * @property {string} [subscriber_id] - Identifier for the subscriber associated
43
- * with the invoice
44
- * @property {string} [currency] - Currency in which the invoice is issued
45
- * @property {string} [invoice_url] - URL to view the invoice pdf
46
- * @property {string} [number] - Invoice number
47
- * @property {boolean} [paid] - Indicates if the invoice has been paid
48
- * @property {Object} [pg_data] - Payment gateway data related to the invoice
49
- * @property {string} [receipt_number] - Receipt number for the invoice payment
50
- * @property {string} [statement_descriptor] - Statement descriptor for the invoice
51
- * @property {string} [current_status] - Current status of the invoice (e.g., paid, open)
52
- * @property {StatusTrail[]} [status_trail] - Trail of status changes for the invoice
53
- * @property {number} [subtotal] - Subtotal amount of the invoice
54
- * @property {number} [total] - Total amount of the invoice
55
- * @property {number} [old_settlement] - Previous settlement amount (if any)
56
- * @property {number} [credit_balance] - Credit balance applied to the invoice
57
- * @property {string} [subscription] - Subscription associated with the invoice
58
- * @property {number} [attempt] - Number of attempts made to pay the invoice
59
- * @property {string} [next_action_time] - Timestamp for the next action on the invoice
60
- * @property {number} [credit_note_amount] - Amount of credit notes applied to the invoice
61
- * @property {string} [created_at] - Timestamp when the invoice was created
62
- * @property {string} [modified_at] - Timestamp when the invoice was last modified
63
- * @property {string} [invoice_type] - Type of invoice (e.g., subscription, extension)
64
- */
65
- /**
66
- * @typedef Client
67
- * @property {string} [name] - Name of the client
68
- * @property {string} [email] - Email address of the client
69
- * @property {string} [phone] - Phone number of the client
70
- * @property {string[]} [address_lines] - List of address lines for the client's address
71
- */
72
- /**
73
- * @typedef Period
74
- * @property {string} [start] - Start date of the period
75
- * @property {string} [end] - End date of the period
76
- */
77
- /**
78
- * @typedef StatusTrail
79
- * @property {string} [value] - The status value of the invoice at a particular
80
- * timestamp (e.g., open, paid, payment_due)
81
- * @property {string} [timestamp] - The date and time when the status was
82
- * recorded, in ISO 8601 format
83
- * @property {string} [_id] - Unique identifier for the status trail entry
84
- */
85
- /**
86
- * @typedef PaymentCollectRes
87
- * @property {string} [transaction_id] - Unique identifier for the transaction
88
- * @property {string} [current_status] - Current status of the payment
89
- * collection (e.g., pending, completed, failed)
90
- */
91
2
  /**
92
3
  * @typedef SubscriptionChargeRes
93
4
  * @property {string} [_id] - Unique identifier for the subscription charge
@@ -107,54 +18,33 @@ export = BillingPlatformModel;
107
18
  * @property {Object[]} [line_items] - List of line items associated with the charge
108
19
  */
109
20
  /**
110
- * @typedef PostDowngradeRes
111
- * @property {boolean} [success]
112
- * @property {DowngradeRes} [data]
113
- */
114
- /**
115
- * @typedef DowngradeRes
116
- * @property {string} [_id] - Unique identifier for the downgrade request
117
- * @property {string} [status] - Current status of the downgrade request (e.g.,
118
- * pending, completed)
119
- * @property {string} [subscriber_id] - Unique identifier for the subscriber
120
- * making the downgrade request
121
- * @property {boolean} [activated] - Indicates if the downgrade has been activated
122
- * @property {string} [created_at] - Timestamp when the downgrade request was created
123
- * @property {string} [modified_at] - Timestamp when the downgrade request was
124
- * last modified
125
- * @property {string} [plan_id] - ID of the plan to which the subscriber is downgrading
126
- * @property {string} [reason] - Reason provided for the downgrade request
127
- * @property {string} [request_user_id] - ID of the user who initiated the
128
- * downgrade request
129
- * @property {string} [subscription_id] - ID of the subscription associated with
130
- * the downgrade request
131
- */
132
- /**
133
- * @typedef PaymentStatusData
134
- * @property {string} [_id] - Unique identifier for the payment status data
135
- * @property {string} [journey] - Payment journey status, such as 'forward' or 'backward'
136
- * @property {Object[]} [webhook_response] - List of responses received from
137
- * webhooks related to the payment
138
- * @property {string} [aggregator_status] - Status of the payment as provided by
139
- * the aggregator (e.g., succeeded, failed)
140
- * @property {string} [current_status] - Current status of the payment (e.g.,
141
- * paid, pending)
142
- * @property {string} [created_at] - Timestamp when the payment status data was created
143
- * @property {string} [modified_at] - Timestamp when the payment status data was
144
- * last modified
145
- * @property {number} [__v] - Version key for the payment status data (typically
146
- * used for versioning in databases)
147
- * @property {string} [aggregator_order_id] - Unique identifier for the order
148
- * provided by the payment aggregator
149
- */
150
- /**
151
- * @typedef PaymentStatusResponse
152
- * @property {string} [status] - The status of the payment.
153
- * @property {PaymentStatusData} [data]
154
- */
155
- /**
156
- * @typedef BadRequest
157
- * @property {string} [message] - Failure message.
21
+ * @typedef ChargeDetails
22
+ * @property {string} [_id] - Unique identifier for the charge.
23
+ * @property {string} [entity_type] - The type of entity associated with the
24
+ * charge (e.g., 'extension', 'subscription').
25
+ * @property {string} [entity_id] - Unique identifier for the entity associated
26
+ * with the charge.
27
+ * @property {string} [name] - The name of the charge.
28
+ * @property {string} [term] - Description of the charge term.
29
+ * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
30
+ * 'recurring').
31
+ * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
32
+ * 'one_time', 'recurring').
33
+ * @property {EntityChargePrice} [price]
34
+ * @property {ChargeRecurring} [recurring]
35
+ * @property {string} [status] - Current status of the charge.
36
+ * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
37
+ * @property {string} [activated_on] - Date and time when the charge was activated.
38
+ * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
39
+ * @property {string} [billing_date] - Date and time when the charge was billed.
40
+ * @property {SubscriptionTrialPeriod} [current_period]
41
+ * @property {string} [modified_at] - Date and time when the charge details were
42
+ * last modified.
43
+ * @property {string} [created_at] - Date and time when the charge was created.
44
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
45
+ * @property {string} [company_id] - Company id.
46
+ * @property {Object} [meta] - Additional metadata associated with the charge.
47
+ * @property {number} [__v] - Internal version key for the charge record.
158
48
  */
159
49
  /**
160
50
  * @typedef ResourceNotFound
@@ -163,74 +53,48 @@ export = BillingPlatformModel;
163
53
  * @property {Object} [success]
164
54
  */
165
55
  /**
166
- * @typedef InternalServerError
167
- * @property {string} [message] - Internal server error
168
- * @property {string} [code] - Error code
56
+ * @typedef CreateOneTimeCharge
57
+ * @property {string} [name] - The name of the one-time charge to be created.
58
+ * @property {OneTimeChargeItem} [charge]
59
+ * @property {boolean} [is_test] - Indicates whether the charge creation is for
60
+ * testing purposes.
61
+ * @property {string} [return_url] - URL to which the user will be redirected
62
+ * after creating the charge.
63
+ */
64
+ /**
65
+ * @typedef CreateOneTimeChargeResponse
66
+ * @property {Charge} [charge]
67
+ * @property {string} [confirm_url] - URL to which users are redirected to
68
+ * confirm or complete the payment or subscription process.
169
69
  */
170
70
  /**
171
- * @typedef CheckValidityResponse
172
- * @property {boolean} [is_valid] - Indicates whether the request is valid.
173
- * @property {number} [discount_amount] - The amount of discount applicable.
71
+ * @typedef BadRequest
72
+ * @property {string} [message] - Failure message.
174
73
  */
175
74
  /**
176
- * @typedef PlanRecurring
177
- * @property {string} [interval] - The interval at which the plan recurs.
178
- * @property {number} [interval_count]
75
+ * @typedef CreateSubscriptionCharge
76
+ * @property {string} name - The name of the charge.
77
+ * @property {number} [trial_days]
78
+ * @property {ChargeLineItem[]} line_items
79
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
80
+ * @property {string} return_url - The URL passed in request which extension
81
+ * expects in return.
179
82
  */
180
83
  /**
181
- * @typedef PlanMeta
182
- * @property {string} [seller_status] - Status of the seller associated with the plan.
183
- * @property {string} [company] - Name of the company offering the plan.
184
- * @property {string} [plan_platform_display_name] - Display name for platform slug.
185
- * @property {string[]} [tags] - Tags associated with the plan for
186
- * categorization or identification.
84
+ * @typedef CreateSubscriptionResponse
85
+ * @property {EntitySubscription} [subscription]
86
+ * @property {string} [confirm_url] - URL to which users are redirected to
87
+ * confirm or complete the payment or subscription process.
187
88
  */
188
89
  /**
189
- * @typedef CountryRes
190
- * @property {string} [name] - Name of the country.
191
- * @property {string} [code] - Country code.
90
+ * @typedef EntityChargePrice
91
+ * @property {number} [amount] - The amount for the price. The minimum value is 1.
92
+ * @property {string} [currency_code] - The currency code for the price
192
93
  */
193
94
  /**
194
- * @typedef Plan
195
- * @property {Object[]} [fee_components] - List of fee components associated
196
- * with the plan. Each component may be represented as a string or an object.
197
- * @property {PlanRecurring} [recurring]
198
- * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan.
199
- * @property {string} [plan_group] - Group or category of the plan.
200
- * @property {string[]} [tag_lines] - List of tag lines or descriptions
201
- * associated with the plan.
202
- * @property {string} [currency] - Currency code used for the plan's pricing.
203
- * @property {string} [approved_by] - Identifier of the user or system that
204
- * approved the plan.
205
- * @property {boolean} [is_active] - Indicates if the plan is currently active.
206
- * @property {boolean} [is_visible] - Indicates if the plan is visible to users.
207
- * @property {number} [trial_period] - Number of days for the trial period, if applicable.
208
- * @property {string[]} [addons] - List of add-ons available for the plan.
209
- * @property {string[]} [tags] - List of tags associated with the plan.
210
- * @property {string} [type] - Type of the plan (e.g., public, private).
211
- * @property {CountryRes} [country]
212
- * @property {string} [_id] - Unique identifier for the plan.
213
- * @property {string} [name] - Name of the plan.
214
- * @property {string} [description] - Description of the plan.
215
- * @property {number} [amount] - Amount to be charged for the plan.
216
- * @property {string} [product_suite_id] - Identifier of the product suite to
217
- * which the plan belongs.
218
- * @property {string} [created_at] - Timestamp when the plan was created.
219
- * @property {string} [modified_at] - Timestamp when the plan was last modified.
220
- * @property {Taxation} [taxation]
221
- * @property {OneTimeFees} [one_time_fees]
222
- * @property {CreditLine} [credit_line]
223
- * @property {string} [current_status] - Current status of the plan (e.g.,
224
- * active, inactive).
225
- * @property {string} [channel_type] - Type of channel where the plan is offered
226
- * (e.g., ecomm, retail).
227
- * @property {string[]} [company_ids] - List of company IDs associated with the
228
- * plan. Can be null.
229
- * @property {string} [platform] - Platform where the plan is available (e.g.,
230
- * web, mobile). Can be null.
231
- * @property {string} [activated_on] - Timestamp when the plan was activated.
232
- * @property {PlanMeta} [meta]
233
- * @property {string} [created_by] - Identifier of the user who created the plan.
95
+ * @typedef ChargeRecurring
96
+ * @property {string} [interval]
97
+ * @property {number} [interval_time]
234
98
  */
235
99
  /**
236
100
  * @typedef SubscriptionTrialPeriod
@@ -238,9 +102,8 @@ export = BillingPlatformModel;
238
102
  * @property {string} [end_date] - The end date and time of the trial period.
239
103
  */
240
104
  /**
241
- * @typedef EntityChargePrice
242
- * @property {number} [amount] - The amount for the price. The minimum value is 1.
243
- * @property {string} [currency_code] - The currency code for the price
105
+ * @typedef Charge
106
+ * @property {OneTimeChargeEntity} [final_charge]
244
107
  */
245
108
  /**
246
109
  * @typedef OneTimeChargeItem
@@ -255,47 +118,35 @@ export = BillingPlatformModel;
255
118
  * @property {Object} [metadata] - Additional metadata associated with the charge item.
256
119
  */
257
120
  /**
258
- * @typedef CreateOneTimeCharge
259
- * @property {string} [name] - The name of the one-time charge to be created.
260
- * @property {OneTimeChargeItem} [charge]
261
- * @property {boolean} [is_test] - Indicates whether the charge creation is for
262
- * testing purposes.
263
- * @property {string} [return_url] - URL to which the user will be redirected
264
- * after creating the charge.
265
- */
266
- /**
267
- * @typedef ChargeRecurring
268
- * @property {string} [interval]
269
- * @property {number} [interval_time]
121
+ * @typedef ChargeLineItem
122
+ * @property {string} name - Its name of the extension plan.
123
+ * @property {string} term - It indicates how it will be charged.
124
+ * @property {string} pricing_type - It indicates the extension subscription
125
+ * will be auto renewed timely.
126
+ * @property {EntityChargePrice} price
127
+ * @property {EntityChargeRecurring} [recurring]
128
+ * @property {number} [capped_amount]
129
+ * @property {number} [trial_days]
130
+ * @property {boolean} [is_test]
131
+ * @property {Object} [metadata]
270
132
  */
271
133
  /**
272
- * @typedef ChargeDetails
273
- * @property {string} [_id] - Unique identifier for the charge.
274
- * @property {string} [entity_type] - The type of entity associated with the
275
- * charge (e.g., 'extension', 'subscription').
276
- * @property {string} [entity_id] - Unique identifier for the entity associated
277
- * with the charge.
278
- * @property {string} [name] - The name of the charge.
279
- * @property {string} [term] - Description of the charge term.
280
- * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
281
- * 'recurring').
282
- * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
283
- * 'one_time', 'recurring').
284
- * @property {EntityChargePrice} [price]
285
- * @property {ChargeRecurring} [recurring]
286
- * @property {string} [status] - Current status of the charge.
287
- * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
288
- * @property {string} [activated_on] - Date and time when the charge was activated.
289
- * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
290
- * @property {string} [billing_date] - Date and time when the charge was billed.
291
- * @property {SubscriptionTrialPeriod} [current_period]
292
- * @property {string} [modified_at] - Date and time when the charge details were
293
- * last modified.
294
- * @property {string} [created_at] - Date and time when the charge was created.
295
- * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
296
- * @property {string} [company_id] - Company id.
297
- * @property {Object} [meta] - Additional metadata associated with the charge.
298
- * @property {number} [__v] - Internal version key for the charge record.
134
+ * @typedef EntitySubscription
135
+ * @property {string} [_id] - Unique identifier for the subscription charge
136
+ * @property {string} [product_suit_id] - ID of the product suit associated with
137
+ * the charge
138
+ * @property {string} [entity_id] - Unique identifier for the entity
139
+ * @property {string} [entity_type] - Type of entity (e.g., subscription, extension)
140
+ * @property {string} [name] - Name of the subscription charge
141
+ * @property {string} [status] - Current status of the subscription charge
142
+ * @property {number} [trial_days] - Number of trial days provided
143
+ * @property {boolean} [is_test] - Indicates if the charge is for testing purposes
144
+ * @property {string} [created_at] - Timestamp when the charge was created
145
+ * @property {string} [modified_at] - Timestamp when the charge was last modified
146
+ * @property {string} [subscriber_id] - Unique Identifier of the company
147
+ * @property {EntityChargeDetails[]} [line_items]
148
+ * @property {string} [return_url] - The URL passed in request which extension
149
+ * expects in return.
299
150
  */
300
151
  /**
301
152
  * @typedef OneTimeChargeEntity
@@ -331,3934 +182,506 @@ export = BillingPlatformModel;
331
182
  * @property {Object} [meta] - Additional metadata associated with the charge.
332
183
  * @property {EntityChargePrice} [price]
333
184
  */
334
- /**
335
- * @typedef CreateOneTimeChargeResponse
336
- * @property {Charge} [charge]
337
- * @property {string} [confirm_url] - URL to which users are redirected to
338
- * confirm or complete the payment or subscription process.
339
- */
340
- /**
341
- * @typedef Charge
342
- * @property {OneTimeChargeEntity} [final_charge]
343
- */
344
- /**
345
- * @typedef InvoiceDetailsStatusTrail
346
- * @property {string} [_id] - Unique identifier for the status trail entry.
347
- * @property {string} [value] - The status value of the invoice at a particular
348
- * point in time.
349
- * @property {string} [timestamp] - The date and time when this status was recorded.
350
- */
351
- /**
352
- * @typedef InvoiceItemsPlanRecurring
353
- * @property {string} [interval] - The interval at which the plan recurs (e.g.,
354
- * month, year).
355
- * @property {number} [interval_count] - The number of intervals for the recurring plan.
356
- */
357
- /**
358
- * @typedef InvoiceItemsPlan
359
- * @property {InvoiceItemsPlanRecurring} [recurring]
360
- * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan.
361
- * @property {string} [plan_group] - Group or category to which the plan belongs.
362
- * @property {string[]} [tag_lines] - List of tag lines or short descriptions
363
- * for the plan.
364
- * @property {string} [currency] - Currency code for the pricing of the plan.
365
- * @property {boolean} [is_active] - Indicates whether the plan is currently active.
366
- * @property {boolean} [is_visible] - Indicates whether the plan is visible to users.
367
- * @property {number} [trial_period] - The number of days for the trial period.
368
- * @property {string[]} [addons] - List of add-ons available with the plan.
369
- * @property {string[]} [tags] - Tags associated with the plan for categorization.
370
- * @property {string} [type] - Type of the plan (e.g., public, private).
371
- * @property {string} [country] - Country for which plan is created
372
- * @property {string} [_id] - Unique identifier for the plan.
373
- * @property {string} [name] - Name of the plan.
374
- * @property {string} [description] - Detailed description of the plan.
375
- * @property {number} [amount] - Price of the plan in the specified currency.
376
- * @property {string} [product_suite_id] - Identifier for the product suite to
377
- * which the plan belongs.
378
- * @property {string} [created_at] - Timestamp when the plan was created.
379
- * @property {string} [modified_at] - Timestamp when the plan was last modified.
380
- */
381
- /**
382
- * @typedef InvoiceItemsPeriod
383
- * @property {string} [start] - Start date of the invoice period.
384
- * @property {string} [end] - End date of the invoice period.
385
- */
386
- /**
387
- * @typedef InvoiceItems
388
- * @property {string} [_id] - Unique identifier for the invoice item.
389
- * @property {string} [currency] - Currency for the amount.
390
- * @property {InvoiceItemsPlan} [plan]
391
- * @property {string} [name] - Name of the invoice item.
392
- * @property {number} [quantity] - Number of units of the invoice item.
393
- * @property {string} [description] - Description of the invoice item.
394
- * @property {InvoiceItemsPeriod} [period]
395
- * @property {number} [unit_amount] - Amount per unit of the invoice item.
396
- * @property {number} [amount] - Total amount for the invoice item.
397
- * @property {string} [type] - Type of the invoice item (e.g., subscription, extension).
398
- * @property {string} [invoice_id] - Identifier for the invoice to which the item belongs.
399
- * @property {string} [created_at] - Timestamp when the invoice item was created.
400
- * @property {string} [modified_at] - Timestamp when the invoice item was last modified.
401
- */
402
- /**
403
- * @typedef InvoicesDataClient
404
- * @property {string} [name] - Name of the client.
405
- * @property {string} [email] - Email address of the client.
406
- * @property {string} [phone] - Phone number of the client.
407
- * @property {string[]} [address_lines] - Array of address lines for the client’s address.
408
- */
409
- /**
410
- * @typedef InvoicesDataPeriod
411
- * @property {string} [start] - The start date and time of the invoice period.
412
- * @property {string} [end] - The end date and time of the invoice period.
413
- */
414
- /**
415
- * @typedef InvoicesDataPaymentMethod
416
- * @property {string} [pg_payment_method_id] - Payment gateway-specific payment
417
- * method identifier. Nullable if not applicable.
418
- */
419
- /**
420
- * @typedef InvoicesData
421
- * @property {string} [_id] - Unique identifier for the invoice.
422
- * @property {Object} [documents] - Associated documents related to the invoice.
423
- * @property {Object} [payment] - Payment details for the invoice.
424
- * @property {number} [old_settlement] - Previous settlement amount, if applicable.
425
- * @property {number} [credit_balance] - Remaining credit balance applied to the
426
- * invoice, if any.
427
- * @property {Object} [discount] - Details of any discounts applied to the invoice.
428
- * @property {Object} [taxation] - Taxation details associated with the invoice.
429
- * @property {number} [credit_note_amount] - Amount covered by credit notes, if any.
430
- * @property {InvoicesDataClient} [client]
431
- * @property {boolean} [auto_advance] - Indicates if the invoice should be
432
- * auto-advanced in the billing process.
433
- * @property {string} [currency] - Currency code used for the invoice amount.
434
- * @property {boolean} [paid] - Indicates if the invoice has been paid.
435
- * @property {number} [attemp] - Number of payment attempts made for the invoice.
436
- * @property {string} [collection_method] - Method used to collect payment for
437
- * the invoice.
438
- * @property {string} [subscriber_id] - Identifier for the subscriber associated
439
- * with the invoice.
440
- * @property {string} [invoice_url] - URL to view or download the invoice.
441
- * "null" if not available.
442
- * @property {string} [number] - Unique invoice number.
443
- * @property {Object} [pg_data] - Payment gateway-related data for the invoice.
444
- * @property {InvoicesDataPeriod} [period]
445
- * @property {string} [receipt_number] - Receipt number for the invoice payment.
446
- * @property {string} [statement_descriptor] - Descriptor that appears on the
447
- * client's statement for the invoice.
448
- * @property {string} [current_status] - Current status of the invoice (e.g.,
449
- * paid, pending).
450
- * @property {InvoiceDetailsStatusTrail[]} [status_trail] - History of status
451
- * changes for the invoice.
452
- * @property {number} [subtotal] - Subtotal amount before taxes and discounts.
453
- * @property {number} [total] - Total amount including taxes and discounts.
454
- * @property {string} [subscription] - Identifier for the subscription
455
- * associated with the invoice.
456
- * @property {string} [next_action_time] - Scheduled time for the next action
457
- * related to the invoice.
458
- * @property {string} [created_at] - Timestamp when the invoice was created.
459
- * @property {string} [modified_at] - Timestamp when the invoice was last modified.
460
- * @property {string} [hash_identifier] - Unique hash identifier for the invoice.
461
- * @property {InvoicesDataPaymentMethod} [payment_method]
462
- * @property {InvoiceItems[]} [invoice_items] - List of items included in the invoice.
463
- * @property {string} [invoice_type] - Type of invoice (e.g., extension, subscription).
464
- */
465
- /**
466
- * @typedef Invoices
467
- * @property {InvoicesData[]} [data]
468
- * @property {number} [start] - Index of the first item in the results.
469
- * @property {number} [end] - Index of the last item in the results.
470
- * @property {number} [limit] - Number of items per page.
471
- * @property {number} [page] - Page number of the results.
472
- * @property {number} [total] - Total number of items available.
473
- */
474
- /**
475
- * @typedef Phone
476
- * @property {string} [phone_number] - The phone number of the contact.
477
- * @property {string} [phone_country_code] - The country code of the phone number.
478
- */
479
- /**
480
- * @typedef SubscriptionBillingAddress
481
- * @property {string} [country] - Name of the country for the billing address.
482
- * @property {string} [country_code] - ISO country code for the billing address.
483
- * @property {string} [state] - State or province for the billing address.
484
- * @property {string} [city] - City for the billing address.
485
- * @property {string} [line1] - First line of the street address.
486
- * @property {string} [line2] - Second line of the street address (optional).
487
- * @property {string} [postal_code] - Postal or ZIP code for the billing address.
488
- */
489
- /**
490
- * @typedef SubscriptionCustomer
491
- * @property {Phone} [phone]
492
- * @property {SubscriptionBillingAddress} [billing_address]
493
- * @property {string} [_id] - Unique identifier for the subscriber.
494
- * @property {string} [unique_id] - Identifier specific to the company.
495
- * @property {string} [type] - Type of the customer (e.g., developer, company).
496
- * @property {string} [name] - Name of the customer.
497
- * @property {string} [email] - Email address of the customer.
498
- * @property {string} [created_at] - Timestamp when the customer record was created.
499
- * @property {string} [modified_at] - Timestamp when the customer record was
500
- * last modified.
501
- * @property {Object} [data] - Additional data related to the customer.
502
- * @property {Object} [documents] - Associated documents related to the customer.
503
- * @property {boolean} [consent] - Indicates whether the customer has given consent.
504
- * @property {boolean} [comms] - Indicates whether the customer has opted in for
505
- * communications.
506
- * @property {number} [credit_balance] - Current credit balance for the customer, if any.
507
- * @property {BusinessCountryInfo} [business_country_info]
508
- */
509
- /**
510
- * @typedef SubscriptionCustomerCreate
511
- * @property {Phone} [phone]
512
- * @property {SubscriptionBillingAddress} [billing_address]
513
- * @property {string} [unique_id] - Company id for the customer, generated by the client.
514
- * @property {string} [type] - Type of company
515
- * @property {string} [name] - Name of the company
516
- * @property {string} [email] - Email address of the company
517
- */
518
- /**
519
- * @typedef SubscriptionCurrentPeriod
520
- * @property {string} [start] - The start date and time of the current
521
- * subscription period.
522
- * @property {string} [end] - The end date and time of the current subscription period.
523
- */
524
- /**
525
- * @typedef SubscriptionPauseCollection
526
- * @property {string} [behavior] - Defines the behavior of the subscription when
527
- * it is paused. Possible values could include `keep_as_draft` or `cancel`.
528
- * @property {string} [resume_at] - The date and time when the paused
529
- * subscription is scheduled to resume.
530
- */
531
- /**
532
- * @typedef SubscriptionTrial
533
- * @property {string} [start] - The start date and time of the subscription trial period.
534
- * @property {string} [end] - The end date and time of the subscription trial period.
535
- */
536
- /**
537
- * @typedef SubscriptionInvoiceSettings
538
- * @property {boolean} [generation] - Indicates whether invoices are
539
- * automatically generated for the subscription.
540
- * @property {boolean} [charging] - Indicates whether charging is enabled for
541
- * the subscription. This setting determines if charges are applied based on
542
- * the invoice settings.
543
- */
544
- /**
545
- * @typedef Subscription
546
- * @property {Object} [meta] - Additional metadata related to the subscription.
547
- * @property {SubscriptionCurrentPeriod} [current_period]
548
- * @property {SubscriptionPauseCollection} [pause_collection]
549
- * @property {SubscriptionTrial} [trial]
550
- * @property {SubscriptionInvoiceSettings} [invoice_settings]
551
- * @property {boolean} [is_active] - Indicates whether the subscription is
552
- * currently active.
553
- * @property {boolean} [cancel_at_period_end] - Indicates whether the
554
- * subscription will be canceled at the end of the current period.
555
- * @property {string} [_id] - Unique identifier for the subscription.
556
- * @property {string} [subscriber_id] - Unique identifier for the subscriber
557
- * associated with the subscription.
558
- * @property {string} [plan_id] - Unique identifier for the plan associated with
559
- * the subscription.
560
- * @property {string} [product_suite_id] - Unique identifier for the product
561
- * suite associated with the subscription.
562
- * @property {boolean} [is_eligible_for_plan_change] - Indicates whether the
563
- * subscriber is eligible to change their subscription plan.
564
- * @property {Plan} [plan_data]
565
- * @property {string} [current_status] - The current status of the subscription
566
- * (e.g., active, canceled).
567
- * @property {string} [collection_method] - Method used to collect payments for
568
- * the subscription (e.g., charge_automatically, invoice).
569
- * @property {string} [created_at] - The date and time when the subscription was created.
570
- * @property {string} [modified_at] - The date and time when the subscription
571
- * was last modified.
572
- * @property {string} [latest_invoice] - Unique identifier for the most recent
573
- * invoice related to the subscription.
574
- * @property {string} [channel_type] - Ordering channel for which the
575
- * subscription was created (e.g., ecomm, fynd).
576
- * @property {boolean} [freezed] - Indicates whether the subscription is
577
- * currently freezed.
578
- * @property {string} [cancel_at] - The date and time when the subscription is
579
- * scheduled to be canceled, if applicable.
580
- * @property {string} [canceled_at] - The date and time when the subscription
581
- * was actually canceled.
582
- */
583
- /**
584
- * @typedef SubscriptionStatus
585
- * @property {boolean} [is_enabled] - Indicates whether the subscription status
586
- * is enabled.
587
- * @property {Subscription} [subscription]
588
- * @property {InvoicesData} [latest_invoice]
589
- * @property {Plan} [next_plan]
590
- * @property {Subscription[]} [current_subscriptions] - List of current
591
- * subscriptions associated with the user.
592
- * @property {number} [mandate_amount] - The amount mandated for the
593
- * subscription or service.
594
- * @property {string} [message] - A message providing additional context or
595
- * information about the subscription status.
596
- */
597
- /**
598
- * @typedef SubscriptionLimitApplication
599
- * @property {boolean} [enabled] - Indicates whether the application limit is enabled.
600
- * @property {number} [hard_limit] - The maximum number of applications allowed.
601
- * @property {number} [soft_limit] - The soft limit of applications allowed,
602
- * typically a warning threshold before reaching the hard limit.
603
- */
604
- /**
605
- * @typedef SubscriptionLimitMarketplace
606
- * @property {boolean} [enabled] - Indicates whether the marketplace limit is enabled.
607
- */
608
- /**
609
- * @typedef SubscriptionLimitOtherPlatform
610
- * @property {boolean} [enabled] - Indicates whether the other platform limit is enabled.
611
- */
612
- /**
613
- * @typedef SubscriptionLimitTeam
614
- * @property {number} [limit] - The limit for team-related features.
615
- */
616
- /**
617
- * @typedef SubscriptionLimitProducts
618
- * @property {boolean} [bulk] - Indicates whether bulk product limits are enabled.
619
- * @property {number} [limit] - The limit for products.
620
- */
621
- /**
622
- * @typedef SubscriptionLimitExtensions
623
- * @property {boolean} [enabled] - Indicates whether the extensions limit is enabled.
624
- * @property {number} [limit] - The limit for extensions.
625
- */
626
- /**
627
- * @typedef SubscriptionLimitIntegrations
628
- * @property {boolean} [enabled] - Indicates whether the integrations limit is enabled.
629
- * @property {number} [limit] - The limit for integrations. A value of `-1`
630
- * usually indicates no limit.
631
- */
632
- /**
633
- * @typedef SubscriptionLimit
634
- * @property {SubscriptionLimitApplication} [application]
635
- * @property {SubscriptionLimitMarketplace} [marketplace]
636
- * @property {SubscriptionLimitOtherPlatform} [other_platform]
637
- * @property {SubscriptionLimitTeam} [team]
638
- * @property {SubscriptionLimitProducts} [products]
639
- * @property {SubscriptionLimitExtensions} [extensions]
640
- * @property {SubscriptionLimitIntegrations} [integrations]
641
- * @property {boolean} [is_trial_plan] - Indicates whether the subscription is
642
- * for a trial plan.
643
- */
644
- /**
645
- * @typedef IntentReq
646
- * @property {string} [unique_external_id] - A unique identifier for the
647
- * external resource, used to track and reference the request like company id.
648
- * @property {string} [plan_id] - The identifier for the plan associated with the intent.
649
- */
650
- /**
651
- * @typedef PutIntentReq
652
- * @property {string} [unique_external_id] - A unique identifier for the
653
- * external resource, used to track and reference the request like company id.
654
- * @property {string} [setup_intent_id] - The ID of the setup intent for payment
655
- * methods, if applicable.
656
- * @property {string} [payment_method_id] - The ID of the payment method to use
657
- * for the intent.
658
- * @property {boolean} [set_default] - Indicates whether the payment method
659
- * should be set as default.
660
- */
661
- /**
662
- * @typedef SubscriptionActivateReq
663
- * @property {string} [unique_id] - A unique identifier for the subscription
664
- * activation request.
665
- * @property {string} [type] - The type of subscriber account, e.g., company or developer.
666
- * @property {string} [product_suite] - The product suite associated with the
667
- * subscription.
668
- * @property {string} [plan_id] - The ID of the plan to be activated for the subscription.
669
- * @property {string} [payment_method] - The payment method ID to be used for
670
- * this subscription.
671
- * @property {string} [subscription_id] - The ID of the subscription to be
672
- * activated, if applicable.
673
- * @property {string} [coupon] - A coupon code for applying discounts, if applicable.
674
- * @property {Object} [meta] - Additional metadata related to the subscription
675
- * activation request.
676
- */
677
- /**
678
- * @typedef SubscriptionActivateRes
679
- * @property {boolean} [success] - Indicates whether the subscription activation
680
- * was successful.
681
- * @property {Subscription} [data]
682
- */
683
- /**
684
- * @typedef CancelSubscriptionReq
685
- * @property {string} [unique_id] - A unique identifier for the subscription
686
- * cancellation request like company id.
687
- * @property {string} [type] - The type of subscription to be canceled, e.g.,
688
- * company or developer.
689
- * @property {string} [product_suite] - The product suite associated with the
690
- * subscription to be canceled.
691
- * @property {string} [subscription_id] - The ID of the subscription to be canceled.
692
- */
693
- /**
694
- * @typedef CancelSubscriptionRes
695
- * @property {boolean} [success]
696
- * @property {Subscription} [data]
697
- */
698
- /**
699
- * @typedef PlanStatusUpdateReq
700
- * @property {string} [plan_id] - The identifier of the plan whose status is
701
- * being updated.
702
- * @property {string} [reason] - The reason for updating the plan status.
703
- * @property {string} [seller_status] - The new status of the plan as set by the
704
- * seller (e.g., approved, rejected, pending).
705
- */
706
- /**
707
- * @typedef SubscribePlan
708
- * @property {string} [entity_type] - The type of entity for which the plan is
709
- * being subscribed (e.g., subscription, extension).
710
- * @property {string} [collection_type] - The method of collection for the
711
- * subscription (e.g., online, offline).
712
- * @property {string} [plan_id] - The identifier of the plan to subscribe to.
713
- * @property {string} [callback_url] - URL to which the payment result will be sent
714
- * @property {Meta} [meta]
715
- */
716
- /**
717
- * @typedef Meta
718
- * @property {boolean} [subscribe] - Indicates whether the subscription is being
719
- * initiated.
720
- * @property {boolean} [is_custom_plan] - Indicates if the plan is a custom plan
721
- * rather than a standard one.
722
- * @property {boolean} [is_plan_upgrade] - Indicates whether this subscription
723
- * is an upgrade from a previous plan.
724
- */
725
- /**
726
- * @typedef SubscribePlanRes
727
- * @property {string} [redirect_url] - The URL to which the user should be
728
- * redirected after completion of subscription process.
729
- * @property {string} [transaction_id] - The unique identifier for the
730
- * subscription transaction.
731
- * @property {string} [current_status] - The current status of the subscription
732
- * process (e.g., initiated, success, failed).
733
- * @property {Meta} [meta]
734
- */
735
- /**
736
- * @typedef EntityDetail
737
- * @property {string} [entity] - Specifies the type of entity (e.g., subscription, user).
738
- * @property {Subscription} [item]
739
- */
740
- /**
741
- * @typedef PaymentOptions
742
- * @property {string} [_id] - Unique identifier for the payment option.
743
- * @property {string} [name] - Name of the payment option.
744
- * @property {string} [description] - Brief description of the payment option's
745
- * functionality.
746
- * @property {string} [logo] - URL of the payment option's logo like upi logo.
747
- * @property {string} [aggregator_id] - Unique identifier for the payment aggregator.
748
- * @property {string} [aggregator] - Identifier for the payment aggregator system.
749
- * @property {string} [created_at] - Date and time when the payment option was created.
750
- * @property {string} [modified_at] - Date and time when the payment option was
751
- * last modified.
752
- * @property {number} [__v] - Version key for document revision control.
753
- */
754
- /**
755
- * @typedef VerifyPaymentReq
756
- * @property {string} [razorpay_payment_id] - Unique identifier for the Razorpay payment.
757
- * @property {string} [razorpay_order_id] - Unique identifier for the Razorpay order.
758
- * @property {string} [razorpay_signature] - Signature generated by Razorpay to
759
- * verify the payment.
760
- * @property {number} [status_code] - HTTP status code of the payment
761
- * verification response.
762
- * @property {string} [provider_type] - The payment provider used for the transaction.
763
- */
764
- /**
765
- * @typedef Documents
766
- * @property {string} [pan] - Permanent Account Number (PAN) used for tax purposes.
767
- * @property {string} [gst] - Goods and Services Tax (GST) number for business taxation.
768
- */
769
- /**
770
- * @typedef BillingAddress
771
- * @property {string} [country] - The country where the billing address is located.
772
- * @property {string} [state] - The state or region within the country.
773
- * @property {string} [city] - The city of the billing address.
774
- * @property {string} [line1] - The first line of the billing address.
775
- * @property {string} [line2] - The second line of the billing address (if applicable).
776
- * @property {string} [postal_code] - The ZIP code of the billing address.
777
- * @property {string} [country_code] - ISO country code for the country of the
778
- * billing address.
779
- */
780
- /**
781
- * @typedef Currency
782
- * @property {string} [code] - Currency code as per ISO 4217.
783
- * @property {string} [symbol] - Symbol representing the currency.
784
- * @property {string} [name] - Full name of the currency.
785
- */
786
- /**
787
- * @typedef BusinessCountryInfo
788
- * @property {string} [country] - The country where the business is registered.
789
- * @property {string} [country_code] - ISO country code for the business's country.
790
- * @property {Currency} [currency]
791
- * @property {string} [timezone] - Timezone in which the business operates.
792
- */
793
- /**
794
- * @typedef SubscriberData
795
- * @property {boolean} [pg_user_exists] - Indicates if the user exists in the
796
- * payment gateway system.
797
- * @property {string} [id] - Unique identifier for the subscriber.
798
- * @property {string} [pg_customer_id] - Unique customer ID assigned by the
799
- * payment gateway.
800
- * @property {string} [default_payment_method] - Identifier for the default
801
- * payment method used by the subscriber.
802
- */
803
- /**
804
- * @typedef Subscriber
805
- * @property {Documents} [documents]
806
- * @property {Object} [phone] - Contact information for the subscriber, such as
807
- * phone number.
808
- * @property {BillingAddress} [billing_address]
809
- * @property {boolean} [consent] - Indicates whether the subscriber has given
810
- * consent for processing.
811
- * @property {boolean} [comms] - Indicates whether the subscriber has opted in
812
- * for communications.
813
- * @property {string} [_id] - Unique identifier for the subscriber in the system.
814
- * @property {string} [type] - The type of the subscriber, such as 'individual'
815
- * or 'company'.
816
- * @property {string} [unique_id] - A unique identifier assigned to the subscriber.
817
- * @property {string} [name] - The name of the subscriber.
818
- * @property {string} [email] - Email address of the subscriber.
819
- * @property {BusinessCountryInfo} [business_country_info]
820
- * @property {string} [created_at] - The date and time when the subscriber was created.
821
- * @property {string} [modified_at] - The date and time when the subscriber
822
- * details were last modified.
823
- * @property {number} [credit_balance] - The current credit balance for the
824
- * subscriber, if any.
825
- * @property {SubscriberData} [data]
826
- */
827
- /**
828
- * @typedef AuthorModifiedDetails
829
- * @property {string} [first_name] - The first name of the author who made modifications.
830
- * @property {string} [last_name] - The last name of the author who made modifications.
831
- * @property {boolean} [is_admin] - Indicates whether the author has
832
- * administrative privileges.
833
- */
834
- /**
835
- * @typedef Author
836
- * @property {AuthorModifiedDetails} [modified_by_details]
837
- * @property {string} [created_by] - Identifier of the user who created the record.
838
- * @property {string} [modified_by] - Identifier of the user who last modified the record.
839
- */
840
- /**
841
- * @typedef EndingBalance
842
- * @property {number} [amount] - The ending balance amount.
843
- * @property {string} [old_entry_ref] - Reference to the previous entry if applicable.
844
- */
845
- /**
846
- * @typedef PaymentData
847
- * @property {string} [transaction_id] - The unique identifier for the transaction.
848
- * @property {string} [aggregator] - The payment aggregator used for the transaction.
849
- * @property {string} [aggregator_order_id] - The order ID generated by the
850
- * payment aggregator.
851
- * @property {string} [receipt_date] - The date and time when the receipt was generated.
852
- * @property {string} [unique_transaction_reference] - A unique reference for
853
- * the transaction.
854
- */
855
- /**
856
- * @typedef CreditTransaction
857
- * @property {Object} [entity] - The entity associated with the transaction.
858
- * @property {Author} [author]
859
- * @property {string} [_id] - The unique identifier for the credit transaction.
860
- * @property {number} [amount] - The amount credited in the transaction.
861
- * @property {string} [currency] - The currency of the transaction amount.
862
- * @property {string} [subscriber_id] - The unique identifier of the subscriber
863
- * involved in the transaction.
864
- * @property {string} [description] - A brief description of the transaction.
865
- * @property {string} [is_test] - Indicates if the transaction is a test transaction.
866
- * @property {EndingBalance} [ending_balance]
867
- * @property {PaymentData} [payment]
868
- * @property {string} [type] - The type of credit transaction.
869
- * @property {string} [created_at] - The date and time when the transaction was created.
870
- * @property {string} [modified_at] - The date and time when the transaction was
871
- * last modified.
872
- */
873
- /**
874
- * @typedef VerifyPaymentData
875
- * @property {boolean} [success] - Indicates if the payment verification was successful.
876
- * @property {Subscriber} [subscriber]
877
- * @property {CreditTransaction} [credit_transaction]
878
- */
879
- /**
880
- * @typedef VerifyPaymentRes
881
- * @property {string} [status] - The status of the payment verification.
882
- * @property {VerifyPaymentData} [data]
883
- */
884
- /**
885
- * @typedef DefaultMerchants
886
- * @property {string} [stripe] - The default Stripe merchant identifier.
887
- */
888
- /**
889
- * @typedef GlobalSettingsPayment
890
- * @property {DefaultMerchants} [default_merchants]
891
- */
892
- /**
893
- * @typedef GlobalSettingsData
894
- * @property {GlobalSettingsPayment} [payment]
895
- * @property {boolean} [freeze_panel] - Indicates if the panel is frozen.
896
- * @property {string} [_id] - Unique identifier for the global settings.
897
- * @property {string} [created_at] - The date and time when the global settings
898
- * were created.
899
- * @property {string} [modified_at] - The date and time when the global settings
900
- * were last modified.
901
- */
902
- /**
903
- * @typedef GlobalSettings
904
- * @property {string} [status] - The status of the global settings retrieval.
905
- * @property {GlobalSettingsData} [data]
906
- */
907
- /**
908
- * @typedef MethodChecks
909
- * @property {string} [address_line1_check] - Result of the address line 1 check.
910
- * @property {string} [address_postal_code_check] - Result of the address postal
911
- * code check.
912
- * @property {string} [cvc_check] - Result of the CVC check.
913
- */
914
- /**
915
- * @typedef MethodNetworks
916
- * @property {string[]} [available] - List of available networks for the payment method.
917
- * @property {string} [preferred] - Preferred network for the payment method.
918
- */
919
- /**
920
- * @typedef MethodSecureUsage
921
- * @property {boolean} [supported] - Indicates if 3D Secure is supported for the
922
- * payment method.
923
- */
924
- /**
925
- * @typedef MethodDetails
926
- * @property {string} [id] - Unique identifier for the payment method.
927
- * @property {string} [type] - Type of payment method.
928
- * @property {boolean} [mandate_available] - Indicates if a mandate is available
929
- * for the payment method.
930
- * @property {number} [mandate_amount] - Mandate amount for the payment method.
931
- * @property {string} [pg_payment_method_id] - Payment gateway's payment method
932
- * identifier.
933
- * @property {boolean} [is_default] - Indicates if the payment method is the default.
934
- * @property {SubscriptionMethodData} [data]
935
- */
936
- /**
937
- * @typedef SubscriptionMethodData
938
- * @property {string} [brand] - Brand of the payment method.
939
- * @property {MethodChecks} [checks]
940
- * @property {string} [country] - Country of the payment method.
941
- * @property {number} [exp_month] - Expiration month of the payment method.
942
- * @property {number} [exp_year] - Expiration year of the payment method.
943
- * @property {string} [fingerprint] - Fingerprint of the payment method.
944
- * @property {string} [funding] - Funding type of the payment method.
945
- * @property {string} [generated_from] - Source from which the payment method
946
- * was generated.
947
- * @property {string} [last4] - Last 4 digits of the payment method.
948
- * @property {MethodNetworks} [networks]
949
- * @property {MethodSecureUsage} [three_d_secure_usage]
950
- * @property {string} [wallet] - Wallet associated with the payment method.
951
- * @property {string} [name] - Name associated with the payment method.
952
- * @property {boolean} [is_default] - Indicates if the payment method is the default.
953
- */
954
- /**
955
- * @typedef SubscriptionMethods
956
- * @property {boolean} [success] - Indicates if the retrieval of subscription
957
- * methods was successful.
958
- * @property {MethodDetails[]} [data] - List of subscription methods.
959
- */
960
- /**
961
- * @typedef ConfigPublicKey
962
- * @property {string} [public_key] - Public key for the payment aggregator.
963
- */
964
- /**
965
- * @typedef ConfigRes
966
- * @property {boolean} [success] - Indicates if the retrieval of configuration
967
- * was successful.
968
- * @property {string} [aggregator] - The payment aggregator.
969
- * @property {ConfigPublicKey} [config]
970
- */
971
- /**
972
- * @typedef PlanChangeData
973
- * @property {number} [total] - The total amount after the plan change.
974
- * @property {number} [credit_note_amount] - The amount credited due to the plan change.
975
- * @property {number} [settlement] - The settlement amount for the plan change.
976
- * @property {number} [taxable_amount] - The taxable amount for the plan change.
977
- * @property {number} [gst_amount] - The GST amount for the plan change.
978
- * @property {number} [gross_total] - The gross total amount for the plan change.
979
- * @property {number} [gst] - The GST for the plan change.
980
- * @property {number} [discount] - The discount amount applied to the plan change.
981
- */
982
- /**
983
- * @typedef PlanChangeDetails
984
- * @property {string} [status] - Status of the plan change.
985
- * @property {PlanChangeData} [data]
986
- */
987
- /**
988
- * @typedef TransactionMeta
989
- * @property {string} [invoice_id] - Invoice ID associated with the transaction.
990
- */
991
- /**
992
- * @typedef PaymentTransactionDetails
993
- * @property {Object} [aggregator] - Payment aggregator details.
994
- * @property {string} [currency] - Currency used in the transaction.
995
- * @property {string} [current_status] - Current status of the transaction.
996
- * @property {string} [_id] - Unique identifier for the payment transaction.
997
- * @property {string} [subscriber_id] - Unique identifier for the subscriber.
998
- * @property {number} [amount] - Amount involved in the transaction.
999
- * @property {string} [entity_type] - Type of entity involved in the transaction.
1000
- * @property {string} [collection_type] - Type of collection for the transaction.
1001
- * @property {TransactionMeta} [meta]
1002
- * @property {string} [created_at] - Timestamp when the transaction was created.
1003
- * @property {string} [modified_at] - Timestamp when the transaction was last modified.
1004
- */
1005
- /**
1006
- * @typedef PaymentItems
1007
- * @property {string} [name] - Name of the payment option.
1008
- * @property {string} [code] - Code for the payment option
1009
- * @property {string} [aggregator] - Aggregator used for the payment option.
1010
- */
1011
- /**
1012
- * @typedef GetPaymentOptions
1013
- * @property {PaymentItems[]} [payment_options] - List of available payment options.
1014
- */
1015
- /**
1016
- * @typedef TopupReq
1017
- * @property {number} [amount] - Amount to be topped up.
1018
- * @property {string} [currency] - Currency in which the top-up is made.
1019
- * @property {string} [provider_type] - Provider type for the top-up.
1020
- */
1021
- /**
1022
- * @typedef SetupMandateReq
1023
- * @property {string} [intent_id] - ID of the setup intent.
1024
- * @property {string} [payment_method_id] - ID of the payment method.
1025
- */
1026
- /**
1027
- * @typedef SetupPaymentReq
1028
- * @property {string} [payment_method] - Payment method to be used.
1029
- * @property {string} [payment_id] - ID of the payment.
1030
- * @property {string} [plan_id] - ID of the plan.
1031
- * @property {string} [invoice_id] - ID of the invoice.
1032
- */
1033
- /**
1034
- * @typedef SubscriptionRenewReq
1035
- * @property {string} [invoice_id] - ID of the invoice for renewal.
1036
- * @property {string} [entity_type] - Type of entity for the renewal.
1037
- * @property {string} [collection_type] - Collection type for the renewal.
1038
- * @property {string} [callback_url] - URL to which the payment result will be sent
1039
- * @property {RenewMeta} [meta]
1040
- */
1041
- /**
1042
- * @typedef RenewMeta
1043
- * @property {boolean} [invoice_payment] - Indicates whether the invoice payment
1044
- * is involved in the renewal.
1045
- * @property {boolean} [renew] - Indicates whether the subscription is being renewed.
1046
- */
1047
- /**
1048
- * @typedef SubscriptionMethodsReq
1049
- * @property {string} [unique_external_id] - The unique external identifier for
1050
- * the subscription method.
1051
- * @property {string} [setup_intent_id] - The setup intent ID for the subscription method.
1052
- * @property {string} [pg_payment_method_id] - The payment gateway payment method ID.
1053
- * @property {boolean} [set_default] - Indicates whether this payment method
1054
- * should be set as the default.
1055
- */
1056
- /**
1057
- * @typedef CreditTransactionResponse
1058
- * @property {number} [total] - Total number of transactions.
1059
- * @property {number} [limit] - Maximum number of transactions per page.
1060
- * @property {number} [page] - Current page number.
1061
- * @property {number} [pages] - Total number of pages.
1062
- * @property {CreditTransaction[]} [items] - List of credit transactions.
1063
- */
1064
- /**
1065
- * @typedef DowngradePlanReq
1066
- * @property {string} [unique_id] - Unique identifier for the request.
1067
- * @property {string} [type] - Type of entity requesting the downgrade.
1068
- * @property {string} [product_suite] - Product suite for the plan.
1069
- * @property {string} [plan_id] - Plan ID for the downgrade request.
1070
- * @property {string} [reason] - Reason for downgrading the plan.
1071
- * @property {string} [platform] - Platform from which the request is made.
1072
- */
1073
- /**
1074
- * @typedef Taxation
1075
- * @property {number} [gst] - GST percentage.
1076
- */
1077
- /**
1078
- * @typedef OneTimeFees
1079
- * @property {number} [developement] - One-time development fee.
1080
- * @property {number} [marketing] - One-time marketing fee.
1081
- */
1082
- /**
1083
- * @typedef CreditLine
1084
- * @property {boolean} [is_active] - Indicates whether the credit line is active.
1085
- */
1086
- /**
1087
- * @typedef StatusMessage
1088
- * @property {string} [status] - Status of the request.
1089
- * @property {string} [message] - Detailed message regarding the status.
1090
- * @property {boolean} [success] - Indicates whether the operation was successful.
1091
- * @property {string} [code] - Status code of the operation.
1092
- */
1093
- /**
1094
- * @typedef PaymentCollectReq
1095
- * @property {string} [transaction_id] - ID of the transaction to collect payment for.
1096
- * @property {boolean} [credit_balance] - Indicates whether to use credit
1097
- * balance for the payment.
1098
- * @property {string} [payment_mode] - Mode of payment.
1099
- * @property {string} [payment_method] - Payment method to be used.
1100
- * @property {string} [invoice_id] - ID of the invoice for which the payment is collected.
1101
- */
1102
- /**
1103
- * @typedef SubscriptionRenewResMeta
1104
- * @property {boolean} [invoice_payment] - Indicates whether the invoice payment
1105
- * is involved in the renewal.
1106
- * @property {boolean} [renew] - Indicates whether the subscription is being renewed.
1107
- */
1108
- /**
1109
- * @typedef SubscriptionRenewRes
1110
- * @property {string} [redirect_url] - URL to redirect the user for completing
1111
- * the renewal.
1112
- * @property {string} [transaction_id] - ID of the renewal transaction.
1113
- * @property {string} [current_status] - Current status of the renewal process.
1114
- * @property {SubscriptionRenewResMeta} [meta]
1115
- */
1116
- /**
1117
- * @typedef SetupIntentRes
1118
- * @property {boolean} [success] - Indicates if the setup intent was successful.
1119
- * @property {SetupIntentData} [data]
1120
- */
1121
- /**
1122
- * @typedef SetupIntentData
1123
- * @property {string} [id] - The ID of the setup intent.
1124
- * @property {string} [client_secret] - The client secret of the setup intent.
1125
- * @property {string} [customer] - The customer associated with the setup intent.
1126
- * @property {string} [status] - The status of the setup intent.
1127
- */
1128
- /**
1129
- * @typedef SetupPayment
1130
- * @property {string} [id] - The ID of the setup payment.
1131
- * @property {string} [status] - The status of the setup payment.
1132
- * @property {string} [customer] - The customer associated with the setup payment.
1133
- * @property {string} [client_secret] - The client secret of the setup payment.
1134
- * @property {string} [payment_method] - The payment method used for the setup payment.
1135
- * @property {string} [mandate] - The mandate ID associated with the setup payment.
1136
- * @property {PaymentMethodOptions} [payment_method_options]
1137
- */
1138
- /**
1139
- * @typedef PaymentMethodOptions
1140
- * @property {Card} [card]
1141
- */
1142
- /**
1143
- * @typedef Card
1144
- * @property {MandateOptions} [mandate_options]
1145
- */
1146
- /**
1147
- * @typedef MandateOptions
1148
- * @property {number} [amount] - The mandate amount.
1149
- */
1150
- /**
1151
- * @typedef Message
1152
- * @property {string} [message] - A message providing details about the operation status.
1153
- */
1154
- /**
1155
- * @typedef TopupRes
1156
- * @property {string} [status] - The status of the top-up request.
1157
- * @property {string} [aggregator_order_id] - The order ID from the aggregator.
1158
- * @property {number} [amount] - The amount of the top-up.
1159
- * @property {string} [currency] - The currency of the top-up.
1160
- * @property {string} [transaction_id] - The transaction ID for the top-up.
1161
- */
1162
- /**
1163
- * @typedef CancelTopupReq
1164
- * @property {string} [order_id] - The order ID of the top-up to cancel.
1165
- */
1166
- /**
1167
- * @typedef CancelTopupRes
1168
- * @property {string} [_id] - The ID of the canceled top-up.
1169
- * @property {string} [subscriber_id] - The subscriber ID associated with the top-up.
1170
- * @property {number} [amount] - The amount of the canceled top-up.
1171
- * @property {string} [currency] - The currency of the canceled top-up.
1172
- * @property {string} [aggregator] - The aggregator used for the top-up.
1173
- * @property {string} [aggregator_order_id] - The order ID from the aggregator.
1174
- * @property {string} [created_at] - The date and time when the top-up was created.
1175
- * @property {string} [modified_at] - The date and time when the top-up was modified.
1176
- * @property {number} [__v] - The version key, used for internal purposes.
1177
- * @property {string} [aggregator_status] - The status of the top-up with the aggregator.
1178
- * @property {string} [current_status] - The current status of the top-up.
1179
- */
1180
- /**
1181
- * @typedef DefaultReq
1182
- * @property {string} [payment_method_id] - The ID of the payment method to set
1183
- * as default.
1184
- */
1185
185
  /**
1186
186
  * @typedef EntityChargeRecurring
1187
- * @property {string} interval - The interval of the subscription.
1188
- */
1189
- /**
1190
- * @typedef ChargeLineItem
1191
- * @property {string} name - Its name of the extension plan.
1192
- * @property {string} term - It indicates how it will be charged.
1193
- * @property {string} pricing_type - It indicates the extension subscription
1194
- * will be auto renewed timely.
1195
- * @property {EntityChargePrice} price
1196
- * @property {EntityChargeRecurring} [recurring]
1197
- * @property {number} [capped_amount]
1198
- * @property {number} [trial_days]
1199
- * @property {boolean} [is_test]
1200
- * @property {Object} [metadata]
1201
- */
1202
- /**
1203
- * @typedef CreateSubscriptionCharge
1204
- * @property {string} name - The name of the charge.
1205
- * @property {number} [trial_days]
1206
- * @property {ChargeLineItem[]} line_items
1207
- * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
1208
- * @property {string} return_url - The URL passed in request which extension
1209
- * expects in return.
1210
- */
1211
- /**
1212
- * @typedef EntityChargeDetails
1213
- * @property {string} [_id] - Unique identifier for the charge.
1214
- * @property {string} [subscription_id] - Unique identifier of the extension subscription.
1215
- * @property {string} [subscriber_id] - Unique identifier of the
1216
- * subscriber/company who installed extension subscription.
1217
- * @property {string} [entity_type] - The type of entity associated with the
1218
- * charge (e.g., 'extension', 'subscription').
1219
- * @property {string} [entity_id] - Unique identifier for the entity associated
1220
- * with the charge.
1221
- * @property {string} [name] - The name of the charge.
1222
- * @property {string} [term] - Description of the charge term.
1223
- * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
1224
- * 'recurring').
1225
- * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
1226
- * 'one_time', 'recurring').
1227
- * @property {EntityChargePrice} [price]
1228
- * @property {ChargeRecurring} [recurring]
1229
- * @property {string} [status] - Current status of the charge.
1230
- * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
1231
- * @property {string} [activated_on] - Date and time when the charge was activated.
1232
- * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
1233
- * @property {string} [billing_date] - Date and time when the charge was billed.
1234
- * @property {SubscriptionTrialPeriod} [current_period]
1235
- * @property {string} [modified_at] - Date and time when the charge details were
1236
- * last modified.
1237
- * @property {string} [created_at] - Date and time when the charge was created.
1238
- * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
1239
- * @property {string} [company_id] - Company id.
1240
- * @property {Object} [meta] - Additional metadata associated with the charge.
1241
- * @property {number} [__v] - Internal version key for the charge record.
1242
- */
1243
- /**
1244
- * @typedef EntitySubscription
1245
- * @property {string} [_id] - Unique identifier for the subscription charge
1246
- * @property {string} [product_suit_id] - ID of the product suit associated with
1247
- * the charge
1248
- * @property {string} [entity_id] - Unique identifier for the entity
1249
- * @property {string} [entity_type] - Type of entity (e.g., subscription, extension)
1250
- * @property {string} [name] - Name of the subscription charge
1251
- * @property {string} [status] - Current status of the subscription charge
1252
- * @property {number} [trial_days] - Number of trial days provided
1253
- * @property {boolean} [is_test] - Indicates if the charge is for testing purposes
1254
- * @property {string} [created_at] - Timestamp when the charge was created
1255
- * @property {string} [modified_at] - Timestamp when the charge was last modified
1256
- * @property {string} [subscriber_id] - Unique Identifier of the company
1257
- * @property {EntityChargeDetails[]} [line_items]
1258
- * @property {string} [return_url] - The URL passed in request which extension
1259
- * expects in return.
1260
- */
1261
- /**
1262
- * @typedef CreateSubscriptionResponse
1263
- * @property {EntitySubscription} [subscription]
1264
- * @property {string} [confirm_url] - URL to which users are redirected to
1265
- * confirm or complete the payment or subscription process.
1266
- */
1267
- declare class BillingPlatformModel {
1268
- }
1269
- declare namespace BillingPlatformModel {
1270
- export { CompanyInfo, AddressDetails, InvoiceData, InvoiceDetailsData, Client, Period, StatusTrail, PaymentCollectRes, SubscriptionChargeRes, PostDowngradeRes, DowngradeRes, PaymentStatusData, PaymentStatusResponse, BadRequest, ResourceNotFound, InternalServerError, CheckValidityResponse, PlanRecurring, PlanMeta, CountryRes, Plan, SubscriptionTrialPeriod, EntityChargePrice, OneTimeChargeItem, CreateOneTimeCharge, ChargeRecurring, ChargeDetails, OneTimeChargeEntity, CreateOneTimeChargeResponse, Charge, InvoiceDetailsStatusTrail, InvoiceItemsPlanRecurring, InvoiceItemsPlan, InvoiceItemsPeriod, InvoiceItems, InvoicesDataClient, InvoicesDataPeriod, InvoicesDataPaymentMethod, InvoicesData, Invoices, Phone, SubscriptionBillingAddress, SubscriptionCustomer, SubscriptionCustomerCreate, SubscriptionCurrentPeriod, SubscriptionPauseCollection, SubscriptionTrial, SubscriptionInvoiceSettings, Subscription, SubscriptionStatus, SubscriptionLimitApplication, SubscriptionLimitMarketplace, SubscriptionLimitOtherPlatform, SubscriptionLimitTeam, SubscriptionLimitProducts, SubscriptionLimitExtensions, SubscriptionLimitIntegrations, SubscriptionLimit, IntentReq, PutIntentReq, SubscriptionActivateReq, SubscriptionActivateRes, CancelSubscriptionReq, CancelSubscriptionRes, PlanStatusUpdateReq, SubscribePlan, Meta, SubscribePlanRes, EntityDetail, PaymentOptions, VerifyPaymentReq, Documents, BillingAddress, Currency, BusinessCountryInfo, SubscriberData, Subscriber, AuthorModifiedDetails, Author, EndingBalance, PaymentData, CreditTransaction, VerifyPaymentData, VerifyPaymentRes, DefaultMerchants, GlobalSettingsPayment, GlobalSettingsData, GlobalSettings, MethodChecks, MethodNetworks, MethodSecureUsage, MethodDetails, SubscriptionMethodData, SubscriptionMethods, ConfigPublicKey, ConfigRes, PlanChangeData, PlanChangeDetails, TransactionMeta, PaymentTransactionDetails, PaymentItems, GetPaymentOptions, TopupReq, SetupMandateReq, SetupPaymentReq, SubscriptionRenewReq, RenewMeta, SubscriptionMethodsReq, CreditTransactionResponse, DowngradePlanReq, Taxation, OneTimeFees, CreditLine, StatusMessage, PaymentCollectReq, SubscriptionRenewResMeta, SubscriptionRenewRes, SetupIntentRes, SetupIntentData, SetupPayment, PaymentMethodOptions, Card, MandateOptions, Message, TopupRes, CancelTopupReq, CancelTopupRes, DefaultReq, EntityChargeRecurring, ChargeLineItem, CreateSubscriptionCharge, EntityChargeDetails, EntitySubscription, CreateSubscriptionResponse };
1271
- }
1272
- /** @returns {CompanyInfo} */
1273
- declare function CompanyInfo(): CompanyInfo;
1274
- type CompanyInfo = {
1275
- /**
1276
- * - Name of the company
1277
- */
1278
- company_name?: string;
1279
- /**
1280
- * - Goods and Services Tax Identification Number
1281
- */
1282
- gstin?: string;
1283
- /**
1284
- * - Main address of the company
1285
- */
1286
- address?: string;
1287
- address_details?: AddressDetails;
1288
- /**
1289
- * - Permanent Account Number of the company
1290
- */
1291
- pan?: string;
1292
- /**
1293
- * - Contact phone number for the company
1294
- */
1295
- phone?: string;
1296
- /**
1297
- * - Contact email address for the company
1298
- */
1299
- email?: string;
1300
- /**
1301
- * - Corporate Identification Number
1302
- */
1303
- cin?: string;
1304
- };
1305
- /** @returns {AddressDetails} */
1306
- declare function AddressDetails(): AddressDetails;
1307
- type AddressDetails = {
1308
- /**
1309
- * - First line of the address
1310
- */
1311
- address_line_1?: string;
1312
- /**
1313
- * - Second line of the address (optional)
1314
- */
1315
- address_line_2?: string;
1316
- /**
1317
- * - Company city
1318
- */
1319
- city?: string;
1320
- /**
1321
- * - Company pincode
1322
- */
1323
- pincode?: string;
1324
- /**
1325
- * - Company state
1326
- */
1327
- state?: string;
1328
- /**
1329
- * - Company country
1330
- */
1331
- country?: string;
1332
- };
1333
- /** @returns {InvoiceData} */
1334
- declare function InvoiceData(): InvoiceData;
1335
- type InvoiceData = {
1336
- invoice?: InvoiceDetailsData;
1337
- invoice_items?: InvoiceItems[];
1338
- shopsense_details?: CompanyInfo;
1339
- };
1340
- /** @returns {InvoiceDetailsData} */
1341
- declare function InvoiceDetailsData(): InvoiceDetailsData;
1342
- type InvoiceDetailsData = {
1343
- /**
1344
- * - Number of attempts made to collect the invoice payment
1345
- */
1346
- attemp?: number;
1347
- /**
1348
- * - Documents associated with the invoice
1349
- */
1350
- documents?: any;
1351
- /**
1352
- * - Payment details related to the invoice
1353
- */
1354
- payment?: any;
1355
- period?: Period;
1356
- client?: Client;
1357
- /**
1358
- * - Discount applied to the invoice
1359
- */
1360
- discount?: any;
1361
- /**
1362
- * - Taxation applied to the invoice
1363
- */
1364
- taxation?: any;
1365
- /**
1366
- * - Unique identifier for the invoice
1367
- */
1368
- _id?: string;
1369
- /**
1370
- * - Indicates if the invoice will
1371
- * automatically advance to the next stage of collection
1372
- */
1373
- auto_advance?: boolean;
1374
- /**
1375
- * - Method of collection (e.g.,
1376
- * charge_automatically, send_invoice)
1377
- */
1378
- collection_method?: string;
1379
- /**
1380
- * - Identifier for the subscriber associated
1381
- * with the invoice
1382
- */
1383
- subscriber_id?: string;
1384
- /**
1385
- * - Currency in which the invoice is issued
1386
- */
1387
- currency?: string;
1388
- /**
1389
- * - URL to view the invoice pdf
1390
- */
1391
- invoice_url?: string;
1392
- /**
1393
- * - Invoice number
1394
- */
1395
- number?: string;
1396
- /**
1397
- * - Indicates if the invoice has been paid
1398
- */
1399
- paid?: boolean;
1400
- /**
1401
- * - Payment gateway data related to the invoice
1402
- */
1403
- pg_data?: any;
1404
- /**
1405
- * - Receipt number for the invoice payment
1406
- */
1407
- receipt_number?: string;
1408
- /**
1409
- * - Statement descriptor for the invoice
1410
- */
1411
- statement_descriptor?: string;
1412
- /**
1413
- * - Current status of the invoice (e.g., paid, open)
1414
- */
1415
- current_status?: string;
1416
- /**
1417
- * - Trail of status changes for the invoice
1418
- */
1419
- status_trail?: StatusTrail[];
1420
- /**
1421
- * - Subtotal amount of the invoice
1422
- */
1423
- subtotal?: number;
1424
- /**
1425
- * - Total amount of the invoice
1426
- */
1427
- total?: number;
1428
- /**
1429
- * - Previous settlement amount (if any)
1430
- */
1431
- old_settlement?: number;
1432
- /**
1433
- * - Credit balance applied to the invoice
1434
- */
1435
- credit_balance?: number;
1436
- /**
1437
- * - Subscription associated with the invoice
1438
- */
1439
- subscription?: string;
1440
- /**
1441
- * - Number of attempts made to pay the invoice
1442
- */
1443
- attempt?: number;
1444
- /**
1445
- * - Timestamp for the next action on the invoice
1446
- */
1447
- next_action_time?: string;
1448
- /**
1449
- * - Amount of credit notes applied to the invoice
1450
- */
1451
- credit_note_amount?: number;
1452
- /**
1453
- * - Timestamp when the invoice was created
1454
- */
1455
- created_at?: string;
1456
- /**
1457
- * - Timestamp when the invoice was last modified
1458
- */
1459
- modified_at?: string;
1460
- /**
1461
- * - Type of invoice (e.g., subscription, extension)
1462
- */
1463
- invoice_type?: string;
1464
- };
1465
- /** @returns {Client} */
1466
- declare function Client(): Client;
1467
- type Client = {
1468
- /**
1469
- * - Name of the client
1470
- */
1471
- name?: string;
1472
- /**
1473
- * - Email address of the client
1474
- */
1475
- email?: string;
1476
- /**
1477
- * - Phone number of the client
1478
- */
1479
- phone?: string;
1480
- /**
1481
- * - List of address lines for the client's address
1482
- */
1483
- address_lines?: string[];
1484
- };
1485
- /** @returns {Period} */
1486
- declare function Period(): Period;
1487
- type Period = {
1488
- /**
1489
- * - Start date of the period
1490
- */
1491
- start?: string;
1492
- /**
1493
- * - End date of the period
1494
- */
1495
- end?: string;
1496
- };
1497
- /** @returns {StatusTrail} */
1498
- declare function StatusTrail(): StatusTrail;
1499
- type StatusTrail = {
1500
- /**
1501
- * - The status value of the invoice at a particular
1502
- * timestamp (e.g., open, paid, payment_due)
1503
- */
1504
- value?: string;
1505
- /**
1506
- * - The date and time when the status was
1507
- * recorded, in ISO 8601 format
1508
- */
1509
- timestamp?: string;
1510
- /**
1511
- * - Unique identifier for the status trail entry
1512
- */
1513
- _id?: string;
1514
- };
1515
- /** @returns {PaymentCollectRes} */
1516
- declare function PaymentCollectRes(): PaymentCollectRes;
1517
- type PaymentCollectRes = {
1518
- /**
1519
- * - Unique identifier for the transaction
1520
- */
1521
- transaction_id?: string;
1522
- /**
1523
- * - Current status of the payment
1524
- * collection (e.g., pending, completed, failed)
1525
- */
1526
- current_status?: string;
1527
- };
1528
- /** @returns {SubscriptionChargeRes} */
1529
- declare function SubscriptionChargeRes(): SubscriptionChargeRes;
1530
- type SubscriptionChargeRes = {
1531
- /**
1532
- * - Unique identifier for the subscription charge
1533
- */
1534
- _id?: string;
1535
- /**
1536
- * - ID of the product suit associated with
1537
- * the charge
1538
- */
1539
- product_suit_id?: string;
1540
- /**
1541
- * - Unique identifier for the entity
1542
- */
1543
- entity_id?: string;
1544
- /**
1545
- * - Type of entity (e.g., subscription, extension)
1546
- */
1547
- entity_type?: string;
1548
- /**
1549
- * - Name of the subscription charge
1550
- */
1551
- name?: string;
1552
- /**
1553
- * - Current status of the subscription charge
1554
- */
1555
- status?: string;
1556
- /**
1557
- * - Number of trial days provided
1558
- */
1559
- trial_days?: number;
1560
- /**
1561
- * - Date when the charge was activated
1562
- */
1563
- activated_on?: string;
1564
- /**
1565
- * - Date when the charge was cancelled
1566
- */
1567
- cancelled_on?: string;
1568
- /**
1569
- * - Indicates if the charge is for testing purposes
1570
- */
1571
- is_test?: boolean;
1572
- /**
1573
- * - Timestamp when the charge was created
1574
- */
1575
- created_at?: string;
1576
- /**
1577
- * - Timestamp when the charge was last modified
1578
- */
1579
- modified_at?: string;
1580
- /**
1581
- * - Company id
1582
- */
1583
- company_id?: string;
1584
- /**
1585
- * - List of line items associated with the charge
1586
- */
1587
- line_items?: any[];
1588
- };
1589
- /** @returns {PostDowngradeRes} */
1590
- declare function PostDowngradeRes(): PostDowngradeRes;
1591
- type PostDowngradeRes = {
1592
- success?: boolean;
1593
- data?: DowngradeRes;
1594
- };
1595
- /** @returns {DowngradeRes} */
1596
- declare function DowngradeRes(): DowngradeRes;
1597
- type DowngradeRes = {
1598
- /**
1599
- * - Unique identifier for the downgrade request
1600
- */
1601
- _id?: string;
1602
- /**
1603
- * - Current status of the downgrade request (e.g.,
1604
- * pending, completed)
1605
- */
1606
- status?: string;
1607
- /**
1608
- * - Unique identifier for the subscriber
1609
- * making the downgrade request
1610
- */
1611
- subscriber_id?: string;
1612
- /**
1613
- * - Indicates if the downgrade has been activated
1614
- */
1615
- activated?: boolean;
1616
- /**
1617
- * - Timestamp when the downgrade request was created
1618
- */
1619
- created_at?: string;
1620
- /**
1621
- * - Timestamp when the downgrade request was
1622
- * last modified
1623
- */
1624
- modified_at?: string;
1625
- /**
1626
- * - ID of the plan to which the subscriber is downgrading
1627
- */
1628
- plan_id?: string;
1629
- /**
1630
- * - Reason provided for the downgrade request
1631
- */
1632
- reason?: string;
1633
- /**
1634
- * - ID of the user who initiated the
1635
- * downgrade request
1636
- */
1637
- request_user_id?: string;
1638
- /**
1639
- * - ID of the subscription associated with
1640
- * the downgrade request
1641
- */
1642
- subscription_id?: string;
1643
- };
1644
- /** @returns {PaymentStatusData} */
1645
- declare function PaymentStatusData(): PaymentStatusData;
1646
- type PaymentStatusData = {
1647
- /**
1648
- * - Unique identifier for the payment status data
1649
- */
1650
- _id?: string;
1651
- /**
1652
- * - Payment journey status, such as 'forward' or 'backward'
1653
- */
1654
- journey?: string;
1655
- /**
1656
- * - List of responses received from
1657
- * webhooks related to the payment
1658
- */
1659
- webhook_response?: any[];
1660
- /**
1661
- * - Status of the payment as provided by
1662
- * the aggregator (e.g., succeeded, failed)
1663
- */
1664
- aggregator_status?: string;
1665
- /**
1666
- * - Current status of the payment (e.g.,
1667
- * paid, pending)
1668
- */
1669
- current_status?: string;
1670
- /**
1671
- * - Timestamp when the payment status data was created
1672
- */
1673
- created_at?: string;
1674
- /**
1675
- * - Timestamp when the payment status data was
1676
- * last modified
1677
- */
1678
- modified_at?: string;
1679
- /**
1680
- * - Version key for the payment status data (typically
1681
- * used for versioning in databases)
1682
- */
1683
- __v?: number;
1684
- /**
1685
- * - Unique identifier for the order
1686
- * provided by the payment aggregator
1687
- */
1688
- aggregator_order_id?: string;
1689
- };
1690
- /** @returns {PaymentStatusResponse} */
1691
- declare function PaymentStatusResponse(): PaymentStatusResponse;
1692
- type PaymentStatusResponse = {
1693
- /**
1694
- * - The status of the payment.
1695
- */
1696
- status?: string;
1697
- data?: PaymentStatusData;
1698
- };
1699
- /** @returns {BadRequest} */
1700
- declare function BadRequest(): BadRequest;
1701
- type BadRequest = {
1702
- /**
1703
- * - Failure message.
1704
- */
1705
- message?: string;
1706
- };
1707
- /** @returns {ResourceNotFound} */
1708
- declare function ResourceNotFound(): ResourceNotFound;
1709
- type ResourceNotFound = {
1710
- /**
1711
- * - Resource not found with {id}
1712
- */
1713
- message?: string;
1714
- code?: any;
1715
- success?: any;
1716
- };
1717
- /** @returns {InternalServerError} */
1718
- declare function InternalServerError(): InternalServerError;
1719
- type InternalServerError = {
1720
- /**
1721
- * - Internal server error
1722
- */
1723
- message?: string;
1724
- /**
1725
- * - Error code
1726
- */
1727
- code?: string;
1728
- };
1729
- /** @returns {CheckValidityResponse} */
1730
- declare function CheckValidityResponse(): CheckValidityResponse;
1731
- type CheckValidityResponse = {
1732
- /**
1733
- * - Indicates whether the request is valid.
1734
- */
1735
- is_valid?: boolean;
1736
- /**
1737
- * - The amount of discount applicable.
1738
- */
1739
- discount_amount?: number;
1740
- };
1741
- /** @returns {PlanRecurring} */
1742
- declare function PlanRecurring(): PlanRecurring;
1743
- type PlanRecurring = {
1744
- /**
1745
- * - The interval at which the plan recurs.
1746
- */
1747
- interval?: string;
1748
- interval_count?: number;
1749
- };
1750
- /** @returns {PlanMeta} */
1751
- declare function PlanMeta(): PlanMeta;
1752
- type PlanMeta = {
1753
- /**
1754
- * - Status of the seller associated with the plan.
1755
- */
1756
- seller_status?: string;
1757
- /**
1758
- * - Name of the company offering the plan.
1759
- */
1760
- company?: string;
1761
- /**
1762
- * - Display name for platform slug.
1763
- */
1764
- plan_platform_display_name?: string;
1765
- /**
1766
- * - Tags associated with the plan for
1767
- * categorization or identification.
1768
- */
1769
- tags?: string[];
1770
- };
1771
- /** @returns {CountryRes} */
1772
- declare function CountryRes(): CountryRes;
1773
- type CountryRes = {
1774
- /**
1775
- * - Name of the country.
1776
- */
1777
- name?: string;
1778
- /**
1779
- * - Country code.
1780
- */
1781
- code?: string;
1782
- };
1783
- /** @returns {Plan} */
1784
- declare function Plan(): Plan;
1785
- type Plan = {
1786
- /**
1787
- * - List of fee components associated
1788
- * with the plan. Each component may be represented as a string or an object.
1789
- */
1790
- fee_components?: any[];
1791
- recurring?: PlanRecurring;
1792
- /**
1793
- * - Indicates whether the plan is a trial plan.
1794
- */
1795
- is_trial_plan?: boolean;
1796
- /**
1797
- * - Group or category of the plan.
1798
- */
1799
- plan_group?: string;
1800
- /**
1801
- * - List of tag lines or descriptions
1802
- * associated with the plan.
1803
- */
1804
- tag_lines?: string[];
1805
- /**
1806
- * - Currency code used for the plan's pricing.
1807
- */
1808
- currency?: string;
1809
- /**
1810
- * - Identifier of the user or system that
1811
- * approved the plan.
1812
- */
1813
- approved_by?: string;
1814
- /**
1815
- * - Indicates if the plan is currently active.
1816
- */
1817
- is_active?: boolean;
1818
- /**
1819
- * - Indicates if the plan is visible to users.
1820
- */
1821
- is_visible?: boolean;
1822
- /**
1823
- * - Number of days for the trial period, if applicable.
1824
- */
1825
- trial_period?: number;
1826
- /**
1827
- * - List of add-ons available for the plan.
1828
- */
1829
- addons?: string[];
1830
- /**
1831
- * - List of tags associated with the plan.
1832
- */
1833
- tags?: string[];
1834
- /**
1835
- * - Type of the plan (e.g., public, private).
1836
- */
1837
- type?: string;
1838
- country?: CountryRes;
1839
- /**
1840
- * - Unique identifier for the plan.
1841
- */
1842
- _id?: string;
1843
- /**
1844
- * - Name of the plan.
1845
- */
1846
- name?: string;
1847
- /**
1848
- * - Description of the plan.
1849
- */
1850
- description?: string;
1851
- /**
1852
- * - Amount to be charged for the plan.
1853
- */
1854
- amount?: number;
1855
- /**
1856
- * - Identifier of the product suite to
1857
- * which the plan belongs.
1858
- */
1859
- product_suite_id?: string;
1860
- /**
1861
- * - Timestamp when the plan was created.
1862
- */
1863
- created_at?: string;
1864
- /**
1865
- * - Timestamp when the plan was last modified.
1866
- */
1867
- modified_at?: string;
1868
- taxation?: Taxation;
1869
- one_time_fees?: OneTimeFees;
1870
- credit_line?: CreditLine;
1871
- /**
1872
- * - Current status of the plan (e.g.,
1873
- * active, inactive).
1874
- */
1875
- current_status?: string;
1876
- /**
1877
- * - Type of channel where the plan is offered
1878
- * (e.g., ecomm, retail).
1879
- */
1880
- channel_type?: string;
1881
- /**
1882
- * - List of company IDs associated with the
1883
- * plan. Can be null.
1884
- */
1885
- company_ids?: string[];
1886
- /**
1887
- * - Platform where the plan is available (e.g.,
1888
- * web, mobile). Can be null.
1889
- */
1890
- platform?: string;
1891
- /**
1892
- * - Timestamp when the plan was activated.
1893
- */
1894
- activated_on?: string;
1895
- meta?: PlanMeta;
1896
- /**
1897
- * - Identifier of the user who created the plan.
1898
- */
1899
- created_by?: string;
1900
- };
1901
- /** @returns {SubscriptionTrialPeriod} */
1902
- declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod;
1903
- type SubscriptionTrialPeriod = {
1904
- /**
1905
- * - The start date and time of the trial period.
1906
- */
1907
- start_date?: string;
1908
- /**
1909
- * - The end date and time of the trial period.
1910
- */
1911
- end_date?: string;
1912
- };
1913
- /** @returns {EntityChargePrice} */
1914
- declare function EntityChargePrice(): EntityChargePrice;
1915
- type EntityChargePrice = {
1916
- /**
1917
- * - The amount for the price. The minimum value is 1.
1918
- */
1919
- amount?: number;
1920
- /**
1921
- * - The currency code for the price
1922
- */
1923
- currency_code?: string;
1924
- };
1925
- /** @returns {OneTimeChargeItem} */
1926
- declare function OneTimeChargeItem(): OneTimeChargeItem;
1927
- type OneTimeChargeItem = {
1928
- /**
1929
- * - The name of the one-time charge item.
1930
- */
1931
- name?: string;
1932
- /**
1933
- * - The term or description of the charge.
1934
- */
1935
- term?: string;
1936
- /**
1937
- * - The type of pricing for the charge item.
1938
- */
1939
- pricing_type?: string;
1940
- price?: EntityChargePrice;
1941
- /**
1942
- * - The maximum amount that can be charged
1943
- * for this item, if applicable.
1944
- */
1945
- capped_amount?: number;
1946
- /**
1947
- * - Indicates whether the charge item is for
1948
- * testing purposes.
1949
- */
1950
- is_test?: boolean;
1951
- /**
1952
- * - Additional metadata associated with the charge item.
1953
- */
1954
- metadata?: any;
1955
- };
1956
- /** @returns {CreateOneTimeCharge} */
1957
- declare function CreateOneTimeCharge(): CreateOneTimeCharge;
1958
- type CreateOneTimeCharge = {
1959
- /**
1960
- * - The name of the one-time charge to be created.
1961
- */
1962
- name?: string;
1963
- charge?: OneTimeChargeItem;
1964
- /**
1965
- * - Indicates whether the charge creation is for
1966
- * testing purposes.
1967
- */
1968
- is_test?: boolean;
1969
- /**
1970
- * - URL to which the user will be redirected
1971
- * after creating the charge.
1972
- */
1973
- return_url?: string;
1974
- };
1975
- /** @returns {ChargeRecurring} */
1976
- declare function ChargeRecurring(): ChargeRecurring;
1977
- type ChargeRecurring = {
1978
- interval?: string;
1979
- interval_time?: number;
1980
- };
1981
- /** @returns {ChargeDetails} */
1982
- declare function ChargeDetails(): ChargeDetails;
1983
- type ChargeDetails = {
1984
- /**
1985
- * - Unique identifier for the charge.
1986
- */
1987
- _id?: string;
1988
- /**
1989
- * - The type of entity associated with the
1990
- * charge (e.g., 'extension', 'subscription').
1991
- */
1992
- entity_type?: string;
1993
- /**
1994
- * - Unique identifier for the entity associated
1995
- * with the charge.
1996
- */
1997
- entity_id?: string;
1998
- /**
1999
- * - The name of the charge.
2000
- */
2001
- name?: string;
2002
- /**
2003
- * - Description of the charge term.
2004
- */
2005
- term?: string;
2006
- /**
2007
- * - The type of charge (e.g., 'standalone',
2008
- * 'recurring').
2009
- */
2010
- charge_type?: string;
2011
- /**
2012
- * - The pricing model for the charge (e.g.,
2013
- * 'one_time', 'recurring').
2014
- */
2015
- pricing_type?: string;
2016
- price?: EntityChargePrice;
2017
- recurring?: ChargeRecurring;
2018
- /**
2019
- * - Current status of the charge.
2020
- */
2021
- status?: string;
2022
- /**
2023
- * - Maximum amount that can be charged, if applicable.
2024
- */
2025
- capped_amount?: number;
2026
- /**
2027
- * - Date and time when the charge was activated.
2028
- */
2029
- activated_on?: string;
2030
- /**
2031
- * - Date and time when the charge was cancelled.
2032
- */
2033
- cancelled_on?: string;
2034
- /**
2035
- * - Date and time when the charge was billed.
2036
- */
2037
- billing_date?: string;
2038
- current_period?: SubscriptionTrialPeriod;
2039
- /**
2040
- * - Date and time when the charge details were
2041
- * last modified.
2042
- */
2043
- modified_at?: string;
2044
- /**
2045
- * - Date and time when the charge was created.
2046
- */
2047
- created_at?: string;
2048
- /**
2049
- * - Indicates whether the charge is for testing purposes.
2050
- */
2051
- is_test?: boolean;
2052
- /**
2053
- * - Company id.
2054
- */
2055
- company_id?: string;
2056
- /**
2057
- * - Additional metadata associated with the charge.
2058
- */
2059
- meta?: any;
2060
- /**
2061
- * - Internal version key for the charge record.
2062
- */
2063
- __v?: number;
2064
- };
2065
- /** @returns {OneTimeChargeEntity} */
2066
- declare function OneTimeChargeEntity(): OneTimeChargeEntity;
2067
- type OneTimeChargeEntity = {
2068
- /**
2069
- * - Description of the charge term or usage.
2070
- */
2071
- term?: string;
2072
- /**
2073
- * - Type of the charge (e.g., 'subscription',
2074
- * 'extension').
2075
- */
2076
- charge_type?: string;
2077
- /**
2078
- * - Maximum amount that can be charged. If
2079
- * no cap, the value should be 0.
2080
- */
2081
- capped_amount?: number;
2082
- /**
2083
- * - Date when the charge was billed. Null if
2084
- * not yet billed.
2085
- */
2086
- billing_date?: string;
2087
- /**
2088
- * - Date and time when the charge entity was created.
2089
- */
2090
- created_at?: string;
2091
- /**
2092
- * - Date and time when the charge entity was
2093
- * last modified.
2094
- */
2095
- modified_at?: string;
2096
- /**
2097
- * - Internal version key for the charge record.
2098
- */
2099
- __v?: number;
2100
- /**
2101
- * - Unique identifier for the charge entity.
2102
- */
2103
- _id?: string;
2104
- /**
2105
- * - The name of the one-time charge.
2106
- */
2107
- name?: string;
2108
- /**
2109
- * - Current status of the charge (e.g., 'pending',
2110
- * 'completed').
2111
- */
2112
- status?: string;
2113
- /**
2114
- * - Date and time when the charge was
2115
- * activated. Null if not yet activated.
2116
- */
2117
- activated_on?: string;
2118
- /**
2119
- * - Date and time when the charge was
2120
- * cancelled. Null if not cancelled.
2121
- */
2122
- cancelled_on?: string;
2123
- /**
2124
- * - Additional metadata associated with the charge.
2125
- */
2126
- metadata?: any;
2127
- /**
2128
- * - URL to redirect to after processing the charge.
2129
- */
2130
- return_url?: string;
2131
- /**
2132
- * - Indicates whether the charge is for testing purposes.
2133
- */
2134
- is_test?: boolean;
2135
- /**
2136
- * - Pricing model for the charge (e.g., 'one_time').
2137
- */
2138
- pricing_type?: string;
2139
- /**
2140
- * - Unique identifier for the subscriber
2141
- * associated with the charge.
2142
- */
2143
- subscriber_id?: string;
2144
- /**
2145
- * - Type of the entity related to the charge
2146
- * (e.g., 'subscription', 'user').
2147
- */
2148
- entity_type?: string;
2149
- /**
2150
- * - Unique identifier for the entity associated
2151
- * with the charge.
2152
- */
2153
- entity_id?: string;
2154
- /**
2155
- * - Additional metadata associated with the charge.
2156
- */
2157
- meta?: any;
2158
- price?: EntityChargePrice;
2159
- };
2160
- /** @returns {CreateOneTimeChargeResponse} */
2161
- declare function CreateOneTimeChargeResponse(): CreateOneTimeChargeResponse;
2162
- type CreateOneTimeChargeResponse = {
2163
- charge?: Charge;
2164
- /**
2165
- * - URL to which users are redirected to
2166
- * confirm or complete the payment or subscription process.
2167
- */
2168
- confirm_url?: string;
2169
- };
2170
- /** @returns {Charge} */
2171
- declare function Charge(): Charge;
2172
- type Charge = {
2173
- final_charge?: OneTimeChargeEntity;
2174
- };
2175
- /** @returns {InvoiceDetailsStatusTrail} */
2176
- declare function InvoiceDetailsStatusTrail(): InvoiceDetailsStatusTrail;
2177
- type InvoiceDetailsStatusTrail = {
2178
- /**
2179
- * - Unique identifier for the status trail entry.
2180
- */
2181
- _id?: string;
2182
- /**
2183
- * - The status value of the invoice at a particular
2184
- * point in time.
2185
- */
2186
- value?: string;
2187
- /**
2188
- * - The date and time when this status was recorded.
2189
- */
2190
- timestamp?: string;
2191
- };
2192
- /** @returns {InvoiceItemsPlanRecurring} */
2193
- declare function InvoiceItemsPlanRecurring(): InvoiceItemsPlanRecurring;
2194
- type InvoiceItemsPlanRecurring = {
2195
- /**
2196
- * - The interval at which the plan recurs (e.g.,
2197
- * month, year).
2198
- */
2199
- interval?: string;
2200
- /**
2201
- * - The number of intervals for the recurring plan.
2202
- */
2203
- interval_count?: number;
2204
- };
2205
- /** @returns {InvoiceItemsPlan} */
2206
- declare function InvoiceItemsPlan(): InvoiceItemsPlan;
2207
- type InvoiceItemsPlan = {
2208
- recurring?: InvoiceItemsPlanRecurring;
2209
- /**
2210
- * - Indicates whether the plan is a trial plan.
2211
- */
2212
- is_trial_plan?: boolean;
2213
- /**
2214
- * - Group or category to which the plan belongs.
2215
- */
2216
- plan_group?: string;
2217
- /**
2218
- * - List of tag lines or short descriptions
2219
- * for the plan.
2220
- */
2221
- tag_lines?: string[];
2222
- /**
2223
- * - Currency code for the pricing of the plan.
2224
- */
2225
- currency?: string;
2226
- /**
2227
- * - Indicates whether the plan is currently active.
2228
- */
2229
- is_active?: boolean;
2230
- /**
2231
- * - Indicates whether the plan is visible to users.
2232
- */
2233
- is_visible?: boolean;
2234
- /**
2235
- * - The number of days for the trial period.
2236
- */
2237
- trial_period?: number;
2238
- /**
2239
- * - List of add-ons available with the plan.
2240
- */
2241
- addons?: string[];
2242
- /**
2243
- * - Tags associated with the plan for categorization.
2244
- */
2245
- tags?: string[];
2246
- /**
2247
- * - Type of the plan (e.g., public, private).
2248
- */
2249
- type?: string;
2250
- /**
2251
- * - Country for which plan is created
2252
- */
2253
- country?: string;
2254
- /**
2255
- * - Unique identifier for the plan.
2256
- */
2257
- _id?: string;
2258
- /**
2259
- * - Name of the plan.
2260
- */
2261
- name?: string;
2262
- /**
2263
- * - Detailed description of the plan.
2264
- */
2265
- description?: string;
2266
- /**
2267
- * - Price of the plan in the specified currency.
2268
- */
2269
- amount?: number;
2270
- /**
2271
- * - Identifier for the product suite to
2272
- * which the plan belongs.
2273
- */
2274
- product_suite_id?: string;
2275
- /**
2276
- * - Timestamp when the plan was created.
2277
- */
2278
- created_at?: string;
2279
- /**
2280
- * - Timestamp when the plan was last modified.
2281
- */
2282
- modified_at?: string;
2283
- };
2284
- /** @returns {InvoiceItemsPeriod} */
2285
- declare function InvoiceItemsPeriod(): InvoiceItemsPeriod;
2286
- type InvoiceItemsPeriod = {
2287
- /**
2288
- * - Start date of the invoice period.
2289
- */
2290
- start?: string;
2291
- /**
2292
- * - End date of the invoice period.
2293
- */
2294
- end?: string;
2295
- };
2296
- /** @returns {InvoiceItems} */
2297
- declare function InvoiceItems(): InvoiceItems;
2298
- type InvoiceItems = {
2299
- /**
2300
- * - Unique identifier for the invoice item.
2301
- */
2302
- _id?: string;
2303
- /**
2304
- * - Currency for the amount.
2305
- */
2306
- currency?: string;
2307
- plan?: InvoiceItemsPlan;
2308
- /**
2309
- * - Name of the invoice item.
2310
- */
2311
- name?: string;
2312
- /**
2313
- * - Number of units of the invoice item.
2314
- */
2315
- quantity?: number;
2316
- /**
2317
- * - Description of the invoice item.
2318
- */
2319
- description?: string;
2320
- period?: InvoiceItemsPeriod;
2321
- /**
2322
- * - Amount per unit of the invoice item.
2323
- */
2324
- unit_amount?: number;
2325
- /**
2326
- * - Total amount for the invoice item.
2327
- */
2328
- amount?: number;
2329
- /**
2330
- * - Type of the invoice item (e.g., subscription, extension).
2331
- */
2332
- type?: string;
2333
- /**
2334
- * - Identifier for the invoice to which the item belongs.
2335
- */
2336
- invoice_id?: string;
2337
- /**
2338
- * - Timestamp when the invoice item was created.
2339
- */
2340
- created_at?: string;
2341
- /**
2342
- * - Timestamp when the invoice item was last modified.
2343
- */
2344
- modified_at?: string;
2345
- };
2346
- /** @returns {InvoicesDataClient} */
2347
- declare function InvoicesDataClient(): InvoicesDataClient;
2348
- type InvoicesDataClient = {
2349
- /**
2350
- * - Name of the client.
2351
- */
2352
- name?: string;
2353
- /**
2354
- * - Email address of the client.
2355
- */
2356
- email?: string;
2357
- /**
2358
- * - Phone number of the client.
2359
- */
2360
- phone?: string;
2361
- /**
2362
- * - Array of address lines for the client’s address.
2363
- */
2364
- address_lines?: string[];
2365
- };
2366
- /** @returns {InvoicesDataPeriod} */
2367
- declare function InvoicesDataPeriod(): InvoicesDataPeriod;
2368
- type InvoicesDataPeriod = {
2369
- /**
2370
- * - The start date and time of the invoice period.
2371
- */
2372
- start?: string;
2373
- /**
2374
- * - The end date and time of the invoice period.
2375
- */
2376
- end?: string;
2377
- };
2378
- /** @returns {InvoicesDataPaymentMethod} */
2379
- declare function InvoicesDataPaymentMethod(): InvoicesDataPaymentMethod;
2380
- type InvoicesDataPaymentMethod = {
2381
- /**
2382
- * - Payment gateway-specific payment
2383
- * method identifier. Nullable if not applicable.
2384
- */
2385
- pg_payment_method_id?: string;
2386
- };
2387
- /** @returns {InvoicesData} */
2388
- declare function InvoicesData(): InvoicesData;
2389
- type InvoicesData = {
2390
- /**
2391
- * - Unique identifier for the invoice.
2392
- */
2393
- _id?: string;
2394
- /**
2395
- * - Associated documents related to the invoice.
2396
- */
2397
- documents?: any;
2398
- /**
2399
- * - Payment details for the invoice.
2400
- */
2401
- payment?: any;
2402
- /**
2403
- * - Previous settlement amount, if applicable.
2404
- */
2405
- old_settlement?: number;
2406
- /**
2407
- * - Remaining credit balance applied to the
2408
- * invoice, if any.
2409
- */
2410
- credit_balance?: number;
2411
- /**
2412
- * - Details of any discounts applied to the invoice.
2413
- */
2414
- discount?: any;
2415
- /**
2416
- * - Taxation details associated with the invoice.
2417
- */
2418
- taxation?: any;
2419
- /**
2420
- * - Amount covered by credit notes, if any.
2421
- */
2422
- credit_note_amount?: number;
2423
- client?: InvoicesDataClient;
2424
- /**
2425
- * - Indicates if the invoice should be
2426
- * auto-advanced in the billing process.
2427
- */
2428
- auto_advance?: boolean;
2429
- /**
2430
- * - Currency code used for the invoice amount.
2431
- */
2432
- currency?: string;
2433
- /**
2434
- * - Indicates if the invoice has been paid.
2435
- */
2436
- paid?: boolean;
2437
- /**
2438
- * - Number of payment attempts made for the invoice.
2439
- */
2440
- attemp?: number;
2441
- /**
2442
- * - Method used to collect payment for
2443
- * the invoice.
2444
- */
2445
- collection_method?: string;
2446
- /**
2447
- * - Identifier for the subscriber associated
2448
- * with the invoice.
2449
- */
2450
- subscriber_id?: string;
2451
- /**
2452
- * - URL to view or download the invoice.
2453
- * "null" if not available.
2454
- */
2455
- invoice_url?: string;
2456
- /**
2457
- * - Unique invoice number.
2458
- */
2459
- number?: string;
2460
- /**
2461
- * - Payment gateway-related data for the invoice.
2462
- */
2463
- pg_data?: any;
2464
- period?: InvoicesDataPeriod;
2465
- /**
2466
- * - Receipt number for the invoice payment.
2467
- */
2468
- receipt_number?: string;
2469
- /**
2470
- * - Descriptor that appears on the
2471
- * client's statement for the invoice.
2472
- */
2473
- statement_descriptor?: string;
2474
- /**
2475
- * - Current status of the invoice (e.g.,
2476
- * paid, pending).
2477
- */
2478
- current_status?: string;
2479
- /**
2480
- * - History of status
2481
- * changes for the invoice.
2482
- */
2483
- status_trail?: InvoiceDetailsStatusTrail[];
2484
- /**
2485
- * - Subtotal amount before taxes and discounts.
2486
- */
2487
- subtotal?: number;
2488
- /**
2489
- * - Total amount including taxes and discounts.
2490
- */
2491
- total?: number;
2492
- /**
2493
- * - Identifier for the subscription
2494
- * associated with the invoice.
2495
- */
2496
- subscription?: string;
2497
- /**
2498
- * - Scheduled time for the next action
2499
- * related to the invoice.
2500
- */
2501
- next_action_time?: string;
2502
- /**
2503
- * - Timestamp when the invoice was created.
2504
- */
2505
- created_at?: string;
2506
- /**
2507
- * - Timestamp when the invoice was last modified.
2508
- */
2509
- modified_at?: string;
2510
- /**
2511
- * - Unique hash identifier for the invoice.
2512
- */
2513
- hash_identifier?: string;
2514
- payment_method?: InvoicesDataPaymentMethod;
2515
- /**
2516
- * - List of items included in the invoice.
2517
- */
2518
- invoice_items?: InvoiceItems[];
2519
- /**
2520
- * - Type of invoice (e.g., extension, subscription).
2521
- */
2522
- invoice_type?: string;
2523
- };
2524
- /** @returns {Invoices} */
2525
- declare function Invoices(): Invoices;
2526
- type Invoices = {
2527
- data?: InvoicesData[];
2528
- /**
2529
- * - Index of the first item in the results.
2530
- */
2531
- start?: number;
2532
- /**
2533
- * - Index of the last item in the results.
2534
- */
2535
- end?: number;
2536
- /**
2537
- * - Number of items per page.
2538
- */
2539
- limit?: number;
2540
- /**
2541
- * - Page number of the results.
2542
- */
2543
- page?: number;
2544
- /**
2545
- * - Total number of items available.
2546
- */
2547
- total?: number;
2548
- };
2549
- /** @returns {Phone} */
2550
- declare function Phone(): Phone;
2551
- type Phone = {
2552
- /**
2553
- * - The phone number of the contact.
2554
- */
2555
- phone_number?: string;
2556
- /**
2557
- * - The country code of the phone number.
2558
- */
2559
- phone_country_code?: string;
2560
- };
2561
- /** @returns {SubscriptionBillingAddress} */
2562
- declare function SubscriptionBillingAddress(): SubscriptionBillingAddress;
2563
- type SubscriptionBillingAddress = {
2564
- /**
2565
- * - Name of the country for the billing address.
2566
- */
2567
- country?: string;
2568
- /**
2569
- * - ISO country code for the billing address.
2570
- */
2571
- country_code?: string;
2572
- /**
2573
- * - State or province for the billing address.
2574
- */
2575
- state?: string;
2576
- /**
2577
- * - City for the billing address.
2578
- */
2579
- city?: string;
2580
- /**
2581
- * - First line of the street address.
2582
- */
2583
- line1?: string;
2584
- /**
2585
- * - Second line of the street address (optional).
2586
- */
2587
- line2?: string;
2588
- /**
2589
- * - Postal or ZIP code for the billing address.
2590
- */
2591
- postal_code?: string;
2592
- };
2593
- /** @returns {SubscriptionCustomer} */
2594
- declare function SubscriptionCustomer(): SubscriptionCustomer;
2595
- type SubscriptionCustomer = {
2596
- phone?: Phone;
2597
- billing_address?: SubscriptionBillingAddress;
2598
- /**
2599
- * - Unique identifier for the subscriber.
2600
- */
2601
- _id?: string;
2602
- /**
2603
- * - Identifier specific to the company.
2604
- */
2605
- unique_id?: string;
2606
- /**
2607
- * - Type of the customer (e.g., developer, company).
2608
- */
2609
- type?: string;
2610
- /**
2611
- * - Name of the customer.
2612
- */
2613
- name?: string;
2614
- /**
2615
- * - Email address of the customer.
2616
- */
2617
- email?: string;
2618
- /**
2619
- * - Timestamp when the customer record was created.
2620
- */
2621
- created_at?: string;
2622
- /**
2623
- * - Timestamp when the customer record was
2624
- * last modified.
2625
- */
2626
- modified_at?: string;
2627
- /**
2628
- * - Additional data related to the customer.
2629
- */
2630
- data?: any;
2631
- /**
2632
- * - Associated documents related to the customer.
2633
- */
2634
- documents?: any;
2635
- /**
2636
- * - Indicates whether the customer has given consent.
2637
- */
2638
- consent?: boolean;
2639
- /**
2640
- * - Indicates whether the customer has opted in for
2641
- * communications.
2642
- */
2643
- comms?: boolean;
2644
- /**
2645
- * - Current credit balance for the customer, if any.
2646
- */
2647
- credit_balance?: number;
2648
- business_country_info?: BusinessCountryInfo;
2649
- };
2650
- /** @returns {SubscriptionCustomerCreate} */
2651
- declare function SubscriptionCustomerCreate(): SubscriptionCustomerCreate;
2652
- type SubscriptionCustomerCreate = {
2653
- phone?: Phone;
2654
- billing_address?: SubscriptionBillingAddress;
2655
- /**
2656
- * - Company id for the customer, generated by the client.
2657
- */
2658
- unique_id?: string;
2659
- /**
2660
- * - Type of company
2661
- */
2662
- type?: string;
2663
- /**
2664
- * - Name of the company
2665
- */
2666
- name?: string;
2667
- /**
2668
- * - Email address of the company
2669
- */
2670
- email?: string;
2671
- };
2672
- /** @returns {SubscriptionCurrentPeriod} */
2673
- declare function SubscriptionCurrentPeriod(): SubscriptionCurrentPeriod;
2674
- type SubscriptionCurrentPeriod = {
2675
- /**
2676
- * - The start date and time of the current
2677
- * subscription period.
2678
- */
2679
- start?: string;
2680
- /**
2681
- * - The end date and time of the current subscription period.
2682
- */
2683
- end?: string;
2684
- };
2685
- /** @returns {SubscriptionPauseCollection} */
2686
- declare function SubscriptionPauseCollection(): SubscriptionPauseCollection;
2687
- type SubscriptionPauseCollection = {
2688
- /**
2689
- * - Defines the behavior of the subscription when
2690
- * it is paused. Possible values could include `keep_as_draft` or `cancel`.
2691
- */
2692
- behavior?: string;
2693
- /**
2694
- * - The date and time when the paused
2695
- * subscription is scheduled to resume.
2696
- */
2697
- resume_at?: string;
2698
- };
2699
- /** @returns {SubscriptionTrial} */
2700
- declare function SubscriptionTrial(): SubscriptionTrial;
2701
- type SubscriptionTrial = {
2702
- /**
2703
- * - The start date and time of the subscription trial period.
2704
- */
2705
- start?: string;
2706
- /**
2707
- * - The end date and time of the subscription trial period.
2708
- */
2709
- end?: string;
2710
- };
2711
- /** @returns {SubscriptionInvoiceSettings} */
2712
- declare function SubscriptionInvoiceSettings(): SubscriptionInvoiceSettings;
2713
- type SubscriptionInvoiceSettings = {
2714
- /**
2715
- * - Indicates whether invoices are
2716
- * automatically generated for the subscription.
2717
- */
2718
- generation?: boolean;
2719
- /**
2720
- * - Indicates whether charging is enabled for
2721
- * the subscription. This setting determines if charges are applied based on
2722
- * the invoice settings.
2723
- */
2724
- charging?: boolean;
2725
- };
2726
- /** @returns {Subscription} */
2727
- declare function Subscription(): Subscription;
2728
- type Subscription = {
2729
- /**
2730
- * - Additional metadata related to the subscription.
2731
- */
2732
- meta?: any;
2733
- current_period?: SubscriptionCurrentPeriod;
2734
- pause_collection?: SubscriptionPauseCollection;
2735
- trial?: SubscriptionTrial;
2736
- invoice_settings?: SubscriptionInvoiceSettings;
2737
- /**
2738
- * - Indicates whether the subscription is
2739
- * currently active.
2740
- */
2741
- is_active?: boolean;
2742
- /**
2743
- * - Indicates whether the
2744
- * subscription will be canceled at the end of the current period.
2745
- */
2746
- cancel_at_period_end?: boolean;
2747
- /**
2748
- * - Unique identifier for the subscription.
2749
- */
2750
- _id?: string;
2751
- /**
2752
- * - Unique identifier for the subscriber
2753
- * associated with the subscription.
2754
- */
2755
- subscriber_id?: string;
2756
- /**
2757
- * - Unique identifier for the plan associated with
2758
- * the subscription.
2759
- */
2760
- plan_id?: string;
2761
- /**
2762
- * - Unique identifier for the product
2763
- * suite associated with the subscription.
2764
- */
2765
- product_suite_id?: string;
2766
- /**
2767
- * - Indicates whether the
2768
- * subscriber is eligible to change their subscription plan.
2769
- */
2770
- is_eligible_for_plan_change?: boolean;
2771
- plan_data?: Plan;
2772
- /**
2773
- * - The current status of the subscription
2774
- * (e.g., active, canceled).
2775
- */
2776
- current_status?: string;
2777
- /**
2778
- * - Method used to collect payments for
2779
- * the subscription (e.g., charge_automatically, invoice).
2780
- */
2781
- collection_method?: string;
2782
- /**
2783
- * - The date and time when the subscription was created.
2784
- */
2785
- created_at?: string;
2786
- /**
2787
- * - The date and time when the subscription
2788
- * was last modified.
2789
- */
2790
- modified_at?: string;
2791
- /**
2792
- * - Unique identifier for the most recent
2793
- * invoice related to the subscription.
2794
- */
2795
- latest_invoice?: string;
2796
- /**
2797
- * - Ordering channel for which the
2798
- * subscription was created (e.g., ecomm, fynd).
2799
- */
2800
- channel_type?: string;
2801
- /**
2802
- * - Indicates whether the subscription is
2803
- * currently freezed.
2804
- */
2805
- freezed?: boolean;
2806
- /**
2807
- * - The date and time when the subscription is
2808
- * scheduled to be canceled, if applicable.
2809
- */
2810
- cancel_at?: string;
2811
- /**
2812
- * - The date and time when the subscription
2813
- * was actually canceled.
2814
- */
2815
- canceled_at?: string;
2816
- };
2817
- /** @returns {SubscriptionStatus} */
2818
- declare function SubscriptionStatus(): SubscriptionStatus;
2819
- type SubscriptionStatus = {
2820
- /**
2821
- * - Indicates whether the subscription status
2822
- * is enabled.
2823
- */
2824
- is_enabled?: boolean;
2825
- subscription?: Subscription;
2826
- latest_invoice?: InvoicesData;
2827
- next_plan?: Plan;
2828
- /**
2829
- * - List of current
2830
- * subscriptions associated with the user.
2831
- */
2832
- current_subscriptions?: Subscription[];
2833
- /**
2834
- * - The amount mandated for the
2835
- * subscription or service.
2836
- */
2837
- mandate_amount?: number;
2838
- /**
2839
- * - A message providing additional context or
2840
- * information about the subscription status.
2841
- */
2842
- message?: string;
2843
- };
2844
- /** @returns {SubscriptionLimitApplication} */
2845
- declare function SubscriptionLimitApplication(): SubscriptionLimitApplication;
2846
- type SubscriptionLimitApplication = {
2847
- /**
2848
- * - Indicates whether the application limit is enabled.
2849
- */
2850
- enabled?: boolean;
2851
- /**
2852
- * - The maximum number of applications allowed.
2853
- */
2854
- hard_limit?: number;
2855
- /**
2856
- * - The soft limit of applications allowed,
2857
- * typically a warning threshold before reaching the hard limit.
2858
- */
2859
- soft_limit?: number;
2860
- };
2861
- /** @returns {SubscriptionLimitMarketplace} */
2862
- declare function SubscriptionLimitMarketplace(): SubscriptionLimitMarketplace;
2863
- type SubscriptionLimitMarketplace = {
2864
- /**
2865
- * - Indicates whether the marketplace limit is enabled.
2866
- */
2867
- enabled?: boolean;
2868
- };
2869
- /** @returns {SubscriptionLimitOtherPlatform} */
2870
- declare function SubscriptionLimitOtherPlatform(): SubscriptionLimitOtherPlatform;
2871
- type SubscriptionLimitOtherPlatform = {
2872
- /**
2873
- * - Indicates whether the other platform limit is enabled.
2874
- */
2875
- enabled?: boolean;
2876
- };
2877
- /** @returns {SubscriptionLimitTeam} */
2878
- declare function SubscriptionLimitTeam(): SubscriptionLimitTeam;
2879
- type SubscriptionLimitTeam = {
2880
- /**
2881
- * - The limit for team-related features.
2882
- */
2883
- limit?: number;
2884
- };
2885
- /** @returns {SubscriptionLimitProducts} */
2886
- declare function SubscriptionLimitProducts(): SubscriptionLimitProducts;
2887
- type SubscriptionLimitProducts = {
2888
- /**
2889
- * - Indicates whether bulk product limits are enabled.
2890
- */
2891
- bulk?: boolean;
2892
- /**
2893
- * - The limit for products.
2894
- */
2895
- limit?: number;
2896
- };
2897
- /** @returns {SubscriptionLimitExtensions} */
2898
- declare function SubscriptionLimitExtensions(): SubscriptionLimitExtensions;
2899
- type SubscriptionLimitExtensions = {
2900
- /**
2901
- * - Indicates whether the extensions limit is enabled.
2902
- */
2903
- enabled?: boolean;
2904
- /**
2905
- * - The limit for extensions.
2906
- */
2907
- limit?: number;
2908
- };
2909
- /** @returns {SubscriptionLimitIntegrations} */
2910
- declare function SubscriptionLimitIntegrations(): SubscriptionLimitIntegrations;
2911
- type SubscriptionLimitIntegrations = {
2912
- /**
2913
- * - Indicates whether the integrations limit is enabled.
2914
- */
2915
- enabled?: boolean;
2916
- /**
2917
- * - The limit for integrations. A value of `-1`
2918
- * usually indicates no limit.
2919
- */
2920
- limit?: number;
2921
- };
2922
- /** @returns {SubscriptionLimit} */
2923
- declare function SubscriptionLimit(): SubscriptionLimit;
2924
- type SubscriptionLimit = {
2925
- application?: SubscriptionLimitApplication;
2926
- marketplace?: SubscriptionLimitMarketplace;
2927
- other_platform?: SubscriptionLimitOtherPlatform;
2928
- team?: SubscriptionLimitTeam;
2929
- products?: SubscriptionLimitProducts;
2930
- extensions?: SubscriptionLimitExtensions;
2931
- integrations?: SubscriptionLimitIntegrations;
2932
- /**
2933
- * - Indicates whether the subscription is
2934
- * for a trial plan.
2935
- */
2936
- is_trial_plan?: boolean;
2937
- };
2938
- /** @returns {IntentReq} */
2939
- declare function IntentReq(): IntentReq;
2940
- type IntentReq = {
2941
- /**
2942
- * - A unique identifier for the
2943
- * external resource, used to track and reference the request like company id.
2944
- */
2945
- unique_external_id?: string;
2946
- /**
2947
- * - The identifier for the plan associated with the intent.
2948
- */
2949
- plan_id?: string;
2950
- };
2951
- /** @returns {PutIntentReq} */
2952
- declare function PutIntentReq(): PutIntentReq;
2953
- type PutIntentReq = {
2954
- /**
2955
- * - A unique identifier for the
2956
- * external resource, used to track and reference the request like company id.
2957
- */
2958
- unique_external_id?: string;
2959
- /**
2960
- * - The ID of the setup intent for payment
2961
- * methods, if applicable.
2962
- */
2963
- setup_intent_id?: string;
2964
- /**
2965
- * - The ID of the payment method to use
2966
- * for the intent.
2967
- */
2968
- payment_method_id?: string;
2969
- /**
2970
- * - Indicates whether the payment method
2971
- * should be set as default.
2972
- */
2973
- set_default?: boolean;
2974
- };
2975
- /** @returns {SubscriptionActivateReq} */
2976
- declare function SubscriptionActivateReq(): SubscriptionActivateReq;
2977
- type SubscriptionActivateReq = {
2978
- /**
2979
- * - A unique identifier for the subscription
2980
- * activation request.
2981
- */
2982
- unique_id?: string;
2983
- /**
2984
- * - The type of subscriber account, e.g., company or developer.
2985
- */
2986
- type?: string;
2987
- /**
2988
- * - The product suite associated with the
2989
- * subscription.
2990
- */
2991
- product_suite?: string;
2992
- /**
2993
- * - The ID of the plan to be activated for the subscription.
2994
- */
2995
- plan_id?: string;
2996
- /**
2997
- * - The payment method ID to be used for
2998
- * this subscription.
2999
- */
3000
- payment_method?: string;
3001
- /**
3002
- * - The ID of the subscription to be
3003
- * activated, if applicable.
3004
- */
3005
- subscription_id?: string;
3006
- /**
3007
- * - A coupon code for applying discounts, if applicable.
3008
- */
3009
- coupon?: string;
3010
- /**
3011
- * - Additional metadata related to the subscription
3012
- * activation request.
3013
- */
3014
- meta?: any;
3015
- };
3016
- /** @returns {SubscriptionActivateRes} */
3017
- declare function SubscriptionActivateRes(): SubscriptionActivateRes;
3018
- type SubscriptionActivateRes = {
3019
- /**
3020
- * - Indicates whether the subscription activation
3021
- * was successful.
3022
- */
3023
- success?: boolean;
3024
- data?: Subscription;
3025
- };
3026
- /** @returns {CancelSubscriptionReq} */
3027
- declare function CancelSubscriptionReq(): CancelSubscriptionReq;
3028
- type CancelSubscriptionReq = {
3029
- /**
3030
- * - A unique identifier for the subscription
3031
- * cancellation request like company id.
3032
- */
3033
- unique_id?: string;
3034
- /**
3035
- * - The type of subscription to be canceled, e.g.,
3036
- * company or developer.
3037
- */
3038
- type?: string;
3039
- /**
3040
- * - The product suite associated with the
3041
- * subscription to be canceled.
3042
- */
3043
- product_suite?: string;
3044
- /**
3045
- * - The ID of the subscription to be canceled.
3046
- */
3047
- subscription_id?: string;
3048
- };
3049
- /** @returns {CancelSubscriptionRes} */
3050
- declare function CancelSubscriptionRes(): CancelSubscriptionRes;
3051
- type CancelSubscriptionRes = {
3052
- success?: boolean;
3053
- data?: Subscription;
3054
- };
3055
- /** @returns {PlanStatusUpdateReq} */
3056
- declare function PlanStatusUpdateReq(): PlanStatusUpdateReq;
3057
- type PlanStatusUpdateReq = {
3058
- /**
3059
- * - The identifier of the plan whose status is
3060
- * being updated.
3061
- */
3062
- plan_id?: string;
3063
- /**
3064
- * - The reason for updating the plan status.
3065
- */
3066
- reason?: string;
3067
- /**
3068
- * - The new status of the plan as set by the
3069
- * seller (e.g., approved, rejected, pending).
3070
- */
3071
- seller_status?: string;
3072
- };
3073
- /** @returns {SubscribePlan} */
3074
- declare function SubscribePlan(): SubscribePlan;
3075
- type SubscribePlan = {
3076
- /**
3077
- * - The type of entity for which the plan is
3078
- * being subscribed (e.g., subscription, extension).
3079
- */
3080
- entity_type?: string;
3081
- /**
3082
- * - The method of collection for the
3083
- * subscription (e.g., online, offline).
3084
- */
3085
- collection_type?: string;
3086
- /**
3087
- * - The identifier of the plan to subscribe to.
3088
- */
3089
- plan_id?: string;
3090
- /**
3091
- * - URL to which the payment result will be sent
3092
- */
3093
- callback_url?: string;
3094
- meta?: Meta;
3095
- };
3096
- /** @returns {Meta} */
3097
- declare function Meta(): Meta;
3098
- type Meta = {
3099
- /**
3100
- * - Indicates whether the subscription is being
3101
- * initiated.
3102
- */
3103
- subscribe?: boolean;
3104
- /**
3105
- * - Indicates if the plan is a custom plan
3106
- * rather than a standard one.
3107
- */
3108
- is_custom_plan?: boolean;
3109
- /**
3110
- * - Indicates whether this subscription
3111
- * is an upgrade from a previous plan.
3112
- */
3113
- is_plan_upgrade?: boolean;
3114
- };
3115
- /** @returns {SubscribePlanRes} */
3116
- declare function SubscribePlanRes(): SubscribePlanRes;
3117
- type SubscribePlanRes = {
3118
- /**
3119
- * - The URL to which the user should be
3120
- * redirected after completion of subscription process.
3121
- */
3122
- redirect_url?: string;
3123
- /**
3124
- * - The unique identifier for the
3125
- * subscription transaction.
3126
- */
3127
- transaction_id?: string;
3128
- /**
3129
- * - The current status of the subscription
3130
- * process (e.g., initiated, success, failed).
3131
- */
3132
- current_status?: string;
3133
- meta?: Meta;
3134
- };
3135
- /** @returns {EntityDetail} */
3136
- declare function EntityDetail(): EntityDetail;
3137
- type EntityDetail = {
3138
- /**
3139
- * - Specifies the type of entity (e.g., subscription, user).
3140
- */
3141
- entity?: string;
3142
- item?: Subscription;
3143
- };
3144
- /** @returns {PaymentOptions} */
3145
- declare function PaymentOptions(): PaymentOptions;
3146
- type PaymentOptions = {
3147
- /**
3148
- * - Unique identifier for the payment option.
3149
- */
3150
- _id?: string;
3151
- /**
3152
- * - Name of the payment option.
3153
- */
3154
- name?: string;
3155
- /**
3156
- * - Brief description of the payment option's
3157
- * functionality.
3158
- */
3159
- description?: string;
3160
- /**
3161
- * - URL of the payment option's logo like upi logo.
3162
- */
3163
- logo?: string;
3164
- /**
3165
- * - Unique identifier for the payment aggregator.
3166
- */
3167
- aggregator_id?: string;
3168
- /**
3169
- * - Identifier for the payment aggregator system.
3170
- */
3171
- aggregator?: string;
3172
- /**
3173
- * - Date and time when the payment option was created.
3174
- */
3175
- created_at?: string;
3176
- /**
3177
- * - Date and time when the payment option was
3178
- * last modified.
3179
- */
3180
- modified_at?: string;
3181
- /**
3182
- * - Version key for document revision control.
3183
- */
3184
- __v?: number;
3185
- };
3186
- /** @returns {VerifyPaymentReq} */
3187
- declare function VerifyPaymentReq(): VerifyPaymentReq;
3188
- type VerifyPaymentReq = {
3189
- /**
3190
- * - Unique identifier for the Razorpay payment.
3191
- */
3192
- razorpay_payment_id?: string;
3193
- /**
3194
- * - Unique identifier for the Razorpay order.
3195
- */
3196
- razorpay_order_id?: string;
3197
- /**
3198
- * - Signature generated by Razorpay to
3199
- * verify the payment.
3200
- */
3201
- razorpay_signature?: string;
3202
- /**
3203
- * - HTTP status code of the payment
3204
- * verification response.
3205
- */
3206
- status_code?: number;
3207
- /**
3208
- * - The payment provider used for the transaction.
3209
- */
3210
- provider_type?: string;
3211
- };
3212
- /** @returns {Documents} */
3213
- declare function Documents(): Documents;
3214
- type Documents = {
3215
- /**
3216
- * - Permanent Account Number (PAN) used for tax purposes.
3217
- */
3218
- pan?: string;
3219
- /**
3220
- * - Goods and Services Tax (GST) number for business taxation.
3221
- */
3222
- gst?: string;
3223
- };
3224
- /** @returns {BillingAddress} */
3225
- declare function BillingAddress(): BillingAddress;
3226
- type BillingAddress = {
3227
- /**
3228
- * - The country where the billing address is located.
3229
- */
3230
- country?: string;
3231
- /**
3232
- * - The state or region within the country.
3233
- */
3234
- state?: string;
3235
- /**
3236
- * - The city of the billing address.
3237
- */
3238
- city?: string;
3239
- /**
3240
- * - The first line of the billing address.
3241
- */
3242
- line1?: string;
3243
- /**
3244
- * - The second line of the billing address (if applicable).
3245
- */
3246
- line2?: string;
3247
- /**
3248
- * - The ZIP code of the billing address.
3249
- */
3250
- postal_code?: string;
3251
- /**
3252
- * - ISO country code for the country of the
3253
- * billing address.
3254
- */
3255
- country_code?: string;
3256
- };
3257
- /** @returns {Currency} */
3258
- declare function Currency(): Currency;
3259
- type Currency = {
3260
- /**
3261
- * - Currency code as per ISO 4217.
3262
- */
3263
- code?: string;
3264
- /**
3265
- * - Symbol representing the currency.
3266
- */
3267
- symbol?: string;
3268
- /**
3269
- * - Full name of the currency.
3270
- */
3271
- name?: string;
3272
- };
3273
- /** @returns {BusinessCountryInfo} */
3274
- declare function BusinessCountryInfo(): BusinessCountryInfo;
3275
- type BusinessCountryInfo = {
3276
- /**
3277
- * - The country where the business is registered.
3278
- */
3279
- country?: string;
3280
- /**
3281
- * - ISO country code for the business's country.
3282
- */
3283
- country_code?: string;
3284
- currency?: Currency;
3285
- /**
3286
- * - Timezone in which the business operates.
3287
- */
3288
- timezone?: string;
3289
- };
3290
- /** @returns {SubscriberData} */
3291
- declare function SubscriberData(): SubscriberData;
3292
- type SubscriberData = {
3293
- /**
3294
- * - Indicates if the user exists in the
3295
- * payment gateway system.
3296
- */
3297
- pg_user_exists?: boolean;
3298
- /**
3299
- * - Unique identifier for the subscriber.
3300
- */
3301
- id?: string;
3302
- /**
3303
- * - Unique customer ID assigned by the
3304
- * payment gateway.
3305
- */
3306
- pg_customer_id?: string;
3307
- /**
3308
- * - Identifier for the default
3309
- * payment method used by the subscriber.
3310
- */
3311
- default_payment_method?: string;
3312
- };
3313
- /** @returns {Subscriber} */
3314
- declare function Subscriber(): Subscriber;
3315
- type Subscriber = {
3316
- documents?: Documents;
3317
- /**
3318
- * - Contact information for the subscriber, such as
3319
- * phone number.
3320
- */
3321
- phone?: any;
3322
- billing_address?: BillingAddress;
3323
- /**
3324
- * - Indicates whether the subscriber has given
3325
- * consent for processing.
3326
- */
3327
- consent?: boolean;
3328
- /**
3329
- * - Indicates whether the subscriber has opted in
3330
- * for communications.
3331
- */
3332
- comms?: boolean;
3333
- /**
3334
- * - Unique identifier for the subscriber in the system.
3335
- */
3336
- _id?: string;
3337
- /**
3338
- * - The type of the subscriber, such as 'individual'
3339
- * or 'company'.
3340
- */
3341
- type?: string;
3342
- /**
3343
- * - A unique identifier assigned to the subscriber.
3344
- */
3345
- unique_id?: string;
3346
- /**
3347
- * - The name of the subscriber.
3348
- */
3349
- name?: string;
3350
- /**
3351
- * - Email address of the subscriber.
3352
- */
3353
- email?: string;
3354
- business_country_info?: BusinessCountryInfo;
3355
- /**
3356
- * - The date and time when the subscriber was created.
3357
- */
3358
- created_at?: string;
3359
- /**
3360
- * - The date and time when the subscriber
3361
- * details were last modified.
3362
- */
3363
- modified_at?: string;
3364
- /**
3365
- * - The current credit balance for the
3366
- * subscriber, if any.
3367
- */
3368
- credit_balance?: number;
3369
- data?: SubscriberData;
3370
- };
3371
- /** @returns {AuthorModifiedDetails} */
3372
- declare function AuthorModifiedDetails(): AuthorModifiedDetails;
3373
- type AuthorModifiedDetails = {
3374
- /**
3375
- * - The first name of the author who made modifications.
3376
- */
3377
- first_name?: string;
3378
- /**
3379
- * - The last name of the author who made modifications.
3380
- */
3381
- last_name?: string;
3382
- /**
3383
- * - Indicates whether the author has
3384
- * administrative privileges.
3385
- */
3386
- is_admin?: boolean;
3387
- };
3388
- /** @returns {Author} */
3389
- declare function Author(): Author;
3390
- type Author = {
3391
- modified_by_details?: AuthorModifiedDetails;
3392
- /**
3393
- * - Identifier of the user who created the record.
3394
- */
3395
- created_by?: string;
3396
- /**
3397
- * - Identifier of the user who last modified the record.
3398
- */
3399
- modified_by?: string;
3400
- };
3401
- /** @returns {EndingBalance} */
3402
- declare function EndingBalance(): EndingBalance;
3403
- type EndingBalance = {
3404
- /**
3405
- * - The ending balance amount.
3406
- */
3407
- amount?: number;
3408
- /**
3409
- * - Reference to the previous entry if applicable.
3410
- */
3411
- old_entry_ref?: string;
3412
- };
3413
- /** @returns {PaymentData} */
3414
- declare function PaymentData(): PaymentData;
3415
- type PaymentData = {
3416
- /**
3417
- * - The unique identifier for the transaction.
3418
- */
3419
- transaction_id?: string;
3420
- /**
3421
- * - The payment aggregator used for the transaction.
3422
- */
3423
- aggregator?: string;
3424
- /**
3425
- * - The order ID generated by the
3426
- * payment aggregator.
3427
- */
3428
- aggregator_order_id?: string;
3429
- /**
3430
- * - The date and time when the receipt was generated.
3431
- */
3432
- receipt_date?: string;
3433
- /**
3434
- * - A unique reference for
3435
- * the transaction.
3436
- */
3437
- unique_transaction_reference?: string;
3438
- };
3439
- /** @returns {CreditTransaction} */
3440
- declare function CreditTransaction(): CreditTransaction;
3441
- type CreditTransaction = {
3442
- /**
3443
- * - The entity associated with the transaction.
3444
- */
3445
- entity?: any;
3446
- author?: Author;
3447
- /**
3448
- * - The unique identifier for the credit transaction.
3449
- */
3450
- _id?: string;
3451
- /**
3452
- * - The amount credited in the transaction.
3453
- */
3454
- amount?: number;
3455
- /**
3456
- * - The currency of the transaction amount.
3457
- */
3458
- currency?: string;
3459
- /**
3460
- * - The unique identifier of the subscriber
3461
- * involved in the transaction.
3462
- */
3463
- subscriber_id?: string;
3464
- /**
3465
- * - A brief description of the transaction.
3466
- */
3467
- description?: string;
3468
- /**
3469
- * - Indicates if the transaction is a test transaction.
3470
- */
3471
- is_test?: string;
3472
- ending_balance?: EndingBalance;
3473
- payment?: PaymentData;
3474
- /**
3475
- * - The type of credit transaction.
3476
- */
3477
- type?: string;
3478
- /**
3479
- * - The date and time when the transaction was created.
3480
- */
3481
- created_at?: string;
3482
- /**
3483
- * - The date and time when the transaction was
3484
- * last modified.
3485
- */
3486
- modified_at?: string;
3487
- };
3488
- /** @returns {VerifyPaymentData} */
3489
- declare function VerifyPaymentData(): VerifyPaymentData;
3490
- type VerifyPaymentData = {
3491
- /**
3492
- * - Indicates if the payment verification was successful.
3493
- */
3494
- success?: boolean;
3495
- subscriber?: Subscriber;
3496
- credit_transaction?: CreditTransaction;
3497
- };
3498
- /** @returns {VerifyPaymentRes} */
3499
- declare function VerifyPaymentRes(): VerifyPaymentRes;
3500
- type VerifyPaymentRes = {
3501
- /**
3502
- * - The status of the payment verification.
3503
- */
3504
- status?: string;
3505
- data?: VerifyPaymentData;
3506
- };
3507
- /** @returns {DefaultMerchants} */
3508
- declare function DefaultMerchants(): DefaultMerchants;
3509
- type DefaultMerchants = {
3510
- /**
3511
- * - The default Stripe merchant identifier.
3512
- */
3513
- stripe?: string;
3514
- };
3515
- /** @returns {GlobalSettingsPayment} */
3516
- declare function GlobalSettingsPayment(): GlobalSettingsPayment;
3517
- type GlobalSettingsPayment = {
3518
- default_merchants?: DefaultMerchants;
3519
- };
3520
- /** @returns {GlobalSettingsData} */
3521
- declare function GlobalSettingsData(): GlobalSettingsData;
3522
- type GlobalSettingsData = {
3523
- payment?: GlobalSettingsPayment;
3524
- /**
3525
- * - Indicates if the panel is frozen.
3526
- */
3527
- freeze_panel?: boolean;
3528
- /**
3529
- * - Unique identifier for the global settings.
3530
- */
3531
- _id?: string;
3532
- /**
3533
- * - The date and time when the global settings
3534
- * were created.
3535
- */
3536
- created_at?: string;
3537
- /**
3538
- * - The date and time when the global settings
3539
- * were last modified.
3540
- */
3541
- modified_at?: string;
3542
- };
3543
- /** @returns {GlobalSettings} */
3544
- declare function GlobalSettings(): GlobalSettings;
3545
- type GlobalSettings = {
3546
- /**
3547
- * - The status of the global settings retrieval.
3548
- */
3549
- status?: string;
3550
- data?: GlobalSettingsData;
3551
- };
3552
- /** @returns {MethodChecks} */
3553
- declare function MethodChecks(): MethodChecks;
3554
- type MethodChecks = {
3555
- /**
3556
- * - Result of the address line 1 check.
3557
- */
3558
- address_line1_check?: string;
3559
- /**
3560
- * - Result of the address postal
3561
- * code check.
3562
- */
3563
- address_postal_code_check?: string;
3564
- /**
3565
- * - Result of the CVC check.
3566
- */
3567
- cvc_check?: string;
3568
- };
3569
- /** @returns {MethodNetworks} */
3570
- declare function MethodNetworks(): MethodNetworks;
3571
- type MethodNetworks = {
3572
- /**
3573
- * - List of available networks for the payment method.
3574
- */
3575
- available?: string[];
3576
- /**
3577
- * - Preferred network for the payment method.
3578
- */
3579
- preferred?: string;
3580
- };
3581
- /** @returns {MethodSecureUsage} */
3582
- declare function MethodSecureUsage(): MethodSecureUsage;
3583
- type MethodSecureUsage = {
3584
- /**
3585
- * - Indicates if 3D Secure is supported for the
3586
- * payment method.
3587
- */
3588
- supported?: boolean;
3589
- };
3590
- /** @returns {MethodDetails} */
3591
- declare function MethodDetails(): MethodDetails;
3592
- type MethodDetails = {
3593
- /**
3594
- * - Unique identifier for the payment method.
3595
- */
3596
- id?: string;
3597
- /**
3598
- * - Type of payment method.
3599
- */
3600
- type?: string;
3601
- /**
3602
- * - Indicates if a mandate is available
3603
- * for the payment method.
3604
- */
3605
- mandate_available?: boolean;
3606
- /**
3607
- * - Mandate amount for the payment method.
3608
- */
3609
- mandate_amount?: number;
3610
- /**
3611
- * - Payment gateway's payment method
3612
- * identifier.
3613
- */
3614
- pg_payment_method_id?: string;
3615
- /**
3616
- * - Indicates if the payment method is the default.
3617
- */
3618
- is_default?: boolean;
3619
- data?: SubscriptionMethodData;
3620
- };
3621
- /** @returns {SubscriptionMethodData} */
3622
- declare function SubscriptionMethodData(): SubscriptionMethodData;
3623
- type SubscriptionMethodData = {
3624
- /**
3625
- * - Brand of the payment method.
3626
- */
3627
- brand?: string;
3628
- checks?: MethodChecks;
3629
- /**
3630
- * - Country of the payment method.
3631
- */
3632
- country?: string;
3633
- /**
3634
- * - Expiration month of the payment method.
3635
- */
3636
- exp_month?: number;
3637
- /**
3638
- * - Expiration year of the payment method.
3639
- */
3640
- exp_year?: number;
3641
- /**
3642
- * - Fingerprint of the payment method.
3643
- */
3644
- fingerprint?: string;
187
+ * @property {string} interval - The interval of the subscription.
188
+ */
189
+ /**
190
+ * @typedef EntityChargeDetails
191
+ * @property {string} [_id] - Unique identifier for the charge.
192
+ * @property {string} [subscription_id] - Unique identifier of the extension subscription.
193
+ * @property {string} [subscriber_id] - Unique identifier of the
194
+ * subscriber/company who installed extension subscription.
195
+ * @property {string} [entity_type] - The type of entity associated with the
196
+ * charge (e.g., 'extension', 'subscription').
197
+ * @property {string} [entity_id] - Unique identifier for the entity associated
198
+ * with the charge.
199
+ * @property {string} [name] - The name of the charge.
200
+ * @property {string} [term] - Description of the charge term.
201
+ * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
202
+ * 'recurring').
203
+ * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
204
+ * 'one_time', 'recurring').
205
+ * @property {EntityChargePrice} [price]
206
+ * @property {ChargeRecurring} [recurring]
207
+ * @property {string} [status] - Current status of the charge.
208
+ * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
209
+ * @property {string} [activated_on] - Date and time when the charge was activated.
210
+ * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
211
+ * @property {string} [billing_date] - Date and time when the charge was billed.
212
+ * @property {SubscriptionTrialPeriod} [current_period]
213
+ * @property {string} [modified_at] - Date and time when the charge details were
214
+ * last modified.
215
+ * @property {string} [created_at] - Date and time when the charge was created.
216
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
217
+ * @property {string} [company_id] - Company id.
218
+ * @property {Object} [meta] - Additional metadata associated with the charge.
219
+ * @property {number} [__v] - Internal version key for the charge record.
220
+ */
221
+ declare class BillingPlatformModel {
222
+ }
223
+ declare namespace BillingPlatformModel {
224
+ export { SubscriptionChargeRes, ChargeDetails, ResourceNotFound, CreateOneTimeCharge, CreateOneTimeChargeResponse, BadRequest, CreateSubscriptionCharge, CreateSubscriptionResponse, EntityChargePrice, ChargeRecurring, SubscriptionTrialPeriod, Charge, OneTimeChargeItem, ChargeLineItem, EntitySubscription, OneTimeChargeEntity, EntityChargeRecurring, EntityChargeDetails };
225
+ }
226
+ /** @returns {SubscriptionChargeRes} */
227
+ declare function SubscriptionChargeRes(): SubscriptionChargeRes;
228
+ type SubscriptionChargeRes = {
3645
229
  /**
3646
- * - Funding type of the payment method.
230
+ * - Unique identifier for the subscription charge
3647
231
  */
3648
- funding?: string;
232
+ _id?: string;
3649
233
  /**
3650
- * - Source from which the payment method
3651
- * was generated.
234
+ * - ID of the product suit associated with
235
+ * the charge
3652
236
  */
3653
- generated_from?: string;
237
+ product_suit_id?: string;
3654
238
  /**
3655
- * - Last 4 digits of the payment method.
239
+ * - Unique identifier for the entity
3656
240
  */
3657
- last4?: string;
3658
- networks?: MethodNetworks;
3659
- three_d_secure_usage?: MethodSecureUsage;
241
+ entity_id?: string;
3660
242
  /**
3661
- * - Wallet associated with the payment method.
243
+ * - Type of entity (e.g., subscription, extension)
3662
244
  */
3663
- wallet?: string;
245
+ entity_type?: string;
3664
246
  /**
3665
- * - Name associated with the payment method.
247
+ * - Name of the subscription charge
3666
248
  */
3667
249
  name?: string;
3668
250
  /**
3669
- * - Indicates if the payment method is the default.
3670
- */
3671
- is_default?: boolean;
3672
- };
3673
- /** @returns {SubscriptionMethods} */
3674
- declare function SubscriptionMethods(): SubscriptionMethods;
3675
- type SubscriptionMethods = {
3676
- /**
3677
- * - Indicates if the retrieval of subscription
3678
- * methods was successful.
3679
- */
3680
- success?: boolean;
3681
- /**
3682
- * - List of subscription methods.
3683
- */
3684
- data?: MethodDetails[];
3685
- };
3686
- /** @returns {ConfigPublicKey} */
3687
- declare function ConfigPublicKey(): ConfigPublicKey;
3688
- type ConfigPublicKey = {
3689
- /**
3690
- * - Public key for the payment aggregator.
3691
- */
3692
- public_key?: string;
3693
- };
3694
- /** @returns {ConfigRes} */
3695
- declare function ConfigRes(): ConfigRes;
3696
- type ConfigRes = {
3697
- /**
3698
- * - Indicates if the retrieval of configuration
3699
- * was successful.
3700
- */
3701
- success?: boolean;
3702
- /**
3703
- * - The payment aggregator.
3704
- */
3705
- aggregator?: string;
3706
- config?: ConfigPublicKey;
3707
- };
3708
- /** @returns {PlanChangeData} */
3709
- declare function PlanChangeData(): PlanChangeData;
3710
- type PlanChangeData = {
3711
- /**
3712
- * - The total amount after the plan change.
3713
- */
3714
- total?: number;
3715
- /**
3716
- * - The amount credited due to the plan change.
251
+ * - Current status of the subscription charge
3717
252
  */
3718
- credit_note_amount?: number;
253
+ status?: string;
3719
254
  /**
3720
- * - The settlement amount for the plan change.
255
+ * - Number of trial days provided
3721
256
  */
3722
- settlement?: number;
257
+ trial_days?: number;
3723
258
  /**
3724
- * - The taxable amount for the plan change.
259
+ * - Date when the charge was activated
3725
260
  */
3726
- taxable_amount?: number;
261
+ activated_on?: string;
3727
262
  /**
3728
- * - The GST amount for the plan change.
263
+ * - Date when the charge was cancelled
3729
264
  */
3730
- gst_amount?: number;
265
+ cancelled_on?: string;
3731
266
  /**
3732
- * - The gross total amount for the plan change.
267
+ * - Indicates if the charge is for testing purposes
3733
268
  */
3734
- gross_total?: number;
269
+ is_test?: boolean;
3735
270
  /**
3736
- * - The GST for the plan change.
271
+ * - Timestamp when the charge was created
3737
272
  */
3738
- gst?: number;
273
+ created_at?: string;
3739
274
  /**
3740
- * - The discount amount applied to the plan change.
275
+ * - Timestamp when the charge was last modified
3741
276
  */
3742
- discount?: number;
3743
- };
3744
- /** @returns {PlanChangeDetails} */
3745
- declare function PlanChangeDetails(): PlanChangeDetails;
3746
- type PlanChangeDetails = {
277
+ modified_at?: string;
3747
278
  /**
3748
- * - Status of the plan change.
279
+ * - Company id
3749
280
  */
3750
- status?: string;
3751
- data?: PlanChangeData;
3752
- };
3753
- /** @returns {TransactionMeta} */
3754
- declare function TransactionMeta(): TransactionMeta;
3755
- type TransactionMeta = {
281
+ company_id?: string;
3756
282
  /**
3757
- * - Invoice ID associated with the transaction.
283
+ * - List of line items associated with the charge
3758
284
  */
3759
- invoice_id?: string;
285
+ line_items?: any[];
3760
286
  };
3761
- /** @returns {PaymentTransactionDetails} */
3762
- declare function PaymentTransactionDetails(): PaymentTransactionDetails;
3763
- type PaymentTransactionDetails = {
3764
- /**
3765
- * - Payment aggregator details.
3766
- */
3767
- aggregator?: any;
3768
- /**
3769
- * - Currency used in the transaction.
3770
- */
3771
- currency?: string;
3772
- /**
3773
- * - Current status of the transaction.
3774
- */
3775
- current_status?: string;
287
+ /** @returns {ChargeDetails} */
288
+ declare function ChargeDetails(): ChargeDetails;
289
+ type ChargeDetails = {
3776
290
  /**
3777
- * - Unique identifier for the payment transaction.
291
+ * - Unique identifier for the charge.
3778
292
  */
3779
293
  _id?: string;
3780
294
  /**
3781
- * - Unique identifier for the subscriber.
3782
- */
3783
- subscriber_id?: string;
3784
- /**
3785
- * - Amount involved in the transaction.
3786
- */
3787
- amount?: number;
3788
- /**
3789
- * - Type of entity involved in the transaction.
295
+ * - The type of entity associated with the
296
+ * charge (e.g., 'extension', 'subscription').
3790
297
  */
3791
298
  entity_type?: string;
3792
299
  /**
3793
- * - Type of collection for the transaction.
3794
- */
3795
- collection_type?: string;
3796
- meta?: TransactionMeta;
3797
- /**
3798
- * - Timestamp when the transaction was created.
3799
- */
3800
- created_at?: string;
3801
- /**
3802
- * - Timestamp when the transaction was last modified.
300
+ * - Unique identifier for the entity associated
301
+ * with the charge.
3803
302
  */
3804
- modified_at?: string;
3805
- };
3806
- /** @returns {PaymentItems} */
3807
- declare function PaymentItems(): PaymentItems;
3808
- type PaymentItems = {
303
+ entity_id?: string;
3809
304
  /**
3810
- * - Name of the payment option.
305
+ * - The name of the charge.
3811
306
  */
3812
307
  name?: string;
3813
308
  /**
3814
- * - Code for the payment option
3815
- */
3816
- code?: string;
3817
- /**
3818
- * - Aggregator used for the payment option.
3819
- */
3820
- aggregator?: string;
3821
- };
3822
- /** @returns {GetPaymentOptions} */
3823
- declare function GetPaymentOptions(): GetPaymentOptions;
3824
- type GetPaymentOptions = {
3825
- /**
3826
- * - List of available payment options.
309
+ * - Description of the charge term.
3827
310
  */
3828
- payment_options?: PaymentItems[];
3829
- };
3830
- /** @returns {TopupReq} */
3831
- declare function TopupReq(): TopupReq;
3832
- type TopupReq = {
311
+ term?: string;
3833
312
  /**
3834
- * - Amount to be topped up.
313
+ * - The type of charge (e.g., 'standalone',
314
+ * 'recurring').
3835
315
  */
3836
- amount?: number;
316
+ charge_type?: string;
3837
317
  /**
3838
- * - Currency in which the top-up is made.
318
+ * - The pricing model for the charge (e.g.,
319
+ * 'one_time', 'recurring').
3839
320
  */
3840
- currency?: string;
321
+ pricing_type?: string;
322
+ price?: EntityChargePrice;
323
+ recurring?: ChargeRecurring;
3841
324
  /**
3842
- * - Provider type for the top-up.
325
+ * - Current status of the charge.
3843
326
  */
3844
- provider_type?: string;
3845
- };
3846
- /** @returns {SetupMandateReq} */
3847
- declare function SetupMandateReq(): SetupMandateReq;
3848
- type SetupMandateReq = {
327
+ status?: string;
3849
328
  /**
3850
- * - ID of the setup intent.
329
+ * - Maximum amount that can be charged, if applicable.
3851
330
  */
3852
- intent_id?: string;
331
+ capped_amount?: number;
3853
332
  /**
3854
- * - ID of the payment method.
333
+ * - Date and time when the charge was activated.
3855
334
  */
3856
- payment_method_id?: string;
3857
- };
3858
- /** @returns {SetupPaymentReq} */
3859
- declare function SetupPaymentReq(): SetupPaymentReq;
3860
- type SetupPaymentReq = {
335
+ activated_on?: string;
3861
336
  /**
3862
- * - Payment method to be used.
337
+ * - Date and time when the charge was cancelled.
3863
338
  */
3864
- payment_method?: string;
339
+ cancelled_on?: string;
3865
340
  /**
3866
- * - ID of the payment.
341
+ * - Date and time when the charge was billed.
3867
342
  */
3868
- payment_id?: string;
343
+ billing_date?: string;
344
+ current_period?: SubscriptionTrialPeriod;
3869
345
  /**
3870
- * - ID of the plan.
346
+ * - Date and time when the charge details were
347
+ * last modified.
3871
348
  */
3872
- plan_id?: string;
349
+ modified_at?: string;
3873
350
  /**
3874
- * - ID of the invoice.
351
+ * - Date and time when the charge was created.
3875
352
  */
3876
- invoice_id?: string;
3877
- };
3878
- /** @returns {SubscriptionRenewReq} */
3879
- declare function SubscriptionRenewReq(): SubscriptionRenewReq;
3880
- type SubscriptionRenewReq = {
353
+ created_at?: string;
3881
354
  /**
3882
- * - ID of the invoice for renewal.
355
+ * - Indicates whether the charge is for testing purposes.
3883
356
  */
3884
- invoice_id?: string;
357
+ is_test?: boolean;
3885
358
  /**
3886
- * - Type of entity for the renewal.
359
+ * - Company id.
3887
360
  */
3888
- entity_type?: string;
361
+ company_id?: string;
3889
362
  /**
3890
- * - Collection type for the renewal.
363
+ * - Additional metadata associated with the charge.
3891
364
  */
3892
- collection_type?: string;
365
+ meta?: any;
3893
366
  /**
3894
- * - URL to which the payment result will be sent
367
+ * - Internal version key for the charge record.
3895
368
  */
3896
- callback_url?: string;
3897
- meta?: RenewMeta;
369
+ __v?: number;
3898
370
  };
3899
- /** @returns {RenewMeta} */
3900
- declare function RenewMeta(): RenewMeta;
3901
- type RenewMeta = {
3902
- /**
3903
- * - Indicates whether the invoice payment
3904
- * is involved in the renewal.
3905
- */
3906
- invoice_payment?: boolean;
371
+ /** @returns {ResourceNotFound} */
372
+ declare function ResourceNotFound(): ResourceNotFound;
373
+ type ResourceNotFound = {
3907
374
  /**
3908
- * - Indicates whether the subscription is being renewed.
375
+ * - Resource not found with {id}
3909
376
  */
3910
- renew?: boolean;
377
+ message?: string;
378
+ code?: any;
379
+ success?: any;
3911
380
  };
3912
- /** @returns {SubscriptionMethodsReq} */
3913
- declare function SubscriptionMethodsReq(): SubscriptionMethodsReq;
3914
- type SubscriptionMethodsReq = {
3915
- /**
3916
- * - The unique external identifier for
3917
- * the subscription method.
3918
- */
3919
- unique_external_id?: string;
381
+ /** @returns {CreateOneTimeCharge} */
382
+ declare function CreateOneTimeCharge(): CreateOneTimeCharge;
383
+ type CreateOneTimeCharge = {
3920
384
  /**
3921
- * - The setup intent ID for the subscription method.
385
+ * - The name of the one-time charge to be created.
3922
386
  */
3923
- setup_intent_id?: string;
387
+ name?: string;
388
+ charge?: OneTimeChargeItem;
3924
389
  /**
3925
- * - The payment gateway payment method ID.
390
+ * - Indicates whether the charge creation is for
391
+ * testing purposes.
3926
392
  */
3927
- pg_payment_method_id?: string;
393
+ is_test?: boolean;
3928
394
  /**
3929
- * - Indicates whether this payment method
3930
- * should be set as the default.
395
+ * - URL to which the user will be redirected
396
+ * after creating the charge.
3931
397
  */
3932
- set_default?: boolean;
398
+ return_url?: string;
3933
399
  };
3934
- /** @returns {CreditTransactionResponse} */
3935
- declare function CreditTransactionResponse(): CreditTransactionResponse;
3936
- type CreditTransactionResponse = {
3937
- /**
3938
- * - Total number of transactions.
3939
- */
3940
- total?: number;
3941
- /**
3942
- * - Maximum number of transactions per page.
3943
- */
3944
- limit?: number;
3945
- /**
3946
- * - Current page number.
3947
- */
3948
- page?: number;
3949
- /**
3950
- * - Total number of pages.
3951
- */
3952
- pages?: number;
400
+ /** @returns {CreateOneTimeChargeResponse} */
401
+ declare function CreateOneTimeChargeResponse(): CreateOneTimeChargeResponse;
402
+ type CreateOneTimeChargeResponse = {
403
+ charge?: Charge;
3953
404
  /**
3954
- * - List of credit transactions.
405
+ * - URL to which users are redirected to
406
+ * confirm or complete the payment or subscription process.
3955
407
  */
3956
- items?: CreditTransaction[];
408
+ confirm_url?: string;
3957
409
  };
3958
- /** @returns {DowngradePlanReq} */
3959
- declare function DowngradePlanReq(): DowngradePlanReq;
3960
- type DowngradePlanReq = {
3961
- /**
3962
- * - Unique identifier for the request.
3963
- */
3964
- unique_id?: string;
3965
- /**
3966
- * - Type of entity requesting the downgrade.
3967
- */
3968
- type?: string;
410
+ /** @returns {BadRequest} */
411
+ declare function BadRequest(): BadRequest;
412
+ type BadRequest = {
3969
413
  /**
3970
- * - Product suite for the plan.
414
+ * - Failure message.
3971
415
  */
3972
- product_suite?: string;
416
+ message?: string;
417
+ };
418
+ /** @returns {CreateSubscriptionCharge} */
419
+ declare function CreateSubscriptionCharge(): CreateSubscriptionCharge;
420
+ type CreateSubscriptionCharge = {
3973
421
  /**
3974
- * - Plan ID for the downgrade request.
422
+ * - The name of the charge.
3975
423
  */
3976
- plan_id?: string;
424
+ name: string;
425
+ trial_days?: number;
426
+ line_items: ChargeLineItem[];
3977
427
  /**
3978
- * - Reason for downgrading the plan.
428
+ * - Indicates whether the charge is for testing purposes.
3979
429
  */
3980
- reason?: string;
430
+ is_test?: boolean;
3981
431
  /**
3982
- * - Platform from which the request is made.
432
+ * - The URL passed in request which extension
433
+ * expects in return.
3983
434
  */
3984
- platform?: string;
435
+ return_url: string;
3985
436
  };
3986
- /** @returns {Taxation} */
3987
- declare function Taxation(): Taxation;
3988
- type Taxation = {
437
+ /** @returns {CreateSubscriptionResponse} */
438
+ declare function CreateSubscriptionResponse(): CreateSubscriptionResponse;
439
+ type CreateSubscriptionResponse = {
440
+ subscription?: EntitySubscription;
3989
441
  /**
3990
- * - GST percentage.
442
+ * - URL to which users are redirected to
443
+ * confirm or complete the payment or subscription process.
3991
444
  */
3992
- gst?: number;
445
+ confirm_url?: string;
3993
446
  };
3994
- /** @returns {OneTimeFees} */
3995
- declare function OneTimeFees(): OneTimeFees;
3996
- type OneTimeFees = {
447
+ /** @returns {EntityChargePrice} */
448
+ declare function EntityChargePrice(): EntityChargePrice;
449
+ type EntityChargePrice = {
3997
450
  /**
3998
- * - One-time development fee.
451
+ * - The amount for the price. The minimum value is 1.
3999
452
  */
4000
- developement?: number;
453
+ amount?: number;
4001
454
  /**
4002
- * - One-time marketing fee.
455
+ * - The currency code for the price
4003
456
  */
4004
- marketing?: number;
457
+ currency_code?: string;
4005
458
  };
4006
- /** @returns {CreditLine} */
4007
- declare function CreditLine(): CreditLine;
4008
- type CreditLine = {
4009
- /**
4010
- * - Indicates whether the credit line is active.
4011
- */
4012
- is_active?: boolean;
459
+ /** @returns {ChargeRecurring} */
460
+ declare function ChargeRecurring(): ChargeRecurring;
461
+ type ChargeRecurring = {
462
+ interval?: string;
463
+ interval_time?: number;
4013
464
  };
4014
- /** @returns {StatusMessage} */
4015
- declare function StatusMessage(): StatusMessage;
4016
- type StatusMessage = {
4017
- /**
4018
- * - Status of the request.
4019
- */
4020
- status?: string;
4021
- /**
4022
- * - Detailed message regarding the status.
4023
- */
4024
- message?: string;
465
+ /** @returns {SubscriptionTrialPeriod} */
466
+ declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod;
467
+ type SubscriptionTrialPeriod = {
4025
468
  /**
4026
- * - Indicates whether the operation was successful.
469
+ * - The start date and time of the trial period.
4027
470
  */
4028
- success?: boolean;
471
+ start_date?: string;
4029
472
  /**
4030
- * - Status code of the operation.
473
+ * - The end date and time of the trial period.
4031
474
  */
4032
- code?: string;
475
+ end_date?: string;
4033
476
  };
4034
- /** @returns {PaymentCollectReq} */
4035
- declare function PaymentCollectReq(): PaymentCollectReq;
4036
- type PaymentCollectReq = {
4037
- /**
4038
- * - ID of the transaction to collect payment for.
4039
- */
4040
- transaction_id?: string;
477
+ /** @returns {Charge} */
478
+ declare function Charge(): Charge;
479
+ type Charge = {
480
+ final_charge?: OneTimeChargeEntity;
481
+ };
482
+ /** @returns {OneTimeChargeItem} */
483
+ declare function OneTimeChargeItem(): OneTimeChargeItem;
484
+ type OneTimeChargeItem = {
4041
485
  /**
4042
- * - Indicates whether to use credit
4043
- * balance for the payment.
486
+ * - The name of the one-time charge item.
4044
487
  */
4045
- credit_balance?: boolean;
488
+ name?: string;
4046
489
  /**
4047
- * - Mode of payment.
490
+ * - The term or description of the charge.
4048
491
  */
4049
- payment_mode?: string;
492
+ term?: string;
4050
493
  /**
4051
- * - Payment method to be used.
494
+ * - The type of pricing for the charge item.
4052
495
  */
4053
- payment_method?: string;
496
+ pricing_type?: string;
497
+ price?: EntityChargePrice;
4054
498
  /**
4055
- * - ID of the invoice for which the payment is collected.
499
+ * - The maximum amount that can be charged
500
+ * for this item, if applicable.
4056
501
  */
4057
- invoice_id?: string;
4058
- };
4059
- /** @returns {SubscriptionRenewResMeta} */
4060
- declare function SubscriptionRenewResMeta(): SubscriptionRenewResMeta;
4061
- type SubscriptionRenewResMeta = {
502
+ capped_amount?: number;
4062
503
  /**
4063
- * - Indicates whether the invoice payment
4064
- * is involved in the renewal.
504
+ * - Indicates whether the charge item is for
505
+ * testing purposes.
4065
506
  */
4066
- invoice_payment?: boolean;
507
+ is_test?: boolean;
4067
508
  /**
4068
- * - Indicates whether the subscription is being renewed.
509
+ * - Additional metadata associated with the charge item.
4069
510
  */
4070
- renew?: boolean;
511
+ metadata?: any;
4071
512
  };
4072
- /** @returns {SubscriptionRenewRes} */
4073
- declare function SubscriptionRenewRes(): SubscriptionRenewRes;
4074
- type SubscriptionRenewRes = {
513
+ /** @returns {ChargeLineItem} */
514
+ declare function ChargeLineItem(): ChargeLineItem;
515
+ type ChargeLineItem = {
4075
516
  /**
4076
- * - URL to redirect the user for completing
4077
- * the renewal.
517
+ * - Its name of the extension plan.
4078
518
  */
4079
- redirect_url?: string;
519
+ name: string;
4080
520
  /**
4081
- * - ID of the renewal transaction.
521
+ * - It indicates how it will be charged.
4082
522
  */
4083
- transaction_id?: string;
523
+ term: string;
4084
524
  /**
4085
- * - Current status of the renewal process.
525
+ * - It indicates the extension subscription
526
+ * will be auto renewed timely.
4086
527
  */
4087
- current_status?: string;
4088
- meta?: SubscriptionRenewResMeta;
528
+ pricing_type: string;
529
+ price: EntityChargePrice;
530
+ recurring?: EntityChargeRecurring;
531
+ capped_amount?: number;
532
+ trial_days?: number;
533
+ is_test?: boolean;
534
+ metadata?: any;
4089
535
  };
4090
- /** @returns {SetupIntentRes} */
4091
- declare function SetupIntentRes(): SetupIntentRes;
4092
- type SetupIntentRes = {
536
+ /** @returns {EntitySubscription} */
537
+ declare function EntitySubscription(): EntitySubscription;
538
+ type EntitySubscription = {
4093
539
  /**
4094
- * - Indicates if the setup intent was successful.
540
+ * - Unique identifier for the subscription charge
4095
541
  */
4096
- success?: boolean;
4097
- data?: SetupIntentData;
4098
- };
4099
- /** @returns {SetupIntentData} */
4100
- declare function SetupIntentData(): SetupIntentData;
4101
- type SetupIntentData = {
542
+ _id?: string;
4102
543
  /**
4103
- * - The ID of the setup intent.
544
+ * - ID of the product suit associated with
545
+ * the charge
4104
546
  */
4105
- id?: string;
547
+ product_suit_id?: string;
4106
548
  /**
4107
- * - The client secret of the setup intent.
549
+ * - Unique identifier for the entity
4108
550
  */
4109
- client_secret?: string;
551
+ entity_id?: string;
4110
552
  /**
4111
- * - The customer associated with the setup intent.
553
+ * - Type of entity (e.g., subscription, extension)
4112
554
  */
4113
- customer?: string;
555
+ entity_type?: string;
4114
556
  /**
4115
- * - The status of the setup intent.
557
+ * - Name of the subscription charge
4116
558
  */
4117
- status?: string;
4118
- };
4119
- /** @returns {SetupPayment} */
4120
- declare function SetupPayment(): SetupPayment;
4121
- type SetupPayment = {
559
+ name?: string;
4122
560
  /**
4123
- * - The ID of the setup payment.
561
+ * - Current status of the subscription charge
4124
562
  */
4125
- id?: string;
563
+ status?: string;
4126
564
  /**
4127
- * - The status of the setup payment.
565
+ * - Number of trial days provided
4128
566
  */
4129
- status?: string;
567
+ trial_days?: number;
4130
568
  /**
4131
- * - The customer associated with the setup payment.
569
+ * - Indicates if the charge is for testing purposes
4132
570
  */
4133
- customer?: string;
571
+ is_test?: boolean;
4134
572
  /**
4135
- * - The client secret of the setup payment.
573
+ * - Timestamp when the charge was created
4136
574
  */
4137
- client_secret?: string;
575
+ created_at?: string;
4138
576
  /**
4139
- * - The payment method used for the setup payment.
577
+ * - Timestamp when the charge was last modified
4140
578
  */
4141
- payment_method?: string;
579
+ modified_at?: string;
4142
580
  /**
4143
- * - The mandate ID associated with the setup payment.
581
+ * - Unique Identifier of the company
4144
582
  */
4145
- mandate?: string;
4146
- payment_method_options?: PaymentMethodOptions;
4147
- };
4148
- /** @returns {PaymentMethodOptions} */
4149
- declare function PaymentMethodOptions(): PaymentMethodOptions;
4150
- type PaymentMethodOptions = {
4151
- card?: Card;
4152
- };
4153
- /** @returns {Card} */
4154
- declare function Card(): Card;
4155
- type Card = {
4156
- mandate_options?: MandateOptions;
4157
- };
4158
- /** @returns {MandateOptions} */
4159
- declare function MandateOptions(): MandateOptions;
4160
- type MandateOptions = {
583
+ subscriber_id?: string;
584
+ line_items?: EntityChargeDetails[];
4161
585
  /**
4162
- * - The mandate amount.
586
+ * - The URL passed in request which extension
587
+ * expects in return.
4163
588
  */
4164
- amount?: number;
589
+ return_url?: string;
4165
590
  };
4166
- /** @returns {Message} */
4167
- declare function Message(): Message;
4168
- type Message = {
591
+ /** @returns {OneTimeChargeEntity} */
592
+ declare function OneTimeChargeEntity(): OneTimeChargeEntity;
593
+ type OneTimeChargeEntity = {
4169
594
  /**
4170
- * - A message providing details about the operation status.
595
+ * - Description of the charge term or usage.
4171
596
  */
4172
- message?: string;
4173
- };
4174
- /** @returns {TopupRes} */
4175
- declare function TopupRes(): TopupRes;
4176
- type TopupRes = {
597
+ term?: string;
4177
598
  /**
4178
- * - The status of the top-up request.
599
+ * - Type of the charge (e.g., 'subscription',
600
+ * 'extension').
4179
601
  */
4180
- status?: string;
602
+ charge_type?: string;
4181
603
  /**
4182
- * - The order ID from the aggregator.
604
+ * - Maximum amount that can be charged. If
605
+ * no cap, the value should be 0.
4183
606
  */
4184
- aggregator_order_id?: string;
607
+ capped_amount?: number;
4185
608
  /**
4186
- * - The amount of the top-up.
609
+ * - Date when the charge was billed. Null if
610
+ * not yet billed.
4187
611
  */
4188
- amount?: number;
612
+ billing_date?: string;
4189
613
  /**
4190
- * - The currency of the top-up.
614
+ * - Date and time when the charge entity was created.
4191
615
  */
4192
- currency?: string;
616
+ created_at?: string;
4193
617
  /**
4194
- * - The transaction ID for the top-up.
618
+ * - Date and time when the charge entity was
619
+ * last modified.
4195
620
  */
4196
- transaction_id?: string;
4197
- };
4198
- /** @returns {CancelTopupReq} */
4199
- declare function CancelTopupReq(): CancelTopupReq;
4200
- type CancelTopupReq = {
621
+ modified_at?: string;
4201
622
  /**
4202
- * - The order ID of the top-up to cancel.
623
+ * - Internal version key for the charge record.
4203
624
  */
4204
- order_id?: string;
4205
- };
4206
- /** @returns {CancelTopupRes} */
4207
- declare function CancelTopupRes(): CancelTopupRes;
4208
- type CancelTopupRes = {
625
+ __v?: number;
4209
626
  /**
4210
- * - The ID of the canceled top-up.
627
+ * - Unique identifier for the charge entity.
4211
628
  */
4212
629
  _id?: string;
4213
630
  /**
4214
- * - The subscriber ID associated with the top-up.
631
+ * - The name of the one-time charge.
4215
632
  */
4216
- subscriber_id?: string;
633
+ name?: string;
4217
634
  /**
4218
- * - The amount of the canceled top-up.
635
+ * - Current status of the charge (e.g., 'pending',
636
+ * 'completed').
4219
637
  */
4220
- amount?: number;
638
+ status?: string;
4221
639
  /**
4222
- * - The currency of the canceled top-up.
640
+ * - Date and time when the charge was
641
+ * activated. Null if not yet activated.
4223
642
  */
4224
- currency?: string;
643
+ activated_on?: string;
4225
644
  /**
4226
- * - The aggregator used for the top-up.
645
+ * - Date and time when the charge was
646
+ * cancelled. Null if not cancelled.
4227
647
  */
4228
- aggregator?: string;
648
+ cancelled_on?: string;
4229
649
  /**
4230
- * - The order ID from the aggregator.
650
+ * - Additional metadata associated with the charge.
4231
651
  */
4232
- aggregator_order_id?: string;
652
+ metadata?: any;
4233
653
  /**
4234
- * - The date and time when the top-up was created.
654
+ * - URL to redirect to after processing the charge.
4235
655
  */
4236
- created_at?: string;
656
+ return_url?: string;
4237
657
  /**
4238
- * - The date and time when the top-up was modified.
658
+ * - Indicates whether the charge is for testing purposes.
4239
659
  */
4240
- modified_at?: string;
660
+ is_test?: boolean;
4241
661
  /**
4242
- * - The version key, used for internal purposes.
662
+ * - Pricing model for the charge (e.g., 'one_time').
4243
663
  */
4244
- __v?: number;
664
+ pricing_type?: string;
4245
665
  /**
4246
- * - The status of the top-up with the aggregator.
666
+ * - Unique identifier for the subscriber
667
+ * associated with the charge.
4247
668
  */
4248
- aggregator_status?: string;
669
+ subscriber_id?: string;
4249
670
  /**
4250
- * - The current status of the top-up.
671
+ * - Type of the entity related to the charge
672
+ * (e.g., 'subscription', 'user').
4251
673
  */
4252
- current_status?: string;
4253
- };
4254
- /** @returns {DefaultReq} */
4255
- declare function DefaultReq(): DefaultReq;
4256
- type DefaultReq = {
674
+ entity_type?: string;
675
+ /**
676
+ * - Unique identifier for the entity associated
677
+ * with the charge.
678
+ */
679
+ entity_id?: string;
4257
680
  /**
4258
- * - The ID of the payment method to set
4259
- * as default.
681
+ * - Additional metadata associated with the charge.
4260
682
  */
4261
- payment_method_id?: string;
683
+ meta?: any;
684
+ price?: EntityChargePrice;
4262
685
  };
4263
686
  /** @returns {EntityChargeRecurring} */
4264
687
  declare function EntityChargeRecurring(): EntityChargeRecurring;
@@ -4268,48 +691,6 @@ type EntityChargeRecurring = {
4268
691
  */
4269
692
  interval: string;
4270
693
  };
4271
- /** @returns {ChargeLineItem} */
4272
- declare function ChargeLineItem(): ChargeLineItem;
4273
- type ChargeLineItem = {
4274
- /**
4275
- * - Its name of the extension plan.
4276
- */
4277
- name: string;
4278
- /**
4279
- * - It indicates how it will be charged.
4280
- */
4281
- term: string;
4282
- /**
4283
- * - It indicates the extension subscription
4284
- * will be auto renewed timely.
4285
- */
4286
- pricing_type: string;
4287
- price: EntityChargePrice;
4288
- recurring?: EntityChargeRecurring;
4289
- capped_amount?: number;
4290
- trial_days?: number;
4291
- is_test?: boolean;
4292
- metadata?: any;
4293
- };
4294
- /** @returns {CreateSubscriptionCharge} */
4295
- declare function CreateSubscriptionCharge(): CreateSubscriptionCharge;
4296
- type CreateSubscriptionCharge = {
4297
- /**
4298
- * - The name of the charge.
4299
- */
4300
- name: string;
4301
- trial_days?: number;
4302
- line_items: ChargeLineItem[];
4303
- /**
4304
- * - Indicates whether the charge is for testing purposes.
4305
- */
4306
- is_test?: boolean;
4307
- /**
4308
- * - The URL passed in request which extension
4309
- * expects in return.
4310
- */
4311
- return_url: string;
4312
- };
4313
694
  /** @returns {EntityChargeDetails} */
4314
695
  declare function EntityChargeDetails(): EntityChargeDetails;
4315
696
  type EntityChargeDetails = {
@@ -4403,68 +784,3 @@ type EntityChargeDetails = {
4403
784
  */
4404
785
  __v?: number;
4405
786
  };
4406
- /** @returns {EntitySubscription} */
4407
- declare function EntitySubscription(): EntitySubscription;
4408
- type EntitySubscription = {
4409
- /**
4410
- * - Unique identifier for the subscription charge
4411
- */
4412
- _id?: string;
4413
- /**
4414
- * - ID of the product suit associated with
4415
- * the charge
4416
- */
4417
- product_suit_id?: string;
4418
- /**
4419
- * - Unique identifier for the entity
4420
- */
4421
- entity_id?: string;
4422
- /**
4423
- * - Type of entity (e.g., subscription, extension)
4424
- */
4425
- entity_type?: string;
4426
- /**
4427
- * - Name of the subscription charge
4428
- */
4429
- name?: string;
4430
- /**
4431
- * - Current status of the subscription charge
4432
- */
4433
- status?: string;
4434
- /**
4435
- * - Number of trial days provided
4436
- */
4437
- trial_days?: number;
4438
- /**
4439
- * - Indicates if the charge is for testing purposes
4440
- */
4441
- is_test?: boolean;
4442
- /**
4443
- * - Timestamp when the charge was created
4444
- */
4445
- created_at?: string;
4446
- /**
4447
- * - Timestamp when the charge was last modified
4448
- */
4449
- modified_at?: string;
4450
- /**
4451
- * - Unique Identifier of the company
4452
- */
4453
- subscriber_id?: string;
4454
- line_items?: EntityChargeDetails[];
4455
- /**
4456
- * - The URL passed in request which extension
4457
- * expects in return.
4458
- */
4459
- return_url?: string;
4460
- };
4461
- /** @returns {CreateSubscriptionResponse} */
4462
- declare function CreateSubscriptionResponse(): CreateSubscriptionResponse;
4463
- type CreateSubscriptionResponse = {
4464
- subscription?: EntitySubscription;
4465
- /**
4466
- * - URL to which users are redirected to
4467
- * confirm or complete the payment or subscription process.
4468
- */
4469
- confirm_url?: string;
4470
- };