finds.dev← search

// the find

stripe/stripe-ruby

★ 2,140 · Ruby · MIT · updated Jun 2026

Ruby library for the Stripe API.

The official Stripe Ruby SDK. It wraps the Stripe REST API with typed resource classes that initialize dynamically from API responses, handles pagination, retries, and idempotency. Anyone accepting payments in a Ruby app reaches for this first.

The instrumentation hooks (request_begin/request_end) are genuinely useful — you can wire StatsD, OpenTelemetry, or your own logging without monkey-patching anything. Automatic retries with idempotency keys are baked in, so transient 409s and network blips don't require you to build that logic yourself. The v13 StripeClient pattern finally makes per-request config (multiple API keys, Connect account headers) clean instead of thread-local global mutation. RBI type annotations in rbi/ mean Sorbet/Tapioca users get real type checking instead of T.untyped everywhere.

The dynamic object initialization from API responses is a double-edged sword: accessing an undefined property via accessor raises NoMethodError at runtime, while the indexer silently returns nil — two different failure modes for the same mistake depending on how you access fields. The legacy global-state pattern (Stripe.api_key = ...) is still supported and not yet deprecated, so codebases mixing old and new styles will have subtle thread-safety bugs waiting to happen. RBI types track the latest API version only — if you're pinned to an older Stripe-Version or using a webhook endpoint on an older version, your type annotations lie to you at static analysis time. The stripe-mock dependency for tests adds Go to your development environment, which is a friction point in teams that don't already have it.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →