#linups_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/1422547571913658560
๐ 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.
- linups_code, 38 minutes ago, 36 messages
- linups_code, 4 days ago, 29 messages
hi there!
are you using the latest API version (Basil)? if so, we removed the PaymentIntent from the Invoice, so it's normal that you cannot get the client secret this way.
"stripe_version" => "2025-08-27.basil"
yep. so in this case you need to expand this instead: latest_invoice.confirmation_secret
which contains the client secret: https://docs.stripe.com/api/invoices/object#invoice_object-confirmation_secret
uch... so many ways to go ๐
Like this ? : $invoice = $stripe->invoices->retrieve($subscription->latest_invoice, [
'expand' => ['latest_invoice.confirmation_secret'],
]);
wait sorry, the code I shared is if you want to use expand when creating the Subscription. if you directly retrive the Invoice, then it's just confirmation_secret you need to expand.
yes... but then it returns as "NULL"
can you share the Invoice ID (in_xxx)?
that invoide is in Draft, so it's expected that there is no client_secret
you first need to finalize the invoice
also note you don't need to retrive the subscription with an extra API call here. you could instead use expand when creating the schedule with expand => ['subscription']
$subscriptionSchedule = $stripe->subscriptionSchedules->create();
$subscription = $stripe->subscriptions->retrieve($subscriptionSchedule->subscription, []);
thank you, checking...
yes, that works. thank you for the help.