#maximepvrt_api
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/1486397209535844452
📝 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.
- maximepvrt_api, 42 minutes ago, 10 messages
- maximepvrt_api, 1 day ago, 6 messages
- maximepvrt_api, 1 day ago, 8 messages
even though several direct relations have been removed—such as charge.balance_transaction or the direct invoice link from a Charge—requesting an expansion on these fields does not trigger an error.
For example, the following call executes without any exception:
\Stripe\Invoice::retrieve(['id' => 'in_xxxx', 'expand' => ['charge.balance_transaction']]);
The API simply ignores the expansion, which is highly misleading. Instead of receiving an error stating that the property cannot be expanded (as happens in other contexts), the code continues to run, but the returned object lacks the expected data. This makes it difficult to audit code for breaking changes during a migration.
hello!! trust me, you are not the first person to run into this 😅 i know this has been confusing to many people trying to migrate before you, and IIRC we've had some conversations around trying to improve it but i can't remember off the top of my head where that has led
do you need any help with finding the right object linkages or are you just looking to provide feedback on the silent failure?
Thank you for your understanding. My main goal is indeed to provide feedback regarding this 'silent failure' bug, as it makes debugging the migration much harder than it should be.
It would be very helpful if the API consistently triggered an error when an expansion is no longer supported, rather than failing silently.
More broadly, this migration is proving to be very complex. Due to the new restrictions on expansion depth and the decoupling of the Charge object, I am now forced to perform multiple API calls where a single one used to suffice. This significantly impacts performance and increases the complexity of our integration.
You cannot expand more than 4 levels of a property. Property: data.payments.data.payment.payment_intent.latest_charge.balance_transaction
for
$invoices = Invoice::all([
'limit' => 100,
'created' => [
'gte' => $gte->timestamp,
'lte' => $lte->timestamp,
],
'expand' => [
'data.customer',
'data.payments.data.payment.payment_intent.latest_charge.balance_transaction',
'data.lines.data.pricing.price_details.price',
]
]);
@low zealot