Level 1
I found the code
\Stripe\Stripe::setApiKey("");
$invoices = \Stripe\Invoice::all(["limit" => 100,"customer"=>'','status'=>'open']);
foreach ($invoices['data'] as $key => $value) {
$value->voidInvoice();
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi
i'm using cashier for stripe payment,now i'm trying to make some invoices as void, there is a function for retrieve invoices from stripe, but i didn't find out, how to update a invoice after scheduled.
kindly help me to solve this
I found the code
\Stripe\Stripe::setApiKey("");
$invoices = \Stripe\Invoice::all(["limit" => 100,"customer"=>'','status'=>'open']);
foreach ($invoices['data'] as $key => $value) {
$value->voidInvoice();
}
Please or to participate in this conversation.