Skip to main content
The grantCredit method adds credit to an AutoBill object. With credit available to an Account, you may extend the life of an AutoBill object, thus allowing a customer to keep their subscription active.
  • Token-based credit may be granted to an AutoBill to pay for billing transactions. To grant Token-based credit to an AutoBill, the credit must be of the same token type as the Payment Method on the AutoBill, and the BillingPlan must also be defined in terms of the same Token Type. Token Credits granted will be deducted from the amount billed to the AutoBill’s payment method at the next billing cycle.
  • You may also grant time-based credit to an AutoBill. With a TimeInterval object, define a time extension to be given to an AutoBill in terms of years, months, weeks, or days. When you grant time credit to an AutoBill, Subscribe delays the next billing for the AutoBill by the specified amount of time, similar to calling delayBillingByDays() on an AutoBill object. This delay does not occur until the billing date following the time credit grant. Until then, the time credit remains on the AutoBill, and the next billing date appears unchanged. Note that Subscribe does not generate a transaction to account for such a time-based credit grant.
  • When granting a currency credit to an AutoBill, the currency (i.e. USD) for the credit grants must be the same as the currency the customer has specified for the AutoBill.
  • Time and Currency Credits may be tracked by timestamp and sortValue. When granted, they are assigned a VID, which may be used when revoking credit.
See the Credit Subobject for a list of data members of the Credit object and related subobjects. See Credit Grants and Gift Cards in the Subscribe Programming Guide for more information.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call. Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response. autobill: an AutoBill object to which you wish to grant credit. Identify the AutoBill using its or VID. credit: a Credit object specifying the amount and type of credit you wish to grant to the AutoBill. note: an optional note regarding the credit granted.

Output

return: an object of type Return that indicates the success or failure of the call. autobill: the AutoBill object to which you granted credit. This object contains the updated array of Credit objects.

Returns

In addition to those listed in The Return Object, this call returns:

Example

Parent topic:AutoBill Methods