{"id":13463202,"url":"https://github.com/stripe/stripe-ruby","last_synced_at":"2026-04-02T13:49:37.586Z","repository":{"id":1557332,"uuid":"1953385","full_name":"stripe/stripe-ruby","owner":"stripe","description":"Ruby library for the Stripe API.    ","archived":false,"fork":false,"pushed_at":"2026-02-20T20:45:55.000Z","size":63445,"stargazers_count":2094,"open_issues_count":24,"forks_count":624,"subscribers_count":60,"default_branch":"master","last_synced_at":"2026-02-23T00:00:31.565Z","etag":null,"topics":["stripe","stripe-sdk"],"latest_commit_sha":null,"homepage":"https://stripe.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stripe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2011-06-25T19:51:57.000Z","updated_at":"2026-02-21T22:57:51.000Z","dependencies_parsed_at":"2023-01-14T10:51:47.315Z","dependency_job_id":"e28d5664-1eda-4b45-8217-83ec1b8b861c","html_url":"https://github.com/stripe/stripe-ruby","commit_stats":{"total_commits":1477,"total_committers":190,"mean_commits":7.773684210526316,"dds":0.8747461069735951,"last_synced_commit":"91c68e4165388222145a9e0bd9aecf9430151ad7"},"previous_names":[],"tags_count":510,"template":false,"template_full_name":null,"purl":"pkg:github/stripe/stripe-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stripe","download_url":"https://codeload.github.com/stripe/stripe-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-ruby/sbom","scorecard":{"id":113937,"data":{"date":"2025-08-04","repo":{"name":"github.com/stripe/stripe-ruby","commit":"31dbce846499535c84a4732e5777d71949065420"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":6.7,"checks":[{"name":"Code-Review","score":8,"reason":"Found 17/19 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"14 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/rules.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/stripe/.github/SECURITY.md:1","Info: Found linked content: github.com/stripe/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/stripe/.github/SECURITY.md:1","Info: Found text in security policy: github.com/stripe/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-ruby/ci.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:62"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T21:46:34.841Z","repository_id":1557332,"created_at":"2025-08-15T21:46:34.841Z","updated_at":"2025-08-15T21:46:34.841Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29755552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T20:43:23.829Z","status":"ssl_error","status_checked_at":"2026-02-23T20:43:23.422Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["stripe","stripe-sdk"],"created_at":"2024-07-31T13:00:47.949Z","updated_at":"2026-04-02T13:49:37.571Z","avatar_url":"https://github.com/stripe.png","language":"Ruby","readme":"# Stripe Ruby Library\n\n[![Gem Version](https://badge.fury.io/rb/stripe.svg)](https://badge.fury.io/rb/stripe)\n[![Build Status](https://github.com/stripe/stripe-ruby/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-ruby/actions?query=branch%3Amaster)\n\n\u003e [!TIP]\n\u003e Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/ruby).\n\nThe Stripe Ruby library provides convenient access to the Stripe API from\napplications written in the Ruby language. It includes a pre-defined set of\nclasses for API resources that initialize themselves dynamically from API\nresponses which makes it compatible with a wide range of versions of the Stripe\nAPI.\n\nThe library also provides other features. For example:\n\n- Easy configuration path for fast setup and use.\n- Helpers for pagination.\n- Built-in mechanisms for the serialization of parameters according to the\n  expectations of Stripe's API.\n\n## Documentation\n\nSee the [Ruby API docs](https://stripe.com/docs/api?lang=ruby).\n\n## Installation\n\nYou don't need this source code unless you want to modify the gem. If you just\nwant to use the package, just run:\n\n```sh\ngem install stripe\n```\n\nIf you want to build the gem from source:\n\n```sh\ngem build stripe.gemspec\n```\n\n### Requirements\n\nPer our [Language Version Support Policy](https://docs.stripe.com/sdks/versioning?lang=ruby#stripe-sdk-language-version-support-policy), we currently support **Ruby 2.7+**.\n\nSupport for Ruby 2.7 is deprecated and will be removed in upcoming major versions. Read more and see the full schedule in the docs: https://docs.stripe.com/sdks/versioning?lang=ruby#stripe-sdk-language-version-support-policy\n\n### Bundler\n\nIf you are installing via bundler, you should be sure to use the https rubygems\nsource in your Gemfile, as any gems fetched over http could potentially be\ncompromised in transit and alter the code of gems fetched securely over https:\n\n```ruby\nsource 'https://rubygems.org'\n\ngem 'rails'\ngem 'stripe'\n```\n\n## Usage\n\nThe library needs to be configured with your account's secret key which is\navailable in your [Stripe Dashboard][api-keys]. Initialize a new client with your API key:\n\n```ruby\nrequire 'stripe'\n\nclient = Stripe::StripeClient.new(\"sk_test_...\")\n\n# list customers\ncustomers = client.v1.customers.list()\n\n# retrieve single customer\ncustomer = client.v1.customers.retrieve('cus_123456789')\n```\n\n### Per-request Configuration\n\nFor apps that need to use multiple keys during the lifetime of a process, like\none that uses [Stripe Connect][connect], it's also possible to set a\nper-request key and/or account:\n\n```ruby\nrequire \"stripe\"\n\nclient = Stripe::StripeClient.new(\"sk_test_...\")\n\nclient.v1.customers.list(\n  {},\n  {\n    api_key: 'sk_test_...',\n    stripe_account: 'acct_...',\n    stripe_version: '2018-02-28',\n  }\n)\n```\n\n### StripeClient vs legacy pattern\n\nWe introduced the `StripeClient` class in v13 of the Ruby SDK. The legacy pattern used prior to that version is still available to use but will be marked as deprecated soon. Review the [migration guide to use StripeClient](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) to move from the legacy pattern.\n\nOnce the legacy pattern is deprecated, new API endpoints will only be accessible in the StripeClient. While there are no current plans to remove the legacy pattern for existing API endpoints, this may change in the future.\n\n### Accessing resource properties\n\nBoth indexer and accessors can be used to retrieve values of resource properties.\n\n```ruby\ncustomer = client.v1.customers.retrieve('cus_123456789')\nputs customer['id']\nputs customer.id\n```\n\nNOTE: If the resource property is not defined, the accessors will raise an exception, while the indexer will return `nil`.\n\n```ruby\ncustomer = client.v1.customers.retrieve('cus_123456789')\nputs customer['unknown'] # nil\nputs customer.unknown # raises NoMethodError\n```\n\n### Accessing a response object\n\nGet access to response objects by using the `last_response` property of the returned resource:\n\n```ruby\ncustomer = client.v1.customers.retrieve('cus_123456789')\n\nprint(customer.last_response.http_status) # to retrieve status code\nprint(customer.last_response.http_headers) # to retrieve headers\n```\n\nIf you are accessing a response field with custom hashes provided by you, such as `Customer.metadata`,\nplease access your fields with the `[]` accessor.\n\n### Configuring a proxy\n\nA proxy can be configured with `Stripe.proxy`:\n\n```ruby\nStripe.proxy = 'https://user:pass@example.com:1234'\n```\n\n### Configuring an API Version\n\nBy default, the library will use the API version pinned to the account making\na request. This can be overridden with this global option:\n\n```ruby\nStripe.api_version = '2018-02-28'\n```\n\nSee [versioning in the API reference][versioning] for more information.\n\n### Configuring CA Bundles\n\nBy default, the library will use its own internal bundle of known CA\ncertificates, but it's possible to configure your own:\n\n```ruby\nStripe.ca_bundle_path = 'path/to/ca/bundle'\n```\n\n### Configuring Automatic Retries\n\nYou can enable automatic retries on requests that fail due to a transient\nproblem by configuring the maximum number of retries:\n\n```ruby\nStripe.max_network_retries = 2\n```\n\nVarious errors can trigger a retry, like a connection error or a timeout, and\nalso certain API responses like HTTP status `409 Conflict`.\n\n[Idempotency keys][idempotency-keys] are added to requests to guarantee that\nretries are safe.\n\n### Configuring Timeouts\n\nOpen, read and write timeouts are configurable:\n\n```ruby\nStripe.open_timeout = 30 # in seconds\nStripe.read_timeout = 80\nStripe.write_timeout = 30 # only supported on Ruby 2.6+\n```\n\nPlease take care to set conservative read timeouts. Some API requests can take\nsome time, and a short timeout increases the likelihood of a problem within our\nservers.\n\n### Logging\n\nThe library can be configured to emit logging that will give you better insight\ninto what it's doing. The `info` logging level is usually most appropriate for\nproduction use, but `debug` is also available for more verbosity.\n\nThere are a few options for enabling it:\n\n1. Set the environment variable `STRIPE_LOG` to the value `debug` or `info`:\n\n   ```sh\n   $ export STRIPE_LOG=info\n   ```\n\n2. Set `Stripe.log_level`:\n\n   ```ruby\n   Stripe.log_level = Stripe::LEVEL_INFO\n   ```\n\n### Instrumentation\n\nThe library has various hooks that user code can tie into by passing a block to\n`Stripe::Instrumentation.subscribe` to be notified about specific events.\n\n#### `request_begin`\n\nInvoked when an HTTP request starts. Receives `RequestBeginEvent` with the\nfollowing properties:\n\n- `method`: HTTP method. (`Symbol`)\n- `path`: Request path. (`String`)\n- `user_data`: A hash on which users can set arbitrary data, and which will be\n  passed through to `request_end` invocations. This could be used, for example,\n  to assign unique IDs to each request, and it'd work even if many requests are\n  running in parallel. All subscribers share the same object for any particular\n  request, so they must be careful to use unique keys that will not conflict\n  with other subscribers. (`Hash`)\n\n#### `request_end`\n\nInvoked when an HTTP request finishes, regardless of whether it terminated with\na success or error. Receives `RequestEndEvent` with the following properties:\n\n- `duration`: Request duration in seconds. (`Float`)\n- `http_status`: HTTP response code (`Integer`) if available, or `nil` in case\n  of a lower level network error.\n- `method`: HTTP method. (`Symbol`)\n- `num_retries`: The number of retries. (`Integer`)\n- `path`: Request path. (`String`)\n- `user_data`: A hash on which users may have set arbitrary data in\n  `request_begin`. See above for more information. (`Hash`)\n- `request_id`: HTTP request identifier. (`String`)\n- `response_header`: The response headers. (`Hash`)\n- `response_body` = The response body. (`String`)\n- `request_header` = The request headers. (`Hash`)\n- `request_body` = The request body. (`String`)\n\n#### Example\n\nFor example:\n\n```ruby\nStripe::Instrumentation.subscribe(:request_end) do |request_event|\n  # Filter out high-cardinality ids from `path`\n  path_parts = request_event.path.split(\"/\").drop(2)\n  resource = path_parts.map { |part| part.match?(/\\A[a-z_]+\\z/) ? part : \":id\" }.join(\"/\")\n\n  tags = {\n    method: request_event.method,\n    resource: resource,\n    code: request_event.http_status,\n    retries: request_event.num_retries\n  }\n  StatsD.distribution('stripe_request', request_event.duration, tags: tags)\nend\n```\n\n### How to use undocumented parameters and properties\n\nIn some cases, you might encounter parameters on an API request or fields on an API response that aren’t available in the SDKs.\nThis might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK.\nSee [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=ruby#undocumented-params-and-fields) to send those parameters or access those fields.\n\n### Writing a Plugin\n\nIf you're writing a plugin that uses the library, we'd appreciate it if you\nidentified using `#set_app_info`:\n\n```ruby\nStripe.set_app_info('MyAwesomePlugin', version: '1.2.34', url: 'https://myawesomeplugin.info')\n```\n\nThis information is passed along when the library makes calls to the Stripe\nAPI.\n\n### Telemetry\n\nBy default, the library sends telemetry to Stripe regarding request latency and feature usage. These\nnumbers help Stripe improve the overall latency of its API for all users, and\nimprove popular features.\n\nYou can disable this behavior if you prefer:\n\n```ruby\nStripe.enable_telemetry = false\n```\n\n### Types\n\nIn [v14.0.0](https://github.com/stripe/stripe-python/releases/tag/v7.1.0) and newer, the library provides RBI\nstatic type annotations. See [the wiki](https://github.com/stripe/stripe-ruby/wiki/Static-Type-Annotations-(with-Sorbet))\nfor an detailed guide.\n\nPlease note that these types are available only for static analysis and we only support RBIs at the moment.\nPlease [report an issue](https://github.com/stripe/stripe-ruby/issues/new/choose)\nif you find discrepancies or have issues using types.\n\nThe RBIs can be found in the `rbi/stripe/` directory, and to decrease `Tapioca` loading time we pack the gem with the\ncombined RBI at `rbi/stripe.rbi`.\n\n#### Types and the Versioning Policy\n\nWe release type changes in minor releases. While stripe-ruby follows semantic versioning, our semantic\nversions describe the runtime behavior of the library alone. Our type annotations are not reflected in the\nsemantic version. That is, upgrading to a new minor version of `stripe-ruby` might result in your type checker\nproducing a type error that it didn't before. You can use `~\u003e x.x` or `x.x.x` constrain the version\nof `stripe-ruby` in your Gemfile to a certain version or range of `stripe-ruby`.\n\n#### Types and API Versions\n\nThe types describe the [Stripe API version](https://stripe.com/docs/api/versioning)\nthat was the latest at the time of release. This is the version that your library sends\nby default. If you are overriding `Stripe.api_version` / `stripe_version` on the StripeClient,\nor using a webhook endpoint tied to an older version, be aware that the data\nyou see at runtime may not match the types.\n\n### Public Preview SDKs\n\nStripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `11.2.0-beta.2`.\nWe would love for you to try these as we incrementally release new features and improve them based on your feedback.\n\nTo install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-ruby/releases/) and use it in the `gem install` command:\n\n```sh\ngem install stripe -v \u003creplace-with-the-version-of-your-choice\u003e\n```\n\n\u003e **Note**\n\u003e There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your Gemfile. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest version of the public preview SDK.\n\nWe highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.\n\nSome preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If your preview feature has this requirement, use the `Stripe.add_beta_version` function (available only in the public preview SDKs):\n\n```python\nStripe.add_beta_version(\"feature_beta\", \"v3\")\n```\n\n### Private Preview SDKs\n\nStripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `11.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-ruby?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.\n\n### Custom requests\n\n\u003e This feature is only available from version 13 of this SDK.\n\nIf you:\n\n- would like to send a request to an undocumented API (for example you are in a private beta)\n- prefer to bypass the method definitions in the library and specify your request details directly,\n- used the method `Stripe::APIResource.request(...)` to specify your own requests, which was removed in v13+\n\nyou can now use the `raw_request` method on `StripeClient`.\n\n```ruby\nclient = Stripe::StripeClient.new('sk_test_...')\nresp = client.raw_request(:post, \"/v1/beta_endpoint\", params: {param: 123}, opts: {stripe_version: \"2022-11-15; feature_beta=v3\"})\n\n# (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.\ndeserialized_resp = client.deserialize(resp.http_body)\n```\n\n## Support\n\nNew features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.\n\n## Development\n\n[Contribution guidelines for this project](CONTRIBUTING.md)\n\nThe test suite depends on [stripe-mock], so make sure to fetch and run it from a background terminal ([stripe-mock's README][stripe-mock] also contains instructions for installing via Homebrew and other methods):\n\n```sh\ngo install github.com/stripe/stripe-mock@latest\nstripe-mock\n```\n\nWe use [just](https://github.com/casey/just) for common development tasks. You can install it or run the underlying commands directly (by copying them from the `justfile`). Common tasks include:\n\nRun all tests:\n\n```sh\njust test\n# or: bundle exec rake test\n```\n\nRun a single test suite:\n\n```sh\nbundle exec ruby -Ilib/ test/stripe/util_test.rb\n```\n\nRun a single test:\n\n```sh\nbundle exec ruby -Ilib/ test/stripe/util_test.rb -n /should.convert.names.to.symbols/\n```\n\nRun the linter:\n\n```sh\njust lint\n# or: bundle exec rubocop\n```\n\nUpdate bundled CA certificates from the [Mozilla cURL release][curl]:\n\n```sh\njust update-certs\n# or: bundle exec rake update_certs\n```\n\n[api-keys]: https://dashboard.stripe.com/account/apikeys\n[connect]: https://stripe.com/connect\n[curl]: http://curl.haxx.se/docs/caextract.html\n[idempotency-keys]: https://stripe.com/docs/api/idempotent_requests?lang=ruby\n[stripe-mock]: https://github.com/stripe/stripe-mock\n[versioning]: https://stripe.com/docs/api/versioning?lang=ruby\n\n\u003c!--\n# vim: set tw=79:\n--\u003e\n","funding_links":[],"categories":["E-Commerce and Payments","API Clients \u0026 SDKs","Ruby"],"sub_categories":["Payments","Official SDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstripe%2Fstripe-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-ruby/lists"}