#Kian-payment-links
1 messages · Page 1 of 1 (latest)
Hi there! Payment Links are really designed for a one to many approach. Stripe Checkout is more for the one-to-one relationship.
That said, you can still use Payment Links here if you like
And we just did add some customization, one sec.
Ok, thank you for taking the time to reply as well
I really appreciate it
Here is an example of my problem
Okay so we just recently introduced client_reference_id which I think is what you want here
I have three separate orders, sometimes different names, but they all use the same phone and mail which I can theoretically collect from a payment link through a webhook
A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
Oooh ok interesting
Is this then used together with payment links or is it unrelated?
I can see that in the response there's an url with checkout instead of buy
Oh wait I think I get it
So if I'm understanding it right, I first call the stripe api with Session.create which will then give me the response with the id and payment_intent which seem to be identifiers
Then I just need to store that and send over the url for the customer to pay?
Sorry, bouncing between a few threads
It's alright
Oooh ok
So you generate the link
Then you append the client_reference_id
Like https://buy.stripe.com/xxxxxxxx?client_reference_id=my_customer_123
e
Wait wait wait
"url": "https://checkout.stripe.com/pay/..."
Is there an example in the docs of what the ... would generate to?
/Does it generate without arguments
Are you using Stripe Checkout? or are you using Payment Links?
I'm looking at the docs for the client_reference_id which you sent
Where I see that the response gives anurl
that's a screenshot of our doc though
What's blocking you?
is it about accessing the url property?
It's about the parameters in here
/xxxxxxxx?client_reference_id=my_customer_123
Yes, I apologize
all good, just try to write one full question in one entire message
Objective: Create a link as a way for a customer to pay, store the unique identifier of that specific link in a database in a way where I can then later perform an action on the user related to the unique identifier once I have received a charge complete from a webhook
Problems: How can this be done? I'm looking at the docs for client_reference_id that bismarck mentioned and I can see that I can create a checkout session (which I am still not entirely sure is the same thing as a payment link) which returns a bunch of unique looking identifiers like payment_intent and id. Which of these two would be returned to the webhook once the charge is complete through the url that gets returned?
So from my understanding:
Use stripe.checkout.Session.create to create the checkout session / payment link -> Store the returned id/payment_intent as a unique identifier in the database row related to the customer I am trying to create the payment/checkout link for -> Send them the url that is returned in the response and wait for a charge complete from the webhook which will then return the id or payment_intent to then do something?
Use stripe.checkout.Session.create to create the checkout session / payment link
Payment Link is a separate product. IF you usestripe.checkout.Session.createthen you are not using Payment Links and they are not relevant
Send them the url that is returned in the response and wait for a charge complete from the webhook which will then return the id or payment_intent to then do something?
what do you mean by "send them the URL" exactly?
Checkout Sessions expire automatically after 24 hours, so you can't just email that URL and wait for them to pay
Basically, I am doing a "receive first pay later" service where I need to "get paid" after they received the service
So once I have "completed the service", I generate a way to pay through an api like Twilio (SMS/text message)
I am aware that they expire automatically after 24 hours, and I can already think of a system that automatically renews it once a certain amount of time has passed to then send again
My main issue is identifying based on the person that uses the link I sent, "who paid"
you know who paid if you create the Checkout Session since you do this for a specific person, so you shouldn't need anything else
Ok, I'll give it a try in test mode