Hey Alex,
There are 2 ways to approach this situation. The first one is to discount the amount you charge the customer but keep the same billing cycle while the second option is to change their billing cycle.
If we continue with your example, giving 3 free months to Joe could mean that instead of charging him $120 for the year on May 1st, 2017 you can charge him $90. The amount is discounted by $10 for each month they get for free. This means they still pay you on the same schedule but pay you less than the full yearly price. If you go down this road, I usually recommend using Invoice Items [1] for this.
You would create an invoice item [2] for a negative amount corresponding to the amount you want to discount off of your customer's subscription for each referral. Those would get added automatically to your customer's upcoming invoice and give him the expected discount when it's time to renew his subscription.
On the other hand, if you prefer to change the billing cycle so that Joe only pays for the full year once he has exhausted his credit, you'll need to use a trial period [3]. The idea is that you update the subscription [4] and put it back on a trial until the day you want their next charge to happen on. You'd pass the `trial_end` parameter as a unix timestamp corresponding to August 1st, 2017 so that the customer is not charged until then. You'd also pass `prorate: false` to disable any proration during the update.
Hope this helps!
Remi