AddTerms

Description

This method is used to add new terms to EBizCharge.

Syntax

TermsResponse TermsResponse AddTerms(SecurityToken securityToken , Terms terms).

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

Terms

terms

Includes terms information, unique Internal Terms ID assigned by EBizCharge, description, discount percentages, and due date. (required)

Return Value

Type

Description

TermsResponse

Returns result of AddTerms request.

Examples

function addTerms()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$terms = array(
'TermsId' => 'Net30',
'TermsName' => 'Net30',
'TermsDescription' => 'Net30',
'NetDueInDays' => '30',
'DiscountPercentage' =>'2',
'DiscountIfPaidWithinDays' => '10',
'IsInactive' => 0,
'ExternalUniqueId' => 'Net30'
);
$addTerms = array(
'SecurityToken' => $securityToken,
'Terms' => $terms
);
$addTermsResponse = $client->AddTerms($addTerms);
$addTermsResponseResult = $addTermsResponse->AddTermsResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:AddTerms>
         <ebiz:securityToken>
            <ebiz:SecurityId>*******-1906-4be3-b01d-e5d6cd68120c</ebiz:SecurityId>
            <ebiz:UserId>cbs01</ebiz:UserId>
            <ebiz:Password>cbs01</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:terms>
            <ebiz:TermsId>Net30</ebiz:TermsId>
            <ebiz:TermsName>Net30</ebiz:TermsName>
            <ebiz:TermsDescription>Net30</ebiz:TermsDescription>
            <ebiz:NetDueInDays>30</ebiz:NetDueInDays>
            <ebiz:DiscountPercentage>2</ebiz:DiscountPercentage>
            <ebiz:DiscountIfPaidWithinDays>10</ebiz:DiscountIfPaidWithinDays>
            <ebiz:IsInactive>0</ebiz:IsInactive>
            <ebiz:ExternalUniqueId>Net30</ebiz:ExternalUniqueId>
         </ebiz:terms>
      </ebiz:AddTerms>
   </soapenv:Body>
</soapenv:Envelope>


Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <AddTermsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <AddTermsResult>
            <TermsId>Net30</TermsId>
            <TermsInternalId>********-0022-4114-b267-562cb2e790b0</TermsInternalId>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </AddTermsResult>
      </AddTermsResponse>
   </s:Body>
</s:Envelope>