#masud-webhook-creation
1 messages · Page 1 of 1 (latest)
Hello, that error is telling you to make a different kind of webook endpoint that goed directly on your account. https://stripe.com/docs/connect/webhooks
Connect endponts will give you events for all connected accounts rather than having to set one up on each connected account
ah okay so i'm using the wrong api
https://stripe.com/docs/api/webhook_endpoints/create
So it's not this?
is the correct api in that doc list
That is the correct API, but you'll want to make the call with your own API key on your own account and pass connect: true https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-connect
Sorry maybe i should've clarified. This isn't MY account. It's a user that authenticated via oauth. I'm using the access_token i've gotten post oauth success.
So the stripe account is not a connect account on our platform.
Is this for a Stripe App?
Or something else?
Can look in to if this is possible. I think connect platforms can't do this but will have to look in to other scenarios
Something else
We use oauth to get their info and then make api calls using the access_token.
For example the access_token works fine for all other things like creating new Products, Subscriptions, PaymentIntents, etc. But it's not working for webhooks.
Does it count as a "Connect account" if the account is not on our platform as a Connect Account?
I may not be familiar with this flow. Is there a specific doc of ours that you were referring to for connecting to these accounts like this?
If you are using this flow then it would be still considered connect as far as I know. https://stripe.com/docs/connect/oauth-standard-accounts
Example request IDs for making the prices may help clarify for me as well
That the error ends with create a Connect webhook on your account instead tells me that the request was considered to be Connect
It shouldn’t be considered a connect. I’m trying to add it directly to an account that I don’t have access to outside their access token.
Like I said, the account isn’t a “connect account” on our stripe platform.
It SEEMS like stripe doesn’t support adding webhooks to an account using their access token. Which seems odd.
Not sure what to say, I'd need example requests or the doc on the process that you are using so I could look in to this
an example request is on the first message
@organization = Organization.find_by(token: params[:organization_id])
require 'stripe'
Stripe.api_key = @organization.stripe_account.access_token
Stripe::WebhookEndpoint.create({
url: Rails.env.development? ? 'https://queue.ngrok.io/api/stripe_payment_intent' : 'https://app.usequeue.com/api/stripe_payment_intent',
connect: true,
enabled_events: [
'payment_intent.succeeded'
],
})
I can DM the stripe access token if you need it
I mean the request ID of a request that has already been made https://stripe.com/docs/api/request_ids
Sorry, to clarify what I am trying to figure out is how exactly you are connecting to these accounts. The only way to get an access token that I know of is a connect flow so I need to see what exactly is happening when you make these calls if you aren't using the flow I linked to earlier
masud-webhook-creation
@coral fractal mostly as a platform you create the endpoint on your own Stripe account. You can never create it on the connected account
we used oauth
look at my answer above, it explains your issue
i'm confused as to why this counts as a "connected account" if it's not a connected account on our stripe platform. The account is of another Stripe user who created their own account on stripe. and we got their secret(access_token) by making them go through an oauth flow and then requesting the access_token using the code.
You did say you went through OAuth which is exactly Connect. That's the whole feature
okay so didn't know doing this counted as a "connect account" since these accounts won't appear on our platform under Connect tab.
they would 100% appear there
Do you have an example account id acct_123 that I can look at?
Account i am trying to create a webhook to: acct_1MSnC2G02uXfwr5H
okay yeah, you're right. it does show up under the Connected tabs on my stripe account
So we can't add webhooks for connected accounts, bummer okay
Webhooks helps us know when a subscription payment has gone through each month (or w/e interval), so a we can keep record of that on our database.
(goal of our company is to make it easier to create subscriptions on their stripe account in special use case ways. that's why we wanted it)