#geeky-mechanic_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/1240365606419566732
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
But since the credit-notes sections doesn't refer to LineItems, or payment intents, and only refers to invoices, I'm not sure how I shall proceed
Should I use this :
CreditNoteCreateParams.builder()
.setInvoice("{{INVOICE_ID}}")
.addLine(
CreditNoteCreateParams.Line.builder()
.setType(CreditNoteCreateParams.Line.Type.INVOICE_LINE_ITEM)
.setInvoiceLineItem("{{INVOICE_LINE_ITEM}}")
.setQuantity(2L)
.build()
)
.setRefundAmount(500L)
.build();
CreditNote creditNote = CreditNote.create(params);```
But replace the INVOICE_LINE_ITEM type by a CUSTOM_LINE_ITEM type?
Still seems to want an invoice Id though
Yeah invoice ID is required : https://docs.stripe.com/api/credit_notes/create#create_credit_note-invoice
So you want to issue a credit note for the refunded Invoice, which means that a credit will be applied for that refunded Invoice to any future invoices that the customer has. Does that sound like the workflow you're trying out?
No, I want to refund a transaction made using a checkout session in live mode (not using setup intents)
Then in the refunds link I sent you, it mentions this :
"If you’re using Stripe Tax and have automatic_tax = enabled for certain transactions, you must use credit notes to accurately shift the tax liability associated with a refund or PaymentIntent cancellation"