#yoni_webhooks
1 messages · Page 1 of 1 (latest)
👋 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/1394960652367564800
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hmm, that request you shared doesn't seem to have any Connect parameters?
So to summarize what I understand;
- Account and account link via our stripe client with our master API key
- Webhook listener for account updates on our connect account
- Create webhook listener on connected account (how?)
It's just a regular Checkout Session created on an account – no destination params, no Stripe-Account header
Well you'd use a Connect webhook on the platform: https://docs.stripe.com/connect/webhooks
That will receive event types from all connected accounts
well, that's because checkout completed events are not being thrown in the connect account, I can only see account.updated as event deliveries
What is the ID of the connected account? As I said the request shared is not a 'Connect request'
acct_1RlOCu2EFUPKR1wT
You're just using the API keys of what I assume is the Connected account (acct_1RdnAACOmExqtnyt)
I'm using the api key of the connect account, not the connected account
Yeah there's no reference to this account in that request: https://dashboard.stripe.com/test/logs/req_oH5oB4lyJG5WYH
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sorry, what is a 'connect account'? Assume you mean the platform
yes indeed, platform
evt_1RlPJwCOmExqtnytB0IbezNo is an example of a checkout completed that is not being sent
OK, then your integration seems confused as there's no reference at all to acct_1RlOCu2EFUPKR1wT in the request you shared. What type of Connect charges are you looking to do?
I'm trying to implement 'checkout sessions' to have one-off invoices paid by our customers' customers
so what I need is, an energy supplier activates Stripe on our billing platform, and our invoice generation is creating checkout sessions (payment links on QR/email) via stripe. We should then be notified if these are paid via webhook and mark invoices as paid
Yes, but what type of Connect charge: https://docs.stripe.com/connect/charges#types
The answer to that will influence how you create the requests (which params you pass)
Direct, sorry
As acct_1RlOCu2EFUPKR1wT is a standard account I'd assume direct charges: https://docs.stripe.com/connect/direct-charges?platform=web&ui=stripe-hosted
In which case, your requests are missing the Stripe-Account header: https://docs.stripe.com/connect/direct-charges?platform=web&ui=stripe-hosted#create-checkout-session
Stripe-Account - This header indicates a direct charge for your connected account. The connected account’s branding is used in Checkout, which allows their customers to feel like they’re interacting directly with the connected account instead of your platform.
You need to adjust your code to include that first, then we can figure out the webhook problem
hmm OK, let me see, I'm using the SessionService in .NET
does it require me to create a new StripeClient instance for the individual accounts? Because I assumed we'd had a singleton StripeClient with our platform api key that could be used
nvm, found it!
If you read the section I just linked it explains it. No, you use the platform key and pass the Stripe-Account header with the ID of the conncted account
Right now you're just creating a Checkout Session on your platform which likely explains why you don't see any events
great
so just to confirm, is one webhook listener sufficient then? Just one on the platform account and that's it, right?
You'd likely need two:
- One Connect webhook to receive events from connected accounts
- One regular webhook to receive events from your platform
aha OK, I see I only have one 'Events from Connected accounts', why would we need an additional for 'platform'?
To be notified of any payments processed directly on your account, or other activity
well, the scenario's I'm interested in:
- Get to know if a connected account is ready to be used (= generating payment links)
- Get to know if a conencted account is not ready to be used anymore (for whatever reason, compliancy for example)
- Get to know if a checkout session on a connected account is successful and we can reconcile an invoice
- Get to know if a reversal on a connected account took place and we need to reverse a payment for an invoice
Reversal = refund?
idd, like when a customer processed a payment but seemed to had insufficient funds even though initially we got the confirmation that payment succeeded
Then a Connect endpoint should be sufficient as all those events occur on the connected account. I'd test the flow end-to-end to ensure it works as needed
Could you confirm then that these are the right event types we should listen to?
You'll likely want refund.* events I guess
OK, and would it make more sense to listen only to charge.completed event instead of all these checkout succeeded/completed/failed events?
No, checkout.* events are recommended