lemonsqueezy.ts icon indicating copy to clipboard operation
lemonsqueezy.ts copied to clipboard

400 bad request when trying to `updateSubscription`

Open developeratul opened this issue 2 years ago • 2 comments

When I am trying to update a subscription in this way,

await client.updateSubscription({
  id: user.subscriptionId,
  variantId: `${user.variantId}`,
  productId: process.env.LEMONS_SQUEEZY_PRODUCT_ID as string,
  cancelled: true,
});

I am getting 400 bad request as a response. The client is set up properly using valid API keys and is certain that all the values being used in the object are also valid.

What is causing this issue? and let me know if it requires more information and context.

Pardon my mistakes. I am writing an actual GitHub issue for the first time ;)

developeratul avatar May 14 '23 16:05 developeratul

Please send response whenever writing for errors.

Parth971 avatar Jun 22 '23 11:06 Parth971

The response only contains a status code of 400 and a message of Bad request. Nothing else.

developeratul avatar Jun 22 '23 13:06 developeratul