Getting started
Important
Starting November 1, 2025, Chargebee will briefly rotate TLS certificates on weekends to help you validate. The new DigiCert G2 chain becomes permanent in February 2026. If you don't update, API calls may fail with SSL errors. Learn more about the TLS G2 certificate update.
Chargebee provides an HTTP-based API that follows the principles of REST. The HTTP rules followed allow simple HTTP clients like cURL to be used as well. The URLs are resource-oriented, the request format is form-encoded, and the responses are in JSON.
Depending on the type of operation, the endpoints use one of two HTTP methods:
GET: Used for all read-only operations such as retrieving a resource or listing a group of resources.POST: Used for all write operations. Such operations modify the state of a resource.
A history of changes to the API is provided in the API Changelog.
Note
Sometimes, while working with Chargebee APIs, you may see undocumented attributes returned in the response. Such attributes should be ignored.
Early Access Program
Some features in the API are part of the Early Access Program and are labeled "EAP," "Beta," or "Early Access." Please review the terms and conditions that apply to these features before using them.
Resources
Chargebee follows the REST model of exposing resources as urls. For example, subscriptions are exposed as:
Request
The HTTP method (like GET, POST) determines the operation type on the resource. Query parameters allow you to provide additional options to the GET requests. POST parameters provide the data to write operations like creation, modification of resource(s).
Response
The response is in JSON format. Currently Chargebee does not support any other response format.
Note: Sometimes, while working with Chargebee APIs, you may see undocumented attributes returned in the response. Such attributes should be ignored.
Request
Response
Sample Request
Sample Response [ JSON ]
User-Agent header to a custom value to differentiate API calls from different applications and help with troubleshooting.Sample request with custom User-Agent header
Client libraries
Chargebee provides the following open-source client libraries as a wrapper around the HTTP API:
To view this API reference tailored to the programming language of your choice, select the language in the "Library" dropdown above. Reach out to us at dx@chargebee.com if you'd like to request any other language bindings.
Using cURL
-d or --data-urlencode options, the HTTP POST method is used:
Framework Adapters / SDKs
In addition to the client libraries, we also provide framework adapters / SDKs for popular frameworks to help you integrate with Chargebee more easily.
Laravel Cashier for Chargebee (PHP)
Laravel Cashier for Chargebee is a library that provides a simple and easy way to integrate Chargebee into your Laravel application. There is a detailed documentation here. To get started quickly, you can play around with the starter kit here.
Next.js Adapter
You can use the Next.js Adapter to integrate Chargebee into your Next.js application. This comes with a CLI to generate the boilerplate code for you. You can find the tutorial here.
Build with LLMs
You can leverage LLMs to build integrations with Chargebee. These tools streamline development, making it easier to automate and simplify workflows.
OpenAPI Specification
Chargebee supports the OpenAPI Specification to make it easier for developers to work with our APIs.
The spec is fully compliant with OpenAPI v3.0.1, enabling customers to:
- Use API development tools like Swagger and Postman
- Automate testing and documentation workflows
This is part of our commitment to providing a smoother, more efficient developer experience.
Code samples
The sample code snippets provided for the endpoints in this documentation are ready-to-test. Once you log in and select a test site using the dropdown that appears at the top, the code samples in this documentation automatically include your API key and site data.
API testing
Chargebee provides the Time Machine feature to help you test your integration. Once you've set up your billing configuration on the test site, you can simulate events on a hypothetical time frame to ensure everything works as expected. Ensure that you rigorously test your configuration before going live.
Additional developer resources
Check out our collection of sample applications and related tutorials for integrating with Chargebee.