#primalfreeze_best-practices
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/1376719477693218979
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! So if i understand what you're trying to do, you are creating an Invoice with collection_method: "send_invoice"?
Well that's pretty much what I want to figure out, I want to know the 'best practice' method of creating some form of 'payable' that an end user can then pay against
one-off invoices sound like what you're looking for. Are you looking to code an implementation, or ideally a no or low code solution?
Happy to code as much as needed. We already have in place functionality to create a PaymentLink and a CheckoutSession
But I don't think either of those work well with the flexible line item costs
I believe I originally had the CheckoutSession, but it didn't have line items, so moved to PaymentLink
hello @abstract jetty , I'm alex's teammate. Could you help us understand what you meant by "flexible line item cost"?
Do you mean you'd just like to create line items?
I see, gotcha. In that case, you can consider creating an Invoice Item [0] first, this should give you a invoice line item object. Then you can update [1] the invoice line item object with the prices you want to set under price_data โ this parameter lets you set your own prices for a line item without using a price id.
[0] https://docs.stripe.com/api/invoiceitems/create
[1] https://docs.stripe.com/api/invoice-line-item/update
Once your invoice is created and ready to be paid, you can send the invoice link to the customer for payment using the Hosted Invoice Page: https://docs.stripe.com/invoicing/hosted-invoice-page
In the initial create [0], am I referencing an item?
As in a product list item or w/e
What would the users be seeing now via the PaymentLink scenario? It won't be quite like that will it
For [0], you will be creating an invoice item which that be done passing only a customer id, amount and currency
Do I create a header and then individual line items, or all in a single call?
Like via a sub collection or something
you would need to make two calls at least. One to create the invoice, and then another to create the invoice item
Ok that's cool.
I also want to clarify that you wouldn't have to use update invoice line item to pass a price. When creating the Invoice Item [0], you would just need customer id, amount and currency.