Docs

Log into read the version of docs relevant to your site.

Chargebee API documentation

Problem Statement

This article points you to Chargebee’s REST APIs and client libraries for integrating with Chargebee’s subscription management system.

Solution

Chargebee provides HTTP-based REST APIs. You can use standard HTTP clients (for example, curl). Chargebee also provides API client libraries for multiple languages:

Sample apps and tutorials: Chargebee API Tutorials.

Authentication: Chargebee uses HTTP Basic Auth. Use your API key as the username and leave the password empty. Get the API key from Settings > Configure Chargebee > API & Webhooks > API Keys.

Note:

API keys differ for your test site and your live site.

Request: HTTP methods (GET, POST, etc.) define the operation. Query parameters apply to GET requests; POST body provides data for create/update operations.

Response: Responses are in JSON. Chargebee does not support other response formats.

Error handling: HTTP status codes indicate success or failure. Response body contains error details in JSON. 2xx indicates success; 4xx indicates client-side errors (e.g. 400 Bad Request); 5xx indicates server-side errors. Chargebee returns the first validation error encountered; validate input on your side before calling the API when possible.

Full reference: Chargebee API Overview.

Additional Information

Was this article helpful?