From 8856f781eae2355c02e83e6a7959ed87c8649edb Mon Sep 17 00:00:00 2001 From: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com> Date: Wed, 24 Aug 2022 09:26:34 -0700 Subject: [PATCH] Add beta readme.md section (#1356) --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f7b9192b3..4dfb40420 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,6 @@ classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Stripe API. -## Support - -New features and bug fixes are released on the latest major version of the Stripe PHP 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. - ## Requirements PHP 5.6.0 and later. @@ -89,7 +85,8 @@ Otherwise, you can download v5.9.2 ([zip](https://github.com/stripe/stripe-php/a ## Custom Request Timeouts -_NOTE:_ We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/?lang=php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic. +> **Note** +> We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/?lang=php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic. To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient. @@ -203,6 +200,32 @@ You can disable this behavior if you prefer: \Stripe\Stripe::setEnableTelemetry(false); ``` +### Beta SDKs + +Stripe has features in the beta phase that can be accessed via the beta version of this package. +We would love for you to try these and share feedback with us before these features reach the stable phase. +Use the `composer require` command with an exact version specified to install the beta version of the stripe-php pacakge. + + +```bash +composer require stripe/stripe-php:v9.2.0-beta.1 +``` + +> **Note** +> There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your composer.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version. + +We 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. + +If your beta feature requires a `Stripe-Version` header to be sent, use the `apiVersion` property of `config` object to set it: + +```php +Stripe::setApiVersion(Stripe::getApiVersion() . '; feature_beta=v3'); +``` + +## Support + +New features and bug fixes are released on the latest major version of the Stripe PHP 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. + ## Development Get [Composer][composer]. For example, on Mac OS: