#MarkoBoras
1 messages · Page 1 of 1 (latest)
I have worked only with type subscription and I am not sure how to handle this.
Hi! Let me help you with this.
If I have explained badly I'll explain again.
You can use price_data to create a price dynamically: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
But I still need to create products in Stripe?
because this is the app that I need to create
Client has some big arena where players can play
- Laser Tag
- Escape Room
- Birthday special (book everything)
Then each of them has a lot of different cases to handle and I don't what price will be because price is changed according to number of people, time slot and upsells (cake, gopro,photographer,....)
I don't want to bother you with my business logic but do you understand what I need to achieve
You can pre-create the products, or use product_data for creating products dynamically: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data
I don't see where I can pass the price
are you here
I'll ask someone else help
nvm
Not sure what do you mean?
You can pass the price_data into your line_item and then product_data into the price_data object, as you see in the docs that I shared.
I don't know if you need to use product_data, it depends on how many distinct product name/image/descriptions you have.
If you have a limited amount it's better to pre-create them in the Dashboard
I need to explain this more because I still don't know how to ask you some questions.
I see that I need to use volume pricing for number of people and graduated pricing because my client wants this case for example
- 8people 150$
- each new user is 10$
typescript
or if you want more specific
react,typescript and firebase functions as a backend
It's a one-time payment, right?
yeah
for example this is easy case
one of them
how would you handle this
- Single Game
Capacity: 1-4players (Reserve a spot for up to 4players)
Price: 5€ per person (Without a membership card)
as you can see I don't know in advance what user will advance
this case is just a one of many cases like this
Do you want them to select the number of people on your website on on Stripe Checkout page?
can they do that on checkout
whatever they can do on checkout
I would do that
what's the difference if you can help me please
If they do it on your website, you calculate the total amount in your app, and use set price_data.amount.
If they do it on your website, you pre-create the price for 1 player, and then allow the customers to adjust the amount on the Checkout page: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-adjustable_quantity-enabled
You can set min/max
can I handle this case in checkout
there is some arena that has 16 people capacity
one person is 10$
if user books arena for 9 or less people he needs to pay additional 50$ to have arena for himself
if user books arena for 10-16 that is free then
so for example 7people is 70$ +50$
can I handle that through checkout or I should do that through my app
I understand, let me check quickly
No, unfortunately it is not possible. You will need to do the calculation on your website, and then submit the final amount to Checkout Session in price_data.amount
Happy to help. Please, let me know if you have any other questions.