Homepage | Client Area | Contact | Order Now »
WHMCS - The Complete Client Management, Billing & Support System
Article | Discussion | Edit | History Log in / create account

API:Add Order

From WHMCS Documentation

Jump to: navigation, search

This command is used to add a new order to the system.

Attributes

clientid - client id for order
pid - product id
domain - domain name
billingcycle - monthly, quarterly, semiannual, etc..
addons - comma seperated list of addon ids
customfields - a base64 encoded serialized array of custom field values
configoptions - a base64 encoded serialized array of configurable product options
domaintype - set for domain registration - register or transfer
regperiod = 1,2,3,etc...
dnsmanagement - true to enable
emailforwarding - true to enable
idprotection - true to enable
eppcode - if transfer
ns1 - first nameserver (domain reg only)
ns2 - second nameserver
ns3 - third nameserver
ns4 - fourth nameserver
paymentmethod - paypal, authorize, etc...

Example Command

$postfields["action"] = "addorder";
$postfields["clientid"] = "1";
$postfields["pid"] = "1";
$postfields["domain"] = "whmcs.com";
$postfields["billingcycle"] = "monthly";
$postfields["addons"] = "1,3,9";
$postfields["customfields"] = base64_encode(serialize(array("1"=>"Google")));
$postfields["domaintype"] = "register";
$postfields["regperiod"] = "1";
$postfields["paymentmethod"] = "mailin";

Returned Variables

orderid
invoiceid

Main Page
Getting Started
Using WHMCS & Howto's
Customising WHMCS
Modules
API
Contributions

Search
 

What links here
Recent Changes
Privacy Policy
General Disclaimer
Copyright © WHMCS Ltd. 2005-2008. All Rights Reserved. UK Registered Company #6265962. Vat No. GB 927 7746 76