ArchiveUsageService

The Archive Usage Service manual cover methods used to retrieve Usage summary and details from PayEx Billing.

Version history

VersionDateDescriptionCreated by
1.02020-03-13Document createdAnders Göthberg

References

Document

Description
Implementation manual - CommonCommon implementation manual. Document describe general concepts such as architecture, security, error handling etc.

Information and service overview

The ArchiveUsageService exposes web methods for retrieving usage details and for retrieving unbilled usage summary for a selected customer and subscription. A separate web method is available for each search scenario.

The complete Wsdl specification for this service can be found at:
https://connect/ArchiveUsageService.asmx?wsdl.

Wsdl is pointing to “production”

Implementing Prerequisites

Implementing PayEx Connect requires basic knowledge about Web Services including Wsdl, Soap and WS-Security.

Web methods

GetUsageListByInvoice

Summary

Method used for retrieving usage details for a customers specified subscription number. Get billed invoice usage details by entering invoice number or get unbilled usage by entering “CURRENT”

Class diagram

ExternalTest_PayExConnect_Manual_ArchiveUsageService_200313_html_m2fc4ed6c.png

Request parameters

GetUsageListByInvoiceRequestType
FieldDatatypeRequiredValidationDescription
CustomerNumberStringYesMaxLength: 15Customer number
InvoiceNumberStringYesMinLength: 1, MaxLength: 50

Billed = ”Invoice number”

Unbilled = ”CURRENT”

SubscriptionNumberStringYesMaxLength: 15Subscription number

Response parameters

GetUsageListByInvoiceResponseType
FieldDatatypeDescription
UsageListUsage()See Usage

Remarks

Unbilled usage will be presented up to maximum 6 month

Usage has a maximum of 3000 records

Exceptions

There are no specific error codes beside the ones described in Common Implementation manual

Example

Example on the records appearance.

Request:
<arc:GetUsageListByInvoice>
   <arc:req
      CustomerNumber="1122334455"
      InvoiceNumber="CURRENT"
      SubscriptionNumber="0707070707">
   </arc:req>
</arc:GetUsageListByInvoice>

Response:
<GetUsageListByInvoiceResponse xmlns="http://faktab.se/B2B/ArchiveUsageService">
   <GetUsageListByInvoiceResult>
      <UsageList>
         <Usage SubscriptionNumber="0707070707" Destination="070*" StartDateTime="2020-01-01T18:57:57" Duration="16" DurationCode="S" UsageTypeText="Samtal till Tele2Comviq" UsageCode="@@331" Cost="2,040" VATRate="25,000"/>
         <Usage SubscriptionNumber="0707070707" Destination="070*" StartDateTime="2020-01-02T08:13:13" Duration="55" DurationCode="S" UsageTypeText="Samtal till Tele2Comviq" UsageCode="@@331" Cost="3,040" VATRate="25,000"/>
      </UsageList>
   </GetUsageListByInvoiceResult>
</GetUsageListByInvoiceResponse>

GetUsageSummary

Summary

Method used for retrieving unbilled usage summary for a customer and subscription.

Class diagram

ExternalTest_PayExConnect_Manual_ArchiveUsageService_200313_html_m4cc2663a.png

Request parameters

GetUsageSummaryRequestType
FieldDatatypeRequiredValidationDescription
CustomerNumberStringYesMaxLength: 15Customer number
SubscriptionNumberStringYesMaxLength: 15Subscription number

Response parameters

GetUsageSummaryResponseType
FieldDatatypeDescription
UsageSummaryListUsageSummary()See UsageSummary

Remarks

The search of Usage will be limited to a maximum number of months/days, depending on the business rule set for removing usage due to aging. This rule is set in the PayEx Billing system and set on ledger level.
 

Exceptions

There are no specific error codes beside those described in Common Implementation manual

Example

Example on the records appearance.

Request:
<arc:GetUsageSummary>
   <arc:req>
      <arc:CustomerNumber>1122334455</arc:CustomerNumber>
      <arc:SubscriptionNumber>031******</arc:SubscriptionNumber>
   </arc:req>
</arc:GetUsageSummary>

Response:
<GetUsageSummaryResponse xmlns="http://faktab.se/B2B/ArchiveUsageService">
   <GetUsageSummaryResult>
      <UsageSummaryList>
         <UsageSummary SubscriptionNumber="031******">
            <UsageType>Internationella samtal</UsageType>
            <UsageCount>22</UsageCount>
            <FirstUsageDate>2020-01-02T20:37:48</FirstUsageDate>
            <LastUsageDate>2020-01-30T13:49:30</LastUsageDate>
            <TotalAmount>1639.3700</TotalAmount>
            <TotalVolume>10369</TotalVolume>
            <VolumeCode>S</VolumeCode>
            <VATRate>25,000</VATRate>
         </UsageSummary>
         <UsageSummary SubscriptionNumber="031******">
            <UsageType>Sverigesamtal</UsageType>
            <UsageCount>14</UsageCount>
            <FirstUsageDate>2020-01-01T07:07:00</FirstUsageDate>
            <LastUsageDate>2020-01-15T19:01:42</LastUsageDate>
            <TotalAmount>18.8600</TotalAmount>
            <TotalVolume>2172</TotalVolume>
            <VolumeCode>S</VolumeCode>
            <VATRate>25,000</VATRate>
         </UsageSummary>
      </UsageSummaryList>
   </GetUsageSummaryResult>
</GetUsageSummaryResponse>

Custom data types

Usage

FieldDatatypeDescription
SubscriptionNumberStringSubscription number from which the call has been made
DestinationStringDestination for usage
StartDateTimeStringStart date and time for usage
DurationStringDuration of the call
DurationCodeStringCode for duration of usage (S (second), B (byte) or E (event))
UsageTypeTextStringText for usage type
UsageCodeStringDestination code for usage
CostStringCost for call data record
VATRateStringVat rate which has been used to rate the call

UsageSummary

FieldDatatypeDescription
UsageTypeStringText for usage type which is aggregated
FirstUsageDateStringFirst date for this usage
LastUsageDateStringLast date for this usage
TotalAmountStringTotal cost for aggregated usage type
TotalVolumeStringTotal volume for aggregated usage type
VolumeCodeStringCode for duration of usage (S (second) or E (event))
VATRateStringVat rate for usage type

 

Created by Anders Göthberg on 2021/04/13 14:49