# Java SDK[](#java-sdk)

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


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

## Installation[](#installation)

**Gradle**

```groovy
implementation 'com.chargebee:chargebee-java:4+'
```

**Maven**

```xml
<dependency>
    <groupId>com.chargebee</groupId>
    <artifactId>chargebee-java</artifactId>
    <version>[4,)</version>
</dependency>
```

## Requirements[](#requirements)

-   Java 1.8 or later

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

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

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

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

Use per-request options to pass an idempotency key:

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

The SDK provides a comprehensive exception hierarchy with strongly-typed error enums:

## Webhooks[](#webhooks)

The SDK provides a `WebhookEventHandler` for processing webhook events with optional Basic Auth verification:

Without Basic Auth:

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

Retries are disabled by default. Enable with `RetryConfig` on the client builder:

Per-request retry overrides:

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)

v3 support ends December 31, 2026. See the [v3 to v4 migration guide](https://github.com/chargebee/chargebee-java/wiki/Migration-guide-for-V4) for upgrade instructions.

## Links[](#links)

-   [GitHub Repository](https://github.com/chargebee/chargebee-java)
-   [Maven Central](https://central.sonatype.com/artifact/com.chargebee/chargebee-java)
-   [API Reference](/docs/api/getting-started)