#fen-paymentlink-pricedata

1 messages · Page 1 of 1 (latest)

magic frostBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • fen_god, 19 hours ago, 10 messages
frank merlin
#

fen-paymentlink-pricedata

#

@vivid leaf There isn't really a way to do this with PaymentLink other than simply creating a new Price each time. It does work totally fine though so that's what I'd recommend to be honest

magic frostBOT
vivid leaf
#

When i create a payment link via the dashboard the frontend allows me to specify a min and max for the amount. Although for relating Create Payment Link API endpoint, there is no properties that represent a min or max. Is this something that can be only done via the dashboard?

When i inspect the request body of the event relating to the payment link created via the dashboard, i can see an api object i.e
"price_data": {
"custom_unit_amount": {
"enabled": "true",
"preset": "100000",
"minimum": "100000",
"maximum": "100001"
},"

Why cant this be done by the API?

silk dagger
#

👋 hopping in here since koopajah had to head out

#

You'd first want to create a Price using the API and the you'd use that Price ID under line_items[].price when you create the Payment Link

vivid leaf
#

So then what price is used when creating the payment link via the dashboard? From my perspective its creating one 'on the fly'

silk dagger
#

Sorry let me clarify - the Dashboard is using line_items[].price_data which creates the Price and the Payment LInk in the same request. That specific attribute is dashboard-only, but you can accomplish the same thing by first creating the Price in a separate request

vivid leaf
#

For the dashboard-only, does the customers specified price get saved in stripe as a new price object?

silk dagger
#

yup!

vivid leaf
#

how? When the price hasn't been linked to a product? Unless the product by default is 'customer chooses'?

silk dagger
#

The dashboard is likely either setting price_data.product or price_data.product_data (which would create the product in-line)

vivid leaf
#

Is there a concept of one time products that could be used for payment links?

#

Similar to how Stripe Invoices have one time products.

silk dagger
#

No, there's really no way around this right now

#

If you want to use Payment Links your only option is to create a Price separately