Introducing the Chargebee CLI

Versioning

The Chargebee API has two major versions: v1 and v2. This reference documents v1. For new integrations, use the API v2 reference.

Checking the API version

There are three ways to know the API version you're using:

  • Endpoints: The version of the API can be seen in the API endpoint path: For v2 the path begins with /api/v2 whereas for v1, it begins with /api/v1.
  • Client library: The API version used can be found assigned to the const named APIVersion in the file environment.{extension}. Moreover, if you know the version of the library, you can find the compatible API versions listed in the readme.
  • Webhooks: In webhook payloads, the API version can be found in the value of the attribute api_version. The schema of the payload is determined by the API version.

Backward compatible changes

Chargebee considers the following changes as backward compatible:

  • Adding new API resources.
  • Adding new attributes to existing API resources.
  • Changing the order of attributes in existing API responses.
  • Adding new endpoints.
  • Adding new optional input parameters to existing endpoints.
  • Adding new event types.