#dudewonder
1 messages · Page 1 of 1 (latest)
Hello! Yeah, this sounds possible in a number of different ways. How is the time tracked? Does the customer pay for the amount of time they want up front, or is it billed based on actual time spent at the end?
It can actually be both but for the sake of this example, let's say up front.
Do you want to use a Stripe-hosted payment page (easier) or build a custom payment page?
I'd probably start with the hosted payment page first and if ever I have requirements that the hpp can't meet, I'd go custom.
Okay, I would recommend you create Checkout Sessions on your server and, instead of creating Prices up front, you can specify ad-hoc price_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
That way you can calculate the amount you want to charge on your server, using your own calculations based on equipment, time, etc. and pass in the specific amount when you create the Checkout Session.
Perfect! Do I need to create any products beforehand or is everything ad-hoc?
You can do it either way.
You can specify an existing Product inside price_data or specify ad-hoc product_data inside price_data.
Ok, great. What would the reporting look like in both cases? I'd want to permit the client to have as much information possible about their transactions.
And also permit them to search through the transactions.
You can build all of that on your end and give them a custom view of things, or if they have access to the Dashboard they can see all the standard Stripe reports and whatnot.
Yeah, I was probably going to do the bulk of the reporting on my end. I can send requests to the Stripe API for the transactions correct?
Yep, you can list Checkout Sessions, you can list Payment Intents, etc. For example: https://stripe.com/docs/api/checkout/sessions/list