Oct 22, 2024
0
Level 7
Cashier Paddle Subscription swap error
According to the documentation on Changing Plans, to swap a subscription I did
$user->subscription()->swap($pricedId);
However, I am getting the error:
Paddle API error 'the new items are not valid for updating this subscription' occurred with validation errors ([{"field":"proration_billing_mode","message":"when changing the billing cycle only prorated_immediately, full_immediately or do_not_bill options are allowed"}])
I have tried doing
$user->subscription()->swap($priceId, [
'proration_billing_mode' => 'prorated_immediately'
])
But still gets the same error.
However, $user->subscription()->swapAndInvoice($priceId); works.
Anyone know what I am missing (if I am missing anything)?
I am using Cashier Paddle 2.x's
Please or to participate in this conversation.