Feature Request / Frage - Life-Cycle of "Credit Packages"

Hi,

wir verwenden manche Packages, damit sich Kunden One-Time Credits kaufen können.
Leider bleiben aber die Packages aktiv, auch wenn die Credits vollständig verbraucht wurden.

Jetzt benötigen wir eine Logik, durch die wir die zugekauften Credit-Packages canceln können, wenn die erworbenen Credits vollständig verbraucht wurden.

Toll wäre eine Checkbox, die das Package automatisch canceln würde, wenn die hinterlegten Credits verbraucht wurden.

Vielen Dank im Voraus!
Sebastian (Grand Garage)

Hey Sebastian,

thanks for the suggestion. Yes, having to manually cancel these kinds of packages is cumbersome.

Can you tell me more about your use-case? Why are you using a package instead of just giving the member a one-time credit directly? I assume it is because you would then have to charge them manually? Or are the credits cumbersome to add?

While we don’t have that feature built-in right now, you could currently help yourself via the API by running these API calls once a day:

  1. Fetch all members that currently have an active one-time credit package (and also return their active packages): GET /members?packages=<package_id>&embed=activePackages
  2. For each of the members, get their currently active credits: GET /members/<id>/credits?predict=false&status=active
  3. Expire every one-time package that doesn’t have any active credits attached to it, by setting the package’s untilDate via PUT /members/<id>/packages/<package_id>

This is more complicated than I’d like it to be. I’ll let you know when we add something that will simplify this process.