#bethany4036
1 messages · Page 1 of 1 (latest)
Hi what's the question?
I've defined a cyo price in the dashboard, with a minimum amount of $10, but sometimes the user might owe more than that. So I'm wondering if it's possible to adjust the minimum on the fly when I create the checkout session. I've been digging through documentation, and it's kind of looking like a no... but can't hurt to ask, eh?
does that make sense?
Yeah that makes sense
But, no it's not currently possible
You'd need to create a new price with a new minimum prior to creating the session to achieve this
ok. thanks!
if i give up the "optional overpay" and just use checkout to have the user pay off these theoretical balances, can I adjust the dynamically? or do i have to create a new price for each separate amount? e.g. if one user owes 11.50 and another owes $27.34, is that gonna wind up as two different prices stored forevermore?
If you give up the optional overpay, you can pass amounts on the fly: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-unit_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And that won't create a price object in your account
ok, i wasn't sure if "to generate a new Price inline" meant that it'd only exist inline there, vs "we'll create it for real etc"
Yeah it only exists in the scope of that session
and one more payments question: I think, according to the documentation, it's not currently possible to pass an existing customer to a payment link? but maybe i heard / read somewhere that that feature was coming? and possibly would be in Beta soon?
Yeah that's not currently possible