#yoni_webhooks

1 messages · Page 1 of 1 (latest)

vestal charmBOT
#

👋 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.

analog flax
#

Hmm, that request you shared doesn't seem to have any Connect parameters?

ionic thunder
#

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?)
analog flax
#

It's just a regular Checkout Session created on an account – no destination params, no Stripe-Account header

analog flax
ionic thunder
#

well, that's because checkout completed events are not being thrown in the connect account, I can only see account.updated as event deliveries

analog flax
#

What is the ID of the connected account? As I said the request shared is not a 'Connect request'

ionic thunder
#

acct_1RlOCu2EFUPKR1wT

analog flax
#

You're just using the API keys of what I assume is the Connected account (acct_1RdnAACOmExqtnyt)

ionic thunder
#

I'm using the api key of the connect account, not the connected account

analog flax
analog flax
ionic thunder
#

yes indeed, platform

#

evt_1RlPJwCOmExqtnytB0IbezNo is an example of a checkout completed that is not being sent

analog flax
#

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?

ionic thunder
#

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

analog flax
ionic thunder
#

Direct, sorry

analog flax
#

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

ionic thunder
#

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!

analog flax
#

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

ionic thunder
#

great

#

so just to confirm, is one webhook listener sufficient then? Just one on the platform account and that's it, right?

analog flax
#

You'd likely need two:

  • One Connect webhook to receive events from connected accounts
  • One regular webhook to receive events from your platform
ionic thunder
#

aha OK, I see I only have one 'Events from Connected accounts', why would we need an additional for 'platform'?

analog flax
#

To be notified of any payments processed directly on your account, or other activity

ionic thunder
#

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
analog flax
#

Reversal = refund?

ionic thunder
#

idd, like when a customer processed a payment but seemed to had insufficient funds even though initially we got the confirmation that payment succeeded

analog flax
#

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

ionic thunder
# ionic thunder

Could you confirm then that these are the right event types we should listen to?

analog flax
#

You'll likely want refund.* events I guess

ionic thunder
#

OK, and would it make more sense to listen only to charge.completed event instead of all these checkout succeeded/completed/failed events?

analog flax
#

No, checkout.* events are recommended

ionic thunder
#

alright

#

I'll have a crack at it

#

thanks for your help!