In-app purchase - cancel subscription

I am using in-app purchase, (@ionic-native/in-app-purchase-2 - npm) all works well.
However, I was wondering if it is possible to programmatically cancel a subscription? I didn’t find anything related on the docs nor in the code.