-2

I'm trying to roll out some pricing changes so I’ll give a summary of what I’m doing

We will be using $subscription->updateAtRenewal(); to update users from their plans on next billing date. I want to log how many paid dashboards these users will have though before that renewal so we can see in billing and show the users what their next bill will be. Is this possible? We don’t want to wait for subscription to be updated to have to log usage

I attached a screenshot to show the code we are using.

When I tested if this would work I got an error saying

Couldn't find AddOn with add_on_code = 112.

This error happens when I run usage->create()

The subscription in Recurly shows it will be updated to new plan on next billing date, but I need to track their usage. Is this possible at all or would I have to instead create a subscription to use instead of add ons?

enter image description here

Venkatachalam
  • 16,288
  • 9
  • 49
  • 77
Derek Joseph Olson
  • 738
  • 1
  • 7
  • 22

1 Answers1

0

You can track the usage of a subscription add_on. You can look up the usage records when you update the subscription, charge for any that have not been charged, delete all those that have been charged, and yes, you can log them. Start here

You do not need a new addon for this. They will be created with a unique usage_id.

Please replace your screenshot of code with code you have typed. That will make it easier for others to copy-paste your code and make edits that can help you.

Ben Hulan
  • 537
  • 2
  • 7