Page tree
Skip to end of metadata
Go to start of metadata

Introduction

DOTS Order Validation (OV) is a fraud detection service that evaluates customer order information and scores it into a manageable pass/fail/review category. The service allows online merchants the ability to easily weed out fraudulent orders by performing a series of checks and cross checks against the customer's order information.

Integration

Integrating OV into your application should be easy and straightforward. If you are using a common platform, such as asp, vb, C# .NET, PHP and others, Service Objects may already have sample code built that you can use:
Sample Code

However, if you are using a common platform that does not already have sample code, you can ask Service Objects to build an example for you. Email support@serviceobjects.com for more details.

Web Service Structure

Web services provide a standard interface to encapsulate tricky business logic. They allow simple integration of applications via the web. Service Objects has followed web services best practices and come up with some of its own standards to ensure that its web services are as easy to integrate and as accessible as possible.

The host path or physical location of the web service is here:
https://trial.serviceobjects.com/ov/api.svc

A test page for the web service can be found here:
https://trial.serviceobjects.com/ov/

The location of the WSDL, or Web Service Definition Language document, is here (This is also accessible via the "Service Definition" link.):
https://trial.serviceobjects.com/ov/api.svc?wsdl

Important Note!
SOAP is done via POST, only with special XML markup in the post-body.

The WSDL is an XML document that defines the interaction web service, meaning its inputs, outputs, operations, and the like. Most likely, you will have another tool read this WSDL and make the operations available to you in your application via some type of proxy class. Whenever your utilities or IDE asks for a WSDL path, you can provide this one. Every web service has operations that it offers to subscribers. These operations, also called methods, contain different functionality and return different outputs.

Code Snippets




Order Validation C# Code Snippet
//Add a service to your application https://trial.serviceobjects.com/ov/api.svc
OrderValidationClient OVClient_Primary = new OrderValidationClient("DOTSOV");
OrderInfoResponse response = OVClient_Primary.OrderValidate(bin, numberofitems, transactiontotal, mcc, email, ipaddress,timeofday, billingcompanyname, billingfirstname, billinglastname, billingaddress, billingaddress2, billingcity,billingstate, billingpostalcode, billingcountry, billingphone, billingaddressisresidential, shippingcompanyname, shippingfirstname, shippinglastname, shippingaddress, shippingaddress2, shippingcity, shippingstate, shippingpostalcode, shippingcountry, shippingphone, shippingaddressisresidential, testype,  licenseKey);
		
if (response.Error != null)
{
	//Process Error
}
else
{
	//Process Response		
}


Order Validation Java Code Snippet
OrderInfoResponse DPVResponse = null;
OrderInfo info = null;
// Create soap request
OrderValidationLocator locator = new OrderValidationLocator();
//use ssl
locator.setsoapEndpointAddress("https://trial.serviceobjects.com/ov/api.svc/soap");
IOrderValidation av = locator.getsoap();
SoapStub soap = (SoapStub)av;
soap.setTimeout(5000);// set timeout
DPVResponse = soap.orderValidate(bin, numberofitems, transactiontotal, mcc,email, ipaddress, timeofday, billingcompanyname,billingfirstname, billinglastname, billingaddress, billingaddress2, billingcity, billingstate, billingpostalcode, billingcountry, billingphone, billingaddressisresidential, shippingcompanyname, shippingfirstname, shippinglastname, shippingaddress, shippingaddress2, shippingcity, shippingstate, shippingpostalcode, shippingcountry, shippingphone, shippingaddressisresidential, testtype, licensekey );
info = DPVResponse.getOrderInfo();
error = DPVResponse.getError();
if(resp == null || (error != null && error.getTypeCode() == "3"))
{
	throw new Exception();
}
 
//Process Results
if(error == null){
	//DOTS Order Validation Results	
}
//Process Errors
else{
	//DOTS Order Validation Error Results	
}


Order Validation PHP Code Snippets
<?php
// Set these values per web service <as needed>
$wsdlUrl = "https://trial.serviceobjects.com/OV/api.svc?wsdl";

$params['BIN'] = $BIN;
$params['NumberOfItems'] = $NUMBEROFITEMS;
$params['TransactionTotal'] = $TRANSACTIONTOTAL;
$params['MCC'] = $MCC;
$params['Email'] = $EMAIL;
$params['IPAddress'] = $IPADDRESS;
$params['TimeOfDay'] = $TIMEOFDAY;
$params['BillingCompanyName'] = $BILLINGCOMPANYNAME;
$params['BillingFirstName'] = $BILLINGFIRSTNAME;
$params['BillingLastName'] = $BILLINGLASTNAME;
$params['BillingAddress'] = $BILLINGADDRESS;
$params['BillingAddress2'] = $BILLINGADDRESS2;
$params['BillingCity'] = $BILLINGCITY;
$params['BillingState'] = $BILLINGSTATE;
$params['BillingPostalCode'] = $BILLINGPOSTALCODE;
$params['BillingCountry'] = $BILLINGCOUNTRY;
$params['BillingPhone'] = $BILLINGPHONE;
$params['BillingAddressIsResidential'] = $BILLINGADDRESSISRESIDENTIAL;
$params['ShippingCompanyName'] = $SHIPPINGCOMPANYNAME;
$params['ShippingFirstName'] = $SHIPPINGFIRSTNAME;
$params['ShippingLastName'] = $SHIPPINGLASTNAME;
$params['ShippingAddress'] = $SHIPPINGADDRESS;
$params['ShippingAddress2'] = $SHIPPINGADDRESS2;
$params['ShippingCity'] = $SHIPPINGCITY;
$params['ShippingState'] = $SHIPPINGSTATE;
$params['ShippingPostalCode'] = $SHIPPINGPOSTALCODE;
$params['ShippingCountry'] = $SHIPPINGCOUNTRY;
$params['ShippingPhone'] = $SHIPPINGPHONE;
$params['ShippingAddressIsResidential'] = $SHIPPINGADDRESSISRESIDENTIAL;
$params['TestType'] = $TESTTYPE;
$params['LicenseKey'] = $LICENSEKEY;

$soapClient = new SoapClient($wsdlUrl, array( "trace" => 1 ));
$result= $soapClient->OrderValidate($params);
if (!isset($result->OrderValidateResult->Error)) {
	foreach($result->OrderValidateResult->OrderInfo $k=>$v) {
		echo $k . ", " . $v;
	}
} else {
	foreach($result->OrderValidateResult->Error as $k=>$v) {
		echo $k . ", " . $v;
	}
}
?>


Order Validation RoR Code Snippets
		#Formats inputs into a hash to pass to Soap Client
		#Hash Keys must be named as they are shown here.
		message = 	{
					"Bin" => @request.bin,
					"NumberOfItems" => @request.numberofitems,
					"TransactionTotal" => @request.transactiontotal,
					"MCC" => @request.mcc,
					"Email" => @request.email,
					"IPAddress" => @request.ipaddress,
					"TimeOfDay" => @request.timeofday,
					"BillingCompanyName" => @request.billingcompanyname,
					"BillingFirstName" => @request.billingfirstname,
					"BillingLastName" => @request.billinglastname,
					"BillingAddress" => @request.billingaddress,
					"BillingAddress2" => @request.billingaddress2,
					"BillingCity" => @request.billingcity,
					"BillingState" => @request.billingstate,
					"BillingPostalCode" => @request.billingpostalcode,
					"BillingCountry" => @request.billingcountry,
					"BillingPhone" => @request.billingphone,
					"BillingAddressIsResidential" => @request.billingaddressisresidential,
					"ShippingCompanyName" => @request.shippingcompanyname,
					"ShippingFirstName" => @request.shippingfirstname,
					"ShippingLastName" => @request.shippinglastname,
					"ShippingAddress" => @request.shippingaddress,
					"ShippingAddress2" => @request.shippingaddress2,
					"ShippingCity" => @request.shippingcity,
					"ShippingState" => @request.shippingstate,
					"ShippingPostalCode" => @request.shippingpostalcode,
					"ShippingCountry" => @request.shippingcountry,
					"ShippingPhone" => @request.shippingphone,
					"ShippingAddressIsResidential" => @request.shippingaddressisresidential,
					"TestType" => @request.testtype,
					"LicenseKey" => @request.licensekey,
					}
		#Implemented to make the code more readable when accessing the hash			
		@ovresponse = :order_validate_response
		@ovresult = :order_validate_result
		@ovinfo = :order_info
		@overror = :error

		#Set Primary and Backup URLs here as needed
		dotsOVPrimary = "https://trial.serviceobjects.com/ov/api.svc?wsdl"
		dotsOVBackup = "https://trial.serviceobjects.com/ov/api.svc?wsdl"

		begin
			#initializes the soap client. The convert request keys global is necessary to receive a response from the service.
			client = Savon.client(wsdl: dotsOVPrimary)
			#Calls the operation with given inptus and converts response to a hash.
			response = client.call(:order_validate, message: message).to_hash
			#Checks to see what results came back from the service
			processresults(response)			
			
		#If an error occurs during the call, this will use backup url and attempt to retrieve data.
		rescue Savon::Error => e
			begin
			backupclient = Savon.client(wsdl: dotsOVBackup)
			#Sets the response to the backclient call to the operation and converts response to a hash.
			response = backupclient.call(:order_validate, message: message).to_hash
			processresults(response)
			#If backup url failed, this will display the error received from the server
			rescue Savon::Error =>error
			end
		end
	end
	private 
	def processresults(response)	
			#Processes Error Response from soap Client		
			#Processes Valid response from soap client	
	end


Order Validation Python Code Snippet
    mBIN =  BIN.get()
    if mBIN is None or  mBIN == "":
         mBIN = " "
    mNumberOfItems = NumberOfItems.get()
    if mNumberOfItems is None or mNumberOfItems == "":
        mNumberOfItems = " "
    mTransactionTotal =  TransactionTotal.get()
    if mTransactionTotal is None or  mTransactionTotal == "":
         mTransactionTotal = " "
    mMCC = MCC.get()
    if mMCC is None or mMCC == "":
        mMCC = " "
    mEmail =  Email.get()
    if mEmail is None or  mEmail == "":
         mEmail = " "
    mIPAddress =  IPAddress.get()
    if mIPAddress is None or  mIPAddress == "":
         mIPAddress = " "
    mTimeOfDay = TimeOfDay.get()
    if mTimeOfDay is None or mTimeOfDay == "":
        mTimeOfDay = " "
    mBillingCompanyName =  BillingCompanyName.get()
    if mBillingCompanyName is None or  mBillingCompanyName == "":
         mBillingCompanyName = " "
    mBillingFirstName = BillingFirstName.get()
    if mBillingFirstName is None or mBillingFirstName == "":
        mBillingFirstName = " "
    mBillingLastName =  BillingLastName.get()
    if mBillingLastName is None or  mBillingLastName == "":
         mBillingLastName = " "
    mBillingAddress = BillingAddress.get()
    if mBillingAddress is None or mBillingAddress == "":
        mBillingAddress = " "
    mBillingAddress2 =  BillingAddress2.get()
    if mBillingAddress2 is None or  mBillingAddress2 == "":
         mBillingAddress2 = " "
    mBillingCity = BillingCity.get()
    if mBillingCity is None or mBillingCity == "":
        mBillingCity = " "
    mBillingState =  BillingState.get()
    if mBillingState is None or  mBillingState == "":
         mBillingState = " "
    mBillingPostalCode = BillingPostalCode.get()
    if mBillingPostalCode is None or mBillingPostalCode == "":
        mBillingPostalCode = " "
    mBillingCountry =  BillingCountry.get()
    if mBillingCountry is None or  mBillingCountry == "":
         mBillingCountry = " "
    mBillingPhone = BillingPhone.get()
    if mBillingPhone is None or mBillingPhone == "":
        mBillingPhone = " "
    mBillingAddressIsResidential =  BillingAddressIsResidential.get()
    if mBillingAddressIsResidential is None or  mBillingAddressIsResidential == "":
        mBillingAddressIsResidential = " "
    mShippingCompanyName = ShippingCompanyName.get()
    if mShippingCompanyName is None or mShippingCompanyName == "":
        mShippingCompanyName = " "
    mShippingFirstName = ShippingFirstName.get()
    if mShippingFirstName is None or mShippingFirstName == "":
        mShippingFirstName = " "
    mShippingLastName = ShippingLastName.get()
    if mShippingLastName is None or mShippingLastName == "":
        mShippingLastName = " "
    mShippingAddress = ShippingAddress.get()
    if mShippingAddress is None or mShippingAddress == "":
        mShippingAddress = " "
    mShippingAddress2 = ShippingAddress2.get()
    if mShippingAddress2 is None or mShippingAddress2 == "":
        mShippingAddress2 = " "
    mShippingCity = ShippingCity.get()
    if mShippingCity is None or mShippingCity == "":
        mShippingCity = " "
    mShippingState = ShippingState.get()
    if mShippingState is None or mShippingState == "":
        mShippingState = " "
    mShippingPostalCode = ShippingPostalCode.get()
    if mShippingPostalCode is None or mShippingPostalCode == "":
        mShippingPostalCode = " "
    mShippingCountry = ShippingCountry.get()
    if mShippingCountry is None or mShippingCountry == "":
        mShippingCountry = " "
    mShippingPhone = ShippingPhone.get()
    if mShippingPhone is None or mShippingPhone == "":
        mShippingPhone = " "
    mShippingAddressIsResidential = ShippingAddressIsResidential.get()
    if mShippingAddressIsResidential is None or mShippingAddressIsResidential == "":
        mShippingAddressIsResidential = " "
    mTestType = TestType.get()
    if mTestType is None or mTestType == "":
        mTestType = " "
    mLicenseKey = LicenseKey.get()
    if mLicenseKey is None or mLicenseKey == "":
        mLicenseKey = " "

    #Set the primary and backup URLs as needed
    primaryURL = 'https://trial.serviceobjects.com/ov/api.svc?wsdl'
    backupURL = 'https://trial.serviceobjects.com/ov/api.svc?wsdl'

    #This block of code calls the web service and prints the resulting values to the screen
    try:
        client = Client(primaryURL)
        result = client.service.OrderValidate(BIN= mBIN, NumberOfItems=mNumberOfItems, TransactionTotal=mTransactionTotal, MCC=mMCC, Email=mEmail, IPAddress=mIPAddress, TimeOfDay=mTimeOfDay, BillingCompanyName= mBillingCompanyName, BillingFirstName=mBillingFirstName, BillingLastName=mBillingLastName, BillingAddress=mBillingAddress, BillingAddress2=mBillingAddress2, BillingCity=mBillingCity, BillingState=mBillingState, BillingPostalCode=mBillingPostalCode, BillingCountry=mBillingCountry, BillingPhone=mBillingPhone, BillingAddressIsResidential= mBillingAddressIsResidential, ShippingCompanyName=mShippingCompanyName, ShippingFirstName=mShippingFirstName, ShippingLastName=mShippingLastName, ShippingAddress=mShippingAddress, ShippingAddress2=mShippingAddress2, ShippingCity=mShippingCity, ShippingState=mShippingState, ShippingPostalCode=mShippingPostalCode, ShippingCountry=mShippingCountry, ShippingPhone=mShippingPhone, ShippingAddressIsResidential=mShippingAddressIsResidential, TestType=mTestType,  LicenseKey= mLicenseKey)
        #Handel response and check for errors

    #Tries the backup URL if the primary URL failed
    except:
        try:
            client = Client(backupURL)
            result = client.service.OrderValidate(BIN= mBIN, NumberOfItems=mNumberOfItems, TransactionTotal=mTransactionTotal, MCC=mMCC, Email=mEmail, IPAddress=mIPAddress, TimeOfDay=mTimeOfDay, BillingCompanyName= mBillingCompanyName, BillingFirstName=mBillingFirstName, BillingLastName=mBillingLastName, BillingAddress=mBillingAddress, BillingAddress2=mBillingAddress2, BillingCity=mBillingCity, BillingState=mBillingState, BillingPostalCode=mBillingPostalCode, BillingCountry=mBillingCountry, BillingPhone=mBillingPhone, BillingAddressIsResidential= mBillingAddressIsResidential, ShippingCompanyName=mShippingCompanyName, ShippingFirstName=mShippingFirstName, ShippingLastName=mShippingLastName, ShippingAddress=mShippingAddress, ShippingAddress2=mShippingAddress2, ShippingCity=mShippingCity, ShippingState=mShippingState, ShippingPostalCode=mShippingPostalCode, ShippingCountry=mShippingCountry, ShippingPhone=mShippingPhone, ShippingAddressIsResidential=mShippingAddressIsResidential, TestType=mTestType,  LicenseKey= mLicenseKey)
            #Handel response and check for errors

        #If the backup call failed then this will display an error to the screen
        except:
            Label(swin.window, text='Error').pack()
            print (result)


Order Validation ColdFusion Snippet
<!--Makes Request to web service --->
<cfscript>
		try
		{
			if (isDefined("form.Action") AND Action neq "")
			{
				wsresponse = CreateObject("webservice", "https://trial.serviceobjects.com/ov/api.svc?wsdl");							  
				outputs = wsresponse.orderValidate("#Bin#", "#NumberOfItems#", "#TransactionTotal#", "#MCC#", "#Email#", "#IPAddress#", "#TimeOfDay#", "#BillingCompanyName#", "#BillingFirstName#", "#BillingLastName#", "#BillingAddress#", "#BillingAddress2#", "#BillingCity#", "#BillingState#", "#BillingPostalCode#",  "#BillingCountry#", "#BillingPhone#" , "#BillingAddressIsResidential#", "#ShippingCompanyName#", "#ShippingFirstName#", "#ShippingLastName#", "#ShippingAddress#",  "#ShippingAddress2#", "#ShippingCity#", "#ShippingState#",  "#ShippingPostalCode#", "#ShippingCountry#", "#ShippingPhone#", "#ShippingAddressIsResidential#", "#TestType#",   "#LicenseKey#");
			}
		}
	catch(any Exception){
		try
			{
				if (isDefined("form.Action") AND Action neq "")
				{
					wsresponse = CreateObject("webservice", "https://trial.serviceobjects.com/ov/api.svc?wsdl");							  
					outputs = wsresponse.orderValidate("#Bin#", "#NumberOfItems#", "#TransactionTotal#", "#MCC#", "#Email#", "#IPAddress#", "#TimeOfDay#", "#BillingCompanyName#", "#BillingFirstName#", "#BillingLastName#", "#BillingAddress#", "#BillingAddress2#", "#BillingCity#", "#BillingState#", "#BillingPostalCode#",  "#BillingCountry#", "#BillingPhone#" , "#BillingAddressIsResidential#", "#ShippingCompanyName#", "#ShippingFirstName#", "#ShippingLastName#", "#ShippingAddress#",  "#ShippingAddress2#", "#ShippingCity#", "#ShippingState#",  "#ShippingPostalCode#", "#ShippingCountry#", "#ShippingPhone#", "#ShippingAddressIsResidential#", "#TestType#",   "#LicenseKey#");
				}
			}
			catch(any Exception)	
				{
		  		 writeoutput("An Error Has Occured. Please Reload and try again #Exception.message#");		  		 
		 		}
	    }
</cfscript>


Order Validation VB Snippet
Try
    Dim ws As New OV.OrderValidationClient
    Dim response As OV.OrderInfoResponse
    response = ws.OrderValidate(Bin.Text, NumberOfItems.Text, TransactionTotal.Text, MCC.Text, Email.Text, IPAddress.Text, TimeOfDay.Text, BillingCompanyName.Text, BillingFirstName.Text, BillingLastName.Text, BillingAddress.Text, BillingAddress2.Text, BillingCity.Text, BillingState.Text, BillingPostalCode.Text, BillingCountry.Text, BillingPhone.Text, BillingAddressIsResidential.Text, ShippingCompanyName.Text, ShippingFirstName.Text, ShippingLastName.Text, ShippingAddress.Text, ShippingAddress2.Text, ShippingCity.Text, ShippingState.Text, ShippingPostalCode.Text, ShippingCountry.Text, ShippingPhone.Text, ShippingAddressIsResidential.Text, TestType.Text, LicenseKey.Text)
    If (response.Error Is Nothing) Then
        ProcessValidResponse(response)
    Else
        ProcessErrorResponse(response.Error)
    End If

Catch er As Exception
    Try
        ''Set the primary and backup service references as necessary
        Dim wsbackup As New OV.OrderValidationClient
        Dim response As OV.OrderInfoResponse
        response = wsbackup.OrderValidate(Bin.Text, NumberOfItems.Text, TransactionTotal.Text, MCC.Text, Email.Text, IPAddress.Text, TimeOfDay.Text, BillingCompanyName.Text, BillingFirstName.Text, BillingLastName.Text, BillingAddress.Text, BillingAddress2.Text, BillingCity.Text, BillingState.Text, BillingPostalCode.Text, BillingCountry.Text, BillingPhone.Text, BillingAddressIsResidential.Text, ShippingCompanyName.Text, ShippingFirstName.Text, ShippingLastName.Text, ShippingAddress.Text, ShippingAddress2.Text, ShippingCity.Text, ShippingState.Text, ShippingPostalCode.Text, ShippingCountry.Text, ShippingPhone.Text, ShippingAddressIsResidential.Text, TestType.Text, LicenseKey.Text)
        If (response.Error Is Nothing) Then
            ProcessValidResponse(response)
        Else
            ProcessErrorResponse(response.Error)
        End If
    Catch ex As Exception
        resultsLabel.Visible = True
        resultsLabel.Text = ex.Message
    End Try
End Try


Order Validation Apex Code Snippet
wwwServiceobjectsCom.OrderInfoResponse result;
try{
wwwServiceobjectsCom.soap client = new wwwServiceobjectsCom.soap();
result = client.OrderValidate([BIN], [NumberOfItems], [TransactionTotal], [MCC], [Email], [IPAddress], [TimeOfDay], [BillingCompanyName], [BillingFirstName], [BillingLastName], [BillingAddress], [BillingAddress2], [BillingCity], [BillingState], [BillingPostalCode], [BillingCountry], [BillingPhone], [BillingAddressIsResidential], [ShippingCompanyName], [ShippingFirstName], [ShippingLastName], [ShippingAddress], [ShippingAddress2], [ShippingCity], [ShippingState], [ShippingPostalCode], [ShippingCountry], [ShippingPhone], [ShippingAddressIsResidential], [TestType], [LicenseKey]);
}
catch(Exception ex){
 //If the first request failed try the failover endpoint
wwwServiceobjectsCom.soap backupClient = new wwwServiceobjectsCom.soap();
//The backup environment will be provided to you upon purchasing a production license key
backupClient.endpoint_x = 'http://trial.serviceobjects.com/OV/api.svc/soap';
result = backupClient.OrderValidate([BIN], [NumberOfItems], [TransactionTotal], [MCC], [Email], [IPAddress], [TimeOfDay], [BillingCompanyName], [BillingFirstName], [BillingLastName], [BillingAddress], [BillingAddress2], [BillingCity], [BillingState], [BillingPostalCode], [BillingCountry], [BillingPhone], [BillingAddressIsResidential], [ShippingCompanyName], [ShippingFirstName], [ShippingLastName], [ShippingAddress], [ShippingAddress2], [ShippingCity], [ShippingState], [ShippingPostalCode], [ShippingCountry], [ShippingPhone], [ShippingAddressIsResidential], [TestType], [LicenseKey]);
}


Order Validation TSQL Code Snippet
SET @requestBody = '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">' +
					'<s:Body>' +
					'<OrderValidate xmlns="http://www.serviceobjects.com">' +
					'<BIN>' + @BIN  +  '</BIN>' +
					'<NumberOfItems>' + @NumberOfItems  +  '</NumberOfItems>' +
					'<TransactionTotal>' + @TransactionTotal  +  '</TransactionTotal>' +
					'<MCC>' + @MCC  +  '</MCC>' +
					'<Email>' + @Email  +  '</Email>' +
					'<IPAddress>' + @IPAddress  +  '</IPAddress>' +
					'<TimeOfDay>' + @TimeOfDay  +  '</TimeOfDay>' +
					'<BillingCompanyName>' + @BillingCompanyName  +  '</BillingCompanyName>' +
					'<BillingFirstName>' + @BillingFirstName  +  '</BillingFirstName>' +
					'<BillingLastName>' + @BillingLastName  +  '</BillingLastName>' +
					'<BillingAddress>' + @BillingAddress  +  '</BillingAddress>' +
					'<BillingAddress2>' + @BillingAddress2  +  '</BillingAddress2>' +
					'<BillingCity>' + @BillingCity  +  '</BillingCity>' +
					'<BillingState>' + @BillingState  +  '</BillingState>' +
					'<BillingPostalCode>' + @BillingPostalCode  +  '</BillingPostalCode>' +
					'<BillingCountry>' + @BillingCountry  +  '</BillingCountry>' +
					'<BillingPhone>' + @BillingPhone  +  '</BillingPhone>' +
					'<BillingAddressIsResidential>' + @BillingAddressIsResidential  +  '</BillingAddressIsResidential>' +
					'<ShippingCompanyName>' + @ShippingCompanyName  +  '</ShippingCompanyName>' +
					'<ShippingFirstName>' + @ShippingFirstName  +  '</ShippingFirstName>' +
					'<ShippingLastName>' + @ShippingLastName  +  '</ShippingLastName>' +
					'<ShippingAddress>' + @ShippingAddress  +  '</ShippingAddress>' +
					'<ShippingAddress2>' + @ShippingAddress2  +  '</ShippingAddress2>' +
					'<ShippingCity>' + @ShippingCity  +  '</ShippingCity>' +
					'<ShippingState>' + @ShippingState  +  '</ShippingState>' +
					'<ShippingPostalCode>' + @ShippingPostalCode  +  '</ShippingPostalCode>' +
					'<ShippingCountry>' + @ShippingCountry  +  '</ShippingCountry>' +
					'<ShippingPhone>' + @ShippingPhone  +  '</ShippingPhone>' +
					'<ShippingAddressIsResidential>' + @ShippingAddressIsResidential  +  '</ShippingAddressIsResidential>' +
					'<TestType>' + @TestType  +  '</TestType>' +
					'<LicenseKey>' + @key  +  '</LicenseKey>' +
					'</OrderValidate>' +
					'</s:Body>' +
					'</s:Envelope>'
SET @requestLength = LEN(@requestBody)
	--If a production key is purchased, this will execute the failover 
IF @isLiveKey = 1
BEGIN
	EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT
	EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'http://ws.serviceobjects.com/OV/api.svc/soap', false
	EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'ws.serviceobjects.com'
	EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text/xml; charset=UTF-8'
	EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '"http://www.serviceobjects.com/IOrderValidation/OrderValidate"'
	EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength 
	EXEC sp_OAMethod @obj, 'send', NULL, @requestBody
	EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT
	EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT
	EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT
			
	--Checks the Response for a fatal error or if null. 
	IF @response IS NULL
	BEGIN
		EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT
		EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'http://wsbackup.serviceobjects.com/OV/api.svc/soap', false
		EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'wsbackup.serviceobjects.com'
		EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text/xml; charset=UTF-8'
		EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '"http://www.serviceobjects.com/IOrderValidation/OrderValidate"'
		EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength 
		EXEC sp_OAMethod @obj, 'send', NULL, @requestBody
		EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT
		EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT
		EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT
	END
END



Order Validation C# Rest Code Snippet
 string mainURL = "https://trial.serviceobjects.com/OV/api.svc/OrderInfo/" + BIN + "/" + NUMBEROFITEMS + "/" + TRANSACTIONTOTAL + "/" + MCC + "/" + EMAIL + "/" + IPADDRESS + "/" + TIMEOFDAY + "/" + BILLINGCOMPANYNAME + "/" + BILLINGFIRSTNAME + "/" + BILLINGLASTNAME + "/" + BILLINGADDRESS + "/" + BILLINGADDRESS2 + "/" + BILLINGCITY + "/" + BILLINGSTATE + "/" + BILLINGPOSTALCODE + "/" +BILLINGCOUNTRY + "/" + BILLINGPHONE + "/" + BILLINGADDRESSISRESIDENTIAL + "/" + SHIPPINGCOMPANYNAME + "/" + SHIPPINGFIRSTNAME + "/" + SHIPPINGLASTNAME + "/" + SHIPPINGADDRESS + "/" + SHIPPINGADDRESS2 + "/" + SHIPPINGCITY + "/" + SHIPPINGSTATE + "/" + SHIPPINGPOSTALCODE + "/" + SHIPPINGCOUNTRY + "/" + SHIPPINGPHONE + "/" + SHIPPINGADDRESSISRESIDENTIAL + "/" + TESTTYPE + "/" + LICENSEKEY + "?format=json";

OVResponseresult = null;
 
HttpWebRequest request = WebRequest.Create(mainURL ) as HttpWebRequest;
request.Timeout = 5000;//timeout for get operation
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
	if (response.StatusCode != HttpStatusCode.OK)
		throw new Exception(String.Format(
		"Server error (HTTP {0}: {1}).",
		response.StatusCode,
		response.StatusDescription));
	//parse response
	DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(OVResponse));
	object objResponse = jsonSerializer.ReadObject(response.GetResponseStream());
	result = objResponse as OVResponse;
//processing result
if (result.error == null)
{
	//process result
}
else
{
	//process error
}


Order Validation Java Rest Code Snippet
OVResponse.Error error = null;
OVResponse.OrderInfo info = null;
OVRestClient OVClient = new OVRestClient();
OVResponse result = OVClient.ValidateOrder(bin, numberofitems, transactiontotal, mcc,email, ipaddress, timeofday, billingcompanyname,billingfirstname, billinglastname, billingaddress, billingaddress2, billingcity, billingstate, billingpostalcode, billingcountry, billingphone, billingaddressisresidential, shippingcompanyname, shippingfirstname, shippinglastname, shippingaddress, shippingaddress2, shippingcity, shippingstate, shippingpostalcode, shippingcountry, shippingphone, shippingaddressisresidential, testtype, licensekey );
if (result != null) {
	error = result.error;
	info = result.orderInfo;
}
 
//Process Results
if (error == null) {
	//DOTS Order Validation		
}
 
//Process Errors
else{
}
	//DOTS Order Validation
}


Order Validation PHP Rest Code Snippets
$URL = "http://trial.serviceobjects.com/OV/api.svc/OrderInfo/."/".urlencode($Bin)."/".urlencode($NumberOfItems)."/".urlencode($TransactionTotal)."/".urlencode($Mcc)."/".urlencode($Email)."/".urlencode($IPAddress)."/".urlencode($TimeOfDay)."/".urlencode($BillingCompanyName)."/".urlencode($BillingFirstName)."/".urlencode($BillingLastName)."/".urlencode($BillingAddress)."/".urlencode($BillingAddress2)."/".urlencode($BillingCity)."/".urlencode($BillingState)."/".urlencode($BillingPostalCode)."/".urlencode($BillingCountry)."/".urlencode($BillingPhone)."/".urlencode($BillingAddressIsResidential)."/".urlencode($ShippingCompanyName)."/".urlencode($ShippingFirstName)."/".urlencode($ShippingLastName)."/".urlencode($ShippingAddress)."/".urlencode($ShippingAddress2)."/".urlencode($ShippingCity)."/".urlencode($ShippingState)."/".urlencode($ShippingPostalCode)."/".urlencode($ShippingCountry)."/".urlencode($ShippingPhone)."/".urlencode($ShippingAddressIsResidential)."/".urlencode($TestType)."/".urlencode($LicenseKey)."?format=json";
	
// Get cURL resource
$curl = curl_init();
curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $URL, CURLOPT_USERAGENT => 'Service Objects Order Validation'));
curl_setopt($curl, CURLOPT_TIMEOUT, 5); //timeout in seconds
// Send the request & save response to $resp
$resp = curl_exec($curl);
$jsonIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator(json_decode($resp, TRUE)), RecursiveIteratorIterator::SELF_FIRST);
foreach ($jsonIterator as $key => $val) 
{
	if(is_array($val)) 
	{
		echo "Order Validation Results";
	} 
	else 
	{ 
		echo "$key";
		echo "$val";
	}
}


Order Validation RoR Rest Code Snippets
     #This sets the default timeout for HTTParty get operation. This must be set in order to use the gem
      default_timeout = 10   
     
      bin = @request.bin
      numberofitems = @request.numberofitems
      transactiontotal = @request.transactiontotal
      mcc = @request.mcc
      email = @request.email
      ipaddress = @request.ipaddress
      timeofday = @request.timeofday
      billingcompanyname = @request.billingcompanyname
      billingfirstname = @request.billingfirstname
      billinglastname = @request.billinglastname
      billingaddress = @request.billingaddress
      billingaddress2 = @request.billingaddress2
      billingcity = @request.billingcity
      billingstate = @request.billingstate
      billingpostalcode = @request.billingpostalcode
      billingcountry = @request.billingcountry
      billingphone = @request.billingphone
      billingaddressisresidential = @request.billingaddressisresidential
      shippingcompanyname = @request.shippingcompanyname
      shippingfirstname = @request.shippingfirstname
      shippinglastname = @request.shippinglastname
      shippingaddress = @request.shippingaddress
      shippingaddress2 = @request.shippingaddress2
      shippingcity = @request.shippingcity
      shippingstate = @request.shippingstate
      shippingpostalcode = @request.shippingpostalcode
      shippingcountry = @request.shippingcountry
      shippingphone = @request.shippingphone
      shippingaddressisresidential = @request.shippingaddressisresidential
      testtype = @request.testtype
      licensekey = @request.licensekey               
      
      #Set Primary and Backup URLs as needed. This method encodes and standardizes the URI to pass to the REST service.
      primaryURL = URI.encode("http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=" + bin + "&NumberOfItems=" + numberofitems + "&TransactionTotal=" + transactiontotal + "&MCC=" + mcc + "&Email=" + email + "&IPAddress=" + ipaddress + "&TimeOfDay=" + timeofday + "&BillingCompanyName=" + billingcompanyname + "&BillingFirstName=" + billingfirstname + "&BillingLastName=" + billinglastname + "&BillingAddress=" + billingaddress + "&BillingAddress2=" + billingaddress2 + "&BillingCity=" + billingcity + "&BillingState=" + billingstate + "&BillingPostalCode=" + billingpostalcode + "&BillingCountry=" + billingcountry + "&BillingPhone=" + billingphone + "&BillingAddressIsResidential=" + billingaddressisresidential + "&ShippingCompanyName=" + shippingcompanyname + "&ShippingFirstName=" + shippingfirstname + "&ShippingLastName=" + shippinglastname + "&ShippingAddress=" + shippingaddress + "&ShippingAddress2=" + shippingaddress2 + "&ShippingCity=" + shippingcity +"&ShippingState=" + shippingstate + "&ShippingPostalCode=" + shippingpostalcode + "&ShippingCountry=" + shippingcountry + "&ShippingPhone=" + shippingphone + "&ShippingAddressIsResidential=" + shippingaddressisresidential + "&TestType=" + testtype + "&LicenseKey=" + licensekey)
      backupURL = URI.encode("http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=" + bin + "&NumberOfItems=" + numberofitems + "&TransactionTotal=" + transactiontotal + "&MCC=" + mcc + "&Email=" + email + "&IPAddress=" + ipaddress + "&TimeOfDay=" + timeofday + "&BillingCompanyName=" + billingcompanyname + "&BillingFirstName=" + billingfirstname + "&BillingLastName=" + billinglastname + "&BillingAddress=" + billingaddress + "&BillingAddress2=" + billingaddress2 + "&BillingCity=" + billingcity + "&BillingState=" + billingstate + "&BillingPostalCode=" + billingpostalcode + "&BillingCountry=" + billingcountry + "&BillingPhone=" + billingphone + "&BillingAddressIsResidential=" + billingaddressisresidential + "&ShippingCompanyName=" + shippingcompanyname + "&ShippingFirstName=" + shippingfirstname + "&ShippingLastName=" + shippinglastname + "&ShippingAddress=" + shippingaddress + "&ShippingAddress2=" + shippingaddress2 + "&ShippingCity="+shippingcity+"&ShippingState="+shippingstate+"&ShippingPostalCode="+shippingpostalcode+"&ShippingCountry="+shippingcountry+"&ShippingPhone="+shippingphone+"&ShippingAddressIsResidential="+shippingaddressisresidential+"&TestType="+testtype+"&LicenseKey=" + licensekey)
      
      #These are set to access the hash that is returned
      @ovresult ="OrderInfoResponse"
      @overror = "Error"
      @ovinfo = "OrderInfo"

        #Begins the call the RESTful web service
      begin
        response = HTTParty.get(primaryURL, timeout: default_timeout)
        #processes the response to display to the screen        
        #Passes the response returned from HTTParty and processes them depending on the results
        processresults(response)
        
       rescue StandardError => e
       		begin
       		#uses the backupURl in the event that the service encountered an error
       		response = HTTParty.get(backupURL, timeout: default_timeout)
          
          #processes the response returned from using the backupURL
       		processresults(response)
          #If the backup url railed this will raise an error and display the 
          #error message returned from the HTTParty gem.
       		rescue StandardError => error
       		end
      end      
  end
	private 
      #processes HTTParty response and uses hash names to display
      #relevant info returned from the ServiceObjects web serivce
	def processresults(response)	
			#Processes Error Response from the web service	
			#Processes a valid response from the web service
	end


Order Validation Python Rest Code Snippet
    
    mBIN =  BIN.get()
    if mBIN is None or  mBIN == "":
         mBIN = " "
    mNumberOfItems = NumberOfItems.get()
    if mNumberOfItems is None or mNumberOfItems == "":
        mNumberOfItems = " "
    mTransactionTotal =  TransactionTotal.get()
    if mTransactionTotal is None or  mTransactionTotal == "":
         mTransactionTotal = " "
    mMCC = MCC.get()
    if mMCC is None or mMCC == "":
        mMCC = " "
    mEmail =  Email.get()
    if mEmail is None or  mEmail == "":
         mEmail = " "
    mIPAddress =  IPAddress.get()
    if mIPAddress is None or  mIPAddress == "":
         mIPAddress = " "
    mTimeOfDay = TimeOfDay.get()
    if mTimeOfDay is None or mTimeOfDay == "":
        mTimeOfDay = " "
    mBillingCompanyName =  BillingCompanyName.get()
    if mBillingCompanyName is None or  mBillingCompanyName == "":
         mBillingCompanyName = " "
    mBillingFirstName = BillingFirstName.get()
    if mBillingFirstName is None or mBillingFirstName == "":
        mBillingFirstName = " "
    mBillingLastName =  BillingLastName.get()
    if mBillingLastName is None or  mBillingLastName == "":
         mBillingLastName = " "
    mBillingAddress = BillingAddress.get()
    if mBillingAddress is None or mBillingAddress == "":
        mBillingAddress = " "
    mBillingAddress2 =  BillingAddress2.get()
    if mBillingAddress2 is None or  mBillingAddress2 == "":
         mBillingAddress2 = " "
    mBillingCity = BillingCity.get()
    if mBillingCity is None or mBillingCity == "":
        mBillingCity = " "
    mBillingState =  BillingState.get()
    if mBillingState is None or  mBillingState == "":
         mBillingState = " "
    mBillingPostalCode = BillingPostalCode.get()
    if mBillingPostalCode is None or mBillingPostalCode == "":
        mBillingPostalCode = " "
    mBillingCountry =  BillingCountry.get()
    if mBillingCountry is None or  mBillingCountry == "":
         mBillingCountry = " "
    mBillingPhone = BillingPhone.get()
    if mBillingPhone is None or mBillingPhone == "":
        mBillingPhone = " "
    mBillingAddressIsResidential =  BillingAddressIsResidential.get()
    if mBillingAddressIsResidential is None or  mBillingAddressIsResidential == "":
        mBillingAddressIsResidential = " "
    mShippingCompanyName = ShippingCompanyName.get()
    if mShippingCompanyName is None or mShippingCompanyName == "":
        mShippingCompanyName = " "
    mShippingFirstName = ShippingFirstName.get()
    if mShippingFirstName is None or mShippingFirstName == "":
        mShippingFirstName = " "
    mShippingLastName = ShippingLastName.get()
    if mShippingLastName is None or mShippingLastName == "":
        mShippingLastName = " "
    mShippingAddress = ShippingAddress.get()
    if mShippingAddress is None or mShippingAddress == "":
        mShippingAddress = " "
    mShippingAddress2 = ShippingAddress2.get()
    if mShippingAddress2 is None or mShippingAddress2 == "":
        mShippingAddress2 = " "
    mShippingCity = ShippingCity.get()
    if mShippingCity is None or mShippingCity == "":
        mShippingCity = " "
    mShippingState = ShippingState.get()
    if mShippingState is None or mShippingState == "":
        mShippingState = " "
    mShippingPostalCode = ShippingPostalCode.get()
    if mShippingPostalCode is None or mShippingPostalCode == "":
        mShippingPostalCode = " "
    mShippingCountry = ShippingCountry.get()
    if mShippingCountry is None or mShippingCountry == "":
        mShippingCountry = " "
    mShippingPhone = ShippingPhone.get()
    if mShippingPhone is None or mShippingPhone == "":
        mShippingPhone = " "
    mShippingAddressIsResidential = ShippingAddressIsResidential.get()
    if mShippingAddressIsResidential is None or mShippingAddressIsResidential == "":
        mShippingAddressIsResidential = " "
    mTestType = TestType.get()
    if mTestType is None or mTestType == "":
        mTestType = " "
    mLicenseKey = LicenseKey.get()
    if mLicenseKey is None or mLicenseKey == "":
        mLicenseKey = " "

    #Set the primary and backup URLs as necessary
    primaryURL = 'http://trial.serviceobjects.com/ov/api.svc/OrderValidate?'
    backupURL = 'http://trial.serviceobjects.com/ov/api.svc/OrderValidate?'

    #The Requests package allows the user to format the path parameters like so instead of having to manually insert them into the URL
    inputs = {'BIN': mBIN, 'NumberOfItems':mNumberOfItems, 'TransactionTotal':mTransactionTotal, 'MCC':mMCC, 'Email':mEmail, 'IPAddress':mIPAddress, 'TimeOfDay':mTimeOfDay, 'BillingCompanyName': mBillingCompanyName, 'BillingFirstName':mBillingFirstName, 'BillingLastName':mBillingLastName, 'BillingAddress':mBillingAddress, 'BillingAddress2':mBillingAddress2, 'BillingCity':mBillingCity, 'BillingState':mBillingState, 'BillingPostalCode':mBillingPostalCode, 'BillingCountry':mBillingCountry, 'BillingPhone':mBillingPhone, 'BillingAddressIsResidential': mBillingAddressIsResidential, 'ShippingCompanyName':mShippingCompanyName, 'ShippingFirstName':mShippingFirstName, 'ShippingLastName':mShippingLastName, 'ShippingAddress':mShippingAddress, 'ShippingAddress2':mShippingAddress2, 'ShippingCity':mShippingCity, 'ShippingState':mShippingState, 'ShippingPostalCode':mShippingPostalCode, 'ShippingCountry':mShippingCountry, 'ShippingPhone':mShippingPhone, 'ShippingAddressIsResidential':mShippingAddressIsResidential, 'TestType':mTestType,  'LicenseKey': mLicenseKey}
    try:
        result = requests.get(primaryURL, params=inputs)
        #Parses the XML response from the service into a python dictionary type
        outputs = xmltodict.parse(result.content)
        #Handel response and check for errors

    #Uses the backup URL if the call to the primary URL failed.
    except:
        try:
            result = requests.get(backupURL, params=inputs)
            #Parses the XML response from the service into a python dictionary type
            outputs = xmltodict.parse(result.content)
            #Handel response and check for errors

        #Prints an error message if the primary and backup urls failed
        except:
            Label(swin.window, text='Error').pack()
            print (result)


Order Validation ColdFusion Rest Snippet
 <!--Makes Request to web service --->
<cfIf isDefined("form.Action") AND Action neq ""  >
	<cftry>
		<cfset primaryURL = "http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=#BIN#&NumberOfItems=#NumberOfItems#&TransactionTotal=#TransactionTotal#&MCC=#MCC#&Email=#Email#&IPAddress=#IPAddress#&TimeOfDay=#TimeOfDay#&BillingCompanyName=#BillingCompanyName#&BillingFirstName=#BillingFirstName#&BillingLastName=#BillingLastName#&BillingAddress=#BillingAddress#&BillingAddress2=#BillingAddress2#&BillingCity=#BillingCity#&BillingState=#BillingState#&BillingPostalCode=#BillingPostalCode#&BillingCountry=#BillingCountry#&BillingPhone=#BillingPhone#&BillingAddressIsResidential=#BillingAddressIsResidential#&ShippingCompanyName=#ShippingCompanyName#&ShippingFirstName=#ShippingFirstName#&ShippingLastName=#ShippingLastName#&ShippingAddress=#ShippingAddress#&ShippingAddress2=#ShippingAddress2#&ShippingCity=#ShippingCity#&ShippingState=#ShippingState#&ShippingPostalCode=#ShippingPostalCode#&ShippingCountry=#ShippingCountry#&ShippingPhone=#ShippingPhone#&ShippingAddressIsResidential=#ShippingAddressIsResidential#&TestType=#TestType#&LicenseKey=#LicenseKey#">
		<cfhttp url="#primaryURL#" method="get" result="response">
		<cfset outputs = XmlParse(response.FileContent)>
	<cfcatch >
		<cftry>
			<cfset backupURL = "http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=#BIN#&NumberOfItems=#NumberOfItems#&TransactionTotal=#TransactionTotal#&MCC=#MCC#&Email=#Email#&IPAddress=#IPAddress#&TimeOfDay=#TimeOfDay#&BillingCompanyName=#BillingCompanyName#&BillingFirstName=#BillingFirstName#&BillingLastName=#BillingLastName#&BillingAddress=#BillingAddress#&BillingAddress2=#BillingAddress2#&BillingCity=#BillingCity#&BillingState=#BillingState#&BillingPostalCode=#BillingPostalCode#&BillingCountry=#BillingCountry#&BillingPhone=#BillingPhone#&BillingAddressIsResidential=#BillingAddressIsResidential#&ShippingCompanyName=#ShippingCompanyName#&ShippingFirstName=#ShippingFirstName#&ShippingLastName=#ShippingLastName#&ShippingAddress=#ShippingAddress#&ShippingAddress2=#ShippingAddress2#&ShippingCity=#ShippingCity#&ShippingState=#ShippingState#&ShippingPostalCode=#ShippingPostalCode#&ShippingCountry=#ShippingCountry#&ShippingPhone=#ShippingPhone#&ShippingAddressIsResidential=#ShippingAddressIsResidential#&TestType=#TestType#&LicenseKey=#LicenseKey#">
			<cfhttp url="#backupURL#" method="get" result="response">
			<cfset outputs = XmlParse(response.FileContent)>				
			<cfcatch type="any" name="error">
				<cfoutput>
					The Following Error Occured: "#error.Message#"
				</cfoutput>
			</cfcatch>
		</cftry>
	</cfcatch>
	</cftry>
</cfif>	


Order Validation VB Rest Snippet
'encodes the URLs for the get Call. Set the primary and back urls as necessary
Dim primaryurl As String = "http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=" + bin + "&NumberOfItems=" + numberofitems + "&TransactionTotal=" + transactiontotal + "&MCC=" + mcc + "&Email=" + email + "&IPAddress=" + ipaddress + "&TimeOfDay=" + timeofday + "&BillingCompanyName=" + billingcompanyname + "&BillingFirstName=" + billingfirstname + "&BillingLastName=" + billinglastname + "&BillingAddress=" + billingaddress + "&BillingAddress2=" + billingaddress2 + "&BillingCity=" + billingcity + "&BillingState=" + billingstate + "&BillingPostalCode=" + billingpostalcode + "&BillingCountry=" + billingcountry + "&BillingPhone=" + billingphone + "&BillingAddressIsResidential=" + billingaddressisresidential + "&ShippingCompanyName=" + shippingcompanyname + "&ShippingFirstName=" + shippingfirstname + "&ShippingLastName=" + shippinglastname + "&ShippingAddress=" + shippingaddress + "&ShippingAddress2=" + shippingaddress2 + "&ShippingCity=" + shippingcity + "&ShippingState=" + shippingstate + "&ShippingPostalCode=" + shippingpostalcode + "&ShippingCountry=" + shippingcountry + "&ShippingPhone=" + shippingphone + "&ShippingAddressIsResidential=" + shippingaddressisresidential + "&TestType=" + testtype + "&LicenseKey=" + licensekey
Dim backupurl As String = "http://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN=" + bin + "&NumberOfItems=" + numberofitems + "&TransactionTotal=" + transactiontotal + "&MCC=" + mcc + "&Email=" + email + "&IPAddress=" + ipaddress + "&TimeOfDay=" + timeofday + "&BillingCompanyName=" + billingcompanyname + "&BillingFirstName=" + billingfirstname + "&BillingLastName=" + billinglastname + "&BillingAddress=" + billingaddress + "&BillingAddress2=" + billingaddress2 + "&BillingCity=" + billingcity + "&BillingState=" + billingstate + "&BillingPostalCode=" + billingpostalcode + "&BillingCountry=" + billingcountry + "&BillingPhone=" + billingphone + "&BillingAddressIsResidential=" + billingaddressisresidential + "&ShippingCompanyName=" + shippingcompanyname + "&ShippingFirstName=" + shippingfirstname + "&ShippingLastName=" + shippinglastname + "&ShippingAddress=" + shippingaddress + "&ShippingAddress2=" + shippingaddress2 + "&ShippingCity=" + shippingcity + "&ShippingState=" + shippingstate + "&ShippingPostalCode=" + shippingpostalcode + "&ShippingCountry=" + shippingcountry + "&ShippingPhone=" + shippingphone + "&ShippingAddressIsResidential=" + shippingaddressisresidential + "&TestType=" + testtype + "&LicenseKey=" + licensekey
Dim wsresponse As OVResponse.OrderInfoResponse = httpGet(primaryurl)

'checks if a response was returned from the service, uses the backup url if response is null or a fatal error occured.
If wsresponse Is Nothing OrElse (wsresponse.[Error] IsNot Nothing AndAlso wsresponse.[Error].TypeCode = "3") Then
    wsresponse = httpGet(backupurl)
End If
If wsresponse.[Error] IsNot Nothing Then
    ProcessErrorResponse(wsresponse.[Error])
Else
    ProcessSuccessfulResponse(wsresponse)

End If


Order Validation TSQL Rest Code Snippet
BEGIN
	SET @sUrl = 'http://ws.serviceobjects.com/OV/api.svc/OrderValidate?BIN=' + @bin + '&NumberOfItems=' + @numberofitems + '&TransactionTotal=' + @transactiontotal + '&MCC=' + @mcc + '&Email=' + @email + '&IPAddress=' + @ipaddress + '&TimeOfDay=' + @timeofday + '&BillingCompanyName=' + @billingcompanyname + '&BillingFirstName=' + @billingfirstname + '&BillingLastName=' + @billinglastname + '&BillingAddress=' + @billingaddress + '&BillingAddress2=' + @billingaddress2 + '&BillingCity=' + @billingcity + '&BillingState=' + @billingstate + '&BillingPostalCode=' + @billingpostalcode + '&BillingCountry=' + @billingcountry + '&BillingPhone=' + @billingphone + '&BillingAddressIsResidential=' + @billingaddressisresidential + '&ShippingCompanyName=' + @shippingcompanyname + '&ShippingFirstName=' + @shippingfirstname + '&ShippingLastName=' + @shippinglastname + '&ShippingAddress=' + @shippingaddress + '&ShippingAddress2=' + @shippingaddress2 + '&ShippingCity=' + @shippingcity +'&ShippingState=' + @shippingstate + '&ShippingPostalCode=' + @shippingpostalcode + '&ShippingCountry=' + @shippingcountry + '&ShippingPhone=' + @shippingphone + '&ShippingAddressIsResidential=' + @shippingaddressisresidential + '&TestType=' + @testtype + '&LicenseKey=' + @key
	EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT
	EXEC sp_OAMethod @obj, 'Open', NULL, 'Get', @sUrl, false
	EXEC sp_OAMethod @obj, 'send'
	EXEC sp_OAGetProperty @obj, 'responseText', @response OUT
			
	--Checks the Response for a fatal error or if null. 
	IF @response IS NULL
	BEGIN
		SET @sBackupUrl = 'http://wsbackup.serviceobjects.com/OV/api.svc/OrderValidate?BIN=' + @bin + '&NumberOfItems=' + @numberofitems + '&TransactionTotal=' + @transactiontotal + '&MCC=' + @mcc + '&Email=' + @email + '&IPAddress=' + @ipaddress + '&TimeOfDay=' + @timeofday + '&BillingCompanyName=' + @billingcompanyname + '&BillingFirstName=' + @billingfirstname + '&BillingLastName=' + @billinglastname + '&BillingAddress=' + @billingaddress + '&BillingAddress2=' + @billingaddress2 + '&BillingCity=' + @billingcity + '&BillingState=' + @billingstate + '&BillingPostalCode=' + @billingpostalcode + '&BillingCountry=' + @billingcountry + '&BillingPhone=' + @billingphone + '&BillingAddressIsResidential=' + @billingaddressisresidential + '&ShippingCompanyName=' + @shippingcompanyname + '&ShippingFirstName=' + @shippingfirstname + '&ShippingLastName=' + @shippinglastname + '&ShippingAddress=' + @shippingaddress + '&ShippingAddress2=' + @shippingaddress2 + '&ShippingCity=' + @shippingcity +'&ShippingState=' + @shippingstate + '&ShippingPostalCode=' + @shippingpostalcode + '&ShippingCountry=' + @shippingcountry + '&ShippingPhone=' + @shippingphone + '&ShippingAddressIsResidential=' + @shippingaddressisresidential + '&TestType=' + @testtype + '&LicenseKey=' + @key
		EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT
		EXEC sp_OAMethod @obj, 'Open', NULL, 'Get', @sBackupUrl, false
		EXEC sp_OAMethod @obj, 'send'
		EXEC sp_OAGetProperty @obj, 'responseText', @response OUT
	END
END



You can find and download full sample code to our services in various languages (PHP, JAVA and C#) by clicking here. Below is a C# version.

If you are looking for a particular integration not listed in our documentation please contact us at support@serviceobjects.com.

C#
using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DOTSOV.com.serviceobjects.trial;
using System.Data;

namespace DOTSOV
{
    public partial class ov_soap : System.Web.UI.Page
    {
        
        static int WEB_SERVICE_REQUEST_TIMEOUT; //In milliseconds

        protected void Page_Load(object sender, EventArgs e)
        {
            ErrorLabel.Visible = false;
            ResultGrid.Visible = false;
            ErrorGrid.Visible = false;
            try
            {
                WEB_SERVICE_REQUEST_TIMEOUT = Convert.ToInt32(ConfigurationManager.AppSettings["WebServiceRequestTimeout"]);
            }
            catch (Exception ex)
            {
                ErrorLabel.Visible = true;
                ErrorLabel.Text = "Page load Error: " + ex.Message;
            }
        }
        //Handle the click image button event
        protected void btn_Validate_Click(object sender, EventArgs e)
        {
            try
            {
                OrderInfoResponse ovResponse = ValidateOrder(inputBin.Text,
                                                                inputNumberOfItems.Text,
                                                                inputTransactionTotal.Text,
                                                                inputMCC.Text,
                                                                inputEmail.Text,
                                                                inputIPAddress.Text,
                                                                inputTimeOfDay.Text,
                                                                inputBillingCompanyName.Text,
                                                                inputBillingFirstName.Text,
                                                                inputBillingLastName.Text,
                                                                inputBillingAddress.Text,
                                                                inputBillingAddress2.Text,
                                                                inputBillingCity.Text,
                                                                inputBillingState.Text,
                                                                inputBillingPostalCode.Text, 
                                                                inputBillingCountry.Text,
                                                                inputBillingPhone.Text,
                                                                inputBillingAddressIsResidential.Text,
                                                                inputShippingCompanyName.Text,
                                                                inputShippingFirstName.Text,
                                                                inputShippingLastName.Text,
                                                                inputShippingAddress.Text,
                                                                inputShippingAddress2.Text,
                                                                inputShippingCity.Text,
                                                                inputShippingState.Text,
                                                                inputShippingPostalCode.Text, 
                                                                inputShippingCountry.Text,
                                                                inputShippingPhone.Text,
                                                                inputShippingAddressIsResidential.Text,
                                                                inputTestType.Text,
                                                                inputLicenseKey.Text);
                
                ProcessResponse(ovResponse);
            }
            catch (Exception ex)
            {
                ErrorLabel.Visible = true;
                ErrorLabel.Text = ex.Message;
            }
        }
        //Create soap clients and request response from service
        private static OrderInfoResponse ValidateOrder(string bin, string numberofitems, string transactiontotal, string mcc, string email, string ipaddress, string timeofday, string billingcompanyname, string billingfirstname, string billinglastname, string billingaddress,
            string billingaddress2, string billingcity, string billingstate, string billingpostalcode, string billingcountry, string billingphone, string billingaddressisresidential, string shippingcompanyname, string shippingfirstname, string shippinglastname, string shippingaddress,
            string shippingaddress2, string shippingcity, string shippingstate, string shippingpostalcode, string shippingcountry, string shippingphone, string shippingaddressisresidential, string testype, string licenseKey)
        {
            OrderValidationClient OVClient_Primary = null;
            OrderValidationClient OVClient_Backup = null;
            OrderInfoResponse response = null;
            try
            {
                OVClient_Primary = new OrderValidationClient("DOTSOVPRIMARY");
                OVClient_Primary.InnerChannel.OperationTimeout = new TimeSpan(0, 0, 0, WEB_SERVICE_REQUEST_TIMEOUT);
                response = OVClient_Primary.OrderValidate(bin, numberofitems, transactiontotal, mcc, email, ipaddress,timeofday, billingcompanyname, billingfirstname, billinglastname, billingaddress, billingaddress2, billingcity,billingstate, billingpostalcode, billingcountry, billingphone, billingaddressisresidential, shippingcompanyname, shippingfirstname, shippinglastname, shippingaddress, shippingaddress2, shippingcity, shippingstate, shippingpostalcode, shippingcountry, shippingphone, shippingaddressisresidential, testype,  licenseKey);
                //NULL ERROR || FATAL ERROR RETURNED -- TRY BACKUP 
                if (response == null || (response.Error != null && response.Error.TypeCode == "3"))
                {
                    throw new Exception();
                }
                return response;
            }
            catch (Exception)
            {
                try
                {
                    OVClient_Backup = new OrderValidationClient("DOTSOVBACKUP");
                    OVClient_Backup.InnerChannel.OperationTimeout = new TimeSpan(0, 0, 0, WEB_SERVICE_REQUEST_TIMEOUT);
                    return OVClient_Backup.OrderValidate(bin, numberofitems, transactiontotal, mcc, email, ipaddress, timeofday, billingcompanyname, billingfirstname, billinglastname, billingaddress, billingaddress2, billingcity, billingstate, billingpostalcode, billingcountry, billingphone, billingaddressisresidential, shippingcompanyname, shippingfirstname, shippinglastname, shippingaddress, shippingaddress2, shippingcity, shippingstate, shippingpostalcode, shippingcountry, shippingphone, shippingaddressisresidential, testype, licenseKey);
                }
                catch (System.Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (OVClient_Backup != null) { OVClient_Backup.Close(); }
                }
            }
            finally
            {
                if (OVClient_Primary != null) { OVClient_Primary.Close(); }
            }
        }
        //Process the returned object

        private void ProcessResponse(OrderInfoResponse response)
        {
            try
            {
                if (response.Error != null)
                {
                    ProcessErrorResult(response.Error);
                }
                else
                {
                    ProccessOrderValidationResult(response.OrderInfo);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //Process and display the error values
        private void ProcessErrorResult(Error error)
        {
            try
            {
                DataTable dtError = new DataTable();
                //A case statement is used here because it is often useful to do different
                //things depeneding on which general type of error occurs.
                //Handle the errors according to your production needs.
                switch (System.Convert.ToInt32(error.TypeCode))
                {
                    case 1:
                        //Authorization Error
                        break;
                    case 2:
                        //User Input Error
                        break;
                    case 4:
                        //Domain Specific Error
                        break;
                    default:
                        //default (error code 3) Service Objects Fatal Error Error
                        break;
                }
                dtError.Columns.Add(new DataColumn("Output", typeof(string)));
                dtError.Columns.Add(new DataColumn("Values", typeof(string)));
                dtError.Rows.Add("Type", error.Type);
                dtError.Rows.Add("TypeCode", error.TypeCode);
                dtError.Rows.Add("Desc", error.Desc);
                dtError.Rows.Add("DescCode", error.DescCode);
                //
                ResultGrid.Visible = false;
                ErrorGrid.Visible = true;
                ErrorGrid.DataSource = new DataView(dtError);
                ErrorGrid.DataBind();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        //Process and display the result values
        private void ProccessOrderValidationResult(OrderInfo result)
        {
            try
            {
                DataTable dtProvider = new DataTable();
                dtProvider.Columns.Add(new DataColumn("Output", typeof(string)));
                dtProvider.Columns.Add(new DataColumn("Values", typeof(string)));
                dtProvider.Rows.Add("OverallScore", result.OverallScore);
                dtProvider.Rows.Add("ComponentScores", result.ComponentScores);
                dtProvider.Rows.Add("NoteCodes", result.NoteCodes);
                dtProvider.Rows.Add("NoteCodeDescriptions", result.NoteCodeDescriptions);
                dtProvider.Rows.Add("WarningCodes", result.WarningCodes);
                dtProvider.Rows.Add("WarningCodeDescriptions", result.WarningCodeDescriptions);
                dtProvider.Rows.Add("BillingAddress", result.BillingAddress);
                dtProvider.Rows.Add("BillingAddress2", result.BillingAddress2);
                dtProvider.Rows.Add("BillingCity", result.BillingCity);
                dtProvider.Rows.Add("BillingState", result.BillingState);
                dtProvider.Rows.Add("BillingPostalCode", result.BillingPostalCode);
                dtProvider.Rows.Add("BillingCountry", result.BillingCountry);
                dtProvider.Rows.Add("ShippingAddress", result.ShippingAddress);
                dtProvider.Rows.Add("ShippingAddress2", result.ShippingAddress2);
                dtProvider.Rows.Add("ShippingCity", result.ShippingCity);
                dtProvider.Rows.Add("ShippingState", result.ShippingState);
                dtProvider.Rows.Add("ShippingPostalCode", result.ShippingPostalCode);
                dtProvider.Rows.Add("ShippingCountry", result.ShippingCountry);
                ResultGrid.Visible = true;
                ErrorGrid.Visible = false;
                ResultGrid.DataSource = new DataView(dtProvider);
                ResultGrid.DataBind();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
    }
}



OrderValidate Example Request and Response


URL Request: 
https://trial.serviceobjects.com/ov/api.svc/OrderValidate?BIN=407441&NumberOfItems=&TransactionTotal=&MCC=&Email=m.wilson72%40hotmail.com&IPAddress=212.62.32.5&TimeOfDay=&BillingCompanyName=&BillingFirstName=Michael&BillingLastName=Wilson&BillingAddress=100+W+Ortg+St&BillingAddress2=&BillingCity=Santa+Barbara&BillingState=CA&BillingPostalCode=93103&BillingCountry=&BillingPhone=&BillingAddressIsResidential=&ShippingCompanyName=&ShippingFirstName=Michael&ShippingLastName=Wilson&ShippingAddress=133+E+De+La+Guerra+St&ShippingAddress2=&ShippingCity=Santa+Barbara&ShippingState=CA&ShippingPostalCode=93101&ShippingCountry=&ShippingPhone=&ShippingAddressIsResidential=&TestType=BusinessToConsumer&LicenseKey=YourDevKey





XML Response
<OrderInfoResponse xmlns="http://www.serviceobjects.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<OrderInfo>
<OverallScore>33</OverallScore>
<ComponentScores>
BillingCrossChecks Score: 24, ShippingCrossChecks Score: 1, BillingAddress Score: -8, ShippingAddress Score: 6, BillingPhone Score: 4, ShippingPhone Score: 4, BillingName Score: 7, ShippingName Score: 7, Email Score: 2, IP Score: -26, BIN Score: 12
</ComponentScores>
<NoteCodes>40,39,50,150,152,300,350,403,503,603</NoteCodes>
<NoteCodeDescriptions>
BillingPhoneProviderDataUnavailable,BillingPhoneContactDataUnavailable,ShippingName_Matches_BillingName,ShippingAddress_IsValid,ShippingAddress_IsDeliverable,BillingName_IsGood,ShippingName_IsGood,Email_Unknown,IP_Found,BIN_Found
</NoteCodeDescriptions>
<WarningCodes>2,81,83,1,1,505</WarningCodes>
<WarningCodeDescriptions>
REJECT,ShippingCity_DoesNotMatch_IPCity,ShippingCountry_DoesNotMatch_IPCountry,BillingAddress_IsInvalid,BillingAddress_IsUndeliverable,IP_IsInternational
</WarningCodeDescriptions>
<BillingAddress>100 W Ortg St</BillingAddress>
<BillingAddress2/>
<BillingCity>Santa Barbara</BillingCity>
<BillingState>CA</BillingState>
<BillingPostalCode>93103</BillingPostalCode>
<BillingCountry/>
<ShippingAddress>133 E De La Guerra St</ShippingAddress>
<ShippingAddress2/>
<ShippingCity>Santa Barbara</ShippingCity>
<ShippingState>CA</ShippingState>
<ShippingPostalCode>93101-2228</ShippingPostalCode>
<ShippingCountry>USA</ShippingCountry>
</OrderInfo>
</OrderInfoResponse>

List of Operations

OrderValidate (Recommended Operation) - Validates an order and returns an easy to use score that indicates if the order should be accepted, rejected or reviewed. The score is determined from a series of checks and cross checks that evaluate the validity and integrity of the order values. Additional codes and descriptive flags about the order are also returned to provide warnings and notes. Additionally, validated order addresses are corrected and standardized to meet USPS deliverability requirements to help ensure that your shipments and billing statements are delivered.

Operation Definitions

This section defines the input, output and behavior of the web services in OV.

OrderValidate (Recommended Operation)

URL Formats

Query String Parameters:

XML: https://trial.serviceobjects.com/OV/api.svc/OrderValidate?BIN={BIN}&NumberOfItems={NUMBEROFITEMS}&TransactionTotal={TRANSACTIONTOTAL}&MCC={MCC}&Email={EMAIL}&IPAddress={IPADDRESS}&TimeOfDay={TIMEOFDAY}&BillingCompanyName={BILLINGCOMPANYNAME}&BillingFirstName={BILLINGFIRSTNAME}&BillingLastName={BILLINGLASTNAME}&BillingAddress={BILLINGADDRESS}&BillingAddress2={BILLINGADDRESS2}&BillingCity={BILLINGCITY}&BillingState={BILLINGSTATE}&BillingPostalCode={BILLINGPOSTALCODE}&BillingCountry={BILLINGCOUNTRY}&BillingPhone={BILLINGPHONE}&BillingAddressIsResidential={BILLINGADDRESSISRESIDENTIAL}&ShippingCompanyName={SHIPPINGCOMPANYNAME}&ShippingFirstName={SHIPPINGFIRSTNAME}&ShippingLastName={SHIPPINGLASTNAME}&ShippingAddress={SHIPPINGADDRESS}&ShippingAddress2={SHIPPINGADDRESS2}&ShippingCity={SHIPPINGCITY}&ShippingState={SHIPPINGSTATE}&ShippingPostalCode={SHIPPINGPOSTALCODE}&ShippingCountry={SHIPPINGCOUNTRY}&ShippingPhone={SHIPPINGPHONE}&ShippingAddressIsResidential={SHIPPINGADDRESSISRESIDENTIAL}&TestType={TESTTYPE}&LicenseKey={LICENSEKEY}}

Path Parameters:

JSON: https://trial.serviceobjects.com/OV/api.svc/OrderInfo/{BIN}/{NUMBEROFITEMS}/{TRANSACTIONTOTAL}/{MCC}/{EMAIL}/{IPADDRESS}/{TIMEOFDAY}/{BILLINGCOMPANYNAME}/{BILLINGFIRSTNAME}/{BILLINGLASTNAME}/{BILLINGADDRESS}/{BILLINGADDRESS2}/{BILLINGCITY}/{BILLINGSTATE}/{BILLINGPOSTALCODE}/{BILLINGCOUNTRY}/{BILLINGPHONE}/{BILLINGADDRESSISRESIDENTIAL}/{SHIPPINGCOMPANYNAME}/{SHIPPINGFIRSTNAME}/{SHIPPINGLASTNAME}/{SHIPPINGADDRESS}/{SHIPPINGADDRESS2}/{SHIPPINGCITY}/{SHIPPINGSTATE}/{SHIPPINGPOSTALCODE}/{SHIPPINGCOUNTRY}/{SHIPPINGPHONE}/{SHIPPINGADDRESSISRESIDENTIAL}/{TESTTYPE}/{LICENSEKEY}?format=json

XML: https://trial.serviceobjects.com/OV/api.svc/OrderInfo/{BIN}/{NUMBEROFITEMS}/{TRANSACTIONTOTAL}/{MCC}/{EMAIL}/{IPADDRESS}/{TIMEOFDAY}/{BILLINGCOMPANYNAME}/{BILLINGFIRSTNAME}/{BILLINGLASTNAME}/{BILLINGADDRESS}/{BILLINGADDRESS2}/{BILLINGCITY}/{BILLINGSTATE}/{BILLINGPOSTALCODE}/{BILLINGCOUNTRY}/{BILLINGPHONE}/{BILLINGADDRESSISRESIDENTIAL}/{SHIPPINGCOMPANYNAME}/{SHIPPINGFIRSTNAME}/{SHIPPINGLASTNAME}/{SHIPPINGADDRESS}/{SHIPPINGADDRESS2}/{SHIPPINGCITY}/{SHIPPINGSTATE}/{SHIPPINGPOSTALCODE}/{SHIPPINGCOUNTRY}/{SHIPPINGPHONE}/{SHIPPINGADDRESSISRESIDENTIAL}/{TESTTYPE}/{LICENSEKEY}?format=xml

Click Here for examples and code snippets!


OrderValidate Inputs

Name

Type

Required

Description

Bin

String


6-Digit Card Bank Identification Number. Please do not enter a full credit card number. If more than 6 digits are entered then the service will return a User Input error.

NumberOfItemsString
An integer value that represents the number of items attached to this order.
TransactionTotalString
The total dollar amount for the current order. Values can be represented in either $XXX,XXX.XX currency format or XXXXXX.XX decimal format.
MCCString

Merchant Category Code, a 4-digit number used by the bankcard industry to classify suppliers into market segments. Please supply your MCC if you know it.

EmailString
Email address.
IPAddressString
IP address. Please note that IPv6 is not currently supported.
TimeOfDayString
The local time of day in 24-hour notation using the HHMM format.
BillingCompanyNameString
Billing company name.
BillingFirstNameStringYesBilling first name.
BillingLastNameStringYesBilling last name.
BillingAddressStringYesBilling address.
BillingAddress2String
Billing address line two. This is rarely used and does not contribute to the USPS Delivery Point Verification coding of an address. If you have an apartment or suite number then it should be included at the end of the billing address and separated by a comma.
BillingCityStringYes*Billing city - *Required if the billing postal code is not provided.
BillingStateStringYes*Billing State - *Required if the billing postal code is not provided.
BillingPostalCodeStringYes*Billing Postal code - *Required if the billing city & state are not provided.
BillingCountryString
Billing Country.
BillingPhoneString
Billing phone number. Must be a 10 digit phone number, no extensions. Currently, accepts any number combination in the North American Numbering Plan (NANP).
BillingAddressIsResidentialString
Enter TRUE or FALSE to indicate if the billing address is for a residence.
ShippingCompanyNameString
Shipping company name.
ShippingFirstNameStringYes**Shipping first name. **Required for some Test Types
ShippingLastNameStringYes**Shipping last name. **Required for some Test Types
ShippingAddressStringYes**Shipping address. **Required for some Test Types
ShippingAddress2String
Shipping address line two. This is rarely used and does not contribute to the USPS Delivery Point Verification coding of an address. If you have an apartment or suite number then it should be included at the end of ShippingAddress and separated by a comma.
ShippingCityStringYes**Shipping city. ** Required for some Test Types and when a shipping postal code is not provided.
ShippingStateStringYes**Shipping state. ** Required for some Test Types and when a shipping postal code is not provided.
ShippingPostalCodeStringYes**Shipping postal code. ** Required for some Test Types and when a shipping city & state are not given.
ShippingCountryString
Shipping country.
ShippingPhoneString
10 digit phone number, no extensions. Currently, accepts any number combination in the North American Numbering Plan (NANP).
ShippingAddressIsResidentialString
Enter TRUE or FALSE to indicate if the shipping address is a residence.
TestTypeStringYes

The name of the type of validation you want to perform on this. Please refer to the Test Types section in this guide for more information.

LicenseKey

String

Yes

Your license key to use the service.
Sign up for a free trial key at
https://www.serviceobjects.com/products/ecommerce/order-verification

*  Required value.
** Required value for test types BusinessToConsumer & BusinessToBusiness.

Test Types

The test type dictates how an order will be validated. Different Test Types will have different required values and will determine what type of checks, cross checks and scoring mechanism will be used to validate an order.

Important Note!
Every call to Order Validation requires a Test Type and it is important to choose a test Test Type that fits your business needs and the data being validated.

A Test Type is like a set of instructions for how a given order should be processed. It tells the service which components (Address, Phone, Name, Email, IP Address or BIN) should be present, which tests should be run and how to score these tests. As such, if a test type is used that does not fit the given data, very unpredictable results may occur! 


TestTypeDescription
BusinessToConsumerUse this test type to validate an order that requires shipping and for orders submitted by a general consumer. It instructs the service to run all component section tests and to check for consumer level information.
BusinessToBusinessUse this test type to validate an order that requires shipping and for orders submitted by a business. It instructs the service to run all component section tests and to check for business level information.
BusinessToConsumerNoShippingUse this test type to validate an order that does not require shipping and was submitted by a general consumer. It instructs the service to run component section tests that do not require shipping and to check for consumer level information.
BusinessToBusinessNoShippingUse this test type to validate an order that does not require shipping and was submitted by a business. It instructs the service to run component section tests that do not require shipping and to check for business level information.


OrderValidate Outputs

Name

Type

Values

Description

OverallScoreString0 – 1000-59 = BAD, 60-74 = REVIEW, 75-100 = GOOD
ComponentScoresStringVariesA list of scores for each test component. How much a component score affects the overall score is dependent on the given test type. The scores can be used to determine the quality of an individual component at a glance.

NoteCodes

String

Varies

Indicates if the order should be accepted, rejected or reviewed along with other notes.

NoteCodeDescriptionsStringVariesEnumerated list. Human readable note code descriptor flag.
WarningCodesStringVariesEnumerated list. Indicates if one or more problems were found with the order.

WarningCodeDescriptions

String

Varies

Enumerated list. Human readable warning code descriptor flag.

BillingAddress

String

Varies

The corrected billing address if the address is valid. Otherwise, an echo of the input is returned.

BillingAddress2

String

Varies

An echo of the billing address line two input value. If the input value was really meant to be a part of the billing address then the output will return empty.

BillingCity

String

Varies

The corrected billing city if the address is valid. Otherwise, an echo of the input is returned.

BillingState

String

Varies

The corrected billing state if the address is valid. Otherwise, an echo of the input is returned.

BillingPostalCode

String

Varies

The corrected billing postal code if the address is valid. Otherwise, an echo of the input is returned.

BillingCountry

String

Varies

The corrected billing country if the address is valid. Otherwise, an echo of the input is returned.

ShippingAddress

String

Varies

The corrected shipping address if the address is valid. Otherwise, an echo of the input is returned.

ShippingAddress2

String

Varies

An echo of the shipping address line two input value. If the input value was really meant to be a part of the billing address then the output will return empty.

ShippingCityStringVariesThe corrected shipping city if the address is valid. Otherwise, an echo of the input is returned.
ShippingStateStringVariesThe corrected shipping state if the address is valid. Otherwise, an echo of the input is returned.
ShippingPostalCodeStringVariesThe corrected shipping postal code if the address is valid. Otherwise, an echo of the input is returned.
ShippingCountryStringVariesThe corrected shipping country if the address is valid. Otherwise, an echo of the input is returned.


Warning Codes & Descriptions

The table contains a list of current and upcoming warning types that the service can report on when processing an order.

Important Note!
New codes and descriptions will be added to the table as new features become available.


CodeWarningDescription
2REJECTIndicates that the order should be rejected.
3REVIEWIndicates that the order should be reviewed for further investigation. See the FAQ for additional information.
100BillingAddress_IsInvalid Indicates that the billing address is invalid.
101BillingAddresss_IsUndeliverableIndicates that the billing address is undeliverable.
108BillingAddress_IsReturningMailIndicates that the billing address exists but mail is being returned.
109BillingAddress_IsVacantIndicates that the billing address exists but is vacant.
117BillingAddress_IsNotAContiguousState

Indicates that the shipping state is not a part of the 48 adjoining U.S. states. The term includes the non-contiguous states of Alaska and Hawaii, and all off-shore U.S. territories and possessions, which include American Samoa, Guam, the Northern Mariana Islands, Puerto Rico and the United States Virgin Islands.

25BillingAddressIPDistanceFarLocation of ip address is greater than 200 miles from the address.
26BillingAddressIPDistanceVeryFarLocation of ip address is greater than 500 miles from the address.
22BillingAddressPhoneDistanceFarLocation of ip address is greater than 200 miles from the address.
151ShippingAddress_IsInvalidIndicates that the shipping address is invalid.
153ShippingAddress_IsUndeliverableIndicates that the shipping address is undeliverable.
158ShippingAddress_IsReturningMailIndicates that the shipping address exists but mail is being returned.
159ShippingAddress_IsVacantIndicates that the shipping address exists but is vacant.
167ShippingAddress_IsNotAContiguousStateIndicates that the shipping state is not a part of the 48 adjoining U.S. states. The term includes the non-contiguous states of Alaska and Hawaii, and all off-shore U.S. territories and possessions, which include American Samoa, Guam, the Northern Mariana Islands, Puerto Rico and the United States Virgin Islands.
72ShippingAddressIPDistanceFarLocation of ip address is greater than 200 miles from the address.
73ShippingAddressIPDistanceVeryFarLocation of ip address is greater than 500 miles from the address.
69ShippingAddressPhoneDistanceFarLocation of ip address is greater than 500 miles from the address.
202BillingPhone_IsInvalidIndicates that the billing phone number is invalid.
205BillingPhone_IsDisconnectedIndicates that the billing phone number is disconnected.
206BillingPhone_IsReservedIndicates that the billing phone number is reserved.
207BillingPhone_IsTollFreeIndicates that the billing phone number is a toll free number.
212BillingPhone_ProviderNotFoundIndicates that a phone provider for the billing phone number was not found. This usually indicates that the number is bogus.
215BillingPhone_ContactNotFoundIndicates that a contact was not found for the billing phone number.
252ShippingPhone_IsInvalidIndicates that the shipping phone number is invalid.
255ShippingPhone_IsDisconnectedIndicates that the shipping phone number is disconnected.
256ShippingPhone_IsReservedIndicates that the shipping phone number is reserved.
257ShippingPhone_IsTollFreeIndicates that the shipping phone number is a toll free number.
262ShippingPhone_ProviderNotFoundIndicates that a phone provider for the shipping phone number was not found. This usually indicates that the number is bogus.
301BillingName_IsBadIndicates that the billing name appears to be bad.
302BillingName_RequiresReviewIndicates that there is something suspicious about the billing name and that it should be reviewed.
304BillingName_VulgarityRiskIndicates that there is a risk of the billing name not being real, it appears to contain a vulgar word.
305BillingName_VulgarityRisk_HighIndicates that there is a high risk of the billing name not being real, it appears to contain a vulgar word.
306BillingName_CelebrityRiskIndicates that there is a risk of the billing name not being real, it appears to be associated with a well known character or celebrity.
307BillingName_CelebrityRisk_HighIndicates that there is a high risk of the billing name not being real, it appears to be associated with a well known character or celebrity.
308BillingName_BogusRiskIndicates that there is a risk of the billing name not being real, it has a silly or nonsensical meaning.
309BillingName_BogusRisk_HighIndicates that there is a high risk of the billing name not being real, it has a silly or nonsensical meaning.
310BillingName_GarbageRiskIndicates that there is a risk of the billing name not being real, it contains random and/or garbage like characters.
311BillingName_GarbageRisk_HighIndicates that there is a high risk of the billing name not being real, it contains random and/or garbage like characters.
312BillingName_DictionaryRiskIndicates that there is a risk of the billing name not being real, it appears to be composed of a dictionary word.
313BillingName_DictionaryRisk_HighIndicates that there is a high risk of the billing name not being real, it appears to be composed of a dictionary word.
314BillingName_MiddleNameRiskIndicates that there is a risk of the billing name not being real, it appears to contain an unusually long middle name.
315BillingName_MiddleNameRisk_HighIndicates that there is a high risk of the billing name not being real, it appears to contain an unusually long middle name.
351ShippingName_IsBadIndicates that the shipping name appears to be bad.
352ShippingName_RequiresReviewIndicates that there is something suspicious about the shipping name and that it should be reviewed.
354ShippingName_VulgarityRiskIndicates that there is a risk of the shipping name not being real, it appears to contain a vulgar word.
355ShippingName_VulgarityRisk_HighIndicates that there is a high risk of the shipping name not being real, it appears to contain a vulgar word.
356ShippingName_CelebrityRiskIndicates that there is a risk of the shipping name not being real, it appears to be associated with a well known character or celebrity.
357ShippingName_CelebrityRisk_HighIndicates that there is a high risk of the shipping name not being real, it appears to be associated with a well known character or celebrity.
358ShippingName_BogusRiskIndicates that there is a risk of the shipping name not being real, it has a silly or nonsensical meaning.
359ShippingName_BogusRisk_HighIndicates that there is a high risk of the shipping name not being real, it has a silly or nonsensical meaning.
360ShippingName_GarbageRiskIndicates that there is a risk of the shipping name not being real, it contains random and/or garbage like characters.
361ShippingName_GarbageRisk_HighIndicates that there is a high risk of the shipping name not being real, it contains random and/or garbage like characters.
362ShippingName_DictionaryRiskIndicates that there is a risk of the shipping name not being real, it appears to be composed of a dictionary word.
363ShippingName_DictionaryRisk_HighIndicates that there is a high risk of the shipping name not being real, it appears to be composed of a dictionary word.
364ShippingName_MiddleNameRiskIndicates that there is a risk of the shipping name not being real, it appears to contain an unusually long middle name.
365ShippingName_MiddleNameRisk_HighIndicates that there is a high risk of the shipping name not being real, it appears to contain an unusually long middle name.
404Email_IsProbablyBadIndicates that there is a risk of the email address probably being bad.
405Email_IsBadIndicates that the email address is bad.
407Email_IsPotentialSpamTrapIndicates that the email address may be a potential spam trap.
408Email_IsBogusIndicates that the email address appears to be bogus.
409Email_IsVulgarIndicates that the email address appears to contain a vulgar word.
502IP_IsInvalidIndicates that the IP address syntax format is invalid.
504IP_NotFoundIndicates that the IP address was not be found in our records. This usually indicates that the IP is bogus.
506IP_CountryRiskLowIndicates that the IP address is located in a potentially risky country.
507IP_CountryRiskHighIndicates that the IP address is located in a country of high risk.
508IP_IsProxyIndicates that the IP address is a known proxy
509IP_ProxyRiskLowIndicates that the IP address is a potentially risky proxy.
511IP_ProxyRiskHighIndicates that the IP address is a proxy of high risk.
600BIN_IsInvalidIndicates that the BIN syntax format is invalid
604BIN_NotFoundIndicates that the BIN was not found in our records. This usually indicates that the BIN is bogus.
606BIN_IsInternationalIndicates that the BIN was issued in a country outside of the US.
607BIN_CountryRiskLowIndicates that the BIN was issued in a potentially risky country.
608BIN_CountryRiskHighIndicates that the BIN was issued in a country of high risk.
605BIN_IsGiftCardIndicates that the BIN is a gift card.

Note Codes & Descriptions

The table contains a list of current and upcoming note flags that the service can report on when processing an order.

Important Note!
New codes and descriptions will be added to the table as new features become available.


CodeNoteDescription
1ACCEPTIndicates that quality of the order is acceptable for the given test type.
4BillingName_Matches_PhoneContactNameThe name in the phone contact matched the billing name.

5

BillingName_LastNameMatches_PhoneContactName

The last name in the phone contact matched the billing name.
6BillingName_PartiallyMatches_PhoneContactNameThe name in the phone contact partially matched the billing name.
7BillingName_Matches_EmailA name was found in the email address that matches the billing name.
8BillingPhoneContactName_Matches_EmailA name was found in the email address that matches the billing name.
9BillingAddress_Matches_PhoneContactAddressThe billing address matches the address in the phone contact.
100BillingAddress_IsValidIndicates that the billing address is valid.
102BillingAddress_IsDeliverableIndicates that the billing address is deliverable.
103BillingAddress_IsResidentialIndicates that the billing address is for a residence.
106BillingAddress_IsPOBoxIndicates that the billing address is for a Post Office Box.
107BillingAddress_IsCMRAIndicates that the billing address specified a PMB and matched a CMRA.
110BillingAddress_IsHotelIndicates that the billing address is for a hotel.
111BillingAddress_IsPrisonIndicates that the billing address is for a prison.
112BillingAddress_IsMilitaryIndicates that the billing address is a military APO/FPO.
114BillingAddress_IsUniquePostalCodeIndicates that the billing address is for a unique postal code.
115BillingAddress_IsGeneralDelivery

Indicates that mail is to be delivered to a post office for pickup by the addressee.

150ShippingAddress_IsValidIndicates that the shipping address is valid.
152ShippingAddress_IsDeliverableIndicates that the shipping address is deliverable.
154ShippingAddress_IsResidentialIndicates that the shipping address is for a residence.
156ShippingAddress_IsPOBoxIndicates that the shipping address is for a Post Office Box.
157ShippingAddress_IsCMRAIndicates that the shipping address specified a PMB and matched a CMRA.
160ShippingAddress_IsHotelIndicates that the shipping address is for a hotel.
161ShippingAddress_IsPrisonIndicates that the shipping address is for a prison.
162ShippingAddress_IsMilitaryIndicates that the shipping address is a military APO/FPO.
164ShippingAddress_IsUniquePostalCodeIndicates that the shipping address is for a unique postal code.
165ShippingAddress_IsGeneralDeliveryIndicates that mail is to be delivered to a post office for pickup by the addressee.
201BillingPhone_IsValidIndicates that the billing phone number is valid.
208BillingPhone_IsLandLineIndicates that the billing phone line type is for a land line.
209BillingPhone_IsWirelessIndicates that the billing phone line type is for a wireless number.
210BillingPhone_IsVOIPIndicates that the billing phone line type is for a VOIP number.
251ShipppingPhone_IsValidIndicates that the shipping phone number is valid.
258ShippingPhone_IsLandLineIndicates that the shipping phone line type is for a land line.
259ShippingPhone_IsWirelessIndicates that the shipping phone line type is for a wireless number.
260ShippingPhone_IsVOIPIndicates that the shipping phone line type is for a VOIP number.
401Email_IsGoodIndicates that the email address is good with high certainty
402Email_IsProbablyGoodIndicates that the email address is probably good, but the certainty is not high.
403Email_UnknownIndicates that there is not enough information available to determine the validity of the email address.
406Email_IsInternationalIndicates that the top level domain country code of the email address is for a country other than the US.
503IP_FoundIndicates that the IP address was found in our records.


Error

Anything that happens during a run of DOTS Order Validation that causes it to be unable to finish its normal processing is an error. If an error occurs, something similar to the following will result instead of the normal/typical output: 
Example:

*Error!*

  <Type>Authorization</Type>
  <TypeCode>1</TypeCode>
  <Desc>Your license key does not work on this service.</Desc>
  <DescCode>8</DescCode>

There are four error types described below.

Error Types

Type

TypeCode

Billable

Standard Across All Gen2 Web Services

Authorization

1

No

Yes

User Input

2

Yes

No

Service Objects Fatal

3

No

Yes

Domain Specific

4

Yes

No

Error type 1: Authorization

Theses are standard to all Generation 2 DOTS Web Services.

DescCode

Desc

0

Unknown authorization error.

1

Please provide a valid license key for this web service.

2

The daily allowable number of transactions for this license key has been exceeded.

3

The monthly allowable number of transactions for this license key has been exceeded.

4

The total allowable number of transactions for this license key has been exceeded.

5

There are not enough transactions available. Check your daily/monthly transaction limits.

6

This license key has not yet been activated.

7

This license key has expired.

8

Your license key does not work on this service

Error type 2: User Input

User Input errors are caused when a user inputs an invalid value or fails to provide a certain input field altogether. If a developer creates a request and mistypes a parameter name, it will probably cause a User Input Error.

DescCode

Desc

1

You must input a license key in the LicenseKey field.

2

TestType is required.

3Invalid Test Type.
4BillingFirstName and BillingLastName are required.
5BillingAddress is required.
6BillingZip is required if both BillingCity and BillingState are not provided.
7ShippingFirstName and ShippingLastName are required.
8ShippingAddress is required.
9ShippingZip is required if both ShippingCity and ShippingState are not provided.
10Invalid input. Please enter a positive integer in the NumberOfItems field.
11Invalid input. Please enter a positive amount in the TransactionTotal field.
12Invalid input. BillingAddressIsResidential and ShippingAddressIsResidential must be either true, false or remain empty.
13Invalid BIN format. Please input a 6 digit BIN.

Error type 3: Service Objects Fatal

The Desc will always be the same and the DescCode has no meaning. This is standard to all Generation 2 DOTS Web Services. This is a rare error that signals either a bug in the DOTS Email Validation 3 service or a Network/Connectivity issue.

DescCode

Desc

1

Unhandled error. Please contact Service Objects.

Error type 4: Domain Specific

Domain specific errors represent the common errors seen in Service Objects services.

DescCode

Desc

1

Operation Not Supported.

Frequently Asked Questions

What should I do with orders that are marked as REVIEW?

It is our recommendation that these orders are not initially accepted or rejected. Instead, they should be handled by a member of your billing department and attempts should be made to contact the customer to clarify critical information. Check the rest of the warning descriptions for indicators as to why the order should be reviewed. A REVIEW generally indicates that the quality of the data inputs on their own appear to be valid, but one or more discrepancies were found when they were crossed checked or that one particular input value was flagged as being highly questionable. 

Does the service work for countries other than the US, such as Canada?

No, the service currently only works for billing and shipping addresses within the United States.

Can the service accept foreign letters and characters from non-English alphabets such as Chinese or German?

No, the service currently only works for billing and shipping addresses within the United States and therefore does not accept any foreign characters.

Conclusion

Service Objects is pleased to offer you a free trial of DOTS Order Validation. 




Other technical questions or concerns can be directed to support@serviceobjects.com.

If you are interested in purchasing DOTS Order Validation, please contact sales@serviceobjects.com.


  
We want to hear from you! We're always looking to improve our developer guides. 
Please email your suggestions to devguidefeedback@serviceobjects.com.

  • No labels