Adding credit to future subscription payment

I’m currently using the PHP-ISDK API. Presently, users have the ability to cancel their subscription via a self-serve webapp that operates via infusionsoft API. Now we were thinking
about adding a new functionality to the cancellation process. When a user wishes to cancel a subscription, he/she shall be presented with a one-time offer(perhaps via a popup) to apply a credit-amount to their next subscription payment (instead of cancelling). Our support team can do this manually within infusionsoft. However, I was wondering whether this process can achieved via the API, and if so what steps must be taken? Thanks!