#emad_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/1384103004436697099
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Hi
Could you please share more details ?
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?
Thank you for the clarfiication
Actually only client_Reference_id is included int he webhook event:
https://docs.stripe.com/payment-links/url-parameters#:~:text=Use UTM codes to track,utm_medium %2C utm_term %2C and utm_campaign .
The other UTM parameter no, they aren't included in the webhook events
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
Actually, the PaymentLink uses Checkout Sessions behind
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
But, In webhook event I just see only, payment_intent.
Invoice.paid, invoice.payment_succeeded etc. No client_reference_id found
YOu need to check the event checkout.session.completed
Then it will come?
yep! that should work. i would run a test yourself to confirm
And received this from..
$data = $event->data->object;
$data->client_reference_id;
Right?
In webhook event.
yep! you can see that property is documented here:
https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-client_reference_id
Okay thank you. Let me check. Already check the checkout event.
url is like this Right?
buy.stripe.com/test_eVshsurbksirb?client_reference_id=Affiliate1244
something like that yes! the query string is definitely correct
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
Hello
hi! I'm taking over this thread.
I'm not sure I understand your latest questions. can you try to rephrase your questions?
Okay..
This is the payment link look like actually..
buy.stripe.com/test_eVshsurbksirb?client_reference_id=Affiliate1244
My question is.
client_reference_id in the url as a query string need to add from the stripe dashboard?
Or I can make it manually.
Like add the ?client_reference_id=Affiliate1234
Dynamically I Need Dynamically actually.
@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=Affiliate1234at the end of it
I want to say..
In payment link.
buy.stripe.com/test_dybsusbvsi
If I add by own.
client_reference_id=affiliate1234 after the url end with manually and dynamic.
Like
buy.stripe.com/test_dybsusbvsi?client_reference_id=Affiliate1244
It will work for the webhook. It will send the client_reference_id=affiliate1234 data to webhook?
@slender meadow
yes exactly.
Okay thankyou.