Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.Try now
ChargebeechargebeeAPI

Go SDK

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

Installation

Requirements

  • Go 1.18 or later

Quick Start

Create a Resource

List & Pagination

Use typed filter structs for filtering:

Idempotent Requests

Use the builder method .SetIdempotencyKey():

Error Handling

The SDK classifies errors into distinct types:

Webhooks

High-Level Handler

Low-Level Parsing

Retry & Rate Limits

Retries are disabled by default. Enable with RetryConfig:

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

Migration Guide

If upgrading from v2 to v3, see the migration guide.