#Neetu

1 messages · Page 1 of 1 (latest)

modest heathBOT
sacred oasis
#

Not sure I understand the ask. Can you elaborate?

fallow hazel
#

I have tried to create subscription item with 'expand' => ['latest_invoice.payment_intent'],

#

it is giving me error UnknownApiErrorException

sacred oasis
fallow hazel
#

ok

#

req_hhDApvyfBYKsMT

#

req_wQ222yjZw68l4a

sacred oasis
fallow hazel
#

req_hhDApvyfBYKsMT

#

what about this one?

sacred oasis
fallow hazel
#

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

sacred oasis
#

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

fallow hazel
#

can you please guide me little bit

sacred oasis
#

You can adapt the examples there

#

I don't have any specific Laravel examples I'm afraid

fallow hazel
#

this is something different

#

I want to add one more item

sacred oasis
#

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

fallow hazel
#

ok