#ricardo_webhooks-order

1 messages ยท Page 1 of 1 (latest)

shell sableBOT
#

๐Ÿ‘‹ 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/1402766027913429148

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

sharp shoal
#

ricardo_webhooks-order

#

๐Ÿ‘‹ I don't really get the question. Can you give a clear example of an Event that was not sent? Or a transaction? You gave an Event id about a Customer creation

#

Unsuccessful situation- occurs through GUI
Payment methods
I don't get what that means or most of the question sorry even after reading multiple times @unique otter but when you have more information I can have a look

unique otter
#

I have to initiate a succession of events which works through the CLI for successful RPC to supabase.

But when I go to press the buy button which should theoretically do the same succession, it just does payment_method;

therefore all the required metadata which is delivered to Supabase through stripe webhook is not and cannot successfully deposit tokens into supabase.

sharp shoal
#

can you give a clear example? I'm sorry this is so high level and you're deep in it right now
I am focused on the API and the code. What exact Event id is not working? What do you call "click the buy button"? Please share actionable information in text not as a 2 minutes video scrolling the Dashboard

unique otter
#

Stripe Buy Button dude

#

When I click the stripe buy button it bypasses all the required previous functions which trigger my RPCs

sharp shoal
#

We have doesn't of products and ways to integrate, many have a buy button. I get it it's obvious to you but am trying to help you here.

Can you please provide an exact object id showing you paying for something?

unique otter
#

Essentially, I am able to successfully trigger my webhook on supabase via the CLI, but something goes wrong when i use the button. I am trying to understand what is different

#

I'll send object id

sharp shoal
#

thanks that is the one piece of information that is important here

unique otter
#

for button id correct?

#

we_1RrCgMP1MRzkoQArkqoqlCev

#

sorry thats webhook id

#

buy button: buy_btn_1RqqdPP1MRzkoQArtjF8reGV

sharp shoal
#

I don't want a buy button id. This is a no code thing that you put in your html

#

Your ask, from the start is "I'm missing Events". I need you to provide an example case where you actively paid with that "buy button" so I can debug

#

clicking the Buy Button does ~nothing in terms of sending Events

unique otter
#

evt_3RtDOkP1MRzkoQAr0V0NT9wx

sharp shoal
#

perfect that's exactly what I needed

#

so when you look at that Event in the Dashboard, what do you see?

unique otter
#

that actually is a bad example that one went through CLI forgive me

#

So many logs

sharp shoal
#

๐Ÿ˜“

unique otter
#

req_cYIRsUbqbMPld5

#

evt_1RtFYaP1MRzkoQArS8KqVfBj

#

evt_1RtFYaP1MRzkoQArSTa24QVF

#

evt_1RtFYaP1MRzkoQArUsQjjIHA

#

this is what failed after I pressed buy button

sharp shoal
#

cool so whaat's the problem? What failed? The previous one you shared failed with the same exact error

#

like what did you look at on your end as the develper? This Event was sent to your WebhookEndpoint configured and your endpoint errored, but it did the same with the previous one

shell sableBOT
unique otter
#

I'm not able to get the stripe button to work like I am within the CLI.

I need help configuring either the button, or my code, to trigger the correct RPC in my supabase so that after my customers subscribe, they are desposited tokens into our database.

sharp shoal
#

I have to run but @crystal quartz can help you. You do seem a bit lost/confused about how Webhooks work overall but right now we send requests to your server/endpoint and that part of your code is erroring

unique otter
#

so the webhook is not working on your end either

#

400 error? or what kind?

crystal quartz
#

Hi ๐Ÿ‘‹

#

I'm stepping in as my colleague needs to go

unique otter
#

Hey thanks for helpin out @sharp shoal

crystal quartz
#

The webhook events are working correctly on Stripe's end. We are sending them exactly like we are supposed to

#

The failure is occurring on your server

#

Your server is returning the 401 error

unique otter
#

oh wait, i think im not handling the authorization header properly

crystal quartz
#

That would make sense, Here's the full response body: {"code":401,"message":"Missing authorization header"}

unique otter
#

could you give me a quick rundown of how I should be handling it?

#

for reference, I am using supabase edge functions for my webhook

crystal quartz
#

Unfortunately that is entirely up to your code. We don't have recommendations for how you are supposed to handle this because it depends on what you want to do with this information. That is entirely up to you.

#

We do have a webhook endpoint builder guide but these functions are for web-servers so I don't know how they would translate to the framework you are using.

unique otter
#

oh nice checking that out rn

crystal quartz
#

Even if you can't use the exact same code, it should give you some ideas for how you can handle things in your function

unique otter
#

Do you suggest making two webhooks for the different buy buttons?

#

I have two products: one subscription, one single-time purchase.

crystal quartz
#

That wouldn't make sense to me unless these are for different integrations.

#

Do you want to handle the events differently?

#

You can just check the event.type to indentify what kind of event is and then handle it appropriately.