chargebee 3.19.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +250 -23
- package/cjs/chargebee.cjs.js +11 -4
- package/cjs/createChargebee.js +9 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/webhook/auth.js +53 -0
- package/cjs/resources/webhook/content.js +4 -0
- package/cjs/resources/webhook/errors.js +94 -0
- package/cjs/resources/webhook/eventType.js +12 -1
- package/cjs/resources/webhook/handler.js +483 -0
- package/esm/chargebee.esm.js +4 -2
- package/esm/createChargebee.js +9 -0
- package/esm/environment.js +1 -1
- package/esm/resources/webhook/auth.js +49 -0
- package/esm/resources/webhook/content.js +2 -0
- package/esm/resources/webhook/errors.js +87 -0
- package/esm/resources/webhook/eventType.js +12 -1
- package/esm/resources/webhook/handler.js +472 -0
- package/package.json +11 -6
- package/types/core.d.ts +19 -3
- package/types/index.d.ts +190 -7
- package/types/resources/Content.d.ts +0 -5
- package/types/resources/CreditNote.d.ts +8 -1
- package/types/resources/Customer.d.ts +14 -2
- package/types/resources/Einvoice.d.ts +8 -1
- package/types/resources/EntitlementOverride.d.ts +5 -0
- package/types/resources/Estimate.d.ts +14 -2
- package/types/resources/Event.d.ts +1 -0
- package/types/resources/Gift.d.ts +14 -2
- package/types/resources/HostedPage.d.ts +1 -0
- package/types/resources/Invoice.d.ts +22 -3
- package/types/resources/OmnichannelSubscription.d.ts +5 -0
- package/types/resources/PaymentIntent.d.ts +35 -5
- package/types/resources/PaymentSource.d.ts +7 -1
- package/types/resources/PricingPageSession.d.ts +1 -1
- package/types/resources/Purchase.d.ts +7 -1
- package/types/resources/Subscription.d.ts +51 -7
- package/types/resources/WebhookEvent.d.ts +11 -14
- package/types/resources/BusinessEntityChange.d.ts +0 -16
- package/types/resources/Product.d.ts +0 -135
- package/types/resources/SalesOrder.d.ts +0 -153
- package/types/resources/UsageReminderInfo.d.ts +0 -9
- package/types/resources/Variant.d.ts +0 -116
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
///<reference path='./resources/BillingConfiguration.d.ts' />
|
|
7
7
|
///<reference path='./resources/Brand.d.ts' />
|
|
8
8
|
///<reference path='./resources/BusinessEntity.d.ts' />
|
|
9
|
-
///<reference path='./resources/BusinessEntityChange.d.ts' />
|
|
10
9
|
///<reference path='./resources/BusinessEntityTransfer.d.ts' />
|
|
11
10
|
///<reference path='./resources/Card.d.ts' />
|
|
12
11
|
///<reference path='./resources/Comment.d.ts' />
|
|
@@ -70,7 +69,6 @@
|
|
|
70
69
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
71
70
|
///<reference path='./resources/PriceVariant.d.ts' />
|
|
72
71
|
///<reference path='./resources/PricingPageSession.d.ts' />
|
|
73
|
-
///<reference path='./resources/Product.d.ts' />
|
|
74
72
|
///<reference path='./resources/PromotionalCredit.d.ts' />
|
|
75
73
|
///<reference path='./resources/Purchase.d.ts' />
|
|
76
74
|
///<reference path='./resources/Quote.d.ts' />
|
|
@@ -83,7 +81,6 @@
|
|
|
83
81
|
///<reference path='./resources/RecordedPurchase.d.ts' />
|
|
84
82
|
///<reference path='./resources/ResourceMigration.d.ts' />
|
|
85
83
|
///<reference path='./resources/Rule.d.ts' />
|
|
86
|
-
///<reference path='./resources/SalesOrder.d.ts' />
|
|
87
84
|
///<reference path='./resources/SiteMigrationDetail.d.ts' />
|
|
88
85
|
///<reference path='./resources/Subscription.d.ts' />
|
|
89
86
|
///<reference path='./resources/SubscriptionEntitlement.d.ts' />
|
|
@@ -99,8 +96,6 @@
|
|
|
99
96
|
///<reference path='./resources/Usage.d.ts' />
|
|
100
97
|
///<reference path='./resources/UsageEvent.d.ts' />
|
|
101
98
|
///<reference path='./resources/UsageFile.d.ts' />
|
|
102
|
-
///<reference path='./resources/UsageReminderInfo.d.ts' />
|
|
103
|
-
///<reference path='./resources/Variant.d.ts' />
|
|
104
99
|
///<reference path='./resources/VirtualBankAccount.d.ts' />
|
|
105
100
|
///<reference path='./resources/WebhookEndpoint.d.ts' />
|
|
106
101
|
///<reference path='./resources/Content.d.ts' />
|
|
@@ -229,7 +224,6 @@ declare module 'chargebee' {
|
|
|
229
224
|
portalSession: PortalSession.PortalSessionResource;
|
|
230
225
|
priceVariant: PriceVariant.PriceVariantResource;
|
|
231
226
|
pricingPageSession: PricingPageSession.PricingPageSessionResource;
|
|
232
|
-
product: Product.ProductResource;
|
|
233
227
|
promotionalCredit: PromotionalCredit.PromotionalCreditResource;
|
|
234
228
|
purchase: Purchase.PurchaseResource;
|
|
235
229
|
quote: Quote.QuoteResource;
|
|
@@ -246,8 +240,197 @@ declare module 'chargebee' {
|
|
|
246
240
|
usage: Usage.UsageResource;
|
|
247
241
|
usageEvent: UsageEvent.UsageEventResource;
|
|
248
242
|
usageFile: UsageFile.UsageFileResource;
|
|
249
|
-
variant: Variant.VariantResource;
|
|
250
243
|
virtualBankAccount: VirtualBankAccount.VirtualBankAccountResource;
|
|
251
244
|
webhookEndpoint: WebhookEndpoint.WebhookEndpointResource;
|
|
245
|
+
|
|
246
|
+
/** Webhook handler instance with auto-configured Basic Auth (if env vars are set) */
|
|
247
|
+
webhooks: WebhookHandler & {
|
|
248
|
+
/** Create a new typed webhook handler instance */
|
|
249
|
+
createHandler<ReqT = unknown, ResT = unknown>(
|
|
250
|
+
options?: WebhookHandlerOptions,
|
|
251
|
+
): WebhookHandler<ReqT, ResT>;
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Webhook Handler Types
|
|
256
|
+
export type WebhookEventName = EventTypeEnum | 'unhandled_event';
|
|
257
|
+
export type WebhookEventTypeValue = `${WebhookEventType}`;
|
|
258
|
+
/**
|
|
259
|
+
* @deprecated Renamed to `WebhookEventTypeValue` for clarity. Use `WebhookEventTypeValue` instead.
|
|
260
|
+
* This alias will be removed in the next major version.
|
|
261
|
+
*/
|
|
262
|
+
export type WebhookContentTypeValue = WebhookEventTypeValue;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Context object passed to webhook event listeners.
|
|
266
|
+
* Wraps the event data with optional framework-specific request/response objects.
|
|
267
|
+
*/
|
|
268
|
+
export interface WebhookContext<ReqT = unknown, ResT = unknown> {
|
|
269
|
+
/** The parsed webhook event from Chargebee */
|
|
270
|
+
event: WebhookEvent;
|
|
271
|
+
/** Framework-specific request object (Express, Fastify, etc.) */
|
|
272
|
+
request?: ReqT;
|
|
273
|
+
/** Framework-specific response object (Express, Fastify, etc.) */
|
|
274
|
+
response?: ResT;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Context object passed to webhook error listeners.
|
|
279
|
+
* Contains the request/response objects so errors can be handled appropriately.
|
|
280
|
+
*/
|
|
281
|
+
export interface WebhookErrorContext<ReqT = unknown, ResT = unknown> {
|
|
282
|
+
/** Framework-specific request object (Express, Fastify, etc.) */
|
|
283
|
+
request?: ReqT;
|
|
284
|
+
/** Framework-specific response object (Express, Fastify, etc.) */
|
|
285
|
+
response?: ResT;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Validator function type for authenticating webhook requests.
|
|
290
|
+
* Can be synchronous or asynchronous.
|
|
291
|
+
*/
|
|
292
|
+
export type RequestValidator = (
|
|
293
|
+
headers: Record<string, string | string[] | undefined>,
|
|
294
|
+
) => void | Promise<void>;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Configuration options for WebhookHandler.
|
|
298
|
+
*/
|
|
299
|
+
export interface WebhookHandlerOptions {
|
|
300
|
+
/**
|
|
301
|
+
* Optional validator function to authenticate incoming webhook requests.
|
|
302
|
+
* Typically used for Basic Auth validation.
|
|
303
|
+
* Can be sync or async - throw an error to reject the request.
|
|
304
|
+
*/
|
|
305
|
+
requestValidator?: RequestValidator;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Options for the handle() method.
|
|
310
|
+
*/
|
|
311
|
+
export interface HandleOptions<ReqT = unknown, ResT = unknown> {
|
|
312
|
+
/** The raw request body (string) or pre-parsed object */
|
|
313
|
+
body: string | object;
|
|
314
|
+
/** Optional HTTP headers for validation */
|
|
315
|
+
headers?: Record<string, string | string[] | undefined>;
|
|
316
|
+
/** Optional framework-specific request object (Express, Fastify, etc.) */
|
|
317
|
+
request?: ReqT;
|
|
318
|
+
/** Optional framework-specific response object (Express, Fastify, etc.) */
|
|
319
|
+
response?: ResT;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export type WebhookEventListener<
|
|
323
|
+
ReqT = unknown,
|
|
324
|
+
ResT = unknown,
|
|
325
|
+
T extends WebhookEventType = WebhookEventType,
|
|
326
|
+
> = (
|
|
327
|
+
context: WebhookContext<ReqT, ResT> & { event: WebhookEvent<T> },
|
|
328
|
+
) => Promise<void> | void;
|
|
329
|
+
export type WebhookErrorListener<ReqT = unknown, ResT = unknown> = (
|
|
330
|
+
error: Error,
|
|
331
|
+
context: WebhookErrorContext<ReqT, ResT>,
|
|
332
|
+
) => Promise<void> | void;
|
|
333
|
+
|
|
334
|
+
// Helper type to map string literal to enum member
|
|
335
|
+
type StringToWebhookEventType<S extends WebhookEventTypeValue> = {
|
|
336
|
+
[K in WebhookEventType]: `${K}` extends S ? K : never;
|
|
337
|
+
}[WebhookEventType];
|
|
338
|
+
|
|
339
|
+
export interface WebhookHandler<ReqT = unknown, ResT = unknown> {
|
|
340
|
+
on<T extends WebhookEventType>(
|
|
341
|
+
eventName: T,
|
|
342
|
+
listener: WebhookEventListener<ReqT, ResT, T>,
|
|
343
|
+
): this;
|
|
344
|
+
on<S extends WebhookEventTypeValue>(
|
|
345
|
+
eventName: S,
|
|
346
|
+
listener: WebhookEventListener<ReqT, ResT, StringToWebhookEventType<S>>,
|
|
347
|
+
): this;
|
|
348
|
+
on(
|
|
349
|
+
eventName: 'unhandled_event',
|
|
350
|
+
listener: WebhookEventListener<ReqT, ResT>,
|
|
351
|
+
): this;
|
|
352
|
+
on(eventName: 'error', listener: WebhookErrorListener<ReqT, ResT>): this;
|
|
353
|
+
once<T extends WebhookEventType>(
|
|
354
|
+
eventName: T,
|
|
355
|
+
listener: WebhookEventListener<ReqT, ResT, T>,
|
|
356
|
+
): this;
|
|
357
|
+
once<S extends WebhookEventTypeValue>(
|
|
358
|
+
eventName: S,
|
|
359
|
+
listener: WebhookEventListener<ReqT, ResT, StringToWebhookEventType<S>>,
|
|
360
|
+
): this;
|
|
361
|
+
once(
|
|
362
|
+
eventName: 'unhandled_event',
|
|
363
|
+
listener: WebhookEventListener<ReqT, ResT>,
|
|
364
|
+
): this;
|
|
365
|
+
once(eventName: 'error', listener: WebhookErrorListener<ReqT, ResT>): this;
|
|
366
|
+
off<T extends WebhookEventType>(
|
|
367
|
+
eventName: T,
|
|
368
|
+
listener: WebhookEventListener<ReqT, ResT, T>,
|
|
369
|
+
): this;
|
|
370
|
+
off<S extends WebhookEventTypeValue>(
|
|
371
|
+
eventName: S,
|
|
372
|
+
listener: WebhookEventListener<ReqT, ResT, StringToWebhookEventType<S>>,
|
|
373
|
+
): this;
|
|
374
|
+
off(
|
|
375
|
+
eventName: 'unhandled_event',
|
|
376
|
+
listener: WebhookEventListener<ReqT, ResT>,
|
|
377
|
+
): this;
|
|
378
|
+
off(eventName: 'error', listener: WebhookErrorListener<ReqT, ResT>): this;
|
|
379
|
+
handle(options: HandleOptions<ReqT, ResT>): Promise<void>;
|
|
380
|
+
requestValidator: RequestValidator | undefined;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Webhook Auth
|
|
384
|
+
/**
|
|
385
|
+
* Credential validator function type.
|
|
386
|
+
* Can be synchronous or asynchronous (e.g., for database lookups).
|
|
387
|
+
*/
|
|
388
|
+
export type CredentialValidator = (
|
|
389
|
+
username: string,
|
|
390
|
+
password: string,
|
|
391
|
+
) => boolean | Promise<boolean>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Creates a Basic Auth validator for webhook requests.
|
|
395
|
+
*/
|
|
396
|
+
export function basicAuthValidator(
|
|
397
|
+
validateCredentials: CredentialValidator,
|
|
398
|
+
): (headers: Record<string, string | string[] | undefined>) => Promise<void>;
|
|
399
|
+
|
|
400
|
+
// Webhook Error Classes
|
|
401
|
+
/**
|
|
402
|
+
* Base class for all webhook-related errors.
|
|
403
|
+
*/
|
|
404
|
+
export class WebhookError extends Error {
|
|
405
|
+
constructor(message: string);
|
|
406
|
+
name: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Authentication error thrown when webhook request authentication fails.
|
|
411
|
+
* Typically maps to HTTP 401 Unauthorized.
|
|
412
|
+
*/
|
|
413
|
+
export class WebhookAuthenticationError extends WebhookError {
|
|
414
|
+
constructor(message: string);
|
|
415
|
+
name: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Payload validation error thrown when the webhook payload structure is invalid.
|
|
420
|
+
* Typically maps to HTTP 400 Bad Request.
|
|
421
|
+
*/
|
|
422
|
+
export class WebhookPayloadValidationError extends WebhookError {
|
|
423
|
+
constructor(message: string);
|
|
424
|
+
name: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* JSON parsing error thrown when the webhook body cannot be parsed as JSON.
|
|
429
|
+
* Typically maps to HTTP 400 Bad Request.
|
|
430
|
+
*/
|
|
431
|
+
export class WebhookPayloadParseError extends WebhookError {
|
|
432
|
+
constructor(message: string, rawBody?: string);
|
|
433
|
+
name: string;
|
|
434
|
+
readonly rawBody?: string;
|
|
252
435
|
}
|
|
253
436
|
}
|
|
@@ -11,7 +11,6 @@ declare module 'chargebee' {
|
|
|
11
11
|
billing_configuration: BillingConfiguration;
|
|
12
12
|
brand: Brand;
|
|
13
13
|
business_entity: BusinessEntity;
|
|
14
|
-
business_entity_change: BusinessEntityChange;
|
|
15
14
|
business_entity_transfer: BusinessEntityTransfer;
|
|
16
15
|
card: Card;
|
|
17
16
|
comment: Comment;
|
|
@@ -75,7 +74,6 @@ declare module 'chargebee' {
|
|
|
75
74
|
portal_session: PortalSession;
|
|
76
75
|
price_variant: PriceVariant;
|
|
77
76
|
pricing_page_session: PricingPageSession;
|
|
78
|
-
product: Product;
|
|
79
77
|
promotional_credit: PromotionalCredit;
|
|
80
78
|
purchase: Purchase;
|
|
81
79
|
quote: Quote;
|
|
@@ -88,7 +86,6 @@ declare module 'chargebee' {
|
|
|
88
86
|
recorded_purchase: RecordedPurchase;
|
|
89
87
|
resource_migration: ResourceMigration;
|
|
90
88
|
rule: Rule;
|
|
91
|
-
sales_order: SalesOrder;
|
|
92
89
|
site_migration_detail: SiteMigrationDetail;
|
|
93
90
|
subscription: Subscription;
|
|
94
91
|
subscription_entitlement: SubscriptionEntitlement;
|
|
@@ -104,8 +101,6 @@ declare module 'chargebee' {
|
|
|
104
101
|
usage: Usage;
|
|
105
102
|
usage_event: UsageEvent;
|
|
106
103
|
usage_file: UsageFile;
|
|
107
|
-
usage_reminder_info: UsageReminderInfo;
|
|
108
|
-
variant: Variant;
|
|
109
104
|
virtual_bank_account: VirtualBankAccount;
|
|
110
105
|
webhook_endpoint: WebhookEndpoint;
|
|
111
106
|
}
|
|
@@ -428,7 +428,14 @@ declare module 'chargebee' {
|
|
|
428
428
|
| 'in_progress'
|
|
429
429
|
| 'success'
|
|
430
430
|
| 'failed'
|
|
431
|
-
| 'registered'
|
|
431
|
+
| 'registered'
|
|
432
|
+
| 'accepted'
|
|
433
|
+
| 'rejected'
|
|
434
|
+
| 'message_acknowledgement'
|
|
435
|
+
| 'in_process'
|
|
436
|
+
| 'under_query'
|
|
437
|
+
| 'conditionally_accepted'
|
|
438
|
+
| 'paid';
|
|
432
439
|
message?: string;
|
|
433
440
|
}
|
|
434
441
|
export interface SiteDetailsAtCreation {
|
|
@@ -755,7 +755,13 @@ declare module 'chargebee' {
|
|
|
755
755
|
| 'kbc_payment_button'
|
|
756
756
|
| 'pay_by_bank'
|
|
757
757
|
| 'trustly'
|
|
758
|
-
| 'stablecoin'
|
|
758
|
+
| 'stablecoin'
|
|
759
|
+
| 'kakao_pay'
|
|
760
|
+
| 'naver_pay'
|
|
761
|
+
| 'revolut_pay'
|
|
762
|
+
| 'cash_app_pay'
|
|
763
|
+
| 'wechat_pay'
|
|
764
|
+
| 'alipay';
|
|
759
765
|
reference_id?: string;
|
|
760
766
|
/**
|
|
761
767
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -933,7 +939,13 @@ declare module 'chargebee' {
|
|
|
933
939
|
| 'kbc_payment_button'
|
|
934
940
|
| 'pay_by_bank'
|
|
935
941
|
| 'trustly'
|
|
936
|
-
| 'stablecoin'
|
|
942
|
+
| 'stablecoin'
|
|
943
|
+
| 'kakao_pay'
|
|
944
|
+
| 'naver_pay'
|
|
945
|
+
| 'revolut_pay'
|
|
946
|
+
| 'cash_app_pay'
|
|
947
|
+
| 'wechat_pay'
|
|
948
|
+
| 'alipay';
|
|
937
949
|
/**
|
|
938
950
|
* @deprecated Please refer API docs to use other attributes
|
|
939
951
|
*/
|
|
@@ -11,7 +11,14 @@ declare module 'chargebee' {
|
|
|
11
11
|
| 'in_progress'
|
|
12
12
|
| 'success'
|
|
13
13
|
| 'failed'
|
|
14
|
-
| 'registered'
|
|
14
|
+
| 'registered'
|
|
15
|
+
| 'accepted'
|
|
16
|
+
| 'rejected'
|
|
17
|
+
| 'message_acknowledgement'
|
|
18
|
+
| 'in_process'
|
|
19
|
+
| 'under_query'
|
|
20
|
+
| 'conditionally_accepted'
|
|
21
|
+
| 'paid';
|
|
15
22
|
message?: string;
|
|
16
23
|
}
|
|
17
24
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface EntitlementOverride {
|
|
6
6
|
id: string;
|
|
7
|
+
subscription_id?: string;
|
|
7
8
|
entity_id?: string;
|
|
8
9
|
entity_type?: string;
|
|
9
10
|
feature_id?: string;
|
|
@@ -12,6 +13,7 @@ declare module 'chargebee' {
|
|
|
12
13
|
name?: string;
|
|
13
14
|
expires_at?: number;
|
|
14
15
|
effective_from?: number;
|
|
16
|
+
is_enabled: boolean;
|
|
15
17
|
schedule_status?: 'activated' | 'scheduled' | 'failed';
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -68,9 +70,12 @@ declare module 'chargebee' {
|
|
|
68
70
|
}
|
|
69
71
|
export interface EntitlementOverridesAddEntitlementOverrideForSubscriptionInputParam {
|
|
70
72
|
feature_id: string;
|
|
73
|
+
entity_id?: string;
|
|
74
|
+
entity_type?: EntityTypeEnum;
|
|
71
75
|
value?: string;
|
|
72
76
|
expires_at?: number;
|
|
73
77
|
effective_from?: number;
|
|
78
|
+
is_enabled?: boolean;
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
}
|
|
@@ -1047,7 +1047,13 @@ declare module 'chargebee' {
|
|
|
1047
1047
|
| 'kbc_payment_button'
|
|
1048
1048
|
| 'pay_by_bank'
|
|
1049
1049
|
| 'trustly'
|
|
1050
|
-
| 'stablecoin'
|
|
1050
|
+
| 'stablecoin'
|
|
1051
|
+
| 'kakao_pay'
|
|
1052
|
+
| 'naver_pay'
|
|
1053
|
+
| 'revolut_pay'
|
|
1054
|
+
| 'cash_app_pay'
|
|
1055
|
+
| 'wechat_pay'
|
|
1056
|
+
| 'alipay';
|
|
1051
1057
|
reference_id?: string;
|
|
1052
1058
|
/**
|
|
1053
1059
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1130,7 +1136,13 @@ declare module 'chargebee' {
|
|
|
1130
1136
|
| 'kbc_payment_button'
|
|
1131
1137
|
| 'pay_by_bank'
|
|
1132
1138
|
| 'trustly'
|
|
1133
|
-
| 'stablecoin'
|
|
1139
|
+
| 'stablecoin'
|
|
1140
|
+
| 'kakao_pay'
|
|
1141
|
+
| 'naver_pay'
|
|
1142
|
+
| 'revolut_pay'
|
|
1143
|
+
| 'cash_app_pay'
|
|
1144
|
+
| 'wechat_pay'
|
|
1145
|
+
| 'alipay';
|
|
1134
1146
|
reference_id?: string;
|
|
1135
1147
|
/**
|
|
1136
1148
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -122,6 +122,7 @@ declare module 'chargebee' {
|
|
|
122
122
|
CardUpdatedContent &
|
|
123
123
|
CustomerCreatedContent &
|
|
124
124
|
SubscriptionRenewalReminderContent &
|
|
125
|
+
PaymentDueReminderContent &
|
|
125
126
|
OrderDeliveredContent &
|
|
126
127
|
OmnichannelSubscriptionItemCancellationScheduledContent &
|
|
127
128
|
OmnichannelSubscriptionItemGracePeriodExpiredContent &
|
|
@@ -208,7 +208,13 @@ declare module 'chargebee' {
|
|
|
208
208
|
| 'kbc_payment_button'
|
|
209
209
|
| 'pay_by_bank'
|
|
210
210
|
| 'trustly'
|
|
211
|
-
| 'stablecoin'
|
|
211
|
+
| 'stablecoin'
|
|
212
|
+
| 'kakao_pay'
|
|
213
|
+
| 'naver_pay'
|
|
214
|
+
| 'revolut_pay'
|
|
215
|
+
| 'cash_app_pay'
|
|
216
|
+
| 'wechat_pay'
|
|
217
|
+
| 'alipay';
|
|
212
218
|
reference_id?: string;
|
|
213
219
|
/**
|
|
214
220
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -285,7 +291,13 @@ declare module 'chargebee' {
|
|
|
285
291
|
| 'kbc_payment_button'
|
|
286
292
|
| 'pay_by_bank'
|
|
287
293
|
| 'trustly'
|
|
288
|
-
| 'stablecoin'
|
|
294
|
+
| 'stablecoin'
|
|
295
|
+
| 'kakao_pay'
|
|
296
|
+
| 'naver_pay'
|
|
297
|
+
| 'revolut_pay'
|
|
298
|
+
| 'cash_app_pay'
|
|
299
|
+
| 'wechat_pay'
|
|
300
|
+
| 'alipay';
|
|
289
301
|
reference_id?: string;
|
|
290
302
|
/**
|
|
291
303
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -414,6 +414,7 @@ declare module 'chargebee' {
|
|
|
414
414
|
export interface CollectNowInputParam {
|
|
415
415
|
redirect_url?: string;
|
|
416
416
|
currency_code?: string;
|
|
417
|
+
payment_method_save_policy?: PaymentMethodSavePolicyEnum;
|
|
417
418
|
customer?: CustomerCollectNowInputParam;
|
|
418
419
|
card?: CardCollectNowInputParam;
|
|
419
420
|
}
|
|
@@ -844,7 +844,14 @@ declare module 'chargebee' {
|
|
|
844
844
|
| 'in_progress'
|
|
845
845
|
| 'success'
|
|
846
846
|
| 'failed'
|
|
847
|
-
| 'registered'
|
|
847
|
+
| 'registered'
|
|
848
|
+
| 'accepted'
|
|
849
|
+
| 'rejected'
|
|
850
|
+
| 'message_acknowledgement'
|
|
851
|
+
| 'in_process'
|
|
852
|
+
| 'under_query'
|
|
853
|
+
| 'conditionally_accepted'
|
|
854
|
+
| 'paid';
|
|
848
855
|
message?: string;
|
|
849
856
|
}
|
|
850
857
|
export interface SiteDetailsAtCreation {
|
|
@@ -1265,7 +1272,13 @@ declare module 'chargebee' {
|
|
|
1265
1272
|
| 'kbc_payment_button'
|
|
1266
1273
|
| 'pay_by_bank'
|
|
1267
1274
|
| 'trustly'
|
|
1268
|
-
| 'stablecoin'
|
|
1275
|
+
| 'stablecoin'
|
|
1276
|
+
| 'kakao_pay'
|
|
1277
|
+
| 'naver_pay'
|
|
1278
|
+
| 'revolut_pay'
|
|
1279
|
+
| 'cash_app_pay'
|
|
1280
|
+
| 'wechat_pay'
|
|
1281
|
+
| 'alipay';
|
|
1269
1282
|
reference_id?: string;
|
|
1270
1283
|
/**
|
|
1271
1284
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -1417,7 +1430,13 @@ declare module 'chargebee' {
|
|
|
1417
1430
|
| 'kbc_payment_button'
|
|
1418
1431
|
| 'pay_by_bank'
|
|
1419
1432
|
| 'trustly'
|
|
1420
|
-
| 'stablecoin'
|
|
1433
|
+
| 'stablecoin'
|
|
1434
|
+
| 'kakao_pay'
|
|
1435
|
+
| 'naver_pay'
|
|
1436
|
+
| 'revolut_pay'
|
|
1437
|
+
| 'cash_app_pay'
|
|
1438
|
+
| 'wechat_pay'
|
|
1439
|
+
| 'alipay';
|
|
1421
1440
|
reference_id?: string;
|
|
1422
1441
|
/**
|
|
1423
1442
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -65,6 +65,7 @@ declare module 'chargebee' {
|
|
|
65
65
|
export interface ListInputParam {
|
|
66
66
|
limit?: number;
|
|
67
67
|
offset?: string;
|
|
68
|
+
omnichannel_subscription_item?: OmnichannelSubscriptionItemOmnichannelSubscriptionListInputParam;
|
|
68
69
|
source?: filter.Enum;
|
|
69
70
|
customer_id?: filter.String;
|
|
70
71
|
}
|
|
@@ -75,5 +76,9 @@ declare module 'chargebee' {
|
|
|
75
76
|
export interface MoveInputParam {
|
|
76
77
|
to_customer_id: string;
|
|
77
78
|
}
|
|
79
|
+
export interface OmnichannelSubscriptionItemOmnichannelSubscriptionListInputParam {
|
|
80
|
+
status?: filter.Enum;
|
|
81
|
+
item_id_at_source?: filter.String;
|
|
82
|
+
}
|
|
78
83
|
}
|
|
79
84
|
}
|
|
@@ -36,7 +36,13 @@ declare module 'chargebee' {
|
|
|
36
36
|
| 'kbc_payment_button'
|
|
37
37
|
| 'pay_by_bank'
|
|
38
38
|
| 'trustly'
|
|
39
|
-
| 'stablecoin'
|
|
39
|
+
| 'stablecoin'
|
|
40
|
+
| 'kakao_pay'
|
|
41
|
+
| 'naver_pay'
|
|
42
|
+
| 'revolut_pay'
|
|
43
|
+
| 'cash_app_pay'
|
|
44
|
+
| 'wechat_pay'
|
|
45
|
+
| 'alipay';
|
|
40
46
|
success_url?: string;
|
|
41
47
|
failure_url?: string;
|
|
42
48
|
created_at: number;
|
|
@@ -117,7 +123,13 @@ declare module 'chargebee' {
|
|
|
117
123
|
| 'kbc_payment_button'
|
|
118
124
|
| 'pay_by_bank'
|
|
119
125
|
| 'trustly'
|
|
120
|
-
| 'stablecoin'
|
|
126
|
+
| 'stablecoin'
|
|
127
|
+
| 'kakao_pay'
|
|
128
|
+
| 'naver_pay'
|
|
129
|
+
| 'revolut_pay'
|
|
130
|
+
| 'cash_app_pay'
|
|
131
|
+
| 'wechat_pay'
|
|
132
|
+
| 'alipay';
|
|
121
133
|
id_at_gateway?: string;
|
|
122
134
|
error_code?: string;
|
|
123
135
|
error_text?: string;
|
|
@@ -162,7 +174,13 @@ declare module 'chargebee' {
|
|
|
162
174
|
| 'kbc_payment_button'
|
|
163
175
|
| 'pay_by_bank'
|
|
164
176
|
| 'trustly'
|
|
165
|
-
| 'stablecoin'
|
|
177
|
+
| 'stablecoin'
|
|
178
|
+
| 'kakao_pay'
|
|
179
|
+
| 'naver_pay'
|
|
180
|
+
| 'revolut_pay'
|
|
181
|
+
| 'cash_app_pay'
|
|
182
|
+
| 'wechat_pay'
|
|
183
|
+
| 'alipay';
|
|
166
184
|
id_at_gateway?: string;
|
|
167
185
|
error_code?: string;
|
|
168
186
|
error_text?: string;
|
|
@@ -207,7 +225,13 @@ declare module 'chargebee' {
|
|
|
207
225
|
| 'kbc_payment_button'
|
|
208
226
|
| 'pay_by_bank'
|
|
209
227
|
| 'trustly'
|
|
210
|
-
| 'stablecoin'
|
|
228
|
+
| 'stablecoin'
|
|
229
|
+
| 'kakao_pay'
|
|
230
|
+
| 'naver_pay'
|
|
231
|
+
| 'revolut_pay'
|
|
232
|
+
| 'cash_app_pay'
|
|
233
|
+
| 'wechat_pay'
|
|
234
|
+
| 'alipay';
|
|
211
235
|
success_url?: string;
|
|
212
236
|
failure_url?: string;
|
|
213
237
|
}
|
|
@@ -241,7 +265,13 @@ declare module 'chargebee' {
|
|
|
241
265
|
| 'kbc_payment_button'
|
|
242
266
|
| 'pay_by_bank'
|
|
243
267
|
| 'trustly'
|
|
244
|
-
| 'stablecoin'
|
|
268
|
+
| 'stablecoin'
|
|
269
|
+
| 'kakao_pay'
|
|
270
|
+
| 'naver_pay'
|
|
271
|
+
| 'revolut_pay'
|
|
272
|
+
| 'cash_app_pay'
|
|
273
|
+
| 'wechat_pay'
|
|
274
|
+
| 'alipay';
|
|
245
275
|
success_url?: string;
|
|
246
276
|
failure_url?: string;
|
|
247
277
|
}
|
|
@@ -458,7 +458,13 @@ declare module 'chargebee' {
|
|
|
458
458
|
| 'kbc_payment_button'
|
|
459
459
|
| 'pay_by_bank'
|
|
460
460
|
| 'trustly'
|
|
461
|
-
| 'stablecoin'
|
|
461
|
+
| 'stablecoin'
|
|
462
|
+
| 'kakao_pay'
|
|
463
|
+
| 'naver_pay'
|
|
464
|
+
| 'revolut_pay'
|
|
465
|
+
| 'cash_app_pay'
|
|
466
|
+
| 'wechat_pay'
|
|
467
|
+
| 'alipay';
|
|
462
468
|
reference_id?: string;
|
|
463
469
|
/**
|
|
464
470
|
* @deprecated Please refer API docs to use other attributes
|
|
@@ -113,7 +113,7 @@ declare module 'chargebee' {
|
|
|
113
113
|
label?: string;
|
|
114
114
|
}
|
|
115
115
|
export interface PricingPageCreateForExistingSubscriptionInputParam {
|
|
116
|
-
id
|
|
116
|
+
id?: string;
|
|
117
117
|
}
|
|
118
118
|
export interface SubscriptionCreateForExistingSubscriptionInputParam {
|
|
119
119
|
id: string;
|
|
@@ -103,7 +103,13 @@ declare module 'chargebee' {
|
|
|
103
103
|
| 'kbc_payment_button'
|
|
104
104
|
| 'pay_by_bank'
|
|
105
105
|
| 'trustly'
|
|
106
|
-
| 'stablecoin'
|
|
106
|
+
| 'stablecoin'
|
|
107
|
+
| 'kakao_pay'
|
|
108
|
+
| 'naver_pay'
|
|
109
|
+
| 'revolut_pay'
|
|
110
|
+
| 'cash_app_pay'
|
|
111
|
+
| 'wechat_pay'
|
|
112
|
+
| 'alipay';
|
|
107
113
|
reference_id?: string;
|
|
108
114
|
/**
|
|
109
115
|
* @deprecated Please refer API docs to use other attributes
|