Skip to main content
The Credit object encapsulates the different types of credit that can be stored on a Product, Account or AutoBill, and applied to one-time or recurring transactions.
  • Tokens: You can use tokens as both payment methods, and credit options. The merchantTokenId attribute of a Token object identifies its type. Use this data member to define your Token types.For example, create an AutoBill with a monthly BillingPlan whose price is defined in terms of Tokens of a certain type. Create a Product object that grants credit for a number of Tokens of that type. Allow your customer to purchase the Product and acquire the allotted Tokens. Then, each time the AutoBill is due, Subscribe deducts the specified number of Tokens from the available Token credit.
  • Credits (time): Grant time credit to an AutoBill by including an array of TimeInterval objects in the Credit object associated with the AutoBill. The TimeInterval object allows you to define a time extension 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 the AutoBill object.
  • Credits (currency): Subscribe enables you to grant or revoke currency credits to Accounts and AutoBills. All ISO 42171 currencies are supported. For more information, see the Credit Subobject in the Subscribe API Guide.
  • Gift Cards: Add Token credits to an AutoBill or an Account by redeeming a gift card. Your customers may redeem gift cards, through Subscribe, to add credit to their Account. For more information, see Working with Gift Cards.
  • Redeeming Credit
  • Using Credits with an Account
  • Using Credits with an AutoBill
Parent topic:Credit Grants and Gift Cards