Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating subscription #9

Closed
r3ap3r2004 opened this issue Aug 19, 2023 · 1 comment
Closed

Error updating subscription #9

r3ap3r2004 opened this issue Aug 19, 2023 · 1 comment

Comments

@r3ap3r2004
Copy link
Contributor

I am running into an error trying to resume a subscription via the api.

The error that I'm receiving from Lemon Squeezy is this:

{
  "jsonapi" : {
    "version" : "1.0"
  },
  "errors" : [
    {
      "status" : "400",
      "detail" : "The member data is required.",
      "source" : {
        "pointer" : "\/"
      },
      "title" : "Non-Compliant JSON:API Document"
    }
  ]
}

I don't see any Data parameter that can be set.

This is how I am attempting to cancel the subscription.

	ctx := context.Background()
	params := &lemonsqueezy.SubscriptionUpdateParams{
		Type:       "subscriptions",
		ID:         "<MY ID HERE>",
		Cancelled:  false,
	}
	apiResponseSubscription, response, err = l.Client.Subscriptions.Update(ctx, params)

It's very likely that I'm just doing something stupid. Is this an actual bug, or an ID10T user error?

@AchoArnold
Copy link
Member

Fixed by #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants