Charge a user’s account

The doCharge operation charges a user’s account based on the supplied parameters.

When extra parameters are supplied, charging is determined by the client system. However, when no extra parameters are supplied, charging is determined by the Content Retail Service.

doCharge + SOAP XML request

content-type: application/SOAP+XML


SOAP XML request

This example shows the doCharge request with the mandatory extra parameters supplied.

See the doCharge parameter descriptions for more details.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ws="http://ws.srs.sm.com">
    <soapenv:Header />
    <soapenv:Body>
        <ws:doCharge soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <providerId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">6010
            </providerId>
            <applicationId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">50000029
            </applicationId>
            <serviceId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">30000020
            </serviceId>
            <originId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">9
            </originId>
            <operationId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">JG
            </operationId>
            <msisdn xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">5536608410
            </msisdn>
            <contentId xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">001
            </contentId>
            <contentDescription xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">PortalSRS
            </contentDescription>
            <extra-params xsi:type="soapenc:string"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                <param>
                    <name>totalPrice</name>
                    <value>12</value>
                </param>
                <param >
                    <name>retailPrice</name>
                    <value>11</value>
                </param>
                <param >
                    <name>calculatedTax</name>
                    <value>0</value>
                </param>
                <param >
                    <name>region</name>
                    <value>1</value>
                </param>
                <param >
                    <name>profile</name>
                    <value>0</value>
                </param>
            </extra-params>
        </ws:doCharge>
    </soapenv:Body>
</soapenv:Envelope>


doCharge parameter descriptions

These are the SOAP XML parameters for the doCharge request.

doCharge mandatory parameters

parameter type description

providerId

string

Identifies the billing content provider.

applicationId

string

Identifies the application submitting the transaction.

Represents values such as WAP Portal and Web Portal.

serviceId

string

The product identifier.

This ID represents the product types such as games, news, or entertaiment.

originId

string

Unique ID of the merchant submitting the transaction.

The ID represents values such as WAP-Agregador or WAP-Proveedor.

operationId

string

The client system transaction ID.

This value must always be unique and a minimum of 20 characters.

msisdn

string

The end user’s MSISDN; this is the subscriber’s number that is charged for the current transaction.

contentId

string

The content ID of the content purchased. This is assigned by the client system.

contentDescription

string

The name of the content. This is assigned by the client system.

Minimum of 200 characters.

extraParams

string

Tag value set of data to be passed by the client system.

See doCharge extra parameters for more details.


doCharge extra parameters

parameter type description

totalPrice

string

The total price of the purchase. This includes retailPrice - (calculatedPromo + calculatedTax + downloadFee).

mandatory extra parameter

retailPrice

string

The retail price of the purchase before promotion, tax, download fee, and any other associated fees.

mandatory extra parameter

calculatedTax

string

The calculated tax to be charged. The value of this parameter must be greater than or equal to 0. Alternatively, you can assign the value of -1 whereby the CRS itself will calculate the tax value to be charged.

mandatory extra parameter

calculatedPromo

string

The calculated promotion to be credited against the retailPrice.

This parameter is not mandatory but if it is omitted then the percentPromo parameter must be included. Both parameters cannot be included in the same request.

percentPromo

string

The promotional percentage to be applied to the retailPrice.

This parameter is not mandatory but if it is omitted then the calculatedPromo parameter must be included. Both parameters cannot be included in the same request.

downloadFee

string

The download fee amount to be charged.

This parameter is not mandatory but if it is omitted then the downloadFeeWot parameter must be included. Both parameters cannot be included in the same request.

downloadFeeWot

string

The download fee amount without tax to be charged.

This parameter is not mandatory but if it is omitted then the downloadFee parameter must be included. Both parameters cannot be included in the same request.

region

string

The customer’s region. This field is provided for compatibility purposes and is overwritten by the CRS with the value retrieved from the relevant SPR for this subscriber.

mandatory extra parameter

profile

string

Indicates if the customer is prepaid or postpaid. This field is provided for compatibility purposes and is overwritten by the CRS with the value retrieved from the relevant SPR for this subscriber.

  • 0 = postpaid

  • 1 = prepaid

mandatory extra parameter

productId

varchar(50)

The ID of the provider obtained from the provider ID list.

The string is structured as follows: {8-4-4-4-12}.
b25bc991-553b-45ec-99de-8c2649b636d1
Included in cloud services only.

salesBranch

varchar(50)

The sales branch associated with the product ID.

Included in cloud services only.

salesPerson

varchar(50)

The sales person from the salesBranch.

Included in cloud services only.

activationType

varchar(50)

The method used for activating the service.

Included in cloud services only.