#Neetu
1 messages · Page 1 of 1 (latest)
Not sure I understand the ask. Can you elaborate?
I have tried to create subscription item with 'expand' => ['latest_invoice.payment_intent'],
it is giving me error UnknownApiErrorException
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
You're trying to expand a field that doesn't exist. Your API call is to the /v1/subscription_items endpoint. The Subscription Item object (https://stripe.com/docs/api/subscription_items/object) doesn't have a latest_invoice field
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
500 error are an API/server error at our end, which can happen: https://stripe.com/docs/error-low-level#server-errors
then please guide me how I can pass payment intent with create subscription item
$user_subscription
->addPriceAndInvoice($plan->stripe_addon_plan_id, 1, [
'payment_behavior' => 'pending_if_incomplete' //allow_incomplete
])
->update([
'plan_price' => $plan->price,
'amount_charged' => $plan->price,
]);
in laravel cashier
You can't. You should instead update the existing subscription directly, adding the new items, and then you'll be able to expand the latest_invoice.payment_intent field
can you please guide me little bit
This is a guide starting point for how to upgrade/downgrade a Subscription: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
You can adapt the examples there
I don't have any specific Laravel examples I'm afraid
Then you'd adapt the examples at the link above to add a new item to the items array. We don't have a specific example of how to do that
ok