stripe-node: stripe.charge.list missing metadata

When I called stripe.charges.list(filter, callback);

I get a full list of charges complete with metadata.

However, when i call stripe.charges.list(filter, {stripe_account: accountId}, callback);

to get a subset of charges from the managed account, I am getting the charges without the metadata.

How can I get the metadata in the second example?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 34 (16 by maintainers)

Most upvoted comments

To close the loop here, we’ve decided to remove this undocumented parameter.

You should be able to do something roughly equivalent by listing transfers to the destination account, and expanding the charge that is the source_transaction. (If you create transfers directly, this query will include both these transfers as well as transfers created as part of the destination charge. You’d need to filter the first type out on the client side by ensuring that transfer.source_transaction.transfer == transfer.id if you need exactly the same behaviour as before.)

We’ll be reaching out to the accounts currently using this parameter to let them know it’s going away but I wanted to flag this here. We’ll provide a more detailed timeframe for turning this off, but our current plans are to remove the parameter completely on May 10th.

@matthewarkin Thanks for the advice but I must ‘charge through the platform’ to apply application fee and use managed account.

Base on your explanation, I will try to expand on the charge id and see what I get.

Will report back.


UPDATE: It doesnt work. I was expecting the returned objects has a charge id which I can expand on but they dont. Essentially they are all payment objects returned as charge object because their id start with ‘py_’ instead of ‘ch_’ when you call the same api without the {stripe_account: accountId}

I think this qualifies as a bug. We called charge list and we got payment back.