#Mallain23

1 messages ยท Page 1 of 1 (latest)

carmine heraldBOT
static parcel
#

Hi ๐Ÿ‘‹ you will need to make all necessary calls to create a new Invoice that is identical to the one you're trying to clone (there is no endpoint to clone/duplicate an existing Invoice), and then use this endpoint to void the previous one:
https://stripe.com/docs/api/invoices/void

silk flicker
#

Well there is an endpoint to duplicate an invoice

#

You can "revise" the invoice

#

By calling the create invoice endpoint with the "from_invoice" param

static parcel
#

Oh cool, sounds like that may work well for you.

silk flicker
#

No

#

It only works if the original invoice is open

#

but if I try to void the invoice it wont let me duplicate it or it wotn let me finalize the new invocie

static parcel
#

Interesting, I don't have hands on experience with that feature so I'm not exactly sure how it works. Are you able to create/finalize the new Invoice and then void the original?

silk flicker
#

Is there anyone who has more experience with that - that I could talk to

static parcel
#

Sorry, I'm not sure offhand if any of my teammates have experience with that. Is there a specific question about that parameter that you have that I can ask them?

static parcel
#

Gotcha, and what additional information are you looking for?

modest schooner
#

Hello ๐Ÿ‘‹
Taking over as toby needs to step away soon.

Circling back at your initial question

I am trying to duplicate and invoice and void the previous one. I can do this in the dashboard but not via the API - how do I achieve this?
That's exactly what from_invoice parameter does though, no?

silk flicker
#

My problem is that

#

I want to void the original invoice

#

but it wont let me finalize the new invoice if the old one is voided

#

But if i do this in the dashboard it allows it

#

What I really want to achieve is removing applied credits from the one off transaction because the user does not want them to apply

modest schooner
#

Gotcha. However, I don't understand how voiding the invoice after you've created a new one affects your usecase here

silk flicker
#

If you void the invoice it releases the credits that were applied to the original invoice

#

So the flow is 1. Invoice created with credits applied

#

Payment sheet is opened which finalzies the invoice

#

user closes payment sheet

#

User decides to remove credits

#

We want to revise the invoice and remove the credits applied (which we achieve by removing them from stripe)

modest schooner
#

When you say credits, you're referring to customer credit balance correct?

silk flicker
#

yup

modest schooner
#

Gotcha. I think customer credit balance applies to the next finalized invoice automatically.

Can you confirm if you want it to apply to the next invoice OR if you DON'T want it to apply to the next invoice?

silk flicker
#

I do not want it to apply to the invoice. THe way we are achieving this (bc stripe does not offer this feature) is to remove the credits from the customer and generate an invoice) and then credit them back

#

Yes that is what we do

modest schooner
#

Yeah unfortunately, that's the only way this would work via the API. I am pretty sure it is a dashboard only feature. I can flag this internally as a feature request for the API

silk flicker
#

My main question is

#

via the dashboard, i can void an invoice and then duplicate it and then i can finalzie and pay the new invoice

#

I can only duplicate an open invoice via the API and I am wondering why and if there is a way I can do this

modest schooner
#

That's what I clarified above, this might be a dashboard only feature at the moment

silk flicker
#

Are you guys planning on making this available via the API at anypoiint

modest schooner
#

I can flag it internally as a feature request for the API

#

Not sure if its on the road map, you can write in via our support team and raise this as a feature request yourself.
https://support.stripe.com/?contact=true

silk flicker
#

Ok thanks

modest schooner
#

NP! ๐Ÿ™‚ Sorry for the confusion earlier