#jgcardelus_product-price-implementation
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1334580030109384799
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
There are no specific limitations on how many Products/Prices you can create. How you choose to implement this is up to you
It might make sense to use Products to group categories or types and then define different Price objects for more detailed breakdowns.
What factors cause the prices to vary?
Also, you only need Products & Prices if you plan to use Checkout or Billing (Invoice/Subscriptions)
Hi! Thanks for the quick reply. Prices depend on stay duration and size of the apartment + any possible damage
You can create a Payment Intent for whatever amount you want
You could also create Prices based on units (e.g. per square foot or per day) that vary the units for each individual charge
I hadn't looked at that. It makes more sense to have one Payment Intent per cleaning, right?
I also need to collect a security deposit from clients, could I create a Payment Intent with the security deposit, the cleaning fee and later return the security deposit?
Okay I worry we're mixing up use cases here. So let's step back.
How do you intend to collect payment data from your Customers?
Ok. My customers book an apartment for a duration of time. Based on the price of the booking we calculate the security deposit and based on the duration of the stay and the size of the house the cleaning fee. Before the customer enters the apartment, they pay both. After the customer has left the apartment, if no damages are found, we return the security deposit.
Sorry that's not what I meant. What Stripe product are you planning on using to collect payment from your customers?
My bad. I was planning to use checkout
Okay so you will need to use Products and Prices, since those are required for the line_items parameter
How you choose to implement them, again, is fundamentally up to you. But it would make sense to use different line_items for the different charges that are being added up in a single transaction
e.g.
- $/square foot = $X
- $/day = $Y
- Security deposit = $Z
You can then refund the security deposit (or whatever portion of the security deposit you want to refund)
https://docs.stripe.com/refunds
You can also refund only part of a payment by specifying an amount.
Ok great. Thank you so much for the help!
Sure thing! Happy to help ๐