#gecko-payment-links
1 messages · Page 1 of 1 (latest)
what do you mean by transaction-specific? eg: a customer would start the payment flow on your website, you'd create a specific payment link for them, and embed a reference into the redirect URL?
correct
right now the pricing link generated by stripe is page specific, and if I try to "attach" or "append" something to it I get a 404 not found
as in eg: https://buy.stripe.com/test_bIYg1K6bt1ME33G5kk?foo=bar?
right
gotcha
that won't work - stripe won't pull in arbitrary params passed to the payment link URL, and yield them back to you on the redirect
so I had a typo...and now it works, but it seems to eat it...I can't find it in the payment log
how to solve?
I'd probably recommend using checkout sessions for this, not payment links
I need a customer specifc/transaction specific bit of info, and was trying to avoid building a custom checkout page
the only way you could do this with payment links would be to create a new payment link for each customer, which sorta defeats the point
like customer_id=123456789 or something
I can't be the only one who has this problem that they want customer info in a payment form
too do this with checkout, you'd want something like https://stripe.com/docs/checkout/quickstart, but pass a client_reference_id when creating the checkout session https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-client_reference_id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
the problem is that if stripe passes you back arbitrary params attached to a payment link, the client can tamper with those parameters
you could get around this by creating a payment link with a redirect URL which embeds those params - that way, you / your server is making the association between a particular client & the param
but now you don't have a no-code setup any more, so it would defeat the point of using payment links
a no-code solution of payment links, means that I go to the payments page and see who paid....and then process from there. and the only traceability I have in that scenario is email (or address if I ask for that)...yes?
right
and a coded solution means I need to create my own payment page setups, or still can be stripe hosted, but with these optional transaction parameters?
right
that was a or b 🤣
oh, sorry, I mis-parsed that
it's stripe hosted, but you need to create a checkout session per customer
you need some amount of code running on your website which redirects customers to the payment flow & a backend server creating the checkout sessions
by contrast, the use case payment links are trying to fit is if I've got a business which is completely manual, and the only web presence I have is a static website (or even just a twitter account / facebook page) that has a link to a buy.stripe.com page on it
when I sold something, I'd just get an email from stripe saying "person@example.com bought a box of chocolates, with a shipping address of 123 main st". the fulfillment / post-purchase flow would be totally manual
so what I am trying to do is this: (I am ok with a coding solution, btw)....I don't have a big web presence...so what I want to do, is give a customer a link that's unique to them (I define the uniqueness, or can decode it somehow), they go to stripe site to pay, and then I have an event I receive from stripe indicating payment (with the unique value).
I keep fishing around for the "best" solution....please advise.
you can do this with stripe checkout. the general flow is documented here: https://stripe.com/docs/checkout/quickstart. you'd pass the unique code as the client_reference_id when creating the checkout session https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-client_reference_id. when you receive the checkout.session.completed webhook from stripe, it'll contain the unique reference in the client_reference_id prop
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok thanks I'll check it out and be back in a bit