#naril_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/1470720024804327507
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi
Hello! You'd need to configure a Connect webhook on the account that publishes the Stripe App: https://docs.stripe.com/stripe-apps/events
That should receive the configured event types from accounts that have installed the app
i need you to help me to put some order here please
i see webhook configuration in the stripe-app.json, i see also webhooks config in my account -> webhooks -> create destinations (here i have 2 options: 1) Your account; 2) Connected Accounts.
i have created webhooks desinations as Connected Accounts and i configured 2 url (per payload style: snapshot and thin)
i tried to install, uninstall, create payment_link and nothing, no webhook events called
Can you share an evt_xxx ID for an event you expect to be sent to a webhook?
sure but guide me how to give it to you
Let's just started with the plink_xxx ID for the Payment Link you created
plink_1SzDCXHAH1Jf6DrMhC7PXpeE
evt_1SzDCXHAH1Jf6DrM3uQhD1Fc is the ID of the payment_link.created event
Looks like it fired on this account: acct_1Sjfj3HAH1Jf6DrM
What's the acct_xxx ID of the account that publishes the app?
Right, but if you want to test the app you should be installing it on a different account to the one that publishes it: https://docs.stripe.com/stripe-apps/test-app#set-up-test
Otherwise using it on the main account wil mean the events just fire on the main account and won't be sent to your Connect webhooks
The events will just send to a normal webhook as they're firing on the same account, not a different account (that has installed the app)
- so in my stripe-app.json i don't need the webhooks section
- i have created a connected account webhooks so i will not get events from my account (this is why i can create "Your account" destination)
- to really test it i need to install the app in other account - can be also sandbox? how do i install it in other account (i can't do it public since i don't have live account)
- What 'webhooks' section? https://docs.stripe.com/stripe-apps/reference/app-manifest
- Yes
- Yes, you can just configure another Sandbox account
- probably something that Opus made up ๐
- cool
- ok cool i will try it
"If you donโt see the External test tab, verify if youโve selected public distribution from Create a release."
i don't have live account, so i don't see External test tab
public distribution is not allowed if we don't have live account - this is what i understood
Yeah so right now there's no real for you to install the app on another account, so for you to test the webhook part speficially you can do this: https://docs.stripe.com/stripe-apps/events#test-locally
If you intend to publish the app, you're going to need a live account before you can do that so then you can do an external test
ok... so the hard truth is that i cannot test and expreience it...
Not end-to-end as an actual installer/user without a live account, no
ok, so also i can't verify signature (secured) when mocking events from CLI
You should be able to, yes
how?
The CLI has it's own signature secret it'll print out when you do stripe listen
Ready! Your webhook signing secret is '{{WEBHOOK_SIGNING_SECRET}}' (^C to quit)
i already have a backend implemented so i dont really need stripe listen. maybe my best shot here is to test the app right now when the destination is "Your account"
WDYT?
The listen function doesn't replace your backend, it actually just forwards events to it
So you can test the Connect webhook endpoint without having to actually install the app
I recommend you stop chatting with Claude and read the documentation
๐
You're conflating different concepts
But yes, that's an option too
alright, i will just use the Your account, its simpler
thanks
one more question please
are you here?
Sure
when merchant installed the application it become a connected account?
no need for oauth / RAK for webhooks?
Correct
COOL!
but i do need RAK / OAuth to be able to execute queries from ny backend to stripe on merchants behalf
No, you just use the stripeAccount header: https://docs.stripe.com/stripe-apps/build-backend#using-stripe-apis
The 'connection' facilitated when they install the app enables you to make API requests to Stripe on their account
You can use OAuth if you prefer, you configure it in the manifest: https://docs.stripe.com/stripe-apps/api-authentication#configure
But otherwise it's easier to just use your account's key with the stripeAccount param
wow!
so you are telling me that i am using my account stripe api key and i put the merchant that installed my app in the Stripe-Account and it will work?
Yep, should do
"should" you are not sure?
That's how it works yes, assuming the account has installed the app and you've configured the permissions correctly in your app manifest
But you've no way to test it because your app is not public
yeah... i will create live account soon. thank you very much for your help!
hi, can i have another one?
Sure
great!
when creating connected account webhook destination i need to provide 2 urls for both payload styles. but when creating your account destination i don't
it still will be consistant? (both payloads types will arrive to the same ednpoint, how i should to distingush between them?)
Will what be consistent?
The payloads will be entirely different:
in my "Your account" definition can i split it also to 2 different endpoints?
wierd because i can select specific event per payload style
Not today, no
in your account i can select anything
Why do you want/need both?
i don't know what i will get because seems like Stripe tret them differently
(in connected accounts)
(the selection is limited there)
I recommend just using the non-thin events. Thin events are currently only valid for V2 APIs which you're not using
so i will get snapshot payloads?
Yes
so thin is "not relevant"?
also in connected account, all events will be sent as snapshot?
I would say not, but ultimately this is your integration
Depends on how you configure the Connect webhook!
when i configured it seems like i must define 2 urls (per payload style)
i prefer one (simplest)
You must have a V2 event type selected
Don't understand what? When you create the webhook endpoint in the Dashboard, you select the 'types' of events you want to receive. Depending on what you select there, you will be required to add a 'thin' event enpoint/URL (e.g. anything with v2 after it)
If you select both v2 and normal events, then you'll need to provide two endpoints/URLs
Then can obviously be the same URL, but then you'll likely have more convoluted logic to handle the different payloads
cool!
i have another one ๐
i have ai agent that that will fetch data with Stripe MCP server on my users (merchants) behalf. the auth header should be my api key and i need to include the account id in the header? like a standard backend request?
ohhhhh greatttt