CREDIT

Overview
The BillingPlatform webservice API allows you to create credits in your application. Please note additional steps may be needed after credit creation in order to apply the credit (or portions of the credit) to actual invoices.

For more information on credits please see here.

Credit entries contain the option to auto-allocate the credit. If this option is enabled then the credits funds will be distributed from the oldest to newest closed invoices (in the order) until funds run out. If all invoices are paid and funds still remain in the credit then they will sit in "unallocated" status. If amounts remain in unallocated status they will be applied to the next invoice that is closed.

If you choose not to auto-allocate funds then you may manually allocate amounts to closed invoices using the credit allocation entity. This option allows you to manually decide where the credit funds are applied. Follow the link for more information on manually allocating credits.

System Entity Name
CREDIT

Allowed Functions

Create Update Retrieve Delete Upsert
YES YES YES NO YES


Fields

Field Data Type Properties Description
Amount decimal   Enter the total amount for the credit.  This amount must be enough to contain all allocations needed.
Autoallocate string  

This flag allows you to tell the system to auto-allocate funds to the oldest to newest closed invoices (in that order).  Setting this flag to 1 will enable this feature, setting to 0 will require manual allocation.

BillingProfileObj BILLING_PROFILE   Object in which to contain the billing profile this credit will belong to.
BillingProfileId decimal   Enter the ID of the billing profile which this credit will belong to.
CreditDate dateTime   Enter the date this credit occured.
CreditNote string   Enter a descriptive note for the credit.  This is useful for tracking why credits were applied.
CreditType string   Enter the type of credit (customer service action).  These types are defined in the application.
InvoiceIdDisplay decimal    
UnallocatedAmount decimal   System field. No need to pass any values. This field indicates the credit record's amount that has not been allocated to any closed invoice yet.
VoidedAmount decimal   System field. No need to pass any values. This indicates the voided amount of the credit invoice if a void request is sent through via the UI.



Sample Requests
Create

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
                  xmlns="urn:stronglytyped.soap.brmsystems.com"
	          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <!--Optional:-->
         <urn:brmObjects xsi:type="CREDIT">
            <!--Zero or more repetitions:-->
            <Amount>100</Amount>
            <BillingProfileObj>
        <Id>7471</Id>
        </BillingProfileObj>
        <Autoallocate>1</Autoallocate>
        <CreditNote>Test Credit</CreditNote>
        <CreditType>Customer Service Action</CreditType>
         </urn:brmObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>



Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <urn:createResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413966</urn:Id>
         </urn:result>
      </urn:createResponse>
   </soapenv:Body>
</soapenv:Envelope>




Update

Request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <urn:update xmlns="urn:stronglytyped.soap.brmsystems.com">
         <!--Optional:-->
         <urn:brmObjects xsi:type="CREDIT">
            <Id>413966</Id>
            <CreditType>Incorrect Billing</CreditType>
         </urn:brmObjects>
      </urn:update>
   </soapenv:Body>
</soapenv:Envelope>

Response

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <urn:updateResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413966</urn:Id>
         </urn:result>
      </urn:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Retrieve

Request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <urn:retrieve xmlns="urn:stronglytyped.soap.brmsystems.com">
         <urn:brmObjectType>CREDIT</urn:brmObjectType>
         <!--Zero or more repetitions:-->
         <urn:id>413966</urn:id>
      </urn:retrieve>
   </soapenv:Body>
</soapenv:Envelope>


Response

 

 


Upsert

Request

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:SessionHeader xmlns:h="urn:stronglytyped.soap.brmsystems.com" 
                      xmlns="urn:stronglytyped.soap.brmsystems.com" 
		      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</SessionID>
        </h:SessionHeader>
    </s:Header>
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <upsert xmlns="urn:stronglytyped.soap.brmsystems.com">
            <externalIDFieldName>Id</externalIDFieldName>
            <brmObjects xsi:type="CREDIT">                
                <Id>413966</Id>
                <CreditType>Customer Service Action</CreditType>    
            </brmObjects>
        </upsert>
    </s:Body>
</s:Envelope>


Response

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:h="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <h:upsertResponse xmlns="urn:stronglytyped.soap.brmsystems.com">
         <h:result>
            <h:created>false</h:created>
            <h:ErrorCode>0</h:ErrorCode>
            <h:ErrorText></h:ErrorText>
            <h:ErrorElementField/>
            <h:Id>413966</h:Id>
         </h:result>
      </h:upsertResponse>
   </soapenv:Body>
</soapenv:Envelope>
Have more questions? Submit a request

Comments

Powered by Zendesk