#bajay_webhooks

1 messages · Page 1 of 1 (latest)

open fernBOT
crisp portalBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

open fernBOT
#

👋 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/1257449160324419585

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

elfin sandal
#

Hi there

torn crag
#

hi

#

please help

elfin sandal
#

Give me a few minutes to look

torn crag
#

yes sure

elfin sandal
#

Okay, I don't see any Connect webhooks configured in your platform account. The only webhooks that are configured are "account" webhooks, which means you'll receive events for actions that occur on your platform account, not on your connected accounts

torn crag
#

i am currently testing it locally using cli

#

and locally it is only triggering one event

elfin sandal
#

This explains why you received application_fee.created. This was a fee your platform received

torn crag
#

but i want the details of the checkoutsession whether it got completed or not and all the payment details.

#

should i explain what am i doing?

elfin sandal
#

I see you're using Connect, specifically direct charges. This means Checkout Sessions are being created directly on the Connected Accounts you're working with

torn crag
#

yes

#

my platform has creators and supporters. creators post their goals and supporters support it. supporters are redirected to stripe checkout

elfin sandal
#

Because of this, you'll need to set up a webhook endpoint that listens for Connect events.

torn crag
#

now i want the details of that checkout session and payment details so that on my end i can show whether the transaction got completed in real time or not

#

so it wont work locally using cli? i have to publish the webhook endpoint on a publicly acessible url?

elfin sandal
#

No. You should be able to use stripe listen to receive events related to your Connected accounts

#

This is assuming you're logged into the CLI as the platform. Connect-related events will look like this:
--> connect checkout.session.completed [evt_...]

torn crag
#

for connect checkout.session.completed. to receive this event for connect what command do i use?

#

for locally testing on cli

elfin sandal
#

You don't need any special flag in your command. stripe listen should suffice as long as you're authenticated as the platform in the CLI

torn crag
#

do i not need to specify that i want to listen for connect events?

elfin sandal
#

No, you don't. You'll receive every event related to your platform and your connected accounts. You could specify which event types you want to listen for: stripe listen --events checkout.session.completed,payment_intent.succeeded

torn crag
#

i did that and i still receive only one event which is application fee created

#

why is that? what am i doing wrong?

#

?

open fernBOT
elfin sandal
#

Hm, that's interesting. If you run stripe accounts retrieve in your terminal, what's the account ID you receive? If should look like acct_...

torn crag
#

wait let me check

#

acct_1N0RuTGuORJUccAU

elfin sandal
#

Okay. Can you run stripe listen , keep that window open, then create and complete another test mode Checkout Session as your connected account?

torn crag
#

yes sure please wait

elfin sandal
#

@torn crag any luck?

torn crag
#

done

#

only one event

prisma crater
#

Please make sure not to post webhook secrets to this server, since it's a public server. Not a big deal for test mode requests, but I deleted the message anyway.

torn crag
#

im sorry

#

it was test mode so i didnt bother

prisma crater
#

No worries!

Can you post the exact commands you're using for the listener and the trigger?

torn crag
#

stripe trigger checkout.session.completed

#

stripe strigger charge.succeeded

#

do i need to specify it with a different command for connect checkout session completed event or any other pament detail event for connect?

prisma crater
#

What's the exact output from the command stripe trigger checkout.session.completed?

torn crag
#

on my cmd?

#

C:\Users\Arbaz\Downloads\Compressed\stripe_1.21.0_windows_x86_64>stripe trigger checkout.session.completed
Setting up fixture for: product
Running fixture for: product
Setting up fixture for: price
Running fixture for: price
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Setting up fixture for: payment_page
Running fixture for: payment_page
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: payment_page_confirm
Running fixture for: payment_page_confirm
Trigger succeeded! Check dashboard for event details.

#

should i try another checkout session?

#

i just did another successful test checkout session

#

this is what i get

#

Please note: this key will expire after 90 days, at which point you'll need to re-authenticate.

C:\Users\Arbaz\Downloads\Compressed\stripe_1.21.0_windows_x86_64>stripe trigger checkout.session.completed
Setting up fixture for: product
Running fixture for: product
Setting up fixture for: price
Running fixture for: price
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Setting up fixture for: payment_page
Running fixture for: payment_page
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: payment_page_confirm
Running fixture for: payment_page_confirm
Trigger succeeded! Check dashboard for event details.

C:\Users\Arbaz\Downloads\Compressed\stripe_1.21.0_windows_x86_64>stripe listen --forward-to https://localhost:44318/v1/stripe/connect-webhook

Ready! You are using Stripe API Version [2023-10-16]. Your webhook signing secret is whsec_xxxxxxxxxxxxx (^C to quit)
2024-07-02 04:10:50 --> application_fee.created [evt_1PXtN0GuORJUccAUUOTVCzt3]
2024-07-02 04:10:56 <-- [200] POST https://localhost:44318/v1/stripe/connect-webhook [evt_1PXtN0GuORJUccAUUOTVCzt3]

#

please respond

#

do you want me to proivde my checkout session code and webhook code?

prisma crater
#

Apologies for the wait. The server is quite busy

#

Those bottom 4 lines are all that you get in the terminal where your webhook listener is running?

torn crag
#

yes

#

everytime i run a successful checkout session

#

this is all i receive

prisma crater
#

That's so strange...

torn crag
#

what should i do

#

do you suggest anything?

prisma crater
#

Something like stripe listen --events=payment_intent.succeeded,checkout.session.completed --forward-to https://localhost:44318/v1/stripe/connect-webhook

torn crag
#

i did this too

#

and result was same. i already tried this

#

should i try it by adding the endpoint for my webhook?

#

maybe that works?

#

meaning instead of localhost should i publish my webhook endpoint to live url?

prisma crater
torn crag
#

okay i’ll do that

#

btw i an using it on windows

#

and i downloaded the zip file from the github

#

what should i do?

prisma crater
#

Just follow the same instructions that you used when you downloaded the latest version before. The docs outline it above

torn crag
#

ok