create custom packages on the fly

Jayreis

Member
Feb 13, 2002
16
0
301
Hello,

First I hope this is in the correct category. I was not sure where I should post this question.

So I have a server I want to test out a new functionality on although not sure if its possible with cpanel.

Basically I want to allow customers to select amount of HDD space, and B/W and then after making payment to have a backend script that then creates their shared web hosting plan. I know how to setup accounts using the scripts/wwwacct script for predefined hosting packages that I had setup in my whm. But is it possible to setup accounts that are not apart of a predefined package in whm??

thanks for any direction you can offer.
 

david.cloudzu

Registered
Aug 17, 2010
1
0
51
Yes, it is possible. Check out the documentation for the createacct API function. You'll see the following parameter:

savepkg (boolean) — Save the settings used as a new package.

Cheers,
David.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Yes, it is possible. Check out the documentation for the createacct API function. You'll see the following parameter:

savepkg (boolean) — Save the settings used as a new package.

Cheers,
David.
Here is a direct link to the aforementioned documentation: Create an Account — createacct

For additional reference I recommend reviewing the following documentation from our Developer Resources (sdk.cpanel.net):