#rherbst-awn
1 messages · Page 1 of 1 (latest)
I can do this via the API, but I want to do it client-side without the API or with a public key
When you say redirect the customer using a "Create Payment Link" function built with client-side .js. - are you redirecting your users to a PaymentLink that you've already created? Or are you creating an entirely new PaymentLink?
I want to create a new payment link each time, based on the QTY the shopper selects prior to the redirect to STRIPE
I want to do exactly what this does, /v1/payment_links. - but don't understand why this resource would be protected or if there is a way to do it with a public key instead of confidential key
Or, alternatively, is there anyway to use the "no code" solution with payment-links and pre-define a QTY, that doesn't look like an option so i went this route
The "easier" way would be to just add a quantity parameter to the payment link created in teh STRIPE Admin, but that doesnt' look supported
So a couple things here:
- Yes, in the dashboard you can create a PaymentLink with a specific quantity
- No, there's no way to create PaymentLinks through a publishable key unfortunately
- However, based on what you've described (where you want the ability to define a different quantity for every user) you probably want something closer to Checkout Sessions (https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout) which will generate a link meant for one-time use
I believe checkout sessions also is a protected source though, right?
resource, i mean, i can't use a public key to access that resource either, right?
Yeah no matter what you're going to need to use a secret key
k - thanks, i guess that is what i found, but was hoping there was a way and i just wasn't seeing it!