Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Plan with ID of "0" returns Stripe_plan object without "id" key #55

kressaty opened this Issue · 2 comments

3 participants


I have a Stripe plan that has ID "0" that was created in the interface. When I request this plan with Stripe_Plan::all(), the plan with that ID is returned without an "id" key in _values. Not sure where to look in the request stack to figure this out, guessing it's being unset somewhere checking for false values? Or perhaps I'm just ignoring something obvious.


You should step through in the debugger to see if the "id" is ever set. I'd be curious to see if there really is a "==" somewhere that treats "0" as "false".

@KorvinSzanto KorvinSzanto referenced this issue from a commit in KorvinSzanto/stripe-php
@KorvinSzanto KorvinSzanto Allow falsy ID for plans
I encountered this issue, and saw that this was already reported in #55.
The fix I've included will solve the issue, but might impact other things, so this should be tested carefully.

Fixed via your PR. I also updated the test to not require the ID to exist or not exist, which was causing intermittent failures.

@bkrausz bkrausz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.