Skip to content
CAI
Software that uses CAICheck a score

stripe/stripe-ruby

60.4

Adequate · 6 November 2026

163.4k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Checkout Session resource support

Introduces the \Stripe::Checkout::Session\ resource class, enabling users to create and manage Checkout Sessions for one-time purchases and subscriptions. This new resource includes support for key configuration options such as adaptive pricing, post-expiration recovery, automatic tax liability, and branding settings (icons, logos, colors, and fonts).

lib/stripe/resources/checkout · high confidence

Add Stripe Apps resources for Install and Secret Store

New resource classes have been added to the \lib/stripe/resources/apps\ directory to support Stripe Apps functionality. The \Install\ resource enables managing app installations, including creating, listing, uninstalling, and reauthorizing apps on accounts, along with handling permissions and content security policies. The \Secret\ resource introduces a Secret Store API, allowing developers to securely persist and manage secrets (scoped to account or user) for use by UI Extensions and app backends, with support for creating, listing, finding, and deleting secrets.

lib/stripe/resources/apps · high confidence

Add support for Billing Portal Configuration and Session resources

This change introduces the \Stripe::BillingPortal::Configuration\ and \Stripe::BillingPortal::Session\ resources, enabling developers to programmatically manage the Customer Portal. The \Configuration\ resource allows you to define portal settings, including business profile details and specific features like customer updates, invoice history access, payment method updates, and subscription management (including cancellation reasons and proration behaviors). The \Session\ resource allows you to create short-lived, secure URLs that redirect customers to the portal to manage their subscriptions and billing details, supporting various flows such as customer updates, subscription cancellations with retention strategies, and subscription updates with discounts.

_lib/stripe/resources/billing\portal · high confidence

Added Identity Verification resources

Introduced new \VerificationReport\ and \VerificationSession\ classes in the \Stripe::Identity\ module, enabling users to programmatically manage identity verification workflows. These resources allow for the creation and listing of verification sessions, as well as the retrieval of detailed verification reports containing user data such as document details, email/phone verification status, and selfie checks.

lib/stripe/resources/identity · high confidence

Added Ruby resource classes for V2 Billing Meter Events

The library now includes generated Ruby resource classes for the V2 Billing API's metering features: \MeterEvent\ for recording usage-based billing activity, \MeterEventAdjustment\ for canceling or modifying previously recorded events, and \MeterEventSession\ for managing authentication tokens for high-throughput event submission. These classes provide the necessary data structures and object mappings to interact with the new metering endpoints.

lib/stripe/resources/v2/billing · high confidence

Added Stripe Climate API resources for Orders, Products, and Suppliers

This change introduces new Ruby resource classes for the Stripe Climate API, enabling users to interact with carbon removal services. The \Stripe::Climate::Order\ resource supports creating, listing, updating, and canceling orders, including nested beneficiary and delivery detail objects. The \Stripe::Climate::Product\ resource allows listing available carbon removal products with their current prices and availability. The \Stripe::Climate::Supplier\ resource provides access to supplier information, including their locations and removal pathways. These resources are generated from the OpenAPI specification and include proper field encodings for decimal values.

lib/stripe/resources/climate · high confidence

Added Stripe Tax resource models

New resource classes have been added to the \lib/stripe/resources/tax\ directory to support Stripe Tax features. These include \Association\ for linking tax transactions to payment intents, \Calculation\ and \CalculationLineItem\ for computing tax liabilities, \Location\ for defining tax venues, \Registration\ for managing tax registration status, \Settings\ for account-wide tax configurations, \Transaction\ and \TransactionLineItem\ for recording collected or refunded tax, and \TransactionLineItem\ for individual transaction details. These files provide the Ruby object models and API operations (such as create, list, and find) required to interact with the Stripe Tax API.

lib/stripe/resources/tax · high confidence

Added TestClock resource for deterministic test mode time control

The library now includes a \TestClock\ resource within the \Stripe::TestHelpers\ namespace, enabling developers to create and manage test clocks that freeze or advance time for deterministic testing. This new resource supports creating, listing, deleting, and advancing test clocks via standard API operations, allowing users to simulate specific time-based scenarios and observe resulting state changes or webhooks in a controlled manner.

_lib/stripe/resources/test\helpers · high confidence

Added strongly typed V2 event classes and notifications

The \lib/stripe/events\ directory now contains generated Ruby classes for Stripe API v2 events and their corresponding notifications. This change introduces specific event types (such as \V1AccountApplicationAuthorizedEvent\, \V1ChargeDisputeCreatedEvent\, and \V1BillingMeterCreatedEvent\) and their notification counterparts, all inheriting from the new \Stripe::V2::Core::Event\ and \Stripe::V2::Core::EventNotification\ base classes. Users can now handle these events with type-specific classes that include \lookup\_type\ methods for identification and \fetch\_related\_object\ methods to retrieve associated resources from the API. A generic \UnknownEventNotification\ class is also provided for handling unrecognized event types.

lib/stripe/events · high confidence

Added support for Product Catalog Trial Offers and Standalone 3D Secure Authentication

The library now includes generated resource classes for new Stripe API capabilities. Users can manage trial offers for subscription items via the new \Stripe::ProductCatalog::TrialOffer\ resource, which supports creating, listing, and updating trial pricing and duration. Additionally, the \Stripe::ThreeDSecure::Authentication\ resource has been added to support the Standalone 3D Secure API, allowing developers to run EMV 3D Secure authentication with external payment service providers.

_lib/stripe/resources/product\_catalog, lib/stripe/resources/three\_d\secure · high confidence

Initial Sorbet type-checking configuration and gem RBI generation

The project now includes Sorbet static type checking, starting with the addition of a \sorbet/config\ file that sets the root directory and excludes \tmp/\, \vendor/\, and \rbi/stripe.rbi\. Additionally, autogenerated RBI type definitions for several gems (including \addressable\, \ast\, \byebug\, \coderay\, \crack\, \erubi\, \hashdiff\, \json\, and \language\_server-protocol\) have been added to \sorbet/rbi/gems/\, along with \.gitattributes\ files to mark these generated files as vendored or generated in Git.

sorbet · high confidence

Introduce EditorConfig, Git attributes, and RuboCop configuration

The repository now includes standard development configuration files to enforce consistent coding styles and repository behaviors. An \.editorconfig\ file defines standard indentation (2 spaces), line endings (LF), and UTF-8 encoding. A \.gitattributes\ file marks JSON and YAML files in the \spec/\ directory as binary to suppress noisy diffs in pull requests. A comprehensive \.rubocop.yml\ file configures the RuboCop linter for Ruby 3.0+, setting specific styles for layout, metrics, and naming, while a \.rubocop\_todo.yml\ file records existing offenses to be addressed incrementally.

(repo-wide) · high confidence

Introduce Stripe API v2 Core resource models and event notification handling

This release adds generated resource classes for the Stripe API v2 Core namespace, including Account, AccountLink, AccountPerson, AccountPersonToken, AccountToken, Event, EventDestination, and EventNotification. These classes provide the data structures and object mappings for interacting with the new v2 APIs. Additionally, the EventNotification class now supports singleton related objects and includes logic to fetch the generating Event, including the addition of a Stripe-Request-Trigger header for event-specific requests.

lib/stripe/resources/v2/core · high confidence

New Financial Connections resource classes for account, ownership, and transactions

The library now includes generated Ruby resource classes for the Financial Connections API, specifically \Account\, \AccountOwner\, \AccountOwnership\, \Authorization\, \Session\, and \Transaction\. These classes provide structured access to external bank account data, allowing users to manage connection sessions, view account balances and ownership details, and list transactions. The \Session\ class supports creating new connection flows, while \Transaction\ and \Account\ classes expose fields for balances, status details, and transaction history, enabling developers to integrate real-time financial data into their applications.

_lib/stripe/resources/financial\connections · high confidence

New Treasury resource classes for money movement and account management

The SDK now includes generated resource classes for Stripe Treasury, enabling users to manage FinancialAccounts and move money. New classes include FinancialAccount (with support for closing accounts and retrieving features), CreditReversal and DebitReversal for reversing incoming funds, InboundTransfer for adding funds via ACH, OutboundPayment and OutboundTransfer for sending funds out, and ReceivedCredit and ReceivedDebit for tracking incoming money movements. These resources provide the necessary methods (create, list, cancel, close, retrieve\_features) and nested objects to interact with the Treasury API.

lib/stripe/resources/treasury · high confidence

New billing resources for meters, alerts, and credit grants

This update adds generated Ruby resource classes for several new Stripe Billing capabilities. You can now create and manage billing meters (Meter, MeterEvent, MeterEventAdjustment, MeterEventSummary) to track and aggregate usage-based billing events. The update also introduces Billing Alerts (Alert, AlertTriggered) to notify when usage thresholds are crossed, and a complete Credit system (CreditGrant, CreditBalanceSummary, CreditBalanceTransaction) to manage the allocation, application, and balance of billing credits for customers.

lib/stripe/resources/billing · high confidence

New examples for event notifications and meter event streaming

Added example scripts demonstrating how to handle Stripe event notifications via webhooks (including deduplication and pre-handle hooks) and how to use the meter event stream API for high-throughput billing events. The examples also include a template for creating new examples and a README with instructions on running them.

examples · high confidence

Support for Stripe API v2 deleted objects

The library now includes support for Stripe API v2 deleted objects. A new \Stripe::V2::DeletedObject\ resource class has been added to represent objects that have been removed, exposing the \id\ and \object\ type attributes. Additionally, a new \Stripe::V2::Amount\ resource class is introduced to handle amount data within the v2 API structure.

lib/stripe/resources/v2 · high confidence

Behavioural changes

Executable moved to the \`exe\` directory

The \stripe-console\ executable has been relocated from the project root to the \exe\ folder. This change reorganizes the project structure to separate executable scripts from library code, but the functionality of the IRB-based console remains unchanged.

exe · high confidence

Introduce StripeClient as the primary API requestor

The library now uses a dedicated \StripeClient\ class to execute API requests, replacing the previous \APIRequestor\ implementation. This change introduces a new \ConnectionManager\ to handle HTTP connection pooling and lifecycle management, and updates the \APIResource\ and \ListObject\ classes to operate within this new client-centric architecture. Users should now interact with the API through the \StripeClient\ instance, which manages configuration, retries, and connection state.

lib/stripe · high confidence

Major library rewrite: new StripeClient architecture and modular structure

The library has been completely rewritten, replacing the previous monolithic \lib/stripe.rb\ with a modular structure of separate files for API operations, resources, services, and configuration. The core HTTP client has been replaced with a new \StripeClient\ and \StripeService\ architecture, moving away from the old global \Stripe.configuration\ and \Stripe.request\ methods. This change introduces new modules for request options, connection management, and telemetry, significantly altering how the library is initialized and how API calls are made under the hood.

lib · high confidence

Refactor API operations into dedicated modules with static methods and deprecations

The \lib/stripe/api\_operations\ directory has been restructured into distinct modules (\Create\, \Delete\, \List\, \NestedResource\, \Request\, \Save\, \Search\, \SingletonSave\) to standardize how API resources interact with the Stripe API. This change introduces static class methods for operations like \delete\ and \update\, allowing resources to be manipulated without instantiating an object first. It also deprecates the instance \save\ method in favor of the new class-based \update\ method and marks the \\_search\ method as deprecated, guiding users toward the new \request\_stripe\_object\ interface. Additionally, the \NestedResource\ module now provides a cleaner way to define subresource operations (like reversals on transfers) via \nested\_resource\_class\_methods\.

_lib/stripe/api\operations · high confidence

Regenerated Stripe API resource classes

The resource definitions in lib/stripe/resources have been regenerated from the OpenAPI specification, introducing new classes such as AccountSession and AccountLink, updating existing models like Account and Balance with new fields and nested structures, and refreshing all resource files to align with the latest Stripe API version.

lib/stripe/resources · high confidence

Regenerated Stripe API service layer

The \lib/stripe/services\ directory has been regenerated from the OpenAPI specification to align with Stripe API version 2025-09-30.clover. This update introduces new service classes for managing Account Capabilities, External Accounts, Login Links, and Persons, while also adding dedicated services for Apps (Installs and Secrets), Billing (Alerts, Credit Balance, Meters, and Feedback Options), and Climate (Orders, Products, and Suppliers). Existing services such as Checkout, Billing Portal, and Charges have been updated to reflect the latest API endpoints and behaviors.

lib/stripe/services · high confidence

Replace custom stripe-console with Tapioca binstub

The custom \bin/stripe-console\ script, which previously launched an IRB session with the Stripe library pre-loaded, has been removed. It has been replaced by a new \bin/tapioca\ binstub that delegates to the Tapioca gem, aligning the project's interactive console tooling with the Sorbet/Tapioca ecosystem.

bin · high confidence

Updated CA certificate bundle

The bundled CA certificates in lib/data have been refreshed, replacing the legacy set generated from Ubuntu 10.04 (May 2011) with a more current collection. This update ensures that applications relying on this library can verify connections to servers using modern or updated root certificates, improving compatibility and security for TLS handshakes.

lib/data · high confidence

Updated Issuing resource models with new fields and decimal precision support

The Issuing resource classes (Authorization, Card, Cardholder, Dispute, PersonalizationDesign, PhysicalBundle, Token, and Transaction) have been regenerated from the OpenAPI specification. This update adds new fields and nested objects to reflect API changes, including detailed fuel and tax breakdowns in Authorization and Transaction objects, enhanced shipping and fraud warning details on Card objects, and new test helper methods for PersonalizationDesign. Additionally, specific monetary fields (such as gross\_amount\_decimal and tax amounts) now use decimal\_string encoding to ensure precise value handling.

lib/stripe/resources/issuing · high confidence

Updated RBI type signatures for Stripe API v2526

The RBI type signatures in the \rbi/\ directory have been regenerated to align with the Stripe API specification v2526. This update refreshes the Sorbet type definitions for resources, parameters, and error objects, ensuring that static type checking reflects the current API structure and field types.

rbi · high confidence

Updated Stripe API parameter classes for v2526

The generated parameter classes in lib/stripe/params have been updated to align with Stripe API version v2526. This includes new or modified parameter structures for Account operations (such as AccountCapability, AccountExternalAccount, AccountLink, AccountPerson, and AccountSession) to reflect current API requirements, including support for new fields like \requested\ on capabilities, \collection\_options\ on account links, and embedded component features in account sessions.

lib/stripe/params · high confidence

Updated Stripe Terminal resource classes with new fields and nested types

The Terminal resource classes (Configuration, ConnectionToken, Location, OnboardingLink, and Reader) have been regenerated from the OpenAPI specification to reflect API updates. This includes new fields and nested configuration options, such as reader-specific settings in Configuration (e.g., splashscreen images for Bbpos and Stripe hardware, cellular and offline transaction toggles, reboot windows, and multi-currency tipping thresholds), location address variations (Kana/Kanji), and expanded Reader action inputs (support for collecting email, numeric, phone, selection, and signature inputs).

lib/stripe/resources/terminal · high confidence

Test coverage

Added comprehensive test suite for Stripe API resources and operations; Added tests for Issuing Authorization, Dispute, and Transaction resources; Migrate test suite to stripe-mock and modernize test infrastructure.

Dependencies

Update gemspec and add Gemfile for Ruby 3.0+ and modern dependency management

The gemspec now requires Ruby 3.0.0 or higher and explicitly declares runtime dependencies on \bigdecimal\ (required for decimal\_string field coercion in Ruby 3.4+) and \logger\. A new \Gemfile\ has been added to manage development dependencies, pinning \rubocop\ to version 1.75.2 to ensure consistent linting, and including tools like \mocha\, \webmock\, \shoulda-context\, and \sorbet\/\tapioca\ for type checking. The gemspec also updates metadata, author information, and file inclusion logic to use \git ls-files\ for better accuracy.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 59 → 60 (+1.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 67 → 67 (+0.0)
  • Architecture 87 → 85 (-2.0)
  • Maturity 51 → 56 (+5.0)
  • Readiness 60 → 60 (+0.0)
  • Security 77 → 65 (-11.5)

Resolved (33)

  • Change coupling: credit_note.rb ↔ subscription_schedule.rb (lib/stripe/resources/credit_note.rb)
  • Change-coupling hub: payout.rb → credit_note.rb, invoice.rb, subscription_schedule.rb (lib/stripe/resources/payout.rb)
  • Duplicated block (12 lines × 26) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (18 lines × 20) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (18 lines × 3) (lib/stripe/params/account_create_params.rb)
  • Duplicated block (21 lines × 6) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • Duplicated block (23 lines × 25) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (28 lines × 18) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (28 lines × 22) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (29 lines × 18) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (36 lines × 20) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (39 lines × 16) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (39 lines × 20) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (41 lines × 12) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • Duplicated block (44 lines × 5) (lib/stripe/params/charge_capture_params.rb)
  • Duplicated block (46 lines × 8) (lib/stripe/params/billing_portal/configuration_create_params.rb)
  • Duplicated block (51 lines × 4) (lib/stripe/services/payment_intent_service.rb)
  • Duplicated block (52 lines × 12) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (55 lines × 2) (lib/stripe/params/tax/calculation_create_params.rb)
  • Duplicated block (56 lines × 10) (lib/stripe/services/billing/alert_service.rb)
  • …and 13 more

New (35)

  • Duplicated block (116 lines × 2) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • Duplicated block (12 lines × 28) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (18 lines × 21) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (21 lines × 5) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • Duplicated block (23 lines × 32) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (28 lines × 19) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (28 lines × 24) (lib/stripe/services/apps/install_service.rb)
  • Duplicated block (29 lines × 20) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (29 lines × 26) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (29 lines × 7) (lib/stripe/params/billing_portal/configuration_create_params.rb)
  • Duplicated block (33 lines × 9) (lib/stripe/params/billing_portal/configuration_create_params.rb)
  • Duplicated block (36 lines × 26) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (39 lines × 20) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (39 lines × 25) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (41 lines × 13) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • Duplicated block (41 lines × 2) (lib/stripe/params/forwarding/request_create_params.rb)
  • Duplicated block (44 lines × 7) (lib/stripe/params/billing_portal/session_create_params.rb)
  • Duplicated block (51 lines × 6) (lib/stripe/services/payment_intent_service.rb)
  • Duplicated block (52 lines × 14) (lib/stripe/services/billing/alert_service.rb)
  • Duplicated block (55 lines × 3) (lib/stripe/params/billing_portal/configuration_update_params.rb)
  • …and 15 more

Changes since last survey

  • 10 commits — 9 feature/other, 1 fixes

By area

  • .hark/changes — 3 commits
  • lib/stripe — 3 commits
  • .github/workflows — 2 commits
  • (root) — 1 commit
  • .github/actions — 1 commit

Notable commits

  • fix: Fix binary webhook payload parsing (#2011)
  • change: Add historical RubyGem publishing workflow (#2006)
  • change: Bump version to 20.0.1
  • change: Bump version to 20.1.0
  • change: Make v2 search limit hoisting explicit (#2015)
  • change: Preserve event context on fetched related objects (#2009)
  • change: Removed workflow for publishing historical versions
  • change: Run full CI on canary branches (#2013)
  • change: Update bundled CA certificates (#2010)
  • change: Update generated code for v2596 and 65c49b0893d71e8cfe272b2d38cd3307ee1833f2 (#2007)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

stripe/stripe-ruby was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit a17b9a0bc258e259bcab0e49a0d672df0adb56c9 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.