#jovan-m_code
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/1389650198162046996
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Sounds like you are likely on our newer API version for this different account. With our new API version you would use the latest_invoice.confirmation_secret: https://docs.stripe.com/api/invoices/object?api-version=2025-05-28.basil#invoice_object-confirmation_secret
is this the new client secret?
Ahhh I finally got the client_secret:
https://passimage.in/i/c7554ee9a51b5b160413.png
Why we can't access the payment_intent anymore on invoice?
Yeah due to implementing partial payments there can be multiple PaymentIntents now associated to Invoices so there is not a direct 1:1 relationship anymore.
I see, thanks! Actually, I have been using ChatGPT for any Stripe-related questions, but I'm quite stuck with this specific case for like 16 hours now. I hope responses from ChatGPT will be updated soon.
I'm glad I reached out to you! Thanks for your quick response and help here!
Would recommend checking the docs if ChatGPT doesn't seem to give you the right information initially!
Yep, I am also reading the docs. Probably, I'll keep visiting the changelog frequently in the future.
Thanks again!
Sure thing!
How about this one:
$this->updatePaymentIntent($id, [
'metadata' => $metadata,
]);
I want to update the payment intent metadata. but how to get the payment intent id?
I am using this code:
$subscription = $this->stripe->subscriptions->create([
'customer' => $customer->id,
'items' => [['price' => 'price_1RdaLDPvdLCL8pZxjtRSwZZf']],
'payment_behavior' => 'default_incomplete',
'payment_settings' => ['save_default_payment_method' => 'on_subscription'],
'expand' => ['latest_invoice.confirmation_secret'],
]);
$this->updatePaymentIntent('PI_ID', [
'metadata' => $metadata,
]);
You want to list Invoice Payments using https://docs.stripe.com/api/invoice-payment/list?api-version=2025-05-28.basil#list_invoice_payments-invoice
That will return the PaymentIntent ID
I see, thanks!