Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mclarenmervin/a0a98486b21c0726d46c7716998caa87 to your computer and use it in GitHub Desktop.
Save mclarenmervin/a0a98486b21c0726d46c7716998caa87 to your computer and use it in GitHub Desktop.
<?php
$sec_key = 'sk_live_xxxxxxxxxxxxxxxxxxx';
require_once 'stripe-php/init.php';
$stripe = new \Stripe\StripeClient($sec_key);
$invoices = $stripe->invoices->all([ 'status' => 'uncollectible', 'limit' => 30 ]);
foreach ($invoices as $key => $value) {
$stripe->invoices->voidInvoice($value->id, []);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment