#ripitried-paymentlink-event
1 messages · Page 1 of 1 (latest)
Hi, what do you mean with 'Is there any way for me to pass in a custom parameter into the redirect url so that I can tell which form submission is related to a completed stripe payment'? Can you add more clarity?
Yeah, so if i use stripe to host a checkout session for subscription payment it has a url right
can I pass an argument into that url somehow so that when I monitor the webhook associated with checkout I can recieve that parameter
does that make sense or should I explain further
Have you seen this, https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata? You can pass additional data on the payment intent of the Checkout session. You can listen to webhook events like https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded and can extract the data from there. Does that solve your ask?
im not generating a checkout session via API
Like I just have a single saas subscription I am linking to from a form and wanted to see if the checkout url supports passing in a param so I can link a form submission id with a payment
How are you creatin gthe Checkout Session then? Are you using Payment Links from the Dashboard?
Yeah I am just creating links from the dashboard
Ah, I think you're looking for this: https://stripe.com/docs/payment-links/url-parameters
So can I just add my own custom params and they will get passed through to the checkout session event?
Please refer to https://stripe.com/docs/payment-links/url-parameters#streamline-reconciliation-with-a-url-parameter, yes it will be sent to the event.
Yes I understand, I have read the docs
However, I am asking if this can be dynamic
for each form that gets filled out, I am not manually going to create a link
so can I provide the link https://buy.stripe.com/XXXXX?client_reference_id=YYY and change the value YYY every time, and the reference id will be passed through without me explicitly building the url from the dashboard or enabling anything?
and does that extend for any parameters not named client reference id?
There is not, and no.
so how does the client reference id even work then?
because in the dashboard you don't specifically enable a link, the tool that shows up is just a link formatting tool
Additionally, what is the right event to monitor for if I am using a payment link for a subscription
When working with teh Dashboard, our support team will be able to assist you better than I can: https://support.stripe.com/contact
Please reach out there
okay can you handle the developer question though?
which is "what is the right event to monitor for if I am using a payment link for a subscription"
ripitried-paymentlink-event
@cedar vortex https://stripe.com/docs/payments/checkout/fulfill-orders -> checkout.session.completed for the first time and in the future normal Events based on https://stripe.com/docs/billing/subscriptions/webhooks#events
thanks, what do you mean by in the future?
Subscriptions are for recurring payments, the checkout.session.completed Event is only for the first payment happening through Checkout
So you mean the first time someone pays for a subscription they will trigger a checkout session completed event
then for subsequent payments what event is triggered so I can monitor if they are still subscribed?
the second link I gave you above
thats a list of a bunch of events
Yes, which a clear explanation about each that you can use
my bad
would subscription_schedule.completed be the right event to monitor that confirms that a given subscription has cleared its next payment cycle?
after the initial checkout.session.completed *
no it wouldn't, that Event is about SubscriptionSchedules which is a separate API. Sorry you're going a bit too fast skimming the doc. Carefully read it end to end, and then try the product in Test mode, look at the relevant Events, look at our https://stripe.com/docs/billing/testing/test-clocks feature that lets you advance time to simulate future months, etc.
Sure, I will but can you not just tell me which event is recommended to monitor to denote that a subscription has cleared its next monthly payment?
It's right there in that doc, sorry but it is important that you take a few minutes to read and try, we're helping a lot of other developers here and it should take you 2 minutes to look at each event and narrow it down
Okay I read through the docs, I would need to monitor invoice.payment_succeeded for all subsequent succesful payments
that's the one Event that does not exist on that doc, so no
You should listen to invoice.paid
sure thing! Definitely a ton of Events, but Subscriptions go through a lot of state changes over time so you'll want to handle more than this one