#gordon-macmaster_api

1 messages ยท Page 1 of 1 (latest)

idle kettleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1301636592456171603

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

nova pondBOT
loud nimbus
#

Hi ๐Ÿ‘‹ are you using Destination Charges or Direct Charges for your Connect flow?

eager epoch
#

Let me check

loud nimbus
#

Okay, direct charges. So then, if you're using Automatic Payouts, you can use the approach shown in this guide to find all Balance Transactions in a Payout:
https://docs.stripe.com/payouts/reconciliation
Then check to see if Payment/Charge you're looking for is associated with one of those Balance Transactions.

You can see the transaction itemization for your Stripe payouts by viewing a payout in the Dashboard, downloading the payout reconciliation report, or retrieving the payout details through the API.

eager epoch
#

When creating the payment intent I use the transfer data object
transfer_data: {
destination: stripeAccountID,
},

loud nimbus
#

You can't do it the other way around, where you start with a Payment Intent or Charge ID and retrieve the ID of the Payout it's included in.

loud nimbus
#

Ah, sorry, I seem to have gotten some IDs mixed up.

#

Oh I see, I was looking at the Charge you were retrieving in the request you shared.

eager epoch
#

Yup, that must be for the SAAS fees we charge. For context we're building abitility for grocers to have an online storefront. We charge them a monthly fee. The flow I'm trying to figure out is thier customers

#

I can see the payout on that page, so I figured it's possible

loud nimbus
#

This is more tricky with Destination Charges, because the Balance Transactions for them are all for the Transfers they receive from your Platform account. So there are more objects to step through to get back to what you're looking for.

eager epoch
#

So far I have gone:

  1. Payment intent
  2. Latest Charge
  3. Transfer
  4. Destination payment
  5. Stuck where to go next
loud nimbus
#

You can still use the approach I shared to find the Balance Transactions in each Payout, and the Payment (technically a Charge) object that created that Balance Transaction.

Then you can look at the source_transfer field on those Charge/Payment objects to find the Transfer on your Platform account that they're associated with:
https://docs.stripe.com/api/charges/object#charge_object-source_transfer

Then from the Transfer on your Platform account find the related Charge and Payment Intent.

eager epoch
#

So I have to start with payout and work backwards?

loud nimbus
#

Yup

eager epoch
#

Got it. So given I have a customer charge on 10/1/24 would it make sense to pull payouts on 10/1, 10/2, 10/3, etc until I find the one that it's in?

loud nimbus
#

Yeah, you can do something like that. For card payments you can use this table to get an idea of how long it takes payments to settle, to get an idea of when it may be included in a payout:
https://docs.stripe.com/payouts#standard-payout-timing
Some payment method types, like ACH payments, may take longer to settle and become available.

You could also listen to payout.created Events for your Connected Account. Find all related payments, and store them in your database. That way you can more quickly find the Payout a payment is associated with rather than making a bunch of API calls for each lookup.

Set up your bank account to receive payouts.

eager epoch
#

Got it, thank you

#

Appreciate the time!