#knuppi-payouts
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- knuppi-subscription-events, 2 days ago, 46 messages
Not familiar with reporting in here. For those questions, we recommend you talk to support, who's more familiar: https://support.stripe.com/contact
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I can help you query this data via the api if you're a dev
But w/ reporting I'm not sure
I'm the dev lead of our team
Ok do you want to do this via api calls?
Yes, we want to automate this via the API
We are a platform with connected Standard Accounts. They, in their turn, have end-users who make purchases using stripe_account=acct_XXX when creating PaymentIntents etc.
This works perfectly well.
Problem is that we have a (big) client who also have an accounting software. They need to match invoices, which we are created through the accounting software-API, with Payouts coming from you.
Got it. Are you doing direct charges?
The issue is that each Payout can contain multiple Payments, and we need to be able to know which Payments are tied to which PaymentIntent (or similar)
Direct Charges? I don't know exactly what you mean. We're using PaymentIntent where the end-user are paying with Google Pay/Apple iPay/Credit card
There's 2 types of connect charges: direct and destination
aha, afaik we're using direct charge with application_fee_amount attached
Got it. That makes things slightly easier. Destination charges are more complicated when it comes to doing this
Ok so in the following requests, you'll need to pass the stripe account header, since you'll be making requests on the connect accounts: https://stripe.com/docs/connect/authentication. The first step is to list all balance transactions by payout id: https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout. That will return a list of balance transactions tied to the payout. Each has a source param: https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-source. This will identify the charge associated with the balance transaction. You can use expand: https://stripe.com/docs/expand to expand details about the source (which will be the charge).
stripe_accounthas been added in all requests- It's not clear, should we listen to webhooks wrt the Payouts? if so, what is the webhook named we should listen to?
You can. Up to you
The above is just how to get a list of charges given a payout id
How else should I know when you create a Payout, and its related ID? ๐
is it payout.paid which is the "last" webhook event which is triggered?
yep
you can also just list payouts via the api
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Up to you on how you want to get them
I think we're going to listen to the webhook and then get the details about the Payout, thanks.
However, is there a way we can fake payout.paid events in test mode?
๐ hopping in here since codename_duchess has to head out soon
If you have automatic payouts enabled in test mode and balance (again, in testmode) then you should still get testmode payouts that would emit payout.paid events
yes, i understand. my question is; how can i fake those events? because AFAIK they're typically only triggered once per day?
There isn't really a way to fake those events
not even through the Stripe CLI?
Unfortunately no - it's not one that we support through the CLI
Is there an example of what the payload looks like?
Backing up for a minute - what do you need the example payload for? If you just generally want to know what the shape would look like you can look at the API ref for our Payout (https://stripe.com/docs/api/payouts/object) but it sounds like you may be looking for something specific?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What I want to do is to find the txn_XXX in the payout.paid webhook so that I can retrieve the balance details
I see now that the balance_transaction has the relevant information ๐๐พ
Yeah the balance transaction is what you'll want to look at
knuppi-payouts
Thanks, will have a look at this.
Please create a feature request in my place; allow stripe CLI to trigger payout.paid events
oh, last question
In the Payout object, I don't see any information which connected Account the payout is associated with
Yeah, that wuldn't be on the Payout object - if you had a connect webhook listening for the payout.paid events you'd get the account on the Event instead (https://stripe.com/docs/api/events/object#event_object-account)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I don't really understand. Are you able to expand on this?
Payouts are when a Stripe balance is paid out to an external bank account. So the full flow of funds from your platform account -> the external bank account of a connected account would be like this:
- Available funds in the platform Stripe account
- Funds are transfered (through a Transfer, or during Destination Charges) from the platform -> to the connected account
- a Payout on the Connected account is made that pays out the funds to the external bank account
Yes, we need to be able to find out all information about step #3
Yeah so those payouts from Step #3 are on the connected accounts themselves - to access them you'd use the Stripe-Account header to access the objects on the connected account.
So if you were to listen for payout.paid events on your connected accounts, you'd have a Connect webhook that listens for those events, and because it's a connect webhook, each event will include the account in it
It seems that I might've missed something (important?) wrt "Connect webhook". We only have one webhook which takes care of everything - but you're talking about a different (more specified?) type of webhook?
You'll want to read through this (https://stripe.com/docs/connect/webhooks#connect-webhooks) - based on what you've mentioned so far I assumed you wanted to see the payouts for your connected accounts, and if that's true you'll need a Connect webhook
Yeah then you'll need another connect webhook
OK, thank you.
Will all webhooks regarding connected Accounts always be redirected to this new Webhook?
yes
OK, great. Thank you
You and your colleague have helped us a lot
happy to help!