# PHP SDK[](#php-sdk)

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


The official Chargebee PHP SDK provides a convenient way to interact with the Chargebee API from your PHP applications.

## Installation[](#installation)

## Requirements[](#requirements)

-   PHP 8.1 or later
-   Composer

## Quick Start[](#quick-start)

## Create a Resource[](#create-a-resource)

## List & Pagination[](#list-pagination)

## Idempotent Requests[](#idempotent-requests)

Pass an idempotency key as a header in the second argument:

## Error Handling[](#error-handling)

## Retry & Rate Limits[](#retry-rate-limits)

Retries are disabled by default. Enable with `RetryConfig`:

Rate-limited responses (HTTP 429) are automatically retried after the `Retry-After` duration.

## OpenTelemetry[](#opentelemetry)

Request telemetry is supported in all Chargebee client libraries. Pass a telemetry adapter when configuring the client to emit standardized spans (`chargebee.{resource}.{operation}`) with OTel HTTP and `chargebee.*` attributes.

See [OpenTelemetry integration](/docs/api/opentelemetry) for span attributes and language-specific examples.

## Migration Guide[](#migration-guide)

If upgrading from v3 to v4, see the [migration guide](https://github.com/chargebee/chargebee-php/wiki/Migration-guide-for-v4).

## Links[](#links)

-   [GitHub Repository](https://github.com/chargebee/chargebee-php)
-   [Packagist](https://packagist.org/packages/chargebee/chargebee-php)
-   [API Reference](/docs/api/getting-started)