#primalfreeze_best-practices

1 messages ยท Page 1 of 1 (latest)

static treeBOT
#

๐Ÿ‘‹ 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.

unreal jackal
#

hello! So if i understand what you're trying to do, you are creating an Invoice with collection_method: "send_invoice"?

abstract jetty
#

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

unreal jackal
#

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?

abstract jetty
#

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

fiery wigeon
#

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?

abstract jetty
#

Heya, yeah pretty much

#

Like free-text line items with no preset price?

fiery wigeon
abstract jetty
#

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

fiery wigeon
#

For [0], you will be creating an invoice item which that be done passing only a customer id, amount and currency

abstract jetty
#

Do I create a header and then individual line items, or all in a single call?

#

Like via a sub collection or something

fiery wigeon
#

you would need to make two calls at least. One to create the invoice, and then another to create the invoice item

abstract jetty
#

Ok that's cool.

fiery wigeon
#

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.

[0] https://docs.stripe.com/api/invoiceitems/create