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 aTimeIntervalobject, define a time extension to be given to anAutoBillin terms of years, months, weeks, or days. When you grant time credit to anAutoBill, Subscribe delays the next billing for theAutoBillby the specified amount of time, similar to callingdelayBillingByDays()on anAutoBillobject. 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 theAutoBill. - Time and Currency Credits may be tracked by
timestampandsortValue. When granted, they are assigned a VID, which may be used when revoking credit.
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 amethod 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 typeReturn 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.

