Enable pro membership level for 3rd party conditions

I want to allow users to pay for the pro site membership some action (for instance - click a link, read a certain article or even pay me on some other site I own). Let's assume I have my criteria set to payment from a different website I own. I guess I'd need to create a code on my site that when the user pays I activate (via ajax, cURL etc.).

Is there some API for this plugin? Some function I can call in my code in order to programatically set a user's level and/or status (active/inactive) from my code (for instance - if I write my own shortcode or use code snippets plugin).