#nickdnk_basil-changlog-lang-discrepancy
1 messages Ā· Page 1 of 1 (latest)
š Welcome to your new thread!
ā²ļø We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
ā±ļø We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1470474852828975166
š Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- nickdnk_api, 2 hours ago, 14 messages
Ack, thanks for flagging this.
Is the concern here specifically about the deprecated/removed fields discrepancy? I notice the list is longer for some SDKs than others; while the Ruby SDK apparently isn't impacted at all.
Which is ...weird, but I would expect that has more to do with the state of the SDKs prior to this change
I'm not sure if the other SDKs just never had that field (but I would assume they all did?), I just know that I used $invoice->subscription in PHP, which I can't anymore
But I may be misunderstanding
so it should be listed in the table as removed on that object
Gotcha okay okay
it's a minor thing, but there are a lot of changes to go through and you could miss it
Yeah but worth flagging.
So many people YOLO their SDK/API upgrades, it will save us headache to make sure this is known upfront
If you read all the text and review your code you'll still find it, but it should just be 1:1
What version did you upgrade from?
SDK or API version?
SDK
Thanks. I have flagged this discrepancy.
nickdnk_basil-changlog-lang-discrepancy
No problem. Edit: Err, I mean thanks. Or I guess both work.
Sure thing! Hopefully we'll get that sorted soon
Not a rush for me of course. I'll report whatever else I find, so I may be back.
I have another unrelated question. Do you want me to open another thread?
No here is fine
Okay. So I'm trying to list all invoices and I want to get to the payment method used. Previously, I could do:
$params = [
'customer' => 'customer_id_here',
'limit' => 15,
'expand' => ['data.payment_intent.source', 'data.charge']
];
$invoices = $stripe->invoices->all($params);
foreach ($invoices->data as $invoice) {
if ($charge = $invoice->charge) {
switch ($charge->payment_method_details?->type) {
// do something
}
}
}
How do I get there with the payment listing logic? It seems to me I need to expand beyond the 4 limit (data.payments.data.payment.payment_intent.charge ??) Or do I have to loop and fetch each, cause that's going to be slow
Ah, this looks like it's the breaking of Invoice from the Payment Intent (and related Charge). It's much more work now š¤¦āāļø
Yes, so what do I do
Docs say you don't surface payment.charge if there's a payment intent, which I guess is true for all payments these days
so I can't even shortcut to payments.charge cause allegedly it won't be there
And even that is painful because it's invoice.payments.payment.charge
I think so. We flagged, when basil was released, that this broke expansion patterns commonly used in List requests.
No, it's invoice.payments.payment.payment_intent.charge
which is 5
AH even more š¤¦āāļø
charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.
Yes
So what am I supposed to do?
Retrieve the PI and expand the change and PM
but that means a listing is multipled in requests by the list length
it's going to be painfully slow
Yeah, we flagged all of this.
Big oof
Although it may be worth testing. Because I have seen expansion work to what appears to be 5 levels I think.
For a single invoice, the following works:
expand: {
0: "lines.data.pricing.price_details.price",
},
data doesn't count
it's equal to lines.pricing.price_details.price
cause it's a list
so; invoice.payments.payment.payment_intent.charge is equal to invoice.payments.data.payment.payment_intent.charge
both are 5
Hmmm.... I just tested "lines.data.pricing.price_details.price.product" and that worked
But, I am on 2025-12-15.clover
that shouldnt work unless you changed the expand limit
And using a beta version of the Python SDK (since I needed to test some preview features)
Can you find out for me if this was officially changed? I have a lot of places where I am stopping at 4
SDK shouldn't matter, it's just a string passed to the API
like for the limit, I mean
Well actually I am listing invoices, not subscriptions, so I can probably get by with 4:
data.payments.data.payment.payment_intent.charge
Okay there are some places where it appears we support 5 layers but they do not appear to be clearly documented.
Maybe it only applies to properties that can be expanded. I.e. payments.payment.payment_intent.charge is only 3 expands because payment is not being expanded
Not entirely clear if it's 4 nested layers or 4 expands
if that is the case, it's a lot less restrictive than I thought
Okay my colleague found the code where we exempt certain properties. Unfortunately Payment Intents and Charges are not in that list. I can file this as feedback though.
It's probably one of the most commonly expanded objects, so I'm guessing there's a reason it's limited, or that it's not exempt
but this is not the case, or ?
either way I only seem to count 4 now, for what I need
https://docs.stripe.com/changelog/clover/2025-12-15/expandable-price-details-price
Ah, we found the change and it is only for the most recent API version
Isn't this just an addition of something that can be expanded now but couldn't before? Doesn't look like it's deeper than usual
It mentions a change but doesn't call out that my 5 level expansion request gets exempted from the 4 level expansion limit. Unfortunately, this does not apply to the payments property and thus, you will still need 2 API requests to get the payment methods for each Invoice.
Okay, but looking at it again I only count 4 expansions from invoice list to charge: data.payments.data.payment.payment_intent.charge
So I'll try that
Okay, sounds good