<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Willy</title>
    <description>The latest articles on DEV Community by Willy (@wolf).</description>
    <link>https://dev.to/wolf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F666212%2F661209bd-6496-4eb4-9e5e-099bb804f4a5.png</url>
      <title>DEV Community: Willy</title>
      <link>https://dev.to/wolf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wolf"/>
    <language>en</language>
    <item>
      <title>How do apps manage user credits/ features nowadays?</title>
      <dc:creator>Willy</dc:creator>
      <pubDate>Fri, 05 Nov 2021 06:04:55 +0000</pubDate>
      <link>https://dev.to/wolf/how-do-apps-manage-user-credits-features-nowadays-4e3k</link>
      <guid>https://dev.to/wolf/how-do-apps-manage-user-credits-features-nowadays-4e3k</guid>
      <description>&lt;p&gt;This seems to be a very common building block for apps, but I can't find popular solutions - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An app has registered users&lt;/li&gt;
&lt;li&gt;Every user can have different types of credits, points, enabled-features, used-promo-codes, campaigns etc...&lt;/li&gt;
&lt;li&gt;Different parts should behave differently according to those&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sure, we can manage all that data in a DB and write lots of custom code, however it becomes a big block to design, refactor, migrate schema versions, manually resolve issues....&lt;/p&gt;

&lt;p&gt;To clarify the question lets simplify to one use-case - &lt;br&gt;
&lt;em&gt;"Credits Management"&lt;/em&gt; - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Upon purchase, user gets 1,000 credits of type "paid-credits" to be used in the app. These don't expire.&lt;/li&gt;
&lt;li&gt;Upon promo-code-activation, user gets 200 credits of type "promo-credits-feature1" - only to be used with "Feature1" of the app, and those expire after 1 month. &lt;/li&gt;
&lt;li&gt;User spends 200 credits on Feature1 &lt;/li&gt;
&lt;li&gt;User is not satisfied, asks for refund. His "paid-credits" are not used yet, so he qualifies for a no-questions-asked refund.&lt;/li&gt;
&lt;li&gt;Upon server-side usage of Feature2, the backend needs to verify the amount of available credits (possibly "reserve X credits" for an activity), log the usage of the credits for traceability (such as an invoice breakdown)  etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I would expect some existing solution to offer this as a service with an API. Do CRMs have anything to do with these things? &lt;/p&gt;

&lt;p&gt;Is it "too simple of a problem" that everybody manage in their DB and don't make a big deal out of it?&lt;/p&gt;

&lt;p&gt;It will be nice to hear what others are using and some insights about this.&lt;/p&gt;

</description>
      <category>help</category>
      <category>discuss</category>
      <category>architecture</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
