Account object, to allow customers to purchase tokens, you must define Product objects and specify how many tokens of a certain type to grant to a customer (Account object) when that customer purchases the related products. After each purchase, Subscribe adds the appropriate number of tokens to the balance attached to the Account object.
The following example creates a Product object that grants 10 tokens, of the type defined in the previous example, to an Account object that purchases the Product object.
Use a Product purchase to grant Tokens:
Product object created can be used in both one-time and recurring billing:
- **Recurring billing:**Construct an
AutoBillobject with theProductobject. With successful capture of each recurring transaction generated by theAutoBill, Subscribe adds the tokens granted by theProductto theAccountobject associated with theAutoBill. - **Real-time billing:**Construct a one-time transaction that refers to the
Productobject as one of its transaction items. Specify the SKU ofTransactionItemasmerchantProductIdforProduct. With a successful capture of a one-time transaction, Subscribe adds the tokens granted byProductto theAccountobject associated with the transaction.

