#benjamin_the_fool

1 messages · Page 1 of 1 (latest)

noble quiverBOT
ruby abyss
#

Hi 👋 I don't believe so. It sounds like you're using a flow that leverages Destination Charges, so I think an easier approach would be to:

  1. List all Payment Intents or Charges that you created on the Platform account, where you can filter by Customer easily
  2. Step through the results and see which ones have a destination that matches the ID of the Connected Account
valid tinsel
#

Thanks for the response - Just making sure I understand you: I should get all Platform charges from stripe.Charge.list(cusomter='cus_...') specifically not filtering by an individual stripe_account, but supplying the id of the customer in question? Will the list of platform charges have access to the customer ids in each connected account?

I'll test this in the meantimme

ruby abyss
valid tinsel
#

Sorry! I'm sure i'm fumbling some of the terminology. I'm almost sure we're using a dest. charges flow

#

But when I look at the dashboard I see there are no customers in the connected account, and many in the platform account... So maybe we're using option B?

ruby abyss
#

Gotcha, with Destination flows it is expected for all of the core objects for processing payments to be on the Platform Account, this will include your Customers, their Payment Methods, the Payment Intents or Charges you're creating, etc because the payments are made and settle on the Platform account. The objects that will be put in the Connected Account are only for moving funds from the Platform to the Connected Account.

So it is expected for there to be no Customers in your Connected Accounts, and no Customers to be included on Charge objects in those accounts.

#

(If you were cloning Payment Methods to your Connected Account, we would expect to also see Customers in the Connected Account for those Payment Methods to be attached to)

valid tinsel
#

Ok thanks for clarifying. So we are using the Destination flow. Ultimately I'm trying to replicate the "Payments" table that can be found under Connect > (a Connected account) > Payments (in left navbar):

#

Which seemed to be a list of Charge objects associated with the connected account

#

Even here, none of these have 'Customer' fields associated. You're saying that's because these charges only represent "moving funds from the Platform to the Connected Account"

noble quiverBOT
ruby abyss
#

Correct, they don't reference a Customer because there isn't one from the context of these Charges. The Customer will be referenced on the Payment Intent or Charge that resides in the Platform account.

valid tinsel
#

Hmm so I could do stripe.Charge.list() with pagination but then I have charges for all connected accounts, and stripe_account doesn't seem to be a search query filter for charges... https://stripe.com/docs/search#query-fields-for-charges. Any tips on how to achieve this list of all, filterable charges for a given connected account?

Look up objects in your Stripe data.

ruby abyss
#

That's not possible, you can't filter the list of charges based on their transfer_data.destination parameter.

valid tinsel
#

Ok gotcha, so maybe I could continue with the current method - get all charges for a given connected account - relate to a customer via source_transfer.source_transaction.customer, and manually filter that list in our API? No better way to do this I guess?

ruby abyss
#

Yeah, you're going to need to retrieve an initial list and then iterate through the results to narrow them down further based on your criteria, I can't think of a smoother way to do it offhand.

valid tinsel
#

No prob, thanks for your patience and assistance!

#

I'll call this one a wrap and get back to it