#linups_code

1 messages ยท Page 1 of 1 (latest)

strong spearBOT
#

๐Ÿ‘‹ 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.

tawny vortex
#

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.

bronze raven
#

"stripe_version" => "2025-08-27.basil"

tawny vortex
#

yep. so in this case you need to expand this instead: latest_invoice.confirmation_secret

bronze raven
#

uch... so many ways to go ๐Ÿ™‚

#

Like this ? : $invoice = $stripe->invoices->retrieve($subscription->latest_invoice, [
'expand' => ['latest_invoice.confirmation_secret'],
]);

tawny vortex
#

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.

bronze raven
#

yes... but then it returns as "NULL"

tawny vortex
#

can you share the Invoice ID (in_xxx)?

bronze raven
#

sure

#

in_1SD22U2WxmpWlx1M4MZyErgN

tawny vortex
#

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, []);
bronze raven
#

thank you, checking...

bronze raven
#

yes, that works. thank you for the help.