Hey there. Exporting the site APIs are definitely possible to make a custom purchase to the plan, if everything else is also custom. If the pricing plan is free, then there is no issue, as the order id which is created can be returned.
But if the pricing plans are paid, then there is a lot more customisation required, and I am not really sure if even after that there will be an easy way to complete the pricing plan purchase.
https://www.wix.com/velo/reference/wix-paid-plans/orderplan
You can check out this orderPlan API. This might be helpful.