The Paddle Go SDK integrates Paddle Billing with server-side Go applications. It returns typed request and response structs, provides iterator-based pagination, and includes helpers for webhook signature verification.
Latest: v5.2.0 · 2026-03-30View source code and report issues on GitHub.
View and install on pkg.go.dev.
See recent releases and changes.
Requirements
Go 1.21 or later.
Install
go get github.com/PaddleHQ/paddle-go-sdk/v5Import the package in your Go program:
import ( paddle "github.com/PaddleHQ/paddle-go-sdk/v5")Authenticate
Create an API key in Paddle > Developer tools > Authentication, then pass it when you create a client.
API keys are environment-specific. Use a sandbox key for sandbox, a live key for production.
package main
import ( "os"
paddle "github.com/PaddleHQ/paddle-go-sdk/v5")
func main() { client, err := paddle.New( os.Getenv("PADDLE_API_KEY"), paddle.WithBaseURL(paddle.SandboxBaseURL), ) if err != nil { panic(err) } _ = client}Use paddle.ProductionBaseURL to use the live API.
Make your first request
List the products in your catalog:
package main
import ( "context" "fmt" "os"
paddle "github.com/PaddleHQ/paddle-go-sdk/v5")
func main() { client, err := paddle.New( os.Getenv("PADDLE_API_KEY"), paddle.WithBaseURL(paddle.SandboxBaseURL), ) if err != nil { panic(err) }
ctx := context.Background() products, err := client.ListProducts(ctx, &paddle.ListProductsRequest{}) if err != nil { panic(err) }
err = products.Iter(ctx, func(p *paddle.Product) (bool, error) { fmt.Printf("%s %s\n", p.ID, p.Name) return true, nil }) if err != nil { panic(err) }}ListProducts returns a collection. Call Iter with a callback that returns (true, nil) to continue to the next product or (false, nil) to stop early. The SDK fetches subsequent pages as needed.
Next steps
- Understand shared patterns for pagination, idempotency, retries, and error handling across SDKs.
- Browse the API reference for every resource and operation the SDK exposes.
- Work against sandbox while you build, then follow the go-live checklist to switch environments.