#thanos-kir_void-invoice-connect

1 messages ยท Page 1 of 1 (latest)

hot pierBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1246023022150815804

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

short cliff
tiny raven
#

The account ID where the invoice belongs is this one: acct_1O0k4FLtNSGOnLOJ

#

And I will give you the invoice rigth now

#

Here is the invoice id: in_1PM4zuLtNSGOnLOJFaNkc054

short cliff
tiny raven
#

Correct

#

I am using the Stripe connect

short cliff
#

I imagine you are trying to make the request using the API secret key of this platform account acct_1NJcADCxgVJcbkxu (which is yours )?

tiny raven
#

Correct

#

Brb, sorry I need to go to the bathroom

short cliff
hot pierBOT
#

thanos-kir_void-invoice-connect

gray pilot
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

tiny raven
#

back

gray pilot
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

give me a minute please

tiny raven
#

Sure

gray pilot
#

which is basically the same thing that my colleague suggested earlier

tiny raven
#

Hmm, what's the point of this request? So I will use this $stripe->charges->retrieve to get all the charges from the connected account and then what?

gray pilot
#

no that's not what I meant

#

the link I sent you shows you how to add the StripeAccount Header to any API call

tiny raven
#

ah ok! I have already made this

gray pilot
#

so if you want to void the invoice on a connected account you call the void invoice API

tiny raven
#

to my API services

gray pilot
#

with the Stripe Account header

tiny raven
#

yes

#

let me show you the code

gray pilot
#

that's the API I was referring to

gray pilot
tiny raven
#

$this
->stripe
->invoices
->voidInvoice(
$invoiceId,
['stripe_account' => $accountId]
);

gray pilot
#

๐Ÿ‘

tiny raven
#

I have already created many services which create subscriptions, products, customers etc to the connected accounts

#

Maybe I will try to run the same request for the parent account to see if it is working

#

But I want to know if the stripe->invoices->voidInvoice will update the uncollectible invoice

#

And how I can update it to also to paid (for future cases)

gray pilot
#

void invoice will cancel the invoice entirely

#

from an accounting perspective

tiny raven
#

I know

#

thanks for the info but I want to void it

#

or to mark it as paid outside of stripe

#

these actions I made them via UI

#

but I can't find the right api call

gray pilot
#

yes you can do both actually

tiny raven
#

Perfect, thanks!

#

And what about the void? Is this stripe->invoices->voidInvoice legit?

late shadow
#

hi! I'm taking over this thread.

#

what do you mean by "legit"?

tiny raven
#

is it working? Because I tried to a connected account and it didn't work

late shadow
#

what didn't work exactly? what was the exact error message?

tiny raven
#

When I run the above code it returns that the invoice does not exist.
I assume I can't void the invoice because it hasn't been finalized?

late shadow
tiny raven
#

Does this API call works on uncollectible invoices?

late shadow
#

if you are trying to void an invoice that doesn't exist, it's normal that it fails. I need to see the request ID in order to better untersant the issue

tiny raven
#

req_s2r1FpUgFptJNM

#

I see that the request send to the parent account instead of the connected account

#

Maybe that was the problem

late shadow
#

indeed. you need to use the Stripe-Account header if the invoice is on a connected account

tiny raven
#

I did

#

I will check again my code

late shadow
#

not in this request

tiny raven
#

Could you confirm that this api call stripe->invoices->voidInvoice works on uncollectible invoices?

late shadow
#

not sure, I recommend testing this on your end. if it doesn't work, you'll get a clear error message about this.

tiny raven
#

Hmm, but I can make the same action via UI

#

It is a bit frustrating to not be supported via the API

late shadow
#

if you can void an uncollectible invoice in the dashboard, it should also work with the API