The Archive Usage Service manual cover methods used to retrieve Usage summary and details from PayEx Billing.
Version history
Version | Date | Description | Created by |
1.0 | 2020-03-13 | Document created | Anders Göthberg |
References
Document | Description |
Implementation manual - Common | Common 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
Request parameters
GetUsageListByInvoiceRequestType | ||||
Field | Datatype | Required | Validation | Description |
CustomerNumber | String | Yes | MaxLength: 15 | Customer number |
InvoiceNumber | String | Yes | MinLength: 1, MaxLength: 50 | Billed = ”Invoice number” Unbilled = ”CURRENT” |
SubscriptionNumber | String | Yes | MaxLength: 15 | Subscription number |
Response parameters
GetUsageListByInvoiceResponseType | ||
Field | Datatype | Description |
UsageList | Usage() | 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
Request parameters
GetUsageSummaryRequestType | ||||
Field | Datatype | Required | Validation | Description |
CustomerNumber | String | Yes | MaxLength: 15 | Customer number |
SubscriptionNumber | String | Yes | MaxLength: 15 | Subscription number |
Response parameters
GetUsageSummaryResponseType | ||
Field | Datatype | Description |
UsageSummaryList | UsageSummary() | 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
Field | Datatype | Description |
SubscriptionNumber | String | Subscription number from which the call has been made |
Destination | String | Destination for usage |
StartDateTime | String | Start date and time for usage |
Duration | String | Duration of the call |
DurationCode | String | Code for duration of usage (S (second), B (byte) or E (event)) |
UsageTypeText | String | Text for usage type |
UsageCode | String | Destination code for usage |
Cost | String | Cost for call data record |
VATRate | String | Vat rate which has been used to rate the call |
UsageSummary
Field | Datatype | Description |
UsageType | String | Text for usage type which is aggregated |
FirstUsageDate | String | First date for this usage |
LastUsageDate | String | Last date for this usage |
TotalAmount | String | Total cost for aggregated usage type |
TotalVolume | String | Total volume for aggregated usage type |
VolumeCode | String | Code for duration of usage (S (second) or E (event)) |
VATRate | String | Vat rate for usage type |