Download the PHP
package chargebee/chargebee-php without Composer
On this page you can find all versions of the php package
chargebee/chargebee-php. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
This is the official PHP library for integrating with Chargebee.
📘 For a complete reference of available APIs, check out our API Documentation.
🧪 To explore and test API capabilities interactively, head over to our API Explorer.
Note: Chargebee now supports two API versions - V1 and V2, of which V2 is the latest release and all future developments will happen in V2. This library is for API version V2. If you’re looking for V1, head to chargebee-v1 branch.
Idempotency keys are passed along with request headers to allow a safe retry of POST requests.
isIdempotencyReplayed() method can be accessed to differentiate between original and replayed requests.
Retry Handling
Chargebee's SDK includes built-in retry logic to handle temporary network issues and server-side errors. This feature is disabled by default but can be enabled when needed.
Key features include:
Automatic retries for specific HTTP status codes: Retries are automatically triggered for status codes 500, 502, 503, and 504.
Exponential backoff: Retry delays increase exponentially to prevent overwhelming the server.
Rate limit management: If a 429 Too Many Requests response is received with a Retry-After header, the SDK waits for the specified duration before retrying.
Note: Exponential backoff and max retries do not apply in this case.
Customizable retry behavior: Retry logic can be configured using the retryConfig parameter in the environment configuration.
Example: Customizing Retry Logic
You can enable and configure the retry logic by passing a retryConfig object when initializing the Chargebee environment:
Example: Rate Limit retry logic
You can enable and configure the retry logic for rate-limit by passing a retryConfig object when initializing the Chargebee environment:
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package chargebee/chargebee-php contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.