#pkdiscgolf - checkout price
1 messages ยท Page 1 of 1 (latest)
HI ๐
In that case where you don't have a Stripe Price object with an ID, you will need to specify the price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so i need to add the "price_data" object to the line items object with a unit_amount?
Yes, that will allow you to define the price amount without creating a Stripe price record
Thanks, i got it to work
It made me add "product data" in order to get it to work. Do you know why that is needed?
Snufkin had to step out but I do know why that is needed. When creating a line item, you need to pass in product info in one of two ways:
- Create a Product in beforehand and pass its ID (
prod_123) in as theproductfield for your line item - Provide info to create an ad-hoc product via
product_dataas you did just now
is this product data stored somewhere?
Yes, you can see it again by retrieving the Checkout Session that you created
Can you tell me a bit more about what you are trying to do here?
I am creating an event signup platform
Users need to choose between different levels of entry
Users need to also choose add ons
Then once price is figure out, i need to initiate payment, then add successful payment /entry/addons into databse
Im retired for the day though. Thanks for the help