#iandk-laravel-invoice
1 messages · Page 1 of 1 (latest)
hello, let's start here, mind sharing the full output you get from that API call?
and also the request ID for the GET request being made for the upcoming Invoice on your Dashboard Logs
Sure, this is the output for invoicesIncludingPending without any filter applied.
As expected it returns a Collection of all the invoices.
Illuminate\Support\Collection {#3238 ▼
#items: array:24 [▼
0 => Laravel\Cashier\Invoice {#1352 ▶}
1 => Laravel\Cashier\Invoice {#1346 ▶}
2 => Laravel\Cashier\Invoice {#1345 ▶}
3 => Laravel\Cashier\Invoice {#3147 ▶}
4 => Laravel\Cashier\Invoice {#3215 ▶}
5 => Laravel\Cashier\Invoice {#3219 ▶}
6 => Laravel\Cashier\Invoice {#3220 ▶}
7 => Laravel\Cashier\Invoice {#3221 ▶}
8 => Laravel\Cashier\Invoice {#3222 ▶}
9 => Laravel\Cashier\Invoice {#3223 ▶}
10 => Laravel\Cashier\Invoice {#3224 ▶}
11 => Laravel\Cashier\Invoice {#3225 ▶}
12 => Laravel\Cashier\Invoice {#3226 ▶}
13 => Laravel\Cashier\Invoice {#3227 ▶}
14 => Laravel\Cashier\Invoice {#3228 ▶}
15 => Laravel\Cashier\Invoice {#3229 ▶}
16 => Laravel\Cashier\Invoice {#3230 ▶}
17 => Laravel\Cashier\Invoice {#3231 ▶}
18 => Laravel\Cashier\Invoice {#3232 ▶}
19 => Laravel\Cashier\Invoice {#3233 ▶}
20 => Laravel\Cashier\Invoice {#3234 ▶}
21 => Laravel\Cashier\Invoice {#3235 ▶}
22 => Laravel\Cashier\Invoice {#3236 ▶}
23 => Laravel\Cashier\Invoice {#3237 ▶}
]
#escapeWhenCastingToString: false
}
However when filtering for open invoices it returns an empty array, even tho the customer has a unpaid invoice
#items: []
#escapeWhenCastingToString: false
}
req_pzxrKhsYRTfyqX
looking
Thank you!
ok so that request ID req_pzxrKhsYRTfyqX - was that for no filter or with filter? (no filter right?)
that was without filter, however the filter is only serverside, so it probably fetches all invoices anyway
can you share the request ID of the one with the filter?
ah
thanks
looking
wait
that is a diff request, that is just fetching a Customer no?
my bad, copied the wrong id, sorry
req_drtEdWAiMzQ7Qx
same, wrong req
you can look up the request path on Dashboard Logs page
what you want is /v1/invoices
this is /v1/customers/cus_123
Those are the only get requests performed when viewing the invoices for a specific client
at least according to your logs
maybe I'm missing something here?
can you try this request again and see what corresponding /v1/invoices is made?
#959116428148105296 message
otherwise I can't trace anything if a request isn't being made! I assume there is, if it gives you the Laravel formatted "Invoices" list
I just tried it again, but still, only requests to /v1/invoices
That's my request
dd(auth()->user()->invoicesIncludingPending()->where('status', 'open'));
Using the Stripe Cashier Client
to clarify, a request to /v1/invoices is what we wanna see
your earlier requests were not that
the last two were /v1/customers/cus_123
At least one of those IDs should have been for a request to /v1/invoices 🙂
yeah the first one, which was without a status: open filter
ohh I see