Hi,
Stripe API is actually full of hidden features. While I'm not sure you can get unpaid invoices, you can easily retrieve unpaid charges by using the "paid" boolean filter (not documented, but it works): GET /charges?paid=false
If you expand the invoice, you will get the unpaid charges with the associated invoice. Note that when a charge fails for an invoice, the invoice then recreate a NEW charge for subsequence retries. This means that although you retrieve the unpaid charges from the API, it does not mean that the invoice is still unpaid.
Alternatively, you can also retrieve all the customers that are delinquent (this means that they have at least one unpaid invoice) by using the undocumented "delinquent" boolean filter: GET /customers?delinquent=false
There are A LOT of other filters across various Stripe resources that are not documented (and could therefore by removed anytime soon), but as they are used in the dashboard, I hope Stripe team will not remove them ;)