Jump to content

How do I create and deploy a new account via the API?


iambobydigital

Recommended Posts

Hi, I am looking to have my shopping cart (ultracart) manage all billing and write a script to manage account creation using the WHMCS API.

 

I have spent ALOT of time in the documentation, the answer is not clear there.

 

There seem to be a number of API calls that need to be made to:

create a client

assign them a plan

mark it as paid

make sure everything gets deployed

heir domain gets registered

and their account information sent via email.

 

I think I need to do the following API calls:

 

Add_Client
   Store: clientid = returned ID of newly added Client

Add_Order
   pid: basic=3 or advanced=4
   domain: domain name
   billing cycle:  1mo = monthly | 6mo = semiannually  
               12mo = annually | 24mo = biannually
   domaintype = register
   regperiod = 1
   eppcode = ignore
   nameserver1 = ns1.xxxxxxxxxxxxx.com
   nameserver2 = ns2.xxxxxxxxxxxxx.com
   paymentmtethod = ?????? mailin?
   contactid = clientid?
   noinvoice = true
   noinvoiceemail = true
   clientip = set to user's IP if possible

   STORE: orderid, invoiceid, productids, domainids

Add_transaction
amountin = Amount paid by user in ultracart
paymentmethod = ?????
date = current date
userid = clientid (i think?)
invoiceid = invoiceid returned by Add_Order
transid = Ultracart OrderID

Accept_Order
   orderid = orderid generated by add_order^
   autosetup = true
   sendregistrar = true
   sendemail = true

Here are my exact questions:

 

1) Are there any other calls I need to make to get the client fully setup and deployed via API?

 

2) In the Add_transaction call if my shopping cart is managing the payments, and no WHMCS payment module is going to be used, what should I put in the "paymentmethod" variable?

 

3) In Add_Transaction where do I get the "userid"? Is that the clientID generated when I add_client?

 

WHMCS support has given me clear answers so any help from the community would be greatly appreciated!

 

thanks!

-Bobby

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated