-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
- I am calling
updateSubscription
andupdateSubscriptionItem
method when the user upgrading subscription - Sometimes it is correctly triggered in correct order and proration charges calculated correctly
- Sometimes Order will be incorrect
- Assume i have Product A with Variant A and Variant B. I need to update my plan from variant A to variant B with some additional quantity. i passed variant B id and quantity and calling the methods in correct order.
i will add my code below
const updateSubscriptionPayload: UpdateSubscription = {
invoiceImmediately: true,
variantId: parseInt(variantId),
};
const { error } = await updateSubscription(
subscriptionId,
updateSubscriptionPayload,
);
const { error } = await updateSubscriptionItem(subscriptionItemId, {
invoiceImmediately: true,
quantity: quantity,
});
,
- But it updates variant A with quantity and later changed to variant B with one quantity
Metadata
Metadata
Assignees
Labels
No labels