#jovan-m_code

1 messages ¡ Page 1 of 1 (latest)

mellow haloBOT
#

👋 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.

cedar lichen
#

Hi there

delicate bolt
#

is this the new client secret?

cedar lichen
#

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.

delicate bolt
#

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!

cedar lichen
#

Would recommend checking the docs if ChatGPT doesn't seem to give you the right information initially!

delicate bolt
#

Yep, I am also reading the docs. Probably, I'll keep visiting the changelog frequently in the future.

#

Thanks again!

cedar lichen
#

Sure thing!

delicate bolt
#

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,
    ]);
cedar lichen
#

That will return the PaymentIntent ID

delicate bolt
#

I see, thanks!

mellow haloBOT