#archmaze-credit-notes

1 messages ยท Page 1 of 1 (latest)

granite wedgeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

warm belfry
#

Hello

#

Can you share the request ID for the error?

gusty notch
#

requst id ?

#

StripeInvalidRequestError:

warm belfry
gusty notch
#

req_0CEyz7vPS9ysZo

warm belfry
#

Thanks, looking

twin plaza
gusty notch
#

along with quantity ?

twin plaza
#

I believe so

#

give it a try

gusty notch
#

ok

#

You may only specify one of these parameters: amount, quantity. ... getting this error so i'm gonna try with amount only

twin plaza
#

๐Ÿ‘

gusty notch
#

The sum of credit amount, refund amount and out of band amount ($0.00) must equal the credit note amount ($720.00) getting this now

twin plaza
#

can you share the request ID?

gusty notch
#

const creditNote = await stripe.creditNotes.create({
invoice: invoice.id,
lines: invoice.lines.data.map(lineItem => ({
type: 'invoice_line_item',
invoice_line_item: lineItem.id,
amount: 72000
})),
});

this is my code sample

#

req_Ia3uuUQk124c0j

twin plaza
#

oh the amount needs to be a sibling parameter to lines and not part of the lines

#
  invoice: '{{INVOICE_ID}}',
  lines: [
    {
      type: 'invoice_line_item',
      invoice_line_item: '{{INVOICE_LINE_ITEM}}',
      quantity: N,
    },
  ],
  refund_amount: xxx,
});```
gusty notch
#

ok let me try it

twin plaza
#

did that work? @gusty notch

gusty notch
#

yes it did.. but i thought with credit note it won't charge for new subscription....

#

but it's basically charging the customer and refunding

twin plaza
#

What are you trying to do exactly? What's the usecase here?

gusty notch
#

i'm letting user to pay uncollectible invoice and after they pay the invoice i called a webhook and create a new subscription

granite wedgeBOT
twin plaza
#

So are you trying to use credit notes to offset the cost of the new subscription?

gusty notch
#

yes

fast valve
#

๐Ÿ‘‹ hopping in here since hanzo has to head out soon - am I understanding correctly that your goal is for some of the funds from the now paid, uncollectible invoice to be automatically applied towards the cost of the new subscription?

granite wedgeBOT
#

archmaze-credit-notes

gusty notch
#

yes it is