Help with Subscription API

Help with Subscription API

Hi,
I've been reading through the API documentation and have created a subscription code that works as expected when running from a terminal.
I am having issues figuring out how to incorporate this code into WordPress. I imagine that I need to create a form page that collects the required data and then when I submit, it would use the form data to submit through the curl.
Does anyone have any examples as to how they've incorporated the Subscription API into Wordpress?
Thanks so much.