#thekents_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/1382999037866803262
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
That support message doesn't help since line_item only takes desciption at line_items.price_data.product_data.description
This description only shows in checkout (embedded) but not on the invoice pdf itself nor on dashboard
hello! fyi im looking into this now
can you share an example invoice? i just created one and it looks like mine populated with the description i set
sorry, i meant an invoice ID (e.g. in_*****)
that way i can look at the API requests you're making to generate it
in_1RZSqwC8VwQdnO07qMJ4BWws
And here is the prod id of one of the items included: prod_SURjd0lqziGsgw
ahhh i see, this originates from a checkout session
this one specifically cs_test_b1V1qhQ2UBN35XRQwwQkKzekORqIYA7VX9m5JFOYL7jeksXmlEQru1W01f
meaning? i guess it doesnt work for post payment invoices?
nope, i was just creating my invoice directly using the invoice API. setting the line item description worked in this context, but i can't remember off the top of my head how this works for checkout sessions so i might need to test it out real quick
okay, it would be great if you could test it ๐
const lineItem: LineItem = {
price_data: {
currency: 'eur',
product_data: {
name: determineLineItemName(item, fetchedProduct),
images:
fetchedProduct.product_images &&
fetchedProduct.product_images.length > 0
? [determineImageUrl(item, fetchedProduct.product_images)]
: [],
metadata: metadata as Metadata,
description: fetchedProduct.description_fi ?? '',
},
tax_behavior: 'inclusive',
unit_amount: calculateLineItemPrice(item, fetchedProduct),
},
quantity:
hasPresaleBeenActivated || availableQuantity >= item.cart_quantity
? item.cart_quantity
: availableQuantity,
};
this is my current creation of lineItem
hmmm yep, i think in the context of checkout sessions it just uses the product name
i can't see a way to make it behave otherwise
that kinda sucks since i have to chain all the item properties together
let me keep poking at it for a bit for you though
alright thanks
asdasd (Ulkopuolelle) (Rannekoru) (Hopea) - Fontti: Kursivoitu
so currently i have to chain the engraving, engraving side, product category, color, font and possibly size all together in the product name
It would be alot nicer to have it all in the description like shopify has it
ok, just checked with a colleague on this and it does look like this isn't possible for invoices created via checkout sessions unfortunately
๐ฆ
if you are open to using the invoicing API directly you can use the description property of the Invoice Item which will supersede the product name
how does that work?
and in the meantime i can pass this gap along to our product team to see if they will consider building support for this in checkout at some point
Yeah that would be nice
if you could please point me towards some docs about invoicing api or show some examples, that would be great
Hey! Taking over for my colleague. I think this is a good starting guide to integrate one time payment invoices:
https://docs.stripe.com/invoicing/integration/quickstart
And this is the same guide for replacing post-payment invoices? What about the pricing for doing invoices this way instead?
And this is the same guide for replacing post-payment invoices?
Not really, as in this flow you create the invoice first, you use it for accepting the payment from your customer
What about the pricing for doing invoices this way instead?
Sorry, we don't know much about Stripe pricing here, this channel is for technical integration questions only. You should reach out to Stripe Support regarding this support.stripe.com
https://stripe.com/invoicing/pricing
It seems that it is the same 0.4% of the paid invoice
How would this work then for checkout session?
Checkout Session is generating automatically post payment invoice (the same object but different flow)
And if now i want to have line item description show in the invoice I need to
1.remove invoice_creation property from checkoutsession creation
2. after checkoutsession is completed then in webhook create and send an invoice based on the docs you sent previously
No no need for Stripe Checkout Session in this case.
You simply create an invoice following the guide I shared
and then instead of sharing a Checkout Sesssion with the Customer
you send them the invoice and they'll have a hosted invoice url to complete the payment
Or you can share the hosted invoice url with your customer like you do with Checkout Session:
https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
With the new flow, you'll do cart->invoice hosted page
is there a sample you could share on how this hosted page looks like
I think you can see this in your Stripe Dashboard:
https://dashboard.stripe.com/test/settings/branding
Or you can create a quick test following this guide I shared with you earlier and open the hosted invoice url generated from that invoice:
<https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url