#nimish-tank_code

1 messages ¡ Page 1 of 1 (latest)

half fableBOT
#

👋 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/1379309682279055425

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

pliant prawn
#

hello

#

$subscription = Subscription::create([
"customer" => $stripeCustomerId,
"items" => [
["price" => $paymentId],
],
'discounts' => $subscriptionDiscount,
"proration_behavior" => "none",
'metadata' => [
"platform" => config('constants.SUBSCRIPTION_PLATFORM'),
"transaction_type" => "subscription",
"machine_id" => $machineId
],
]);

This is my code
how to find the payment intent

shadow thorn
#

Hi! Thank you for waiting! Looking into your query now.

#

From 03-31-basil onwards, we removed the Payment Intent object from Invoice objects. [0] To retrieve the payment intent from an associated invoice, you need to make a GET call to List all Invoice Payments API [1] and pass the Invoice ID to this endpoint. It will return a list of Invoice Payment objects, where you can find the Payment Intent.

[0] https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices
[1] https://docs.stripe.com/api/invoice-payment/list

pliant prawn
#

$invoicePayments = $stripe->invoicePayments->all([
'invoice' => 'in_103Q0w2eZvKYlo2C5PYwf6Wf',
]);

These are given multiple objects. am I right?

shadow thorn
#

It depends on the number of payments being made for an invoice.

pliant prawn
#

"How to find the single invoicePayments object that has been currently paid in a subscription?

shadow thorn
#

Sorry what do you mean by that?

pliant prawn
#

$invoicePayments = $stripe->invoicePayments->retrieve();
this type single object fetch

shadow thorn
#

That would be the correct method to retrieve a specific payment object. The earlier method I linked was to get all the payment objects for an Invoice.