Objects Not Expanding

435 views
Skip to first unread message

gravity+ Support

unread,
Feb 4, 2014, 9:38:01 PM2/4/14
to api-d...@lists.stripe.com
Hi :-)

The API docs say that the 'expand' parameter is available on all API requests, however we are receiving an invalid request error both with curl and the Stripe PHP library on select API calls when trying to expand objects, on the latest version of the API.

For example, the customer object will not expand when creating a subscription or retrieving an upcoming invoice, but it will expand when retrieving a list of invoices. We have not tried all of the API calls to see which ones work and which ones don't, though.

For curl, we pass -d "expand[]=charge" and for PHP —
$cu->subscriptions->create(array("plan" => "foo", "expand"=>array("customer")));

-Edward




{#HS:21011111-828#}
 

Powered by Help Scout



Jim Danz

unread,
Feb 4, 2014, 10:26:42 PM2/4/14
to api-d...@lists.stripe.com
Hi Edward,

The customer subscription creation customer expansion issue is a known bug that we just learned about a couple of days ago from one of your teammates.  We are tracking it as an active bug and will follow up soon when a fix is it out.

I am not able to confirm the issue for the case of retrieving an upcoming invoice.  For instance, the following works fine for me:

{
  "date": 1391747401,
  "period_start": 1391142601,
  "period_end": 1391747401,
  "lines": {
    ...
  },
  "subtotal": 1000,
  "total": 1000,
  "customer": {
    "object": "customer",
    "created": 1386908966,
    "id": "cus_371dzXnTn4WH42",
    "livemode": false,
    "description": "Jimbo Dimbo
   ...
 },
....
}

Jim


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Jim Danz

unread,
Feb 16, 2014, 11:39:14 PM2/16/14
to api-d...@lists.stripe.com
Just to close the loop on this, we've now fixed the bug that was preventing customer from being expandable on subscription creation.
Reply all
Reply to author
Forward
0 new messages