#phonicuk - Payment Link Redirects
1 messages ยท Page 1 of 1 (latest)
Evening!
What are you trying to achieve by adding parameters to the success url?
I've got the beta 'URL parameters' feature on my account, what I'd like to be able to do is get back the original client_reference_id that I originally shoved in, or the payment intent id.
Use case is that my checkout-less system could direct the user off to payment for their software licence, and then once checkout is complete I'd have the reference needed to look their transaction up again and present their licence key to them in the browser rather than them having to wait for the email.
Okay I just saw something on this. You actually append the client_reference value as a parameter to the Payment Link URL itself.
e.g.
https://buy.stripe.com/test_eEOIGJAHODHOHDOFGHHO?client_reference_id=my_customer_123
aye, I get that in my webhook just fine so the server has it - but I want the client to be given that value again in the redirect
Ah....okay.
since I've got no state for my user after that redirect
so like https://mydomain.com/success?client_reference_id=my_customer_123 which would let me re-capture my state
I am yet again trying to bend payment links further than I suspect they were intended ๐
Well Checkout does support dynamic success_urls but mostly to return payment intent ID's to check the status of the payment.
the payment intent ID would be absolutely fine
so if checkouts already has that function, making it available to payment links would be a nice touch
Sorry, checkout session id rather. In my own test integration I have a success url as follows:
"/success?session_id={CHECKOUT_SESSION_ID}",
I wonder what happens if I shove {CHECKOUT_SESSION_ID} in that field value same as the checkout API...
ooooh that does indeed work!
derp it is in fact documented xD
I searched for this before and didn't find it xD https://stripe.com/docs/payments/payment-links#change-confirmation-behavior
Hey, there's a lot of stuff documented. It doesn't mean it's easy to find
xD
Okay, that's perfect - that suits my needs perfectly. Thanks for pointing me in that direction ๐
Happy to help ๐