To create a charge as a subscription, you need add to charge creation the following code:
$subscription = new Subscription();
$subscription->repeats(2)
->interval(1);
$response = $apiGN->createCharge()
...
->subscription($subscription)
->run()
->response();
To cancel a subscription:
$response = $apiGN->cancelSubscription()
->subscriptionId($subscriptionId)
->isCustomer(true) // This is optional
->run()
->response();