> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Presenting the Reason for Credit (to the customer)

When you grant credit to Accounts and Autobills, the default Subscribe behavior is to populate the Transaction Line Item Description (when that credit is later used by the customer) with an arbitrary fixed value, such as `AutoBillCreditConversion`.

While this might be sufficient in most cases, you can alternatively enable an option that allows you to populate the Transaction Line Item Description field with the text string you entered in the `Reason` field of the original credit grant—thus linking the credit grant with later consumption of that same credit. When using this option, however, bear in mind that the explanation you enter in the `Reason` field of the credit grant is potentially customer facing.

To enable this option (`use_credit_reason_on_tx_item`), contact Vindicia Client Technical Support.Once enabled, the text string you enter in the Reason field will present in the Transaction Line Item Description when your customer uses all or part of that credit.

If you later decide you don’t want this functionality, Client Technical Support can disable it and your Subscribe implementation will return to the default behavior.

The following example demonstrates how to grant credit to an Account using the Reason field.

```
 
 // to grant credit to an account
  
 $acct = new Account();
  
 // account id for an existing customer
  
 $acct->setMerchantAccountId('jdoe101');
  
 $tok = new Token();
  
 // specify id of an existing token type.
 // assumption here is that you have already created
 // a Token object with this id
  
 $tok->setMerchantTokenId('ANYTIME_PHONE_MINUTES_2010');
  
 $tokAmt = new TokenAmount();
 $tokAmt->setToken($tok);
 $tokAmt->setAmount(100);
  
 $cr = new Credit();
 $cr->setTokenAmounts(array($tokAmt));
 $cr->setReason("This is why I am granting credits");
  
 // Now make the SOAP API call to grant credit to the acct
 $response = $acct->grantCredit($cr);
  
 if ($response['returnCode'] == 200) {
  
 // Credit successfully granted to the account
  
 $updatedAcct = $response['data']->account;
 $availableCredits = $updatedAcct->getCredit();
 $availableTokens = $availableCredits->getTokenAmounts();
  
 print "Available token credits: \n";
 foreach($availableTokens as $tkAmt) {
 print "Token type: " . $tkAmt->getMerchantTokenId() . " ";
 print "Amount: " . $tkAmt->getAmount() . "\n";
 }
 }
 else {
  
 // Error while granting credit to the account
 print $response['returnString'] . "\n";
 }
```

**Parent topic:**[Working with Accounts](../topics/ProgGuide_Accounts)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.