#ted_webhooks

1 messages ยท Page 1 of 1 (latest)

hot wolfBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255627659640045579

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

signal idol
#

Are you trying to create a webhook endpoint for them? Or are you trying to create a webhook event to test a webhook endpoint?

thick gate
#

We are trying to create a webhook endpoint for them

#

basically, we want them to grant permission to create a webhook endpoiont, and then we want to programatically create that webhook endpoint for them, rather than them having to go through the steps of manually creating the webhook endpoint in the dashboard ui

#

TBH I have no idea if this is possible, but it would great UX if it is possible

fiery arrow
#

I do see that there is an invoice.paid permission in the OAuth permissions, so it seems like maybe that's the way to do it actually... maybe we don't need webhooks at all

signal idol
#

So you can't create webhook endpoints on behalf of Connect accounts unfortunately.

fiery arrow
#

got it ok, so maybe this is more of an OAuth question then, but could we create an app that grants permission to the invoice.paid event and then we hit an external service when ever that event fires?

signal idol
#

When you say "grant permission" can you show me what you're looking at?

fiery arrow
#

ok so here's the use case (and sorry I'm not being super crisp about describing this):

  • Startup Acme, a SaaS startup, uses Stripe to bill customers monthly
  • Startup Acme's customer, Customer Joe, has to take a screenshot of the monthly invoice and upload it to his expense management system. This is inconvenient, and sometimes he forgets to do it.
  • Startup Acme, for this reason, wants to use Versa to automate this flow, saving their customers the hassle.
  • Startup Acme goes to the versa.org site, they create an account. They then indicate that they use Stripe for their billing. At this point theyre given the option to OAuth their stripe account and share their invoice.paid events with Versa.
  • Once they grant access to the invoice.paid events, which include the full body of the Stripe invoice object, then whenever one of their customers has an invoice, and if their customers' expense management app is also an authorized registered 'receiver', then all of those transactions magically are enriched with a full itemized invoice / receipt object in that expense management app (e.g. Brex, Ramp, Concur, etc.). Hooray! now Customer Joe doesn't have to upload a screenshot of the email receipt; it's automatically in his expense management app.
#

Does that make sense, and if so, is this possible via the Stripe OAuth flow?

signal idol
#

I'm still not sure where you're seeing the option to "share their invoice.paid events". Can you link to that or share a screenshot? Or are you just asking if it's possible to do so?

#

My understanding of your desired workflow is that the Connect Account onboards via OAuth and you want to be able to share platform-level Events (e.g. invoice.paid) with them via their own webhook endpoint

fiery arrow
signal idol
#

Okay, so you're building a Stripe App

#

I didn't realize that's what you were looking into doing

#

What account is the invoice being created on? The Connect Account or the Platform?

fiery arrow
#

haha yea me neither โ€” it's not what I thought we were doing 10min ago ๐Ÿ™‚ โ€” Basically currently we support this use case via webhooks, but I'm wondering if an OAuth solution would work better.

#

the invoice is being created on the customer's account. In the example above, the invoice is being created in Startup Acme's Stripe account. And we (Versa) would like Startup Acme to be able to grant us access to those events.

signal idol
#

So OAuth would give Versa access to the invoice events on Startup Acme's account just fine. It sounds like the hangup here is: how does Versa then get that information back to Startup Acme to display in their UI without having them do a bunch of manual work. Does that track?

fiery arrow
#

Not sure I totally follow, but I think that complexity is stuff we already handle in our core app. If the following is true, I think we're good (!)

  1. We (Versa) can add a 'Connect Stripe Account' OAuth button on our website, app.versa.org
  2. Companies (e.g. Startup Acme) can log in, click that button, and grant access for Versa to 'subscribe' to their invoice.paid events
  3. By granting access to invoice.paid events (invoice_read permission) Versa can see the contents of Startup Acme's invoices.
signal idol
#

Yup, that all tracks. You don't need Stripe Apps to do that. It's supported with just regular OAuth

fiery arrow
#

beautiful! ok i think we're on the right track, thank you, you've been super helpful, really appreicate the input