# Ruby SDK[](#ruby-sdk)

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


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

## Installation[](#installation)

**gem**

```bash
gem install chargebee
```

**Gemfile**

```ruby
gem 'chargebee', '~> 2'
```

## Requirements[](#requirements)

-   Ruby 1.9.3 or later

## 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 third argument:

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

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

Retries are disabled by default. Enable via `retry_config` on the default environment:

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.

## Links[](#links)

-   [GitHub Repository](https://github.com/chargebee/chargebee-ruby)
-   [RubyGems](https://rubygems.org/gems/chargebee)
-   [API Reference](/docs/api/getting-started)