#alex-expand-php
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- alex-subscription-expand, 2 hours ago, 7 messages
- alexelba, 2 days ago, 25 messages
- alexelba, 2 days ago, 8 messages
- alexelba, 5 days ago, 18 messages
- alexelba, 6 days ago, 5 messages
I try both way, no error
alex-expand-php
@finite cosmos you want $stripe_invoice = \Stripe\Invoice::retrieve([ 'id' => $payment_intent->invoice, 'expand' => ['latest_charge', 'invoice.balance_transaction'], ]);
You're using a pretty old approach in php that requires this hack
I honestly don't care how to do it, I want to get fees charged by stripe for each invoice which got paid for subscription
regular and prorated invoices
if there is better way to do it please let me know
I did give you the way, and then I linked you to the exact page that explains the alternative
you said it is hack ๐
Well it's just a tweak in how to call the API. Could you just try the code?
trying now
looking at code, looks I need to create checkout session/
?
I don't have checkout session
do I need to do for each invoice stripe subscription creates?
The example code above is just about \Stripe\Invoice:retrieve Why would you need Checkout Session ๐
๐ oh, the code you put inside of chat, I was looking at link sorry
This property cannot be expanded (latest_charge).
Error: This property cannot be expanded (latest_charge).
Can you provide its Invoice Id here?