Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
### v3.31.0 (2026-08-12)
* * *
### New Resources:
- [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens) has been added.
- [`OmnichannelSubscriptionItemMetric`](https://apidocs.chargebee.com/docs/api/omnichannel_subscription_item_metrics) has been added.
- [`VaultedPaymentMethod`](https://apidocs.chargebee.com/docs/api/vaulted_payment_methods) has been added.


### New Actions:
- [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
- [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) has been added to [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).


### New Attributes:
- [`vault_token`](https://apidocs.chargebee.com/docs/api/payment_sources/payment-source-object#vault_token) has been added to [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).


### New Parameters:
- [`updated_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_between) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
- [`updated_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#updated_at_on) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
- [`purchased_at.between`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_between) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
- [`purchased_at.on`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions#purchased_at_on) has been added as query parameter to [`list_omnichannel_subscriptions`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions/list-omnichannel-subscriptions) in [`OmnichannelSubscription`](https://apidocs.chargebee.com/docs/api/omnichannel_subscriptions).
- [`limit`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#limit) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`offset`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#offset) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`include_deleted`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source#include_deleted) has been added as query parameter to [`list_gateway_payment_method_tokens_for_a_payment_source`](https://apidocs.chargebee.com/docs/api/payment_sources/list-gateway-payment-method-tokens-for-a-payment-source) in [`PaymentSource`](https://apidocs.chargebee.com/docs/api/payment_sources).
- [`comment`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details#comment) has been added as request body parameter to [`update_credit_note_details`](https://apidocs.chargebee.com/docs/api/credit_notes/update-credit-note-details) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes).
- [`ramp`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#ramp) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`export_type`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps#export_type) has been added as request body parameter to [`export_subscription_ramps`](https://apidocs.chargebee.com/docs/api/exports/export-subscription-ramps) in [`Export`](https://apidocs.chargebee.com/docs/api/exports).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items#subscription_items_description) has been added as request body parameter to [`create_a_quote_for_a_new_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-a-new-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items#subscription_items_description) has been added as request body parameter to [`edit_update_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-update-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items#subscription_items_description) has been added as request body parameter to [`edit_create_subscription_quote_for_items`](https://apidocs.chargebee.com/docs/api/quotes/edit-create-subscription-quote-for-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).
- [`subscription_items.description`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items#subscription_items_description) has been added as request body parameter to [`create_a_quote_for_update_subscription_items`](https://apidocs.chargebee.com/docs/api/quotes/create-a-quote-for-update-subscription-items) in [`Quote`](https://apidocs.chargebee.com/docs/api/quotes).


### New Events:
- [`vault_token_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_updated) has been added.
- [`vault_token_deleted`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_deleted) has been added.
- [`omnichannel_subscription_item_mrr_updated`](https://apidocs.chargebee.com/docs/api/events/webhook/omnichannel_subscription_item_mrr_updated) has been added.
- [`vault_token_created`](https://apidocs.chargebee.com/docs/api/events/webhook/vault_token_created) has been added.


### New Enums:
- `omnichannel_subscription_item_metric` has been added as a new value enum `EntityType`.
- `omnichannel_subscription_item_mrr_updated`, `vault_token_created`, `vault_token_updated`, and `vault_token_deleted` have been added as new values enum `EventType`.
- `chargebee`, `chargebee_payments`, `adyen`, `stripe`, `wepay`, `braintree`, `authorize_net`, `paypal_pro`, `pin`, `eway`, `eway_rapid`, `worldpay`, `balanced_payments`, `beanstream`, `bluepay`, `elavon`, `first_data_global`, `hdfc`, `migs`, `nmi`, `ogone`, `paymill`, `paypal_payflow_pro`, `sage_pay`, `tco`, `wirecard`, `amazon_payments`, `paypal_express_checkout`, `gocardless`, `orbital`, `moneris_us`, `moneris`, `bluesnap`, `cybersource`, `vantiv`, `checkout_com`, `paypal`, `ingenico_direct`, `exact`, `mollie`, `quickbooks`, `razorpay`, `global_payments`, `bank_of_america`, `ecentric`, `metrics_global`, `windcave`, `pay_com`, `ebanx`, `dlocal`, `nuvei`, `solidgate`, `paystack`, `jp_morgan`, `deutsche_bank`, `ezidebit`, `twikey`, `tempus`, `moyasar`, `payway`, and `not_applicable` have been added as new values enum `GatewayName`.
- `active`, `inactive`, and `pending_verification` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens/gateway-payment-method-token-object#status) in [`GatewayPaymentMethodToken`](https://apidocs.chargebee.com/docs/api/gateway_payment_method_tokens).
- `payment_method_helper`, `card_components`, `checkout`, `collect_now`, `portal`, and `payment_components` have been added as new values to enum attribute [`payment_intent_metadata.source`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata_source) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents).



### v3.30.1 (2026-08-11)
* * *
### Bug Fixes:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.30.1
3.31.0
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chargebee",
"version": "3.30.1",
"version": "3.31.0",
"description": "A library for integrating with Chargebee.",
"scripts": {
"prepack": "npm install && npm run build",
Expand Down
2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Environment = {
hostSuffix: '.chargebee.com',
apiPath: '/api/v2',
timeout: DEFAULT_TIME_OUT,
clientVersion: 'v3.30.1',
clientVersion: 'v3.31.0',
port: DEFAULT_PORT,
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
Expand Down
55 changes: 55 additions & 0 deletions src/resources/api_endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ interface Endpoints {
businessEntityTransfer: EndpointTuple[];
token: EndpointTuple[];
paymentSource: EndpointTuple[];
gatewayPaymentMethodToken: EndpointTuple[];
thirdPartyPaymentMethod: EndpointTuple[];
vaultedPaymentMethod: EndpointTuple[];
virtualBankAccount: EndpointTuple[];
card: EndpointTuple[];
promotionalCredit: EndpointTuple[];
Expand Down Expand Up @@ -95,6 +97,7 @@ interface Endpoints {
paymentScheduleScheme: EndpointTuple[];
pricingPageSession: EndpointTuple[];
omnichannelSubscriptionItemScheduledChange: EndpointTuple[];
omnichannelSubscriptionItemMetric: EndpointTuple[];
omnichannelSubscription: EndpointTuple[];
omnichannelTransaction: EndpointTuple[];
omnichannelSubscriptionItem: EndpointTuple[];
Expand Down Expand Up @@ -1071,6 +1074,17 @@ export const Endpoints: Endpoints = {
isIdempotent: true,
},
],
[
'listGatewayTokensForPaymentSource',
'GET',
'/payment_sources',
'/gateway_payment_method_tokens',
true,
null,
false,
{},
{},
],
['retrieve', 'GET', '/payment_sources', null, true, null, false, {}, {}],
['list', 'GET', '/payment_sources', null, false, null, false, {}, {}],
[
Expand Down Expand Up @@ -1126,7 +1140,21 @@ export const Endpoints: Endpoints = {
},
],
],
gatewayPaymentMethodToken: [],
thirdPartyPaymentMethod: [],
vaultedPaymentMethod: [
[
'retrieve',
'GET',
'/vaulted_payment_methods',
null,
true,
null,
false,
{},
{},
],
],
virtualBankAccount: [
[
'createUsingPermanentToken',
Expand Down Expand Up @@ -1902,6 +1930,19 @@ export const Endpoints: Endpoints = {
isIdempotent: true,
},
],
[
'update',
'POST',
'/credit_notes',
'/update',
true,
null,
false,
{},
{
isIdempotent: true,
},
],
[
'removeTaxWithheldRefund',
'POST',
Expand Down Expand Up @@ -3933,6 +3974,19 @@ export const Endpoints: Endpoints = {
isIdempotent: true,
},
],
[
'ramps',
'POST',
'/exports',
'/ramps',
false,
null,
false,
{},
{
isIdempotent: true,
},
],
],
paymentIntent: [
[
Expand Down Expand Up @@ -4877,6 +4931,7 @@ export const Endpoints: Endpoints = {
],
],
omnichannelSubscriptionItemScheduledChange: [],
omnichannelSubscriptionItemMetric: [],
omnichannelSubscription: [
[
'retrieve',
Expand Down
28 changes: 28 additions & 0 deletions src/resources/webhook/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,14 @@ export interface OmnichannelSubscriptionItemGracePeriodStartedContent {
Customer: import('chargebee').Customer;
}

export interface OmnichannelSubscriptionItemMrrUpdatedContent {
OmnichannelSubscriptionItem: import('chargebee').OmnichannelSubscriptionItem;

OmnichannelSubscription: import('chargebee').OmnichannelSubscription;

OmnichannelSubscriptionItemMetric: import('chargebee').OmnichannelSubscriptionItemMetric;
}

export interface OmnichannelSubscriptionItemPauseScheduledContent {
OmnichannelSubscriptionItem: import('chargebee').OmnichannelSubscriptionItem;

Expand Down Expand Up @@ -1450,6 +1458,18 @@ export interface VariantDeletedContent {}

export interface VariantUpdatedContent {}

export interface VaultTokenCreatedContent {
VaultedPaymentMethod: import('chargebee').VaultedPaymentMethod;
}

export interface VaultTokenDeletedContent {
VaultedPaymentMethod: import('chargebee').VaultedPaymentMethod;
}

export interface VaultTokenUpdatedContent {
VaultedPaymentMethod: import('chargebee').VaultedPaymentMethod;
}

export interface VirtualBankAccountAddedContent {
Customer: import('chargebee').Customer;

Expand Down Expand Up @@ -1691,6 +1711,8 @@ export type WebhookContentMap = {

[WebhookEventType.OmnichannelSubscriptionItemGracePeriodStarted]: OmnichannelSubscriptionItemGracePeriodStartedContent;

[WebhookEventType.OmnichannelSubscriptionItemMrrUpdated]: OmnichannelSubscriptionItemMrrUpdatedContent;

[WebhookEventType.OmnichannelSubscriptionItemPauseScheduled]: OmnichannelSubscriptionItemPauseScheduledContent;

[WebhookEventType.OmnichannelSubscriptionItemPaused]: OmnichannelSubscriptionItemPausedContent;
Expand Down Expand Up @@ -1941,6 +1963,12 @@ export type WebhookContentMap = {

[WebhookEventType.VariantUpdated]: VariantUpdatedContent;

[WebhookEventType.VaultTokenCreated]: VaultTokenCreatedContent;

[WebhookEventType.VaultTokenDeleted]: VaultTokenDeletedContent;

[WebhookEventType.VaultTokenUpdated]: VaultTokenUpdatedContent;

[WebhookEventType.VirtualBankAccountAdded]: VirtualBankAccountAddedContent;

[WebhookEventType.VirtualBankAccountDeleted]: VirtualBankAccountDeletedContent;
Expand Down
8 changes: 8 additions & 0 deletions src/resources/webhook/eventType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ export enum WebhookEventType {

OmnichannelSubscriptionItemGracePeriodStarted = 'omnichannel_subscription_item_grace_period_started',

OmnichannelSubscriptionItemMrrUpdated = 'omnichannel_subscription_item_mrr_updated',

OmnichannelSubscriptionItemPauseScheduled = 'omnichannel_subscription_item_pause_scheduled',

OmnichannelSubscriptionItemPaused = 'omnichannel_subscription_item_paused',
Expand Down Expand Up @@ -457,6 +459,12 @@ export enum WebhookEventType {

VariantUpdated = 'variant_updated',

VaultTokenCreated = 'vault_token_created',

VaultTokenDeleted = 'vault_token_deleted',

VaultTokenUpdated = 'vault_token_updated',

VirtualBankAccountAdded = 'virtual_bank_account_added',

VirtualBankAccountDeleted = 'virtual_bank_account_deleted',
Expand Down
2 changes: 1 addition & 1 deletion src/schema/coupon.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ const ListCouponCurrencyCodeSchema = z.object({
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
});
const ListCouponApplicableItemPriceIdsSchema = z.object({
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
is: z.string().min(1).optional(),
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
});
const ListCouponBodySchema = z.looseObject({
limit: z.number().int().min(1).max(100).optional(),
Expand Down
10 changes: 9 additions & 1 deletion src/schema/credit_note.schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated Zod schemas: CreditNote
// Actions: create, retrieve, pdf, refund, recordRefund, voidCreditNote, list, creditNotesForCustomer, delete, removeTaxWithheldRefund, importCreditNote
// Actions: create, retrieve, pdf, refund, recordRefund, voidCreditNote, list, creditNotesForCustomer, delete, update, removeTaxWithheldRefund, importCreditNote
// Do not edit manually – regenerate via sdk-generator

import { z } from 'zod';
Expand Down Expand Up @@ -376,6 +376,14 @@ const DeleteCreditNoteBodySchema = z.looseObject({
export { DeleteCreditNoteBodySchema };
export type DeleteCreditNoteBody = z.infer<typeof DeleteCreditNoteBodySchema>;

//CreditNote.update

const UpdateCreditNoteBodySchema = z.looseObject({
comment: z.string().max(300).optional(),
});
export { UpdateCreditNoteBodySchema };
export type UpdateCreditNoteBody = z.infer<typeof UpdateCreditNoteBodySchema>;

//CreditNote.removeTaxWithheldRefund

const RemoveTaxWithheldRefundCreditNoteTaxWithheldSchema = z.object({
Expand Down
4 changes: 2 additions & 2 deletions src/schema/credit_unit.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { z } from 'zod';
//CreditUnit.list

const ListCreditUnitStatusSchema = z.object({
in: z.enum(['active', 'archived']).optional(),
is: z.enum(['active', 'archived']).optional(),
in: z.enum(['active', 'archived']).optional(),
});
const ListCreditUnitIdSchema = z.object({
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
is: z.string().min(1).optional(),
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
});
const ListCreditUnitBodySchema = z.looseObject({
limit: z.number().int().min(1).max(100).optional(),
Expand Down
8 changes: 4 additions & 4 deletions src/schema/entitlement.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import { z } from 'zod';
//Entitlement.list

const ListEntitlementFeatureIdSchema = z.object({
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
is: z.string().min(1).optional(),
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
});
const ListEntitlementEntityTypeSchema = z.object({
in: z
is: z
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
.optional(),
is: z
in: z
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
.optional(),
});
const ListEntitlementEntityIdSchema = z.object({
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
is: z.string().min(1).optional(),
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
});
const ListEntitlementBodySchema = z.looseObject({
limit: z.number().int().min(1).max(100).optional(),
Expand Down
2 changes: 1 addition & 1 deletion src/schema/entitlement_override.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { z } from 'zod';
const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema =
z.object({
feature_id: z.array(z.string().max(50).optional()),
entity_id: z.array(z.string().max(50).optional()).optional(),
entity_id: z.array(z.string().max(100).optional()).optional(),
entity_type: z
.array(
z
Expand Down
Loading
Loading