#hoffemberg_api
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/1265744289674170369
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Hi
Payment Links are designed for a one-to-many approach whereas Checkout Sessions are for a one-to-one approach.
You don't pass a Customer ID to a Payment Link since it isn't meant for an individual customer
Ah, okay. Since each of our users generates custom products for their customers, then it sounds like Session.create() is the way to go. They email the links to their clients and get the payment info.
Overall yes, however Checkout Sessions expire within 24 hours
The idea of a Checkout Session is that the customer is present in your checkout flow
If you are sending a link then you do want to either use Payment Links (there are no limits on the amount of Payment Links you create) or you would use Invoices which will have a hosted payment URL associated with them.
Okay. One use case is that our users may want to split up large payments. Our users are photographers who use our software to generate various products (albums, wall displays, cards, etc.) for their customers. They sometimes want to take 50% up front, and 50% once the order is delivered from the photo lab. In the checkout session it looks like there is no way to charge a customer less than the sum of the line items. Can invoices do that?
You could use manual capture to capture a partial amount: https://docs.stripe.com/payments/place-a-hold-on-a-payment-method and then you charge that saved PaymentMethod again later
But otherwise, no, you can't take partial payments
I'm reading the info at the link now...
Okay, but with invoices, I can accept partial payments, correct?
No
But can I provide line items, say without prices, then just set the invoice total to whatever I want?
I'm not really sure what you mean by that
You can create Invoice Items for whatever amount you want, but once you finalize the Invoice then it can't be mutated
I haven't worked with invoices much yet, so assuming the line item generation is similar to Session.create(), let's say the invoice is for one album that costs $1000. Can I show on the invoice that the album price is $1000, but have the amount due on the invoice to be $500?
Sure if you have either a coupon or a negative invoice item
But you can't just arbitrarily set what the total amount is
It is the sum of the invoice items
With discounts/tax (if applicable)
The best thing for you to do here at this point is likely go test out Invoices a little bit so you get a feel for how they work
That is going to give you a better understanding than I can
Then feel free to come back with any specific questions that we can help with