#sunnylbk

1 messages ยท Page 1 of 1 (latest)

cursive shardBOT
cloud void
#

stripeInvoice.setAmountDue(10000L)
Where is this method coming from? I don't know what setAmountDue is.

cold rover
cloud void
#

Ohhhh, it's Java. Duh

#

My mind saw var and just went straight to JS

cold rover
#

Java 17 ๐Ÿ™‚

cloud void
#

Where's the code for invoiceParams?

#

Can you not set the amount there?

cold rover
#

there's no amount field in invoiceParams

cloud void
cursive shardBOT
cold rover
#

Can we not create invoice with custom line items without the price objects?

distant obsidian
#

Hi there

cold rover
#

I created this, and I also attached to the invoice. But the invoice due is still o

distant obsidian
#

Can you share invoice id? And invoice item id that you created?

cold rover
#

Actually, I was able to create the invoice and it's showing the right amount now. Here is ths snippet ``` Invoice stripeInvoice = Invoice.create(invoiceParams, requestOptions);
var invoiceItemCreateParams = InvoiceItemCreateParams.builder()
.setAmount(100L)
.setCurrency("inr")
.setDescription("Product A")
.setInvoice(stripeInvoice.getId())
.setCustomer(customerId)
.build();
InvoiceItem.create(invoiceItemCreateParams, requestOptions);

    var finalized = stripeInvoice.finalizeInvoice(requestOptions);```
#

Thanks!

distant obsidian
#

Awesome