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.28.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.27.0 (2026-07-30)
* * *
### New Resources:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.27.0
3.28.0
5 changes: 5 additions & 0 deletions chargebee/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(
self.Feature = chargebee.Feature(self.env)
self.FilterCondition = chargebee.FilterCondition(self.env)
self.GatewayErrorDetail = chargebee.GatewayErrorDetail(self.env)
self.GatewayPaymentMethodToken = chargebee.GatewayPaymentMethodToken(self.env)
self.Gift = chargebee.Gift(self.env)
self.GrantBlock = chargebee.GrantBlock(self.env)
self.Hierarchy = chargebee.Hierarchy(self.env)
Expand Down Expand Up @@ -111,6 +112,9 @@ def __init__(
self.OmnichannelSubscriptionItem = chargebee.OmnichannelSubscriptionItem(
self.env
)
self.OmnichannelSubscriptionItemMetric = (
chargebee.OmnichannelSubscriptionItemMetric(self.env)
)
self.OmnichannelSubscriptionItemOffer = (
chargebee.OmnichannelSubscriptionItemOffer(self.env)
)
Expand Down Expand Up @@ -165,6 +169,7 @@ def __init__(
self.UsageEvent = chargebee.UsageEvent(self.env)
self.UsageFile = chargebee.UsageFile(self.env)
self.UsageSummary = chargebee.UsageSummary(self.env)
self.VaultedPaymentMethod = chargebee.VaultedPaymentMethod(self.env)
self.VirtualBankAccount = chargebee.VirtualBankAccount(self.env)
self.WebhookEndpoint = chargebee.WebhookEndpoint(self.env)

Expand Down
11 changes: 11 additions & 0 deletions chargebee/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
FreePeriodUnit,
FriendOfferType,
Gateway,
GatewayName,
HierarchyOperationType,
InvoiceDunningHandling,
ItemType,
Expand Down Expand Up @@ -176,6 +177,10 @@

from chargebee.models.gateway_error_detail.operations import GatewayErrorDetail

from chargebee.models.gateway_payment_method_token.operations import (
GatewayPaymentMethodToken,
)

from chargebee.models.gift.operations import Gift

from chargebee.models.grant_block.operations import GrantBlock
Expand Down Expand Up @@ -236,6 +241,10 @@
OmnichannelSubscriptionItem,
)

from chargebee.models.omnichannel_subscription_item_metric.operations import (
OmnichannelSubscriptionItemMetric,
)

from chargebee.models.omnichannel_subscription_item_offer.operations import (
OmnichannelSubscriptionItemOffer,
)
Expand Down Expand Up @@ -340,6 +349,8 @@

from chargebee.models.usage_summary.operations import UsageSummary

from chargebee.models.vaulted_payment_method.operations import VaultedPaymentMethod

from chargebee.models.virtual_bank_account.operations import VirtualBankAccount

from chargebee.models.webhook_endpoint.operations import WebhookEndpoint
23 changes: 23 additions & 0 deletions chargebee/models/credit_note/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ class CreditNotesForCustomerParams(TypedDict):
class DeleteParams(TypedDict):
comment: NotRequired[str]

class UpdateParams(TypedDict):
comment: NotRequired[str]

class RemoveTaxWithheldRefundParams(TypedDict):
tax_withheld: NotRequired["CreditNote.RemoveTaxWithheldRefundTaxWithheldParams"]

Expand Down Expand Up @@ -691,6 +694,26 @@ def delete(self, id, params: DeleteParams = None, headers=None) -> DeleteRespons
operation="delete",
)

def update(self, id, params: UpdateParams = None, headers=None) -> UpdateResponse:
jsonKeys = {}
options = {
"isIdempotent": True,
}
return request.send(
"post",
request.uri_path("credit_notes", id, "update"),
self.env,
cast(Dict[Any, Any], params),
headers,
UpdateResponse,
None,
False,
jsonKeys,
options,
resource="creditNote",
operation="update",
)

def remove_tax_withheld_refund(
self, id, params: RemoveTaxWithheldRefundParams, headers=None
) -> RemoveTaxWithheldRefundResponse:
Expand Down
6 changes: 6 additions & 0 deletions chargebee/models/credit_note/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ class DeleteResponse(Response):
credit_note: CreditNoteResponse


@dataclass
class UpdateResponse(Response):
is_idempotency_replayed: bool
credit_note: CreditNoteResponse


@dataclass
class RemoveTaxWithheldRefundResponse(Response):
is_idempotency_replayed: bool
Expand Down
80 changes: 80 additions & 0 deletions chargebee/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,16 @@ class EnabledEvents(Enum):
ALERT_STATUS_CHANGED = "alert_status_changed"
OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated"
OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered"
OMNICHANNEL_SUBSCRIPTION_ITEM_MRR_UPDATED = (
"omnichannel_subscription_item_mrr_updated"
)
LEDGER_ACCOUNT_BALANCE_UPDATED = "ledger_account_balance_updated"
GRANT_BLOCKS_CREATED = "grant_blocks_created"
GRANT_BLOCKS_UPDATED = "grant_blocks_updated"
LEDGER_UPDATED = "ledger_updated"
VAULT_TOKEN_CREATED = "vault_token_created"
VAULT_TOKEN_UPDATED = "vault_token_updated"
VAULT_TOKEN_DELETED = "vault_token_deleted"
PLAN_CREATED = "plan_created"
PLAN_UPDATED = "plan_updated"
PLAN_DELETED = "plan_deleted"
Expand Down Expand Up @@ -684,6 +690,7 @@ class EntityType(Enum):
BUSINESS_RULE = "business_rule"
RULESET = "ruleset"
ALERT_STATUS = "alert_status"
OMNICHANNEL_SUBSCRIPTION_ITEM_METRIC = "omnichannel_subscription_item_metric"

def __str__(self):
return self.value
Expand Down Expand Up @@ -949,10 +956,16 @@ class EventType(Enum):
ALERT_STATUS_CHANGED = "alert_status_changed"
OMNICHANNEL_SUBSCRIPTION_ITEM_UPDATED = "omnichannel_subscription_item_updated"
OMNICHANNEL_SUBSCRIPTION_ITEM_RECOVERED = "omnichannel_subscription_item_recovered"
OMNICHANNEL_SUBSCRIPTION_ITEM_MRR_UPDATED = (
"omnichannel_subscription_item_mrr_updated"
)
LEDGER_ACCOUNT_BALANCE_UPDATED = "ledger_account_balance_updated"
GRANT_BLOCKS_CREATED = "grant_blocks_created"
GRANT_BLOCKS_UPDATED = "grant_blocks_updated"
LEDGER_UPDATED = "ledger_updated"
VAULT_TOKEN_CREATED = "vault_token_created"
VAULT_TOKEN_UPDATED = "vault_token_updated"
VAULT_TOKEN_DELETED = "vault_token_deleted"
PLAN_CREATED = "plan_created"
PLAN_UPDATED = "plan_updated"
PLAN_DELETED = "plan_deleted"
Expand Down Expand Up @@ -1066,6 +1079,73 @@ def __str__(self):
return self.value


class GatewayName(Enum):
CHARGEBEE = "chargebee"
CHARGEBEE_PAYMENTS = "chargebee_payments"
ADYEN = "adyen"
STRIPE = "stripe"
WEPAY = "wepay"
BRAINTREE = "braintree"
AUTHORIZE_NET = "authorize_net"
PAYPAL_PRO = "paypal_pro"
PIN = "pin"
EWAY = "eway"
EWAY_RAPID = "eway_rapid"
WORLDPAY = "worldpay"
BALANCED_PAYMENTS = "balanced_payments"
BEANSTREAM = "beanstream"
BLUEPAY = "bluepay"
ELAVON = "elavon"
FIRST_DATA_GLOBAL = "first_data_global"
HDFC = "hdfc"
MIGS = "migs"
NMI = "nmi"
OGONE = "ogone"
PAYMILL = "paymill"
PAYPAL_PAYFLOW_PRO = "paypal_payflow_pro"
SAGE_PAY = "sage_pay"
TCO = "tco"
WIRECARD = "wirecard"
AMAZON_PAYMENTS = "amazon_payments"
PAYPAL_EXPRESS_CHECKOUT = "paypal_express_checkout"
GOCARDLESS = "gocardless"
ORBITAL = "orbital"
MONERIS_US = "moneris_us"
MONERIS = "moneris"
BLUESNAP = "bluesnap"
CYBERSOURCE = "cybersource"
VANTIV = "vantiv"
CHECKOUT_COM = "checkout_com"
PAYPAL = "paypal"
INGENICO_DIRECT = "ingenico_direct"
EXACT = "exact"
MOLLIE = "mollie"
QUICKBOOKS = "quickbooks"
RAZORPAY = "razorpay"
GLOBAL_PAYMENTS = "global_payments"
BANK_OF_AMERICA = "bank_of_america"
ECENTRIC = "ecentric"
METRICS_GLOBAL = "metrics_global"
WINDCAVE = "windcave"
PAY_COM = "pay_com"
EBANX = "ebanx"
DLOCAL = "dlocal"
NUVEI = "nuvei"
SOLIDGATE = "solidgate"
PAYSTACK = "paystack"
JP_MORGAN = "jp_morgan"
DEUTSCHE_BANK = "deutsche_bank"
EZIDEBIT = "ezidebit"
TWIKEY = "twikey"
TEMPUS = "tempus"
MOYASAR = "moyasar"
PAYWAY = "payway"
NOT_APPLICABLE = "not_applicable"

def __str__(self):
return self.value


class HierarchyOperationType(Enum):
COMPLETE_HIERARCHY = "complete_hierarchy"
SUBORDINATES = "subordinates"
Expand Down
30 changes: 30 additions & 0 deletions chargebee/models/export/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ class PriceVariantsPriceVariantParams(TypedDict):
updated_at: NotRequired[Filters.TimestampFilter]
created_at: NotRequired[Filters.TimestampFilter]

class RampsRampParams(TypedDict):
status: NotRequired[Filters.EnumFilter]
subscription_id: NotRequired[Filters.StringFilter]
effective_from: NotRequired[Filters.TimestampFilter]
updated_at: NotRequired[Filters.TimestampFilter]

def wait_for_export_completion(
self, export: ExportResponse, headers=None
) -> RetrieveResponse:
Expand Down Expand Up @@ -465,6 +471,10 @@ class PriceVariantsParams(TypedDict):
business_entity_id: NotRequired[Filters.StringFilter]
include_site_level_resources: NotRequired[Filters.BooleanFilter]

class RampsParams(TypedDict):
ramp: NotRequired["Export.RampsRampParams"]
export_type: NotRequired[enums.ExportType]

def retrieve(self, id, headers=None) -> RetrieveResponse:
jsonKeys = {}
options = {}
Expand Down Expand Up @@ -844,3 +854,23 @@ def price_variants(
resource="export",
operation="priceVariants",
)

def ramps(self, params: RampsParams = None, headers=None) -> RampsResponse:
jsonKeys = {}
options = {
"isIdempotent": True,
}
return request.send(
"post",
request.uri_path("exports", "ramps"),
self.env,
cast(Dict[Any, Any], params),
headers,
RampsResponse,
None,
False,
jsonKeys,
options,
resource="export",
operation="ramps",
)
6 changes: 6 additions & 0 deletions chargebee/models/export/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ class DifferentialPricesResponse(Response):
class PriceVariantsResponse(Response):
is_idempotency_replayed: bool
export: ExportResponse


@dataclass
class RampsResponse(Response):
is_idempotency_replayed: bool
export: ExportResponse
2 changes: 2 additions & 0 deletions chargebee/models/gateway_payment_method_token/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .operations import GatewayPaymentMethodToken
from .responses import GatewayPaymentMethodTokenResponse
19 changes: 19 additions & 0 deletions chargebee/models/gateway_payment_method_token/operations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from .responses import *
from chargebee import request, environment
from typing import TypedDict, Required, NotRequired, Dict, List, Any, cast
from enum import Enum


@dataclass
class GatewayPaymentMethodToken:
env: environment.Environment

class Status(Enum):
ACTIVE = "active"
INACTIVE = "inactive"
PENDING_VERIFICATION = "pending_verification"

def __str__(self):
return self.value

pass
16 changes: 16 additions & 0 deletions chargebee/models/gateway_payment_method_token/responses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from dataclasses import dataclass
from chargebee.model import Model
from typing import Dict, List, Any


@dataclass
class GatewayPaymentMethodTokenResponse(Model):
raw_data: Dict[Any, Any] = None
id: str = None
gateway_account_id: str = None
gateway_name: str = None
gateway_customer_id: str = None
gateway_token: str = None
status: str = None
created_at: int = None
updated_at: int = None
Loading
Loading