#qmathe

1 messages ยท Page 1 of 1 (latest)

oblique vaultBOT
sullen barn
#

Hi ๐Ÿ‘‹ are there Payment Intents on the Connected Account you're retrieving objects from to list?

sullen barn
#

@eternal folio checking to see if you're still around and saw my above question, or have more context to offer about your scenario?

eternal folio
#

@sullen barn Sorry, I had to go away, just saw your reply.

#

Yes, there are payments intents on the connected account, I can list them with Stripe CLI or see in the Connect dashboard

sullen barn
#

Hm, can you share the ID of the list request (should have a req_ prefix) that isn't returning any results when you expect it to?

eternal folio
#

Sure, I'm going to make a new request.

By the way, what Stripe CLI is returning is the wrong payment list, because it contains too many payment intents.

It's as if Stripe CLI is ignoring --stripe-account when doing stripe payment_intents list --stripe-account accountID. May be I'm not passing it correclty?

oblique vaultBOT
eternal folio
#

Here is the request id : req_B11h4ky1l5fXcc

#

I'm expecting a single payment with 500 as amount to be returned.

sullen barn
#

I'm not seeing any requests that would have successfully created a Payment Intent on that Connected Account. I see 5 requests that attempted to do so, but which errored due to the requests not providing any parameters.

eternal folio
#

ok, let me check again

#

In the dashboard, I have this payment ID : py_1N1qTKPAKbSTYoxeH3HGnGcO

Was it received by another connected account then the one I used to make the request?

sullen barn
#

That's not a Payment Intent object. Piecing together what you've shared, it sounds like you're using Destination Charges or Separate Charges/Transfers for your Connect scenario. So all of your Payment Intents will reside on your Platform account, you won't have them on your Connected Accounts.

The py_ prefix indicates that is a Payment object, which can be interacted with via our Charges endpoints.

eternal folio
#

ok, thanks I mixed up payment intent and payment. I didn't realize a distinct Payment object existed.

sullen barn
#

Yeah, it's not one we talk about very much, because they don't have much functionality associated with them.

eternal folio
#

To explain a bit more what I want to do.

I'm setting an application_fee on payment intents. Once the payment intents have been processed, I want to list payments received per connected account and get the net amount (amount without the application fee) for each one. I was considering doing it in this way:

const payments = stripe.paymentIntents.list({ย  extract: ["data.latest_charge.balance_transaction"] }, {ย  stripeAccount: accountID }); const netAmounts = payments.data.map(payment => payment.latest_charge.balance_transaction.net);

Looks this isn't good to cut it. What would be the correct approach?

drowsy kettle
#

Hi taking over for toby as they have to step out

#

Give me a minute to catch up

#

Since you're using destination charges, the payment intent objects lie on the platform account

#

Since all you're after is retrieving the net amount that the connect account receives you can use the Charges API that my colleague referenced

#

Make sure to pass the stripe account header

eternal folio
#

ok, thanks a lot. I'm going to take a look and see if I have any questions about it.

if I was using transfer_data[amount] in place of application_fee, would the payment intent reside elsewhere? Or is it always on the platform for indirect payments?

drowsy kettle
#

With destination charges, payment intent always resides on the platform

eternal folio
#

ok, makes sense. I'm going to re-read it.

#

Your solution with charges work great and is much simpler than what I was attempting to do. Thanks for helping me ๐Ÿ‘