- #1060 Improve PHPDocs for
Discount
- #1059 Upgrade PHPStan to 0.12.59
- #1057 Bump PHP-CS-Fixer and update code
- #1054 Improve error message for invalid keys in StripeClient
- #1053 Update PHPDocs
- #1050 Added constants for
proration_behavior
onSubscription
- #1049 Update PHPDocs
- #1030 Add support for
jp_rn
andru_kpp
as atype
onTaxId
- #1027 Warn if opts are in params
- #1026 Add support for the Payout Reverse API
- #1020 Add support for the
SetupAttempt
resource and List API
- #1019 Update PHPDocs
- #1018 Multiple API changes
- Updated PHPDocs
- Added
TYPE_CONTRIBUTION
as a constant onBalanceTransaction
- #1017 Updated PHPDoc
- #1015 Bugfix: don't error on systems with php_uname in disablefunctions with whitespace
- #1016 Updated PHPDocs
- #1010 Update PHPDocs
- #1007 Multiple API changes
- Add support for the Issuing Dispute Submit API
- Add constants for
payment_status
on CheckoutSession
- #1003 Add trim to getSignatures to allow for leading whitespace.
- #1005 Updated PHPDocs
- #998 PHPDocs updated
- #994 Nullable balance_transactions on issuing disputes
- #991 Fix invalid return types in OAuthService
- #990 PHPdoc changes
- #989 Add support for the
PromotionCode
resource and APIs
- #981 PHPdoc updates
- #948 Add
first()
andlast()
functions toCollection
- #975 Add support for
political_exposure
onPerson
- #974 Add new constants for
purpose
onFile
- #973 Multiple PHPDoc fixes
- #971 Adds enum values for
billing_address_collection
on CheckoutSession
- #964 Add OAuthService
- #960 Add constants for
payment_behavior
onSubscription
- #959 Add multiple constants missing for
Event
- #957 Updated PHPDocs
- #952 Improve PHPDoc
- #950 Add support for
id_npwp
andmy_frp
astype
onTaxId
- #946 Update PHPDoc
- #937 Add support for
ae_trn
,cl_tin
andsa_vat
astype
onTaxId
- #936 Add
anticipation_repayment
as atype
onBalanceTransaction
- #934 Add support for
issuing_dispute
as atype
onBalanceTransaction
- #933 Services bugfix: convert nested null params to empty strings
- #771 Introduce client/services API. The migration guide contains before & after examples of the backwards-compatible changes.
- #932 Fix multiple PHPDoc
- #931 Add support for the
LineItem
resource and APIs
- #927 Add support for new tax IDs
- #924 Add support for the
Price
resource and APIs
- #920 Add support for the
Session
resource and APIs on theBillingPortal
namespace
- #915 Improve PHPdocs for many classes
- #912 Preserve backwards compatibility for typoed
TYPE_ADJUSTEMENT
enum. - #911 Codegenerated PHPDoc for nested resources
- #902 Update docstrings for nested resources
- #899 Convert keys to strings in
StripeObject::toArray()
- #894 Multiple PHPDocs changes
- #890 Update PHPdoc
- #889 Add new constants for
type
onTaxId
- #879 Make
\Stripe\Collection
implement\Countable
- #875 Last set of PHP-CS-Fixer updates
- #874 Enable php_unit_internal_class rule
- #873 Add support for phpDocumentor in Makefile
- #872 Another batch of PHP-CS-Fixer rule updates
- #871 Fix a few PHPDoc comments
- #870 More PHP-CS-Fixer tweaks
- #860 Add PHPDoc types for expandable fields
- #858 Use
native_function_invocation
PHPStan rule - #857 Update PHPDoc on nested resources
- #855 PHPDoc:
StripeObject
->ErrorObject
where appropriate - #837 Autogen diff
- #854 Upgrade PHPStan and fix settings
- #850 Yet more PHPDoc updates
- #840 Update phpdocs across multiple resources.
- #839 Add support for
TYPE_ES_CIF
onTaxId
- #836 Add new type values for
TaxId
- #831 Fix incorrect
UnexpectedValueException
instantiation
- #830 Add support for
CreditNoteLineItem
- #829 Don't call php_uname function if disabled by php.ini
- #821 Improve PHPDoc types for
ApiErrorException.get/setJsonBody()
methods
- #824 Add constant
TYPE_SG_UEN
toTaxId
- #816 Disable autoloader when checking for
Throwable
- #812 Fix invalid PHPdoc on
Subscription
- #811 Add support for
CreditNote
preview.
- #808 Add support for listing lines on an Invoice directly via
Invoice::allLines()
- #805 Add Source::allSourceTransactions and SubscriptionItem::allUsageRecordSummaries
- #798 The argument of
array_key_exists
cannot benull
- #803 Removed unwanted got
- #797 Add support for reverse pagination
- #795 Add support for
Mandate
- #770 Add missing constants for Customer's
TaxId
- #768 Redact API key in
RequestOptions
debug info
- #764 Add support for HTTP request monitoring callback
- #755 Respect Stripe-Should-Retry and Retry-After headers
- #752 Add
payment_intent.canceled
andsetup_intent.canceled
events - #749 Call
toArray()
on objects only
- #746 Add missing decline codes
- #744 Added new PHPDoc
- #738 Added missing constants for
SetupIntent
events
- #737 Added new PHPDoc
- #736 Make
CaseInsensitiveArray
countable and traversable
- #729 Fix usage of
SignatureVerificationException
in PHPDoc blocks
- #728 Clean up Collection
Major version release. The migration guide contains a detailed list of backwards-incompatible changes with upgrade instructions.
Pull requests included in this release (cf. #552) (
⚠️ Drop support for PHP 5.4 (#551)⚠️ Drop support for PHP 5.5 (#554)- Bump dependencies (#553)
- Remove
CURLFile
check (#555) - Update constant definitions for PHP >= 5.6 (#556)
⚠️ RemoveFileUpload
alias (#557)- Remove
curl_reset
check (#570) - Use
\Stripe\<class>::class
constant instead of strings (#643) - Use
array_column
to flatten params (#686) ⚠️ Remove deprecated methods (#692)⚠️ RemoveIssuerFraudRecord
(#696)- Update constructors of Stripe exception classes (#559)
- Fix remaining TODOs (#700)
- Use yield for autopagination (#703)
⚠️ Rename fake magic methods and rewrite array conversion (#704)- Add
ErrorObject
to Stripe exceptions (#705) - Start using PHP CS Fixer (#706)
- Update error messages for nested resource operations (#708)
- Upgrade retry logic (#707)
⚠️ Collection
improvements / fixes (#715)⚠️ Modernize exceptions (#709)- Add constants for error codes (#716)
- Update certificate bundle (#717)
- Retry requests on a 429 that's a lock timeout (#718)
- Fix
toArray()
calls (#719) - Couple of fixes for PHP 7.4 (#725)
- #722 Make
LoggerInterface::error
compatible with its PSR-3 counterpart - #714 Add
pending_setup_intent
property inSubscription
- #713 Add typehint to
ApiResponse
- #712 Fix comment
- #701 Start testing PHP 7.3
- #694 Add
SubscriptionItem::createUsageRecord
method
- #688 Remove
SubscriptionScheduleRevision
- Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused.
- #683 Move the List Balance History API to
/v1/balance_transactions
- #675 Add support for
SetupIntent
resource and APIs
- #676 Fix exception message in
CustomerBalanceTransaction::update()
- #674 Add new constants for
collection_method
onInvoice
- #673 Enable request latency telemetry by default
- #649 Add support for
CustomerBalanceTransaction
resource and APIs
- #670 Add new PHPDoc
- #663 Add support for
radar.early_fraud_warning
resource
- #655 Add constants for payment intent statuses
- #659 Fix PHPDoc for various nested Account actions
- #660 Fix various PHPDoc
- #658 Use absolute value when checking timestamp tolerance
- #651 Add support for the Capability resource and APIs
- #654 Fix typo in definition of
Event::PAYMENT_METHOD_ATTACHED
constant
- #647 Set the return type to static for more operations
- #650 Add missing constants for Event types
- #644 Update return type to
static
to improve static analysis - #645 Fix constant for
payment_intent.payment_failed
- #642 Fix an issue where existing idempotency keys would be overwritten when using automatic retries
- #640 Add missing phpdocs
- #630 Add support for the
TaxId
resource and APIs
- #636 Correct type of
$personId
in PHPDoc
- #621 Add support for
CreditNote
- #624 Fix encoding of nested parameters in multipart requests
- #623 Only use HTTP/2 with curl >= 7.60.0
- #619 Fix PHPDoc return types for list methods for nested resources
- #600 Add support for the
PaymentMethod
resource and APIs - #606 Add support for retrieving a Checkout
Session
- #611 Add support for deleting a Terminal
Location
andReader
- #607 Correctly handle case where a metadata key is called
metadata
- #602 Add
subscription_schedule
toSubscription
for PHPDoc.
- #603 Improve PHPDoc on the
Source
object to cover all types of Sources currently supported.
- #601 Fix PHPDoc across multiple resources and add support for new events.
- #599 Fix PHPDoc for
SubscriptionSchedule
andSubscriptionScheduleRevision
- #590 Add support for
SubscriptionSchedule
andSubscriptionScheduleRevision
- #592 Some more PHPDoc fixes
- #591 Fix PHPDoc for nested resources
- #579 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.
- #580 Properly serialize
individual
onAccount
objects
- #576 Add support for iterating directly over
Collection
instances
- #571 Add support for the
CheckoutSession
resource
- #568 Enable persistent connections
- #567 Add support for account links
- #562 Add support for the Review resource
- #564 Add event name constants for subscription schedule aborted/expiring
- #542 Add support for
ValueList
andValueListItem
for Radar
- #561 Add cast and some docs to telemetry introduced in 6.22.0/549
- #549 Add support for client telemetry
- #548 Don't mutate
Exception
class properties fromOAuthBase
error
- #537 Add new API endpoints for the
Invoice
resource.
- #546 Drop files from the Composer package that aren't needed in the release
- #539 Fix methods on
\Stripe\PaymentIntent
to properly pass arguments to the API.
- #534 Fix PSR-4 autoloading for
\Stripe\FileUpload
class alias
- #530 Add constants for
flow
(FLOW_*
),status
(STATUS_*
) andusage
(USAGE_*
) on\Stripe\Source
- #531 Store HTTP response headers in case-insensitive array
- #526 Ignore null values in request parameters
- #523 Add support for Stripe Terminal
- #520 Rename
\Stripe\FileUpload
to\Stripe\File
- #522 Fix warning when adding a new additional owner to an existing array
- #517 Integer-index encode all sequential arrays
- #514 Add support for reporting resources
- #509 Add support for usage record summaries
- #504 Add cancel support for topups
- #505 Add support for file links
- #502 Add
isDeleted()
method to\Stripe\StripeObject
- #501 Add support for scheduled query runs (
\Stripe\Sigma\ScheduledQueryRun
) for Sigma
- #500 Add support for Stripe Issuing
- #498 Internal improvements to the
\Stripe\ApiResource.classUrl()
method
- #497 Use HTTP/2 only for HTTPS requests
- #494 Enable HTTP/2 support
- #493 Add PHPDoc for
auto_advance
on\Stripe\Invoice
- #488 Add support for
$appPartnerId
toStripe::setAppInfo()
- #487 Add support for payment intents
- #486 Make
Account.deauthorize()
return theStripeObject
from the API
- #472 Added phpDoc for
ApiRequestor
and others, especially regarding thrown errors
- #481 Add new
\Stripe\Discount
and\Stripe\OrderItem
classes, add more PHPDoc describing object attributes
- #480 PHPDoc changes for API version 2018-05-21 and the addition of the new
CHARGE_EXPIRED
event type
- #479 Fix unnecessary traits on
\Stripe\InvoiceLineItem
- #471 Add
OBJECT_NAME
constant to all API resource classes, add\Stripe\InvoiceLineItem
class
- #468 Update fields in PHP docs for accuracy
- #466 Add support for issuer fraud records
- #460 Add support for flexible billing primitives
- #461 Don't zero keys on non-
metadata
subobjects
- #458 Add PHPDoc for
account
on\Stripe\Event
- #453 Add constants for
reason
(REASON_*
) andstatus
(STATUS_*
) on\Stripe\Dispute
- #452 Add PHPDoc for
amount_paid
andamount_remaining
on\Stripe\Invoice
- #443 Add event types as constants to
\Stripe\Event
class
- #450 Add support for
code
attribute on all Stripe exceptions
Major version release. List of backwards incompatible changes to watch out for:
- The minimum PHP version is now 5.4.0. If you're using PHP 5.3 or older, consider upgrading to a more recent version.
\Stripe\AttachedObject
no longer exists. Attributes that used to be instances of\Stripe\AttachedObject
(such asmetadata
) are now instances of\Stripe\StripeObject
.
- Attributes that used to be PHP arrays (such as
legal_entity->additional_owners
on\Stripe\Account
instances) are now instances of\Stripe\StripeObject
, except when they are empty.\Stripe\StripeObject
has array semantics so this should not be an issue unless you are actively checking types.
\Stripe\Collection
now derives from\Stripe\StripeObject
rather than from\Stripe\ApiResource
.
Pull requests included in this release:
- #410 Drop support for PHP 5.3
- #411 Use traits for common API operations
- #414 Use short array syntax
- #404 Fix serialization logic
- #417 Remove
ExternalAccount
class - #418 Increase test coverage
- #421 Update CA bundle and add script for future updates
- #422 Use vendored CA bundle for all requests
- #428 Support for automatic request retries
- #431 Update PHPDoc @property tags for latest API version
- #427 Add and update PHPDoc @property tags on all API resources
- #403 Add
__debugInfo()
magic method toStripeObject
- #390 Remove some unsupported API methods
- #391 Alphabetize the list of API resources in
Util::convertToStripeObject()
and add missing resources - #393 Fix expiry date update for card sources
- #386 Support for exchange rates APIs
- #387 Allow
personal_address_kana
andpersonal_address_kanji
to be updated on an account
- #385 Support for listing source transactions
- #383 Add static methods to manipulate resources from parent
Account
gains methods for external accounts and login links (e.g.createExternalAccount
,createLoginLink
)ApplicationFee
gains methods for refundsCustomer
gains methods for sourcesTransfer
gains methods for reversals
- #378 Rename source
delete
todetach
(and deprecate the former)
- Add PHPDoc for
Card
- Fix deserialization mapping of
FileUpload
objects
- Serialized
shipping
nested attribute
- Add support for
InvalidClient
OAuth error
- Allow
address_kana
andaddress_kanji
to be updated for custom accounts
- Fix documented return type of
autoPagingIterator()
(was missing namespace)
- Fix order returns to use the right URL
/v1/order_returns
- Add support for OAuth
pay
on invoice now takes params as well as opts
- Add support for ephemeral keys
- Clients can implement
getUserAgentInfo()
to add additional user agent information
- Implement
Countable
forAttachedObject
(metadata
andadditional_owners
)
- Add support for login links
- Fix docs to include arrays on
$id
parameter for retrieve methods
- Support for checking webhook signatures
- Allow nested field
payout_schedule
to be updated
- Add
\Stripe\Stripe::setLogger()
to support an external PSR-3 compatible logger
- Add support for payouts and recipient transfers
- Please see 4.7.0 instead (no-op release)
- Remove hard dependency on cURL
- Support for detaching sources from customers
- Correct handling of
owner
parameter when updating sources
- Correct the error check on a bad JSON decoding
- Add support for updating sources
- Add support for verifying sources
- Add retrieve method for 3-D Secure resources
- Add docblock with model properties for
Plan
- Support for 403 status codes (permission denied)
- Fix transfer reversal materialization
- Fixes for some property definitions in docblocks
- Support for subscription items
- Drop attempt to force TLS 1.2: please note that this could be breaking if you're using old OS distributions or packages and upgraded recently (so please make sure to test your integration!)
- Add support for Apple Pay domains
- Add
Stripe::setAppInfo
to allow plugins to register user agent information
- Add
Source
model for generic payment sources
- Add
getDeclineCode
to card errors
- Opt requests directly into TLS 1.2 where OpenSSL >= 1.0.1 (see #277 for context)
- Add new
STATUS_
constants for subscriptions
- Fix auto-paging iterator so that it plays nicely with
iterator_to_array
- Add field annotations to model classes for better editor hinting
- Add
ThreeDSecure
model for 3-D secure payments
- Add static
update
method to all resources that can be changed.
- Make sure that cURL never sends
Expects: 100-continue
, even on large request bodies
- Add
inventory
underSKU
to list of keys that have nested data and can be updated
- Fix some inconsistencies in PHPDoc
- Add support for returning Relay orders
- Add
list
,create
,update
,retrieve
, anddelete
methods to the Subscription class
- Additional check on value arrays for some extra safety
- Fix bug
refreshFrom
onStripeObject
would not take an$opts
array - Fix bug where
$opts
not passed to parentsave
method inAccount
- Fix bug where non-existent variable was referenced in
reverse
inTransfer
- Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1
- Allow
CurlClient
to be initialized with defaultCURLOPT_*
options
- Fix bug where request params and options were ignored in
ApplicationFee
'srefund.
- Add
reject
onAccount
to support the new API feature
- Fix error when an object's metadata is set more than once
- Fix encoding behavior of nested arrays for requests (see #227)
- Add automatic pagination mechanism with
autoPagingIterator()
- Allow global account ID to be set with
Stripe::setAccountId()
- Add
CountrySpec
model for looking up country payment information
- Update bundled CA certs
- Support deleting Relay products and SKUs
- Allow configuration of HTTP client timeouts
- Add a verification routine for external accounts
- Products, SKUs, and Orders -- https://stripe.com/relay
- Add support for 429 Rate Limit response
- Add refund listing and retrieval without an associated charge
- Add dispute listing and retrieval
- Add support for manage account deletion
- Rename
\Stripe\Object
to\Stripe\StripeObject
(PHP 7 compatibility) - Rename
getCode
andgetParam
in exceptions togetStripeCode
andgetStripeParam
- Add support for calling
json_encode
on Stripe objects in PHP 5.4+ - Start supporting/testing PHP 7
- Add request ID to all Stripe exceptions
- Add support for Alipay accounts as sources
- Add support for bank accounts as sources (private beta)
- Add support for bank accounts and cards as external_accounts on Account objects
- Fix CA certificate file path (thanks @lphilps & @matthewarkin)
- Fix to account updating to permit
tos_acceptance
andpersonal_address
to be set properly - Fix to Transfer reversal creation (thanks @neatness!)
- Network requests are now done through a swappable class for easier mocking
- Remove SSL cert revokation checking (all pre-Heartbleed certs have expired)
- Bug fixes to account updating
- Support transfer reversals
- Support new API version (2015-02-18)
- Added Bitcoin Receiever update and delete actions
- Edited tests to prefer "source" over "card" as per new API version
- Fix to fetching endpoints that use a non-default baseUrl (
FileUpload
)
- Bumped minimum version to 5.3.3
- Switched to Stripe namespace instead of Stripe_ class name prefiexes (thanks @chadicus!)
- Switched tests to PHPUnit (thanks @chadicus!)
- Switched style guide to PSR2 (thanks @chadicus!)
- Added $opts hash to the end of most methods: this permits passing 'idempotency_key', 'stripe_account', or 'stripe_version'. The last 2 will persist across multiple object loads.
- Added support for retrieving Account by ID
- Support making bitcoin charges through BitcoinReceiver source object
- Adding support for creating file uploads.
- Saving objects fetched with a custom key now works (thanks @JustinHook & @jpasilan)
- Added methods for reporting charges as safe or fraudulent and for specifying the reason for refunds
- Better handling of HHVM support for SSL certificate blacklist checking.
- Coupons now are backed by a
Stripe_Coupon
instead ofStripe_Object
, and support updating metadata - Running operations (
create
,retrieve
,all
) on upcoming invoice items now works
- Requests now send Content-Type header
- Application Fee refunds now a list instead of array
- HHVM now works
- Small bug fixes (thanks @bencromwell & @fastest963)
__toString
now returns the name of the object in addition to its JSON representation
- Add metadata for refunds and disputes
- Support canceling transfers
- Support cards for recipients.
- Fix bug in account resource where
id
wasn't in the result
- Add support for certificate blacklisting
- Update ca bundle
- Drop support for HHVM (Temporarily)
- Add Stripe_RateLimitError for catching rate limit errors.
- Update to Zend coding style (thanks, @jpiasetz)
- Add support for multiple subscriptions per customer
- Add new ApplicationFee
- Fix a bug where a null nestable object causes warnings to fire.
- Add support for metadata API.
- Add support for closing disputes.
- Add new Balance and BalanceTransaction
- Add support for unsetting attributes by updating to NULL. Setting properties to a blank string is now an error.
- Add support for multiple cards API (Stripe API version 2013-07-12: https://stripe.com/docs/upgrades#2013-07-05)
- Allow Transfers to be creatable
- Add new Recipient resource
- Add 'id' to the list of permanent object attributes
- Don't re-encode strings that are already encoded in UTF-8. If you were previously using plan or coupon objects with UTF-8 IDs, they may have been treated as ISO-8859-1 (Latin-1) and encoded to UTF-8 a 2nd time. You may now need to pass the IDs to utf8_encode before passing them to Stripe_Plan::retrieve or Stripe_Coupon::retrieve.
- Ensure that all input is encoded in UTF-8 before submitting it to Stripe's servers. (github issue #27)
- Add support for passing options when retrieving Stripe objects e.g., Stripe_Charge::retrieve(array("id"=>"foo", "expand" => array("customer"))); Stripe_Charge::retrieve("foo") will continue to work
- Add support for setting a Stripe API version override
- Version bump to cleanup constants and such (fix issue #26)
- Add support for updating charge disputes.
- Fix bug preventing retrieval of null attributes
- Fix usage under autoloaders such as the one generated by composer (fix issue #22)
- Add support for creating invoices.
- Add support for new invoice lines return format
- Add support for new list objects
- Get all of the various version numbers in the repo in sync (no other changes)
- Add update and pay methods to Invoice resource
- Change internal function names so that Stripe_SingletonApiRequest is E_STRICT-clean (github issue #16)
- Bugfix so that Stripe objects (e.g. Customer, Charge objects) used in API calls are transparently converted to their object IDs
- Add new Account resource
- Make clearer that you should be including lib/Stripe.php, not test/Stripe.php (github issue #14)
- Add missing argument to Stripe_InvalidRequestError constructor in Stripe_ApiResource::instanceUrl. Fixes a warning when Stripe_ApiResource::instanceUrl is called on a resource with no ID (fix issue #12)
- Support Composer and Packagist (github issue #9)
- Add new deleteDiscount method to Stripe_Customer
- Add new Transfer resource
- Switch from using 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