- #1486 This release changes the pinned API version to
2024-11-20.acacia
.- Add support for
respond
test helper method on resourceIssuing.Authorization
- Add support for
- #1488 Fix incorrect key in param encoding
- #1483 Fix APIResource#retrieve not sending
stripe_version
- #1472 This release changes the pinned API version to
2024-10-28.acacia
.- Add support for
submit_card
test helper method on resourceIssuing.Card
- Add support for new resource
V2.EventDestinations
- Add support for
create
,retrieve
,update
,list
,delete
,disable
,enable
andping
methods on resourceV2.EventDestinations
- Add support for
- #1476 Fix APIResource#retrieve bug not returning instance of custom resources
- Fix bug in APIResource#refresh and APIResource#retrieve where they returned an instance of
StripeObject
for custom resources. They should now return the instance of the custom resource.
- Fix bug in APIResource#refresh and APIResource#retrieve where they returned an instance of
-
#1473 Always return the result of APIResource#refresh in APIResource.retrieve
- Fix bug where we would not return the mutated
self
object when callingAPIResource.retrieve
- Fix bug where we would not return the mutated
-
#1471 update object tags for meter-related classes
- fixes a bug where the
object
property of theMeterEvent
,MeterEventAdjustment
, andMeterEventSession
didn't match the server.
- fixes a bug where the
-
#1470 Cleaned up examples and added documentation
-
#1458 Support for APIs in the new API version 2024-09-30.acacia
This release changes the pinned API version to
2024-09-30.acacia
. Please read the API Upgrade Guide and carefully review the API changes before upgrading.Please refer to our migration guide for v13 for more information about the backwards incompatible changes.
- Move
StripeClient
and requestor logic toAPIRequestor
.StripeClient#request
is still available, but is deprecated and will be removed. We encourageStripeClient#raw_request
as a replacement (see other breaking changes for more detail).
- Repurpose and introduce
StripeClient
as the the entry-point to the service-based pattern, a new interface for calling the Stripe API with many benefits over the existing resource-based paradigm. Services are available under thev1
andv2
accessors.- No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
- No extra API calls. All API endpoints can be accessed with a single method call. You don't have to call
retrieve
before doing anupdate
. - No static methods. Much easier mocking.
- Adjust default values around retries for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
- max retries:
0
->2
- max retry delay (seconds)
2
->5
- max retries:
- Remove
StripeClient#connection_manager
. This was a legacy method from years ago. - Singleton
retrieve
method now requiresparams
to be passed as the first argument. Existing calls to singletonretrieve
method with onlyopts
argument will have to be updated to account for the addition ofparams
argument.params = { expand: ["available"] } opts = { stripe_account: "acct_123" } # ❌ No longer works Stripe::Balance.retrieve(opts) # ✅ Correct way to call retrieve method Stripe::Balance.retrieve(params, opts)
- Moved the
Stripe.raw_request()
method that was recently added toStripeClient
. This will use the configuration set on the StripeClient instead of the global configuration used before. - Remove
APIResource.request
. Instead, useStripeClient#raw_request
now.# Instead of Stripe::APIResource.request(:get, "/v1/endpoint", params, opts) # do client = Stripe::StripeClient.new(...) resp = client.raw_request(:get, "/v1/endpoint", params: params, opts: opts)
- Add an additional parameter to
APIResource.execute_resource_request
. However, we discourage use of this in favor ofStripeClient#raw_request
.APIResource.execute_resource_request(method, url, params = {}, opts = {}, usage = []) # is now, with base_address being one of [:api, :files, :connect, :meter_events] APIResource.execute_resource_request(method, url, base_address = :api, params = {}, opts = {}, usage = [])
- Change parameters to
APIRequestor.execute_request
(previouslyStripeClient.execute_request
). It now returns all request options from our internal request framework as the second value in the returned tuple, instead of only the API key used:# Before obj, api_key = StripeClient.execute_request(method, path, api_base: nil, api_key: nil, headers: {}, params: {}, usage: []) # is now, with base_address being one of [:api, :files, :connect, :meter_events] obj, opts = APIRequestor.execute_request(method, path, base_address, params: {}, opts: {}, usage: []) puts(opts) # will output {api_key: "sk_test_123", stripe_account: "acct_123"}
- Add support for new Usage Billing APIs
Billing.MeterEvent
,Billing.MeterEventAdjustments
,Billing.MeterEventSession
,Billing.MeterEventStream
and the new Events APICore.Events
in the v2 namespace - Add method
parse_thin_event()
on theStripeClient
class to parse thin events.
- Move
- #1442 Update generated code
- Add support for new resource
InvoiceRenderingTemplate
- Add support for
archive
,list
,retrieve
, andunarchive
methods on resourceInvoiceRenderingTemplate
- Add support for new resource
- #1443 Removed v1/files override
- #1440 Update generated code
- Add support for new resources
Billing.AlertTriggered
andBilling.Alert
- Add support for
activate
,archive
,create
,deactivate
,list
, andretrieve
methods on resourceAlert
- Add support for
retrieve
method on resourceTax.Calculation
- Add support for new resources
- #1437 Update generated code
- Add support for
update
method on resourceCheckout.Session
- Add support for
- #1436 Fixed changelog for major release 12.0.0
- #1435 Add deprecation warning for
APIResource.request
-
#1430 Update generated code
-
#1433 Add usage to raw_request call
-
#1431 Add
raw_request
- Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using
Stripe::APIResource.request(...)
to make custom requests, which is discouraged and will be broken in a future major version.
- Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using
-
#1425 Update generated code
- Add support for
add_lines
,remove_lines
, andupdate_lines
methods on resourceInvoice
- Add support for
-
#1420 Update static methods for delete/list on BankAccount/Card to throw NotImplementedError
- The below methods have been throwing
InvalidRequestError
because the urls used to make the requests have been buggy. Updating them to throwNotImplementedError
instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id.
Methods affected Use these instead in the context of payment method Use these in the context of external accounts Stripe:: BankAccount.delete Stripe::Customer.delete_source Stripe::Account.delete_external_account Stripe:: BankAccount.list Stripe::Customer.list_sources Stripe::Customer.list_external_accounts Stripe:: Card.delete Stripe::Customer.delete_source Stripe::Account.delete_external_account Stripe:: Card.list Stripe::Customer.list_sources Stripe::Customer.list_external_accounts - The below methods have been throwing
-
#1427 Regenerate rbis
-
#1426 Remove coveralls and re-added JRuby
-
#1418 Add missing static method for verify on BankAccount
-
This release changes the pinned API version to 2024-06-20. Please read the API Upgrade Guide and carefully review the API changes before upgrading.
- Add support for
finalize_amount
test helper method on resourceIssuing.Authorization
- Add support for
- #1415 Deprecate StripeClient#request
- Add deprecation warning for
StripeClient#request
. This helper method will be removed in a future major version. To access response objects, use thelast_response
property on the returned resource instead. Refer to Accessing a response object in the README for usage details.
- Add deprecation warning for
- #1404 Add method to list invoice line items
- Add methods
list_lines()
on the classInvoice
to list the invoice line items
- Add methods
- This release has no changes.
- #1397 Update generated code
- Add support for
update
test helper method on resourcesTreasury.OutboundPayment
andTreasury.OutboundTransfer
- Add support for
- #1399 Pass params to transfer reversal
- Allow
Stripe::Transfer.retrieve_reversal()
to accept a params hash as the third argument, followed by opts. No changes to existing calls are necessary, but in a future major version this method will be updated to only accept params as the first argument. Fixes #1393
- Allow
- #1389 Removed jaro_winkler as a dependency
- #1396 Start tracking
StripeClient#request
usage
-
#1387 Update generated code
-
#1392 Deprecate Ruby methods based on OpenAPI spec
- Mark as deprecated the
approve
anddecline
methods inlib/stripe/resources/issuing/authorization.rb
. Instead, respond directly to the webhook request to approve an authorization.
- Mark as deprecated the
-
#1391 Add Ruby 3.3 to CI test matrix
- #1385 Update generated code
- Add support for
create_preview
method on resourceInvoice
- Add support for
- #1379 Update generated code
- Add support for new resource
Entitlements.ActiveEntitlementSummary
- Add support for new resource
-
- This release changes the pinned API version to
2024-04-10
. Please read the API Upgrade Guide and carefully review the API changes before upgrading.
- When no
x-stripe-should-retry
header is set in the response, the library now retries all requests withstatus >= 500
, not just non-POST methods.
- This release changes the pinned API version to
- #1377 Add last_response to StripeObject
- Users can now retrieve raw response from the returned resource, using the
last_response
property. See README for an example.
- Users can now retrieve raw response from the returned resource, using the
- #1372 Update generated code
- Add support for new resources
Entitlements.ActiveEntitlement
andEntitlements.Feature
- Add support for
list
andretrieve
methods on resourceActiveEntitlement
- Add support for
create
,list
,retrieve
, andupdate
methods on resourceFeature
- Add support for new resources
- #1366 Move executables to
exe
folder
- #1369 Update generated code
- Add support for new resources
Billing.MeterEventAdjustment
,Billing.MeterEvent
, andBilling.Meter
- Add support for
create
,deactivate
,list
,reactivate
,retrieve
, andupdate
methods on resourceMeter
- Add support for
create
method on resourcesMeterEventAdjustment
andMeterEvent
- Add support for new resources
- #1367 Update generated code
- Add support for new resources
ConfirmationToken
andForwarding.Request
- Add support for
retrieve
method on resourceConfirmationToken
- Add support for
create
,list
, andretrieve
methods on resourceRequest
- Add support for new resources
- #1362 Exclude sorbet directory and tapioca script when packing gem
- #1359 Update generated code
- Add support for new resources
Issuing.PersonalizationDesign
andIssuing.PhysicalBundle
- Add support for
create
,list
,retrieve
, andupdate
methods on resourcePersonalizationDesign
- Add support for
list
andretrieve
methods on resourcePhysicalBundle
- Add support for new resources
- #1354 Refactor after SDK based generation pattern
- #1347 Reorder methods with lexographical sort
- #1355 Disable Metrics/ClassLength
- #1351 Update CHANGELOG.md
- #1348 Use sorbet gem instead of sorbet-static
- #1342 Update generated code
- Add
list_refunds
andretrieve_refund
methods on resourceCharge
.
- Add
- #1345 Update README to use add_beta_version
- #1336 Update generated code
- Add
InvoiceLineItem.update
method.
- Add
- #1334 Add TaxIds API
- Add support for
all
,create
, andretrieve
methods on resourceTaxId
- The
delete
method now sends a DELETE request to/v1/tax_ids/{id}
instead of/v1/customers/{customer}/tax_ids/{id}
. The endpoints are functionally the same when operating on a Customer Tax ID. - The
resource_url
method onTaxId
now returns the top-level/v1/tax_ids/{id}
path instead of the/v1/customers/{customer}/tax_ids/{id}
path.
- Add support for
- #1329 Update generated code
- Fixed bug where
TaxId
resourcedelete
method sent request to wrong URL (#1333)
- Fixed bug where
- #1324 Start running Sorbet in CI
- #1327 Add methods for dynamically referenced constants
- #1322 Update generated code
- #1323 Extract other CRUDL api operations from mixins
- Extract more CRUDL operations, namely
create
,delete
,update
, andlist
into the resources. These methods will no longer rely on the APIOperation mixins.
- Extract more CRUDL operations, namely
- #1314 Update mocha gem to 1.16
- #1317 Remove list method in child resources
- Removes list method mixin from child resources, as these methods always return
InvalidRequestError
and never succeed
- Removes list method mixin from child resources, as these methods always return
- #1311 Use the deprecation gem in search and clean up usage of the gem
- #1310 Update generated code
- Add support for new resource
CustomerSession
- Add support for
create
method on resourceCustomerSession
- Add support for new resource
- #1306 Update generated code
- Add support for
retrieve
method on resourceTax.Registration
- Add support for
- #1303 Update generated code
- Add support for new resource
FinancialConnections.Transaction
- Add support for
list
andretrieve
methods on resourceTransaction
- Add support for
subscribe
andunsubscribe
methods on resourceFinancialConnections.Account
- Add support for new resource
- #1304 Add support for updatable singleton resources
- #1294 Support sending parameters inside singleton retrieve
-
#1292 Update generated code
- Add support for new resources
Climate.Order
,Climate.Product
, andClimate.Supplier
- Add support for
cancel
,create
,list
,retrieve
, andupdate
methods on resourceOrder
- Add support for
list
andretrieve
methods on resourcesProduct
andSupplier
- Add support for new resources
-
#1295 Upgrade rubocop
-
#1291 Update generated code
-
#1290 Update generated code
-
#1288 Update generated code
- #1286 Update generated code
- Add support for new resource
Tax.Registration
- Add support for
create
,list
, andupdate
methods on resourceRegistration
- Add support for new resource
- This release changes the pinned API version to
2023-10-16
. Please read the API Upgrade Guide and carefully review the API changes before upgradingstripe-ruby
. - #1283 Update generated code
- Updated pinned API version
- #1281 Update generated code
- Documentation only changes
- #1277 Update generated code
- Add support for new resources
Issuing.Token
- Add support for
list
,retrieve
, andupdate
methods on resourceToken
- Add support for new resources
- #1272 Update generated code
- Add support for new resource
PaymentMethodConfiguration
- Add support for
create
,list
,retrieve
, andupdate
methods on resourcePaymentMethodConfiguration
- Add support for new resource
- #1271 Update generated code
- Add support for
capture
,create
,expire
,increment
, andreverse
test helper methods on resourceIssuing.Authorization
- Add support for
create_force_capture
,create_unlinked_refund
, andrefund
test helper methods on resourceIssuing.Transaction
- Add support for
- #1267 Update generated code
- Add support for new resource
PaymentMethodDomain
- Add support for
create
,list
,retrieve
,update
, andvalidate
methods on resourcePaymentMethodDomain
- Add support for new resource
- #1266 Update generated code
- Add support for new resource
AccountSession
- Add support for
create
method on resourceAccountSession
- Add support for new resource
- #1262 Explicitly format timestamp in SignatureVerificationError message
-
#1253 #1260 Pin latest API version as the default
In this release, Stripe API Version
2023-08-16
(the latest at time of release) will be sent by default on all requests. This is a significant change with wide ramifications. The API version affects the properties you see on responses, the parameters you are allowed to send on requests, and so on. The previous default was to use your Stripe account's default API version.To successfully upgrade to stripe-ruby v9, you must either
-
(Recommended) Upgrade your integration to be compatible with API Version
2023-08-16
.Please read the API Changelog carefully for each API Version from
2023-08-16
back to your Stripe account's default API version. Determine if you are using any of the APIs that have changed in a breaking way, and adjust your integration accordingly. Carefully test your changes with Stripe Test Mode before deploying them to production.You can read the v9 migration guide for more detailed instructions.
-
(Alternative option) Specify a version other than
2023-08-16
when initializingstripe-ruby
.If you were previously initializing stripe-ruby without an explicit API Version, you can postpone modifying your integration by specifying a version equal to your Stripe account's default API version. For example:
require 'stripe' Stripe.api_key = "sk_test_..." + Stripe.api_version = '2020-08-27'
If you were already initializing stripe-ruby with an explicit API Version, upgrading to v9 will not affect your integration.
Read the v9 migration guide for more details.
Going forward, each major release of this library will be pinned by default to the latest Stripe API Version at the time of release.
That is, instead of upgrading stripe-ruby and separately upgrading your Stripe API Version through the Stripe Dashboard. whenever you upgrade major versions of stripe-ruby, you should also upgrade your integration to be compatible with the latest Stripe API version.
-
- #1256 Update generated code
Add resources
Tax::CalculationLineItem
,Tax::TransactionLineItem
, andTreasury::FinancialAccountFeatures
. These resources have no methods on them, but do represent the return type of methods elsewhere.
-
#1244 Update generated code
- Add support for new resource
Tax.Settings
- Add support for
retrieve
andupdate
methods on resourceSettings
- Add support for new resource
-
#1241 Update generated code
-
#1209 Update shoulda-context version
-
#1235 Allow "error" string as log level
-
#1238 Update log level error message to include
error
-
#1231 fix: variable typo in README for instrumentation
-
#1234 Update generated code
-
#1230 Update generated code
- Release specs are identical.
-
#1226 Update generated code
-
#1223 Update generated code
-
#1225 Downgrade jaro_winkler
-
#1219 Update generated code
Documentation updates.
-
#1215 Update generated code
-
#1208 Update generated code
-
#1204 Update generated code
- #1203 Update generated code
- Remove support for
create
method on resourceTax.Transaction
- This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the
create_from_calculation
method.
- This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the
- Remove support for
- #1201 Update save deprecation message
- #1197 Update generated code (new)
- Add support for new resources
Tax.CalculationLineItem
,Tax.Calculation
,Tax.TransactionLineItem
, andTax.Transaction
- Add support for
create
andlist_line_items
methods on resourceCalculation
- Add support for
create_from_calculation
,create_reversal
,create
,list_line_items
, andretrieve
methods on resourceTransaction
- Add support for new resources
- #1152 Symbolize hash keys inside
convert_to_stripe_object_with_params
- #1175 API Updates
- Add support for
refund_payment
method on resourceTerminal.Reader
- Add support for
- #1173 API Updates
- Add support for
resume
method on resourceSubscription
- Add support for
- #1171 Remove unused
partial
param frominitialize_from
- #1162 Improve request events instrumentation
- #1144 Next major release changes
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-11-15.
"
- The
save
method is deprecated. Prefer the staticupdate
method that doesn't require retrieval of the resource to update it.# before refund = Stripe::Refund.retrieve("re_123") refund.description = "Refund description" refund.save # after Stripe::Refund.update("re_123", description: "Refund description")
- Removed deprecated
Sku
resource. - Removed deprecated
Orders
resource. - Removed deprecated
delete
method onSubscription
resource. Please usecancel
method instead.# before Stripe::Subscription::delete("sub_12345") # after Stripe::Subscription::cancel("sub_12345")
- #1116 API Updates
- Add support for new resource
CustomerCashBalanceTransaction
- Add support for new resource
- #1118 Update AllowedChars in rubocop config
- #1117 Refresh rubocop config.
- #1115 Add a support section to the readme
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
"
- #1106 API Updates
- #1092 API Updates
- #1090 Use auto-generation for
Invoice
methods - #1103 Next major release changes
retrieve_cash_balance
andupdate_cash_balance
methods onCustomer
resource no longer requires the second argument to always benil
. The methods now now take incustomer_id
,params
, andopts
parameters.- Update default bundle of CA certificates to April 26, 2022.
- Deprecate
delete
method onSubscription
resource. Please usecancel
method instead.
- Remove
details
method fromIssuing.Card
resource. The method was not supported. - Remove
Issuing.CardDetails
resource. Read more at https://stripe.com/docs/issuing/cards/virtual. - Remove
create
method fromReportType
resource. The method was not supported. - Remove
usage_record_summaries
method fromSubscriptionItem
resource. Please uselist_usage_record_summaries
method instead. - Remove
AlipayAccount
,BitcoinReceiver
,BitcoinTransaction
,Issuing::CardDetails
,Recipient
,RecipientTransfer
, andThreeDSecure
resources. The resources were deprecated or no longer in use. - Remove ability to list
Card
resource for aRecipient
. - Remove
cancel
method fromTransfer
resource. The method was deprecated.
- #1084 API Updates
- Add support for
deliver_card
,fail_card
,return_card
, andship_card
test helper methods on resourceIssuing.Card
- Add support for
- #1076 fix: Update logging to coerce ASCII-8BIT into UTF-8.
-
#1073 API Updates
- Add support for
fund_cash_balance
test helper method on resourceCustomer
- Add support for
-
#1074 Support updating pre-release versions
-
#1072 Trigger workflows on beta branches
-
#1071 Use request_stripe_object for all requests
-
#1070 API Updates
Switch from using meta-programing to generating explicit methods for custom methods.
-
#1069 chore: Stop special implementation of Account.persons method.
- #1063 fix: Update cash balance methods to no longer require nested ID.
- #1060 API Updates
- Add support for new resource
Apps.Secret
- Add support for new resource
- #1057 API Updates
- Add support for new resources
Treasury.CreditReversal
,Treasury.DebitReversal
,Treasury.FinancialAccountFeatures
,Treasury.FinancialAccount
,Treasury.FlowDetails
,Treasury.InboundTransfer
,Treasury.OutboundPayment
,Treasury.OutboundTransfer
,Treasury.ReceivedCredit
,Treasury.ReceivedDebit
,Treasury.TransactionEntry
, andTreasury.Transaction
- Add support for
retrieve_payment_method
method on resourceCustomer
- Add support for
list_owners
andlist
methods on resourceFinancialConnections.Account
- Add support for new resources
-
#1056 API Updates Major version release. The migration guide contains more information.
(
⚠️ = breaking changes):⚠️ Replace the legacyOrder
API with the newOrder
API.- New methods:
cancel
,list_line_items
,reopen
, andsubmit
- Removed methods:
pay
andreturn_order
- Removed resources:
OrderItem
andOrderReturn
- New methods:
⚠️ RenameFinancialConnections::Account.refresh
to `FinancialConnections::Account.refresh_account
- #1055 API Updates
- Add support for new resources
FinancialConnections.AccountOwner
,FinancialConnections.AccountOwnership
,FinancialConnections.Account
, andFinancialConnections.Session
- Add support for new resources
- #1053 API Updates
- Add support for new resource
CashBalance
- Add support for new resource
- #1050 API Updates
- Add support for
expire
test helper method on resourceRefund
- Add support for
- #1046 #1047 API Updates
- Add support for new resources
FundingInstructions
andTerminal.Configuration
- Add support for new resources
- #1046 This release was incomplete and was yanked from RubyGems immediately after it was published.
- #1045 API Updates
- Add support for
increment_authorization
method on resourcePaymentIntent
- Add support for
- #1043 API Updates
- Add support for
apply_customer_balance
method on resourcePaymentIntent
- Add support for
- #1041 API Updates
- Add support for
cancel_action
,process_payment_intent
,process_setup_intent
, andset_reader_display
methods on resourceTerminal.Reader
- Add support for
-
#1040 API Updates
- Add support for Search API
- Add support for
search
method on resourcesCharge
,Customer
,Invoice
,PaymentIntent
,Price
,Product
, andSubscription
- Add support for
- Add support for Search API
-
#1034 Add supporting classes for test helper generation
- #1035 API Updates
- Add support for new resource
TestHelpers.TestClock
- Add support for new resource
- #1032 API Updates
- Add support for
verify_microdeposits
method on resourcesPaymentIntent
andSetupIntent
- Add support for
- #1031 API Updates
- Add support for new resource
PaymentLink
- Add support for new resource
- #1022 Add connection manager logging and include object IDs in logging.
- #1017 API Updates
- Add support for new resource
ShippingRate
- Add support for new resource
- #1015 API Updates
- Add support for
expire
method on resourceCheckout.Session
- Add support for
- #1013 Add tests for child resources.
- #1012 Add tests for namespaced resources.
- #1011 codegen: 3 more files
- #1010 API Updates
- Add support for
list_payment_methods
method on resourceCustomer
- Add support for
- #993 Add
request_id
to RequestEndEvent - #991 Codegen more files
- #989 Remove unused API error types from docs.
- #988 API Updates
- Add support for
list_computed_upfront_line_items
method on resourceQuote
- Add support for
- #987 Add support for
Quote
API
- #985 Update normalize_opts to use dup instead of clone.
- #982 Deprecate travis
- #983 Add support for making a request and receiving the response as a stream.
- #981 API Updates
- Add support for
TaxCode
API.
- Add support for
- #979 Add support for the Identify VerificationSession and VerificationReport APIs
- Correct use of regexp
match
in gemspec for old versions of Ruby
- #973 Reduce packed gem size
- #968 Allow StripeClient to be configured per instance
- #971 On config change, only clear connection managers for changed config
- #972 Rename
Stripe.configuration
toStripe.config
- #970 Reserve some critical field names when adding
StripeObject
accessors - #967 CI: github actions
- #965 Add support for the Billing Portal Configuration API
- #964 Fix return value of
Customer#delete_discount
- #952 Allow client_id configuration on instance config
- #950 Add configuration option for
write_timeout
for connections on Ruby 2.6+
- #951 Add support for the Payout Reverse API
- #949 Add support for the
SetupAttempt
resource and List API
- #944 Add support for the Issuing Dispute Submit API
- #936 Rename API resource's
request
method
- #937 Add support for the
PromotionCode
resource and APIs
- #918 Add support for the
LineItem
resource and APIs
- #917 Add support for the
Price
resource and APIs
- #916 Add new
.generate_header
method for webhooks
- #915 Expose
Stripe::Webhook.compute_signature
publicly
- #911 Add support for
BillingPortal
namespace andSession
resource and APIs
- #907 Add
StripeError#idempotent_replayed?
- #902 Add
request_begin
instrumentation callback
- #896 Add support for
CreditNoteLineItem
- #894 Clean up test output by capturing
$stderr
when we expect warnings - #892 Explicitly pass a parameter as hash to be more ruby 2.7 friendly
- #893 Upgrade Rubocop to 0.79
- #891 Fix most Ruby 2.7 warnings
- #890 Override API key with
client_secret
inOAuth.token
- #889 Add support for retrieve source transaction API method
- #885 Add support for
CreditNote
preview
- #882 Add list_usage_record_summaries and list_source_transactions
- #870 Add request instrumentation callback (see
README.md
for usage example)
- #879 Add support for
Mandate
- #876 Add additional per-request configuration documentation
- #874 Raise an error when requests params are invalid
- #873 Contributor Covenant
- #869 Fixes the misnamed
connection_base=
setter to be namedconnect_base=
- #865 Support backwards pagination with list's
#auto_paging_each
- #861 Nicer error when specifying non-nil non-string opt value
- #859 User-friendly messages and retries for
EOFError
,Errno::ECONNRESET
,Errno::ETIMEDOUT
, andErrno::EHOSTUNREACH
network errors
- #858 Drop Timecop dependency
- #857 Move to monotonic time for duration calculations
- #853 Support
Stripe-Should-Retry
header
- #851 Introduce system for garbage collecting connection managers
- #845 Transfer the request_id from the http_headers to error.
- #841 Retry requests on a 429 that's a lock timeout
- #836 Increase connection keep alive timeout to 30 seconds
Major version release. The migration guide contains a detailed list of backwards-incompatible changes with upgrade instructions.
Pull requests included in this release (cf. #815) (
⚠️ #813: Convert library to use built-inNet::HTTP
⚠️ #816: Makecode
argument inCardError
named instead of positional.⚠️ #817: Drop support for very old Ruby versions.- #818: Bump Rubocop to latest version
- #819: Ruby minimum version increase followup
⚠️ #820: Remove old deprecated methods⚠️ #823: Remove all alias for list methods⚠️ #826: RemoveUsageRecord.create
method⚠️ #827: RemoveIssuerFraudRecord
- #811: Add
ErrorObject
toStripeError
exceptions - #828: Tweak retry logic to be a little more like stripe-node
- #829: Reset connections when connection-changing configuration changes (optional)
- #830: Fix inverted sign for 500 retries
⚠️ #831: Remove a few more very old deprecated methods- #832: Minor cleanup in
StripeClient
- #833: Do better bookkeeping when tracking state in
Thread.current
- #834: Add
Invoice.list_upcoming_line_items
method
- #825 Add
SubscriptionItem.create_usage_record
method- This release also removed the
SubscriptionSchedule.revisions
method. This should have been included in the previous release (4.23.0)
- This release also removed the
- #824 Remove SubscriptionScheduleRevision
- This is technically a breaking change. We've chosen to release it as a minor vesion bump because the associated API is unused.
- #808 Unify request/response handling
- #821 Listing
BalanceTransaction
objects now uses/v1/balance_transactions
instead of/v1/balance/history
- #810 Better error message when passing non-string to custom method
- #806 Revert back to
initialize_from
fromUtil.convert_to_stripe_object
- #807 Add gem metadata
- #803 Add support for the
SetupIntent
resource and APIs
- #805 Fix formatting in
ConnectionFailed
error message
- #800 Enable request latency telemetry by default
- #770 Add support for
CustomerBalanceTransaction
resource and APIs
- #789 Allow
Order#pay
to be called without arguments
- #783 Add support for
radar.early_fraud_warning
resource
- #779 Add support for the Capability resource and APIs
- #760 Add support for the
TaxRate
resource and APIs
- #762 Add support for the
TaxId
resource and APIs
- #758 Add support for the
CreditNote
resource and APIs
- #766 Relax constraints on objects that we'll accept as a file (now they just need to respond to
#read
)
- #752 Add
.delete
class method on deletable API resources - #754 Add class methods for all custom API requests (e.g.
Charge.capture
)
- #753 Add a global proxy configuration parameter
- #745 Add support for the
PaymentMethod
resource and APIs - #747 Add support for retrieving a Checkout
Session
- #748 Add support for deleting a Terminal
Location
andReader
- #750 Catch error and warn if unable to remove a method
- #739 Add support for
SubscriptionSchedule
andSubscriptionScheduleRevision
- #743 Fix bug in file uploading introduced in #741
- #741 Use
FaradayStripeEncoder
to encode all parameter styles
- #740 Fix query encoding for integer-indexed maps
- #735 Rename
CheckoutSession
toSession
and move it under theCheckout
namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach.
- #736 Properly serialize
individual
onAccount
objects
- #719 Generate OAuth authorize URLs for Express accounts as well as standard
- #718 Fix an error message typo
- #716 Add support for the
CheckoutSession
resource
- #711 Add support for account links
- #705 Add support for the
Review
APIs
- #695 Add support for
ValueList
andValueListItem
for Radar
- #703 Don't use
Net::HTTP::Persistent
on Windows where it's not well supported
- #701 Require minimum Faraday 0.13 for proper support of persistent connections
- #699 Only send telemetry if
Request-Id
was present in the response
- #698 Use persistent connections by default through
Net::HTTP::Persistent
- #698 Drop support for Ruby 2.0 (which we consider a breaking change here)
- #697 Send telemetry in milliseconds specifically
- #696 Add configurable telemetry to gather information on client-side request latency
- #693 Add new API endpoints for the
Invoice
resource.
- #690 Add support for Stripe Terminal
- #689 Rename
FileUpload
toFile
- #688 Fix hash equality on
StripeObject
- #681 Add support for reporting resources
- #678 Allow payment intent
#cancel
,#capture
, and#confirm
to take their own parameters
- #675 Remove support for
BitcoinReceiver
write-actions
- #676 Add support for usage record summaries
- #674 Use integer-indexed encoding for all arrays
- #671 Add cancel support for topups
- #669 Add support for file links
- #666 Add support for scheduled query runs (
Stripe::Sigma::ScheduledQueryRun
) for Sigma
- #665 Add support for Stripe Issuing
- #664 Don't colorize log output being sent to a configured logger
- #663 Internal improvements to
ApiResource.class_url
- #658 Add support for
partner_id
fromStripe.set_app_info
- #657 Add support for payment intents
- #649 Freeze all string literals
- #645 Add support for issuer fraud records
- #647 Merge query parameters coming from path with
params
argument
- #498 Add support for flexible billing primitives
- #636 Fix a warning for uninitialized instance variable
@additive_params
- #632 Introduce
additive_object_param
so that non-metadata
subobjects don't zero their keys as they're being replaced
- #628 Add support for
code
attribute on all Stripe exceptions
- #627 Add support for topups
- #625 Skip calling
to_hash
fornil
- #616 Support all file-like objects for uploads with duck typed checks on
path
andread
(we previously whitelisted only certain classes)
- #613 Introduce new
IdempotencyError
type for idempotency-specific failures
- #612 Fix integer-indexed array encoding when sent as query parameter (subscription items can now be used when fetching an upcoming invoice)
- #611 Support
Tempfile
(as well asFile
) in file uploads
- #606 Support for exchange rates APIs
- #603 Support for listing source transactions
- #597 Add static methods to manipulate resources from parent
Account
gains methods for external accounts and login links (e.g..create_account
,create_login_link
)ApplicationFee
gains methods for refundsCustomer
gains methods for sourcesTransfer
gains methods for reversals
- #594 Make sure that
StripeObject
's#deep_copy
maintains original class - #595 Allow
Object#method
to be called onStripeObject
even if it conflicts with an accessor - #596 Encode arrays as integer-indexed hashes where appropriate
- #598 Don't persist
idempotency_key
opt between requests
- #592 Bring back
Marshal.dump/load
support with custom marshal encoder/decoder
- #591 Use thread-local
StripeClient
instances for thread safety
- #589 Rename source
delete
todetach
(and deprecate the former)
- #586 Log query strings as well as form bodies with STRIPE_LOG
- #588 Require minimum Faraday 0.10 for bug fix in parameter encoding
- Mark legacy Bitcoin API as deprecated, and remove corresponding tests
- Mark recipients API as deprecated, and remove recipient card tests
- Correct minimum required Ruby version in gemspec (it's 2.0.0)
- Only parse webhook payload after verification to decrease likelihood of attack
- Add support for standard library logger interface with
Stripe.logger
- Error logs now go to stderr if using
Stripe.log_level
/STRIPE_LOG
Stripe.log_level
/STRIPE_LOG
now supportStipe::LEVEL_ERROR
- Add logging for request retry account and
Stripe-Account
header
- Implement request logging with
Stripe.log_level
andSTRIPE_LOG
- Revert
nil
to empty string coercion from 3.0.2 - Handle
invalid_client
OAuth error code - Improve safety of error handling logic safer for unrecognized OAuth error codes
Important: This version is non-functional and has been yanked in favor of 3.0.3.
- Convert
nil
to empty string when serializing parameters (instead of opaquely dropping it) -- NOTE: this change has since been reverted
- Properties set with an API resource will now serialize that resource's ID if possible
- API resources will throw an ArgumentError on save if a property has been with an API resource that cannot be serialized
#pay
on invoice now takes params as well as opts
- Add support for ephemeral keys
- Warn when keys that look like opts are included as parameters
- Add support for account login links
- Support for OAuth operations in
Stripe::OAuth
- Support for checking webhook signatures
- Add model
InvoiceLineItem
- Add
OBJECT_NAME
constants to all API resources
- Make
opts
argument inUtil.convert_to_stripe_object
optional
- Add
Stripe.set_app_info
for use by plugin creators
- Add question mark accessor when assigning boolean value to undefined field
- Declare minimum required Faraday as 0.9
- Add support for payouts and recipient transfers
- Support for detaching sources from customers
- Fix marshalling of
StripeObjects
that have an embedded client
- Fix bad field reference when recovering from a JSON parsing problem
- Fix multipart parameter encoding to repair broken file uploads
- Drop support for Ruby 1.9
- Allow HTTP client that makes Stripe calls to be configured via Faraday
- Drop RestClient
- Switch to OpenAPI 2.0 spec and generated fixtures in test suite
- Switch to Webmock in test suite
- Remove erroneously added list methods for
Source
model
- Disallow sending protected fields along with API resource
.update
- Add retrieve method for 3-D Secure resources
- Improve
StripeObject
's#to_s
to better handle how embedded objects are displayed
- Fix (fairly serious) memory like in
StripeObject
- Add accessors for new fields added in
#update_attributes
- Handle multi-plan subscriptions through new subscription items
- Handle 403 status codes from the API
Identical to 1.56.0 above. I incorrectly cut a patch-level release.
- Add support for Apple Pay domains
- Whitelist errors that should be retried; scope to known socket and HTTP errors
- Relax version constraint on rest-client (and by extension mime-types) for users on Ruby 2+
- Make sure
Subscription
'ssource
is saved with its parent
- Make sure
Account
'sexternal_account
is saved with its parent
- Error when an array of maps is detected that cannot be accurately encoded
- Start using strings for header names instead of symbols for better clarity
- Fix encoding of arrays of maps where maps unequal sets of keys
- Allow sources to be created
- Add top-level
Source
model
- Add
ThreeDSecure
model for 3-D secure payments
- Allow rest-client version 2.0+ to be used with the gem
- Allow retry when a 409 conflict is encountered
- Do not send subresources when updating except when explicitly told to do so (see #433)
- Add
update
class method to all resources that can be updated
- Fix type of resource returned from
Order#return_order
- Allow Relay orders to be returned and add associated types
- Support Alipay account retrieval and deletion
- Add support for the new /v1/subscriptions endpoint (retrieve, list, create, update, and delete)
- Add global
stripe_account
option that adds aStripe-Account
header to all requests
- Fix bug that omitted subresources from serialization
- Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1
- Allow
opts
to be passed to an API resource's#save
method
- Add
Account#reject
to support the new API feature
- Fix reference to non-existent
#url
inListObject
- Fix serialization when subhash given to
#save
or#update_attributes
- Add
CountrySpec
model for looking up country payment information
- Add compatibility layer for old API versions on
Charge#refund
- Allow CA cert bundle location to be configured
- Updated bundled CA certs
- Add support for deleting products and SKUs
- Pass through arguments of
Charge#refund
- Re-implement
Charge#refund
helper to use the modern endpoint suggested by docs
- Fix bug where ivar left uninitialized in StripeObject could error on serialization
- Fix bug where a nil customer from API could error Bitcoin model on refresh
- Add configuration to optionally retry network failures
- Use modern API endpoint for producing application fee refunds
- Add BankAccount#verify convenience method
- Fix bug where arrays that were not
additional_owners
were not properly encoded for requests
- Fix bug where
opts
didn't properly propagate to descendantStripeObjects
- Fix bug that prevent lists of hashes from being URI-encoded properly
- Fix bug where filter conditions were not making it past the first instantiated
ListObject
- Add
StripeObject#deleted?
for a reliable way to check whether an object is alive - Deprecate
StripeObject#refresh_from
- New parameter encoding scheme that doesn't use
URI.escape
- Fix bug where ampersands were not being properly encoded
- Add pagination helpers
#auto_paging_each
,#previous_page
, and#next_page
- Fix URI being referenced by file upload resources
- Make StripeObject's #save "upsert"-like; creates an object if new
- Add #update_attributes to StripeObject for safe mass assignment
- Properly mass assign attributes on calls to #save
- Add question mark helpers for boolean fields (e.g. #paid? as well as old #paid)
- Fix a bug that broke the API for StripeObject initialization
- Remove use of deprecated URI.escape
- Correct the URLs used to fetch Bitcoin transactions.
- Use hash rockets for backwards compatibility.
- Add Orders, Products, and SKUs for Relay
- Add support for 429 Rate Limited response
- Added support for refund listing and retrieval without an associated charge
- Added support for deleting managed accounts
- Added support for dispute listing and retrieval
- Bugfix: token objects now are the correct class
- Added request IDs and HTTP headers to errors
- Added support for bank accounts and debit cards in managed accounts (via the
external_accounts
param)
- Remove TLS cert revocation check (all pre-heartbleed certs have expired)
- Bugfix: don't unset keys when they don't exist on StripeObject
- Raise an error when explicitly passing nil as the API key on resource methods
- Fix error when passing an API key to Balance.retrieve (github issue #232)
- Fixed error when updating certain resources (github issue #224)
- Added support for updating nested hashes besides
metadata
(which was already supported) - Fixed bug in balance retrieval
- Updated Card to point to customer sources endpoint when customer property is set
- Added Update & Delete operations to Bitcoin Receivers
- Fixed fetching upcoming invoice/paying invoice methods
- Support for new Transfers /reversals endpoint
- Account retrieval now optionally accepts an account ID
- Better support for passing custom headers, like Stripe-Account, through requests
- 1 major enhancement:
- Added support for making bitcoin charges through BitcoinReceiver source object
- 1 bugfix:
- Fixed API key propagation for ApplicationFee#refund
- 1 bugfix:
- Fixed API key propagation for child resources
- 2 minor enhacements:
- Fixed dependencies for Ruby versions less than 1.9.3
- Added deauthorize method to Account object
- 1 major enhacement:
- File uploads resource was added (for uploading pdf or image documents for disputes)
- 2 minor enhancements:
- Ability to send idempotent requests
- Ability to specify stripe account as a header
- 1 minor enhacement:
- Coupons now support update operations - useful for manipulating metadata
- 1 major enhacement:
- Application Fee refunds now a list instead of array
- 1 major enhancement:
- Add metadata for refunds and disputes
- 1 major enhancement:
- Support for canceling transfers
- 1 major enhancement:
- Support for cards for recipients
- 2 minor enhancements:
- Update included ca bundles
- Implement certificate blacklisting
- 1 minor enhancement:
- Add create_subscription on Customer resources, so you can create subscriptions without needing to retrieve the customer first (github issue #120)
- 1 bugfix:
- Fix marshaling of StripeObjects
-
2 major enhancements
- Support for multiple subscriptions per customer
- Testing ruby 2.1.0
-
2 minor enhancements
- Replace multi_json with json
- Allow #save to take opts (for :expand)
-
1 bugfix
- Fix #try and #respond_to? on StripeObjects
- 1 major enhancement
- Add ApplicationFee resource
- 2 bugfixes:
- Fix gemspec dependencies so the gem doesn't break for Ruby 1.8 users
- Fix api_resource_test to not use returns as a way of testing rescue behavior
- 1 major enhancement
- Add support for metadata on resources
- 1 minor enhancement
- Add support for closing disputes.
- 1 major enhancement
- Add Balance and BalanceTransaction resources
- 1 major enhancement
- Add support for unsetting attributes by setting to nil. This permits unsetting email and description on customers and description on charges. Setting properties to a blank string is now an error.
- Attempting to set an object's id is now an error
- 1 major enhancement
- Add support for new cards API (Stripe API version - 2013-07-05)
- 1 bugfix:
- Fix handling of per-call API keys (github issue #67)
-
3 minor enhancements:
- Use to_sym instead of type checking for minor performance improvement (github issue #59)
- Handle low-memory situations without throwing an exception (github issue #61)
- Add an Customer#upcoming_invoice convenience method (github issue #65)
-
1 bugfix:
- Allow updating resources without first retrieving them (github issue #60)
- 1 minor enhancement:
- Add support for specifying an API key when retrieving an upcoming invoice
- 1 major enhancement:
- Add new Recipient resource
- Allow Transfers to be createable
- 1 minor enhancement
- Add 'id' to the list of permanent attributes
- 1 major enhancement
- Add support for passing options when retrieving Stripe objects e.g., Stripe::Charge.retrieve({id:"foo", expand:["customer"]}) Stripe::Charge("foo") is still supported as well
- 1 major enhancement
- Add support for setting a Stripe API version override.
- 1 bugfix
- Relax the version constraint on multi_json (github issue #44)
-
1 minor enhancement:
- Add support for updating charge disputes
-
1 bugfix
- Fix Account API resource bug
- 1 major enhancement
- Add support for creating invoices
- 1 major enhancement
- Add support for new API lists
- 1 bugfix
- Fix bug introduced in 1.7.3 calling API methods that take no arguments, like Stripe::Invoice#pay (github issue #42)
- 2 bugfixes
- Make sure that both keys and values of GET params are URL-encoded. NOTE: If you were previously URL-encoding values yourself, you may need to adjust your code.
- URL-encode POST params directly, instead of allowing rest-client to do it to work around an unfortunate interaction with the hashery gem (github issue #38)
- 1 major enhancement
- Add support for new pay and update methods for Invoice objects
- 1 major enhancement
- Add new Account API resource
-
3 major enhancements:
- Switch from vendored stripe-json to multi_json for all JSON parsing and rendering. This should not impact programmatic usage of the library, but may cause small rendering differences from, e.g., StripeObject#inspect (github issue #22)
- Add new delete_discount method to Customer objects
- Add new Transfer API resource
-
2 minor enhancements:
- Switch from HTTP Basic auth to Bearer auth (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward)
- Numerous test suite improvements
- 1 bugfix:
- Encode GET query strings ourselves instead of using rest-client to work around a bug
- 1 bugfix:
- Correct argument handling in StripeObject#as_json
- 1 bugfix:
- Fix StripeObject#inspect when ActiveSupport 3.0 is loaded
- A whole bunch of releases between 1.5.0 and 1.6.0, but few changes, mainly the addition of plans, coupons, events, and tokens
- 1.6.0 also contains a new inspect/to_string implementation
- 1 major enhancement:
- Update for new RESTful API
- 1 major enhancement:
- Rename to Stripe
- 1 major enhancement:
- Support for the set_customer_subscription and delete_customer API methods
- 1 major enhancement:
- Support for recurring billing
- 1 major enhancement:
- Initial release