#emad_webhooks

1 messages · Page 1 of 1 (latest)

modest haloBOT
#

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

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

vocal berry
#

Hello

weary obsidian
#

Hi
Could you please share more details ?

vocal berry
#

Okay

#

Here’s our use case:

Our customers (merchants) connect their Stripe accounts to TrackReward via OAuth.

We listen for events like payment_intent.succeeded, checkout.session.completed, and invoice.paid via webhooks from their connected Stripe accounts.

Many of our customers use Stripe Payment Links to collect payments.

We want to allow them to track affiliate sales using UTM parameters (e.g., ?utm_source=aff123) added to their Stripe Payment Links. The goal is for TrackReward to identify which affiliate referred the sale when a payment is made, using the webhook data.

#

Our question:

Is there any official way to:

Capture UTM/query parameters from Payment Link usage and include them in webhook payloads?

Or automatically forward UTM parameters to Checkout Session metadata or customer metadata?

weary obsidian
#

Thank you for the clarfiication

#

The other UTM parameter no, they aren't included in the webhook events

modest haloBOT
vocal berry
#

But. In subscribe payment link (generate invoice and payment_intent)

And client_reference_id only work with checkout session. Thats why not received any data to webhook like client_reference_id

weary obsidian
#

Actually, the PaymentLink uses Checkout Sessions behind

keen harness
#

hello! fyi i'm taking over for my colleague here - fyi the server is a little busy atm so my response might be a little slow

vocal berry
#

But, In webhook event I just see only, payment_intent.

Invoice.paid, invoice.payment_succeeded etc. No client_reference_id found

weary obsidian
#

YOu need to check the event checkout.session.completed

vocal berry
#

Then it will come?

keen harness
#

yep! that should work. i would run a test yourself to confirm

vocal berry
#

And received this from..

$data = $event->data->object;

$data->client_reference_id;

Right?

#

In webhook event.

keen harness
vocal berry
#

Okay thank you. Let me check. Already check the checkout event.

keen harness
#

something like that yes! the query string is definitely correct

vocal berry
#

it will be dynamic?

If not exist in the stripe dashboard?

It is need to add in stripe dashboard? Or work if it made manually?

Just asking for ensure

#

@keen harness

modest haloBOT
vocal berry
#

Hello

slender meadow
#

hi! I'm taking over this thread.

#

I'm not sure I understand your latest questions. can you try to rephrase your questions?

vocal berry
#

Okay..

#

@slender meadow

slender meadow
#

what do you mean by "need to add from the stripe dashboard"? what exactly do you want to do and what is the issue?

#

Like add the ?client_reference_id=Affiliate1234
you just change the URL yourself to add ?client_reference_id=Affiliate1234 at the end of it

vocal berry
#

@slender meadow

slender meadow
#

yes exactly.

vocal berry
#

Okay thankyou.