#thekents_api

1 messages ยท Page 1 of 1 (latest)

golden wigeonBOT
#

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

dire trail
#

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

ember flower
#

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

dire trail
ember flower
#

sorry, i meant an invoice ID (e.g. in_*****)

#

that way i can look at the API requests you're making to generate it

dire trail
#

in_1RZSqwC8VwQdnO07qMJ4BWws

#

And here is the prod id of one of the items included: prod_SURjd0lqziGsgw

ember flower
#

ahhh i see, this originates from a checkout session

#

this one specifically cs_test_b1V1qhQ2UBN35XRQwwQkKzekORqIYA7VX9m5JFOYL7jeksXmlEQru1W01f

dire trail
#

meaning? i guess it doesnt work for post payment invoices?

ember flower
#

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

dire trail
#

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

ember flower
#

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

dire trail
#

that kinda sucks since i have to chain all the item properties together

ember flower
#

let me keep poking at it for a bit for you though

dire trail
#

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

golden wigeonBOT
ember flower
#

ok, just checked with a colleague on this and it does look like this isn't possible for invoices created via checkout sessions unfortunately

dire trail
#

๐Ÿ˜ฆ

ember flower
#

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

dire trail
#

how does that work?

ember flower
#

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

dire trail
#

if you could please point me towards some docs about invoicing api or show some examples, that would be great

rigid stump
dire trail
#

And this is the same guide for replacing post-payment invoices? What about the pricing for doing invoices this way instead?

rigid stump
#

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

dire trail
dire trail
rigid stump
#

Checkout Session is generating automatically post payment invoice (the same object but different flow)

dire trail
#

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

rigid stump
#

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

dire trail
#

This really wouldnt be ideal, I really would want a simple flow

#

cart to checkout

rigid stump
rigid stump
dire trail
#

is there a sample you could share on how this hosted page looks like

rigid stump
rigid stump
dire trail
#

Okay, I'll have a look on what is the best way to proceed. I have an upsell on current checkoutsession so this way of doing this is a bummer

#

Hopefully product team will have invoice settings for checkoutsessions aswell soon