CartThrob Credits Version 1.17

CartThrob Credits addon enables your CartThrob powered site to sell Credits to customers that can be redeemed as 1 to 1 credits, or as micropayments. Purchase and redemption of credits requires membership. Purchased credits can not be automatically gifted to another user, and are tied to the member account.

CartThrob Credits is an addon for CartThrob. Like other CartThrob addons, it must be uploaded and installed on your website, and CartThrob must be active for it to run. To use this addon, you will need to add additional template tags for selling, redeeming, and viewing information about credit balances. You can place the tags in any of your EE templates to suit your specific workflow. Sample template code can be found here in the documentation.

When active in a customer account, credits are deducted from each purchase until the credits are exhausted, at which point a backup payment option will be required to complete the transaction, or more credits will need to be purchased.


  • Credits are tied to the member account. No redemption codes are needed to use credits. They're automatically deducted from the purchase price in each transaction

  • Credits are stored in the database and can be used across multiple transactions

  • An optional credit payment gateway is included, which will make it possible for you to force customers into only using credits to complete a transaction and disallow any other payment method.


  • ExpressionEngine 2.5+
  • CartThrob 2.2+
  • PHP 5.3+


  • Upload the /system/expressionengine/third_party/cartthrob_credits/ folder to /system/expressionengine/third_party/
  • Make sure Extensions are enabled on your system
  • Install the CartThrob Credits module and extension (through EE's add-ons/modules panel)
  • Upload the individual files stored in the /system/expressionengine/third_party/cartthrob/ folder to their respective folders in your CartThrob installation.


  • Upload the /system/expressionengine/third_party/cartthrob_credits/ folder to /system/expressionengine/third_party/ Overwriting existing files.
  • Go to EE settings » addons » and click "Run Module Updates"


The settings are self-explanatory for the most part, however please pay note the default conversion rate. By default all credits will be applied at a one to one ratio. You can change this however, by adjusting the "default conversion rate". If you would like to apply 3 credits to every dollar, you would set this setting to "3". Any time Credits converts a monetary value, it will be multiplied by this conversion rate. This is useful when you will be selling small items for less than $1 (for instance when used with a gaming system where members purchase experience points, or virtual game items), or when the purchase power of $1 becomes less over time (for instance when used with micropayments).



outputs the total with credits deducted



outputs the credits for the logged in user



This is a tag pair that outputs information about credits available to a specific member.


If the member id parameter is not set, all credit information for all members will be listed.

{exp:cartthrob_credits:credits_data member_id="{logged_in_member_id}"}
    there are {credits} credits for member
    <br />
    {if no_results}
        No credits


Outputs information about redemptions made by this member, or connected to a specific order_id

This is tag is a variable pair. If no order_id is supplied, it automatically applies to the logged in member.

// Member Specific 
    order_id {order_id}                            
    credits_used {credits_used}
    amount {amount}
    member_id {member_id}                           
    id {id}

// Order Specific 
{exp:cartthrob_credits:redemptions order_id="{order_id}"}
    order_id {order_id}                            
    credits_used {credits_used}
    amount {amount}
    member_id {member_id}                           
    id {id}


This tag pair extends CartThrob's default add to cart form tag, making it possible to add credits to the cart, which can be purchased for later redemption. The amount of an item added to the cart is used as the basis for the credit purchase. If credits are not manually set when adding an item to the cart, the default conversion rate will be applied to the items price, and that amount of credits will be added to the customer's account when the customer successfully completes checkout.


The credits parameter, is a parameter of the add_to_cart_form tag. It is optional, and only used to override the default conversion rate that would otherwise be automatically applied when adding credits to the cart. If the default conversion rate is 1 to 1, but you'd like to give 10 credits for a $1 item, you can use this parameter to specify the desired credit amount. If this value is specified the conversion rate is completely ignored for this item


for all other prarmaters, see add_to_cart_form for more details.

{exp:channel:entries channel="products"}
    {exp:cartthrob_credits:add_to_cart_form return="cart/index" entry_id="{entry_id}" credits="10"}
        <input type="submit" name="Add this item which will apply 10 credits to your account" />