#imabev
1 messages ยท Page 1 of 1 (latest)
hello! i'm afraid i don't quite understand, can you describe with an example?
hello and thanks! Yes. I understand how to create a payment link. It makes complete sense that if I set up a product with a specific price I can create a payment link.
as I am typing I think there might be some logic I can use graduated or volume pricing....
but...
is it possible to have one product that has different prices? And I can set the price based on the payment link I create?
I am still thinking my way through this so if you're confused it's ok!
I think what I am I looking for is to create payment links on the fly...for a generic product but with different prices
yes, you can set different Prices under a Product. And yes, you can decide what Price to be used in the Payment Link you create : https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-line_items
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 I see that if I create multiple prices for the product it keeps the same API ID
I am looking to see how I can present the correct link to the customer. I dont want them to choose. I want to guarantee they pay the correct amount
ok I see that if I create multiple prices for the product it keeps the same API ID - what does this mean? Each Price has it's own Price ID.
you're passing in the Price ID when creating the Payment Link
which object ID are you referring to when you say it keeps the same API ID?
nope- I am mistaken
when I create multiple prices for a product there are different API IDs
It looks like there is no way to pass a specific price with a product to create a payment link.
It's possible that the price could be, for example, anything between 1 and 100 including cents e.g between 1.00 and 99.99
its a difficult customer ๐
so are you saying that you want to define an amount range for a particular Price object? and let the customer choose how much to pay between that range?
yes and pass it in at the time of creating a payment link - but no I need to make sure they pay the exact amount that I specify
yes to a range, no to letting them decide
I think the only way this works is whatever logic they use to determine the price, I would need to reproduce that logic within the stripe product
is this what you're looking for? think it may not be possible to achieve this via the API though
no, because I cannot let them choose. Sometimes the price of the product might be 12.50, sometimes 13.75, sometimes 22.25...it differs from customer to customer.
more typically it will be the same price 90% of the time. The other 10% it can vary quite a bit.
i think i understand what you're trying to do - you would want to use Checkout Sessions instead to generate the Price inline / adhoc and define the amount : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
I would send the customer a link to your app, and your app would then generate a Checkout Session when the customer loads the page