You are on page 1of 67

SDP Solution

_______________________________________________________________

[API Reference
(Payment, ParlayX 3.0)]

www.ethiotelecom.et Huawei Technologies Co., Ltd


SDP Solution
API Reference (Payment, ParlayX 3.0) Contents

Contents

1 Overview......................................................................................................................................... 1
1.1 API Functions ................................................................................................................................................... 1
1.2 Level of Requirement for Parameters............................................................................................................... 3
1.3 Request Format ................................................................................................................................................ 3
1.4 Response Format .............................................................................................................................................. 4
1.5 Namespaces ...................................................................................................................................................... 5
1.6 SOAPAction ..................................................................................................................................................... 6

2 APIs for Deduction ....................................................................................................................... 7


2.1 Process ............................................................................................................................................................. 7
2.2 chargeAmount .................................................................................................................................................. 8
2.2.1 Function .................................................................................................................................................. 8
2.2.2 Request URI ............................................................................................................................................ 8
2.2.3 Request.................................................................................................................................................... 9
2.2.4 Response ............................................................................................................................................... 13
2.2.5 Error Codes ........................................................................................................................................... 13
2.3 chargeVolume ................................................................................................................................................. 16
2.3.1 Function ................................................................................................................................................ 16
2.3.2 Request URI .......................................................................................................................................... 16
2.3.3 Request.................................................................................................................................................. 16
2.3.4 Response ............................................................................................................................................... 19
2.3.5 Error Codes ........................................................................................................................................... 20

3 APIs for Refund ........................................................................................................................... 23


3.1 Process ........................................................................................................................................................... 23
3.2 refundAmount ................................................................................................................................................ 24
3.2.1 Function ................................................................................................................................................ 24
3.2.2 Request URI .......................................................................................................................................... 24
3.2.3 Request.................................................................................................................................................. 24
3.2.4 Response ............................................................................................................................................... 29
3.2.5 Error Codes ........................................................................................................................................... 29
3.3 refundVolume ................................................................................................................................................. 31
3.3.1 Function ................................................................................................................................................ 31
3.3.2 Request URI .......................................................................................................................................... 32
SDP Solution
API Reference (Payment, ParlayX 3.0) Contents

3.3.3 Request.................................................................................................................................................. 32
3.3.4 Response ............................................................................................................................................... 35
3.3.5 Error Codes ........................................................................................................................................... 36

4 APIs for Reserve Amount Charging ........................................................................................ 39


4.1 Process ........................................................................................................................................................... 39
4.2 reserveAmount ............................................................................................................................................... 41
4.2.1 Function ................................................................................................................................................ 41
4.2.2 Request URI .......................................................................................................................................... 41
4.2.3 Request.................................................................................................................................................. 41
4.2.4 Response ............................................................................................................................................... 45
4.2.5 Error Codes ........................................................................................................................................... 46
4.3 chargeReservation .......................................................................................................................................... 48
4.3.1 Function ................................................................................................................................................ 48
4.3.2 Request URI .......................................................................................................................................... 48
4.3.3 Request.................................................................................................................................................. 48
4.3.4 Response ............................................................................................................................................... 52
4.3.5 Error Codes ........................................................................................................................................... 53
4.4 releaseReservation .......................................................................................................................................... 55
4.4.1 Function ................................................................................................................................................ 55
4.4.2 Request URI .......................................................................................................................................... 55
4.4.3 Request.................................................................................................................................................. 55
4.4.4 Response ............................................................................................................................................... 58
4.4.5 Error Codes ........................................................................................................................................... 59

5 API Error Responses ..................................................................................................................... 1


5.1 Service Error Response .................................................................................................................................... 1
5.2 Policy Error Response ...................................................................................................................................... 2
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

1 Overview

About This Chapter


1.1 API Functions
1.2 Level of Requirement for Parameters
1.3 Request Format
1.4 Response Format
1.5 Namespaces
1.6 SOAPAction

1.1 API Functions


The SDP provides Payment capability application programming interfaces (APIs) for
third-party applications (App for short) to connect to it and use its Payment capability to
deduct and refund by fee, deduct by volume, and amount reservation, fee deduction from the
reserved amount, and reservation cancellation. The App is generally developed by various
partners of the SDP.

Partners are the enterprises and individuals who sign a contract and cooperate with carriers in utilizing
the SDP. Partners include SPs, CPs, Developers, and Enterprises. In this document, partners are mainly
the SPs, Developers, and Enterprises who use APIs for secondary development.

Table 1-1 describes functions of Payment capability APIs provided by the SDP.

Table 1-1 Functions of Payment capability APIs

Functi Subfuncti Description API


on on
Deducti Deduction The App (functioning as the client) invokes chargeAmount
on by fee the chargeAmount API provided by the
SDP(functioning as the server) to deduct by
fee from users' accounts.
Partners must code the App based on the
API field requirements so that the App can

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 1


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

Functi Subfuncti Description API


on on
send correct requests to the SDP. The SDP
sends a response within 60 seconds by
default.
Deduction The App (functioning as the client) invokes chargeVolume
by volume the chargeVolume API provided by the
SDP(functioning as the server) to deduct by
volume from users' accounts.
Partners must code the App based on the
API field requirements so that the App can
send correct requests to the SDP. The SDP
sends a response within 60 seconds by
default.
Refund Refund by The App (functioning as the client) invokes refundAmount
fee the refundAmount API provided by the
SDP(functioning as the server) to refund by
fees to users when charging fails.
Partners must code the App based on the
API field requirements so that the App can
send correct requests to the SDP. The SDP
sends a response within 60 seconds by
default.
Refund by The App (functioning as the client) invokes refundVolume
volume the refundVolume API provided by the
SDP(functioning as the server) to refund by
volume to users when charging fails.
Partners must code the App based on the
API field requirements so that the App can
send correct requests to the SDP. The SDP
sends a response within 60 seconds by
default.
Amount reservation, Before a user uses services, the App  reserveAmoun
fee deduction from the (functioning as the client) invokes the t
reserved amount, and reserveAmount interface provided by the  chargeReserva
reservation SDP(functioning as the server) to reserve tion
cancellation required amount from a user's mobile
 releaseReserva
account.
tion
After the user uses services, the
App(functioning as the client) invokes the
chargeReservation interface provided by the
SDP(functioning as the server) to deduct
fees from the user's reserved amount.
When the user cancels a transaction or the
transaction fails, the App (functioning as the
client) invokes the releaseReservation
interface provided by the SDP(functioning
as the server) to cancel the amount
reservation.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 2


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

Functi Subfuncti Description API


on on
Partners must code the App based on the
API field requirements so that the App can
send correct requests to the SDP. The SDP
sends a response within 60 seconds by
default.

1.2 Level of Requirement for Parameters


The App must develop APIs based on the level of requirement for each parameter.

Table 1-2 Level of requirement for parameters

Type Description

Mandatory A parameter is always mandatory in a request.


Parameters with the Mandatory requirement are used for access
authentication or service processing. If a parameter with the Mandatory
requirement is left empty in a request, access authentication or service
processing fails and the request fails.
Conditional A parameter is mandatory or optional in specified conditions.
Parameters with the Conditional requirement are used for access
authentication or service processing in specified conditions. If the
specified conditions is met but a parameter with the Conditional
requirement is left empty in a request, access authentication or service
processing fails and the request fails.
Optional A parameter is always optional.
Parameters with the Optional requirement are not used for service
processing.

1.3 Request Format


The SDP provides the Parlay X 3.0 request in the following format:
<soapenv:Envelope>
<soapenv:Header>
<parameter>…</parameter>

</soapenv:Header>
<soapenv:Body>
<parameter>…</parameter>

</soapenv:Body>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 3


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

</soapenv:Envelope>

Table 1-3 Request format

Element Description
<soapenv:Envel Root element in a request, which specifies the namespace.
ope>
<soapenv:Heade Request header.
r> Parameters in this element are defined by the SDP and are mainly
information to be processed by the SDP services, including access
authentication parameters.
<soapenv:Body> Request body.
Parameters in this element comply with the Parlay X 3.0 protocol.

1.4 Response Format


Success Response Format
The SDP provides the Parlay X 3.0 API success responses in the following format:
<soapenv:Envelope>
<soapenv:Body>
<parameter>…</parameter>

</soapenv:Body>
</soapenv:Envelope>

Table 1-4 Success response format

Element Description
<soapenv:Envel Root element in a success response, which specifies the namespace.
ope>
<soapenv:Body> Success response body.
Parameters in this element comply with the Parlay X 3.0 protocol.

Error Response Format


The SDP provides the Parlay X 3.0 API error responses in the following format:
<soapenv:Envelope>
<soapenv:Body>
<soapenv:Fault>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 4


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

<parameter>…</parameter>

<detail>
<parameter>…</parameter>

</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Table 1-5 Error response format

Element Description
<soapenv:Envel Root element in an error response, which specifies the namespace.
ope>
<soapenv:Body> Error response body, contains the <soapenv:Fault> and <detail>
elements. This element specifies the error code and error details.
<soapenv:Fault> Error code and description.
For details about error responses, see 5 API Error Responses.
<detail> Error details, which are the same as the <soapenv:Fault> element
information.

1.5 Namespaces
When coding API functions, partners must follow the namespaces of Payment capability APIs
and data types in the APIs.
 Table 1-6 describes namespaces of Payment capability APIs.
 The namespace of data types in Payment capability APIs is
http://www.csapi.org/schema/parlayx/payment/v3_0.

Table 1-6 Namespaces of Payment capability APIs

Namespace API
http://www.csapi.org/wsdl/parla  chargeAmount
yx/payment/amount_charging/v3  refundAmount
_1
http://www.csapi.org/wsdl/parla  chargeVolume
yx/payment/amount_charging/v3  refundVolume
_1
http://www.csapi.org/wsdl/parla  reserveAmount
yx/payment/reserve_amount_cha  chargeReservation
rging/v3_1
 releaseReservation

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 5


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 1 Overview

1.6 SOAPAction
Leave the SOAPAction parameter empty.
The following is an example of the SOAPAction parameter setting in an HTTP header:
SOAPAction: ""

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 6


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

2 APIs for Deduction

About This Chapter


2.1 Process
2.2 chargeAmount
2.3 chargeVolume

2.1 Process
Process for deduction by fees from the user's account
Figure 2-1 shows the process in which the App uses the Payment capability provided by the
SDP to deduct by fees from users' accounts.

Figure 2-1 chargeAmount service process

The process is as follows:


 The App uses the chargeAmount interface to send a request to the SDP.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 7


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

The request body must contain the endUserIdentifier, charge, and referenceCode
parameters.
 The SDP performs charging and sends a response to the App.

Process for deduction by volume from the user's account


Figure 2-2 shows the process in which the App uses the Payment capability provided by the
SDP to deduct by volume from users' accounts.

Figure 2-2 chargeVolume service process

The process is as follows:


 The App uses the chargeVolume interface to send a request to the SDP.
The request body must contain the endUserIdentifier, volume, billingText, and
referenceCode parameters.
 The SDP performs charging and sends a response to the App.

2.2 chargeAmount
2.2.1 Function
The App (functioning as the client) invokes the chargeAmount API provided by the
SDP(functioning as the server) to deduct by fee from users' accounts.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

2.2.2 Request URI


The request URI is the destination URI of chargeAmountRequest messages sent by the App to
the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/AmountChargingService/services/AmountCharging/v3

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 8


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

2.2.3 Request
The App functions as the client and sends a chargeAmountRequest message to the SDP to
charge users by fee.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/amount_charging/v3_1/local"
>
<soapenv:Header>
<tns:RequestSOAPHeader
xmlns:tns="http://www.huawei.com.cn/schema/common/v2_1">
<tns:spId>35000001</tns:spId>
<tns:spPassword>C5216E519A071D601BEDD150F3FCD026</tns:spPassword>
<tns:timeStamp>20080101010101</tns:timeStamp>
<tns:serviceId>35000001000002</tns:serviceId>
<tns:OA>8613900000001</tns:OA>
<tns:FA>8613900000001</tns:FA>
</tns:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:chargeAmount>
<loc:endUserIdentifier>8613900000001</loc:endUserIdentifier>
<loc:charge>
<description>sdfsdaff</description>
<currency>s</currency>
<amount>1212</amount>
<code>3</code>
</loc:charge>
<loc:referenceCode>12</loc:referenceCode>
</loc:chargeAmount>
</soapenv:Body>
</soapenv:Envelope>

Message Header Parameters


Table 2-1 describes parameters in a chargeAmountRequest message header.

Table 2-1 Parameters in a chargeAmountRequest message header

Para Type Leng Level of Description


meter th Requirement

spId xsd: 21 Mandatory Partner ID.


string The ID is automatically allocated by the SDP
to partners after successful registration. To
obtain the ID:
 An SP can log in to the SDP management
portal and query account information, or
log in to the mailbox used for registration
and view the email notification received

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 9


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Para Type Leng Level of Description


meter th Requirement
after successful registration.
 A Developer can log in to the Developer
Portal and query account information, or
log in to the mailbox used for registration
and view the email notification received
after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Conditional Authentication key for the SDP to authenticate
word string partners.
The value is a character string encrypted from
spId + Password + timeStamp by MD5. The
encryption formula is: spPassword =
MD5(spId + Password + timeStamp). In the
formula:
 spId and timeStamp: authentication ID
and timestamp.
 Password: password for partners to access
the SDP.
 An SP can obtain the password from the
email notification received after
successful registration.
 A Developer can log in to the Developer
Portal, choose Member Center >
Account > Registration Information >
Invoke Password, and set the
password.
 An Enterprise must contact the carrier
to obtain the password.
The SDP supports authentication by SP ID +
Password, SP ID + IP address + Password,
or SP ID + IP address. Partners select an
authentication mode during registration. If a
partner selects authentication by SP ID +
Password or SP ID + IP address +
Password, this parameter is mandatory in
requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb
servic xsd: 21 Mandatory Service ID.
eId string The ID is automatically allocated by the SDP
to services after successful release. An SP can
log in to the SDP management portal and
query service information for the ID.
This parameter is mandatory in an SP's

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 10


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Para Type Leng Level of Description


meter th Requirement
request, and can be left empty in a Developer's
or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Conditional Timestamp (UTC time).
amp string The value is used in MD5 encryption of
spPassword.
This parameter is mandatory when the
spPassword parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Conditional Mobile number of the service originator.
string  When the SP charges a user that subscribes
to or orders a service by fee, this parameter
value is the mobile number of the charged
user.
 When the SP charges a user that receives a
gift from another user by fee, this
parameter value is the mobile number of
the gift sender.
 In an Enterprise's or a Developer's request,
the value is the mobile number of the
message recipient.
[Example]
989377123456
FA xsd: 30 Conditional Mobile number of the charged party.
string The value must be the same as the OA value.

Message Body Parameters


Table 2-2 describes parameters in a chargeAmountRequest message body.

Table 2-2 Parameters in a chargeAmountRequest message body


Paramet Type Length Level of Description
er Require
ment
endUserI xsd:any 30 Mandato Account of the user to be charged.
dentifier URI ry [Format]

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 11


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Paramet Type Length Level of Description


er Require
ment
[tel:][Prefix][Country code]Mobile number.
In the format, [tel:], [Prefix], and [Country
code] are optional. The value of [Prefix] can
be +, +0, +00, 0, or 00.
Set the parameter to a mobile number
containing the country code.
[Example]
tel:008612345678
008612345678
8612345678
charge commo - Mandato Charging information.
n:Charg ry For the detailed parameters, see Table 2-3.
ingI
informa
tion
reference xsd:stri 30 Mandato Unique ID of the charge request.
Code ng ry [Example]
225

Table 2-3 ChargingInformation parameters

Parameter Type Length Level of Description


Requirement
description xsd:string 255 Mandatory Charging description.
[Example]
charge
currency xsd:string 3 Mandatory Currency used for the
charging. See ISO 4217,
Codes for the
representation of
currencies and funds.
[Example]
USD
amount xsd:decimal 4 Mandatory Amount of the charged
fee. The SDP system
does not support the
decimal point currently.
[Example]
100
code xsd:string 30 Optional Charging code, which is

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 12


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Parameter Type Length Level of Description


Requirement
relevant to the contract
of the charged party.
[Example]
4523

2.2.4 Response
The SDP functions as the server, processes chargeAmountRequest messages received from
the App, and sends chargeAmountResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:chargeAmountResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/amount_charging/v3_1/local"
/>
</soapenv:Body>
</soapenv:Envelope>

2.2.5 Error Codes


Table 2-4 describes chargeAmount error codes that the SDP may return upon an exception.
For details about the error codes, see the SDP Solution Error Code Reference.

Table 2-4 Error codes of the chargeAmount interface

Error Cause
Code Description

SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 ChargingInformation is null. The ChargingInformation value in
the request body is blank.
Description is null in The Description value in the request
ChargingInformation. body is blank.
Amount is null. The Amount value in the request
body is blank.
Invalid input value. A parameter value in the request is

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 13


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Error Cause
Code Description
invalid.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.
The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.
The sp's Status is pre-deregistered. The SP is in the pre-deregistered
state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 14


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Error Cause
Code Description
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.
SVC0270 MDSP charge failed. An internal SDP service is abnormal.
POL0910 Minimum Amount per Transaction. The Amount value in the request is
out of the transaction amount range.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 15


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

2.3 chargeVolume
2.3.1 Function
The App (functioning as the client) invokes the chargeVolume API provided by the
SDP(functioning as the server) to deduct by volume from users' accounts.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

2.3.2 Request URI


The request URI is the destination URI of chargeVolumeRequest messages sent by the App to
the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/VolumeChargingService/services/VolumeCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

2.3.3 Request
The App functions as the client and sends a chargeVolumeRequest message to the SDP to
charge users by volume.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/volume_charging/v3_1/local"
>
<soapenv:Header>
<loc:RequestSOAPHeader>
<loc:spId>35000001</loc:spId>
<loc:spPassword>e6434ef249df55c7a21a0b45758a39bb1</loc:spPassword>
<loc:serviceId>35000001000001</loc:serviceId>
<loc:timeStamp>20100731064245</loc:timeStamp>
<loc:OA>8613172222222</loc:OA>
<loc:FA>8613172222222</loc:FA>
<loc:token/>
</loc:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:chargeVolume>
<loc:endUserIdentifier>8613172222222</loc:endUserIdentifier>
<loc:volume>1322</loc:volume>
<loc:billingText>rte</loc:billingText>
<loc:referenceCode>4545</loc:referenceCode>
<loc:parameters>
<name>33</name>
<value>4545</value>
</loc:parameters>
</loc:chargeVolume>
</soapenv:Body>
</soapenv:Envelope>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 16


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Message Header Parameters


Table 2-5 describes parameters in a chargeVolumeRequest message header.

Table 2-5 Parameters in a chargeVolumeRequest message header

Para Type Leng Lev Description


meter th el of
Req
uire
men
t

spId xsd: 21 Man Partner ID.


string dator The ID is automatically allocated by the SDP to partners
y after successful registration. To obtain the ID:
 An SP can log in to the SDP management portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.
 A Developer can log in to the Developer Portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Con Authentication key for the SDP to authenticate partners.
word string ditio The value is a character string encrypted from spId +
nal Password + timeStamp by MD5. The encryption
formula is: spPassword = MD5(spId + Password +
timeStamp). In the formula:
 spId and timeStamp: authentication ID and
timestamp.
 Password: password for partners to access the SDP.
 An SP can obtain the password from the email
notification received after successful registration.
 A Developer can log in to the Developer Portal,
choose Member Center > Account >
Registration Information > Invoke Password,
and set the password.
 An Enterprise must contact the carrier to obtain
the password.
The SDP supports authentication by SP ID + Password,
SP ID + IP address + Password, or SP ID + IP
address. Partners select an authentication mode during
registration. If a partner selects authentication by SP ID
+ Password or SP ID + IP address + Password, this
parameter is mandatory in requests sent by this partner.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 17


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Para Type Leng Lev Description


meter th el of
Req
uire
men
t
[Example]
e6434ef249df55c7a21a0b45758a39bb
servic xsd: 21 Man Service ID.
eId string dator The ID is automatically allocated by the SDP to services
y after successful release. An SP can log in to the SDP
management portal and query service information for the
ID.
This parameter is mandatory in an SP's request, and can
be left empty in a Developer's or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Con Timestamp (UTC time).
amp string ditio The value is used in MD5 encryption of spPassword.
nal
This parameter is mandatory when the spPassword
parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Con Mobile number of the service originator.
string ditio  When the SP charges a user that subscribes to or
nal orders a service by fee, this parameter value is the
mobile number of the charged user.
 When the SP charges a user that receives a gift from
another user by fee, this parameter value is the mobile
number of the gift sender.
 In an Enterprise's or a Developer's request, the value
is the mobile number of the message recipient.
[Example]
989377123456
FA xsd: 30 Con Mobile number of the charged party.
string ditio The value must be the same as the OA value.
nal

Message Body Parameters


Table 2-6 describes parameters in a chargeVolumeRequest message body.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 18


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Table 2-6 Parameters in a chargeVolumeRequest message body

Paramet Type Length Level of Description


er Require
ment
endUserI xsd:any 30 Mandato Account of the user to be charged.
dentifier URI ry [Format]
[tel:][Prefix][Country code]Mobile number.
In the format, [tel:], [Prefix], and [Country
code] are optional. The value of [Prefix] can
be +, +0, +00, 0, or 00.
Set the parameter to a mobile number
containing the country code.
[Example]
tel:008612345678
008612345678
8612345678
volume xsd:lon 4 Mandato Unit for charging by traffic.
g ry
billingTe xsd:stri 255 Mandato Bill information.
xt ng ry
reference xsd:stri 30 Mandato Unique ID of the request.
Code ng ry [Example]
225
paramete Propert - Optional Extended information.
rs y NOTE
[0..unbo This parameter is not used in the SDP currently.
unded]

2.3.4 Response
The SDP functions as the server, processes chargeVolumeRequest messages received from the
App, and sends chargeVolumeResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:chargeVolumeResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/volume_charging/v3_1/local"
/>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 19


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

</soapenv:Body>
</soapenv:Envelope>

2.3.5 Error Codes


Table 2-7 describes chargeVolume error codes that the SDP may return upon an exception.
For details about the error codes, see the SDP Solution Error Code Reference.

Table 2-7 Error codes of the chargeVolume interface

Error Cause
Code Description
SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 Invalid input value. A parameter value in the request is
invalid.
SVC0270 MDSP charge failed. An internal SDP service is abnormal.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.
The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 20


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Error Cause
Code Description

The sp's Status is pre-deregistered. The SP is in the pre-deregistered


state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 21


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 2 APIs for Deduction

Error Cause
Code Description
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 22


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

3 APIs for Refund

About This Chapter


3.1 Process
3.2 refundAmount
3.3 refundVolume

3.1 Process
Process for refund by fees from the user's account
Figure 3-1 shows the process in which the App uses the Payment capability provided by the
SDP to refund fees to users.

Figure 3-1 refundAmount service process

The process is as follows:


 The App uses the refundAmount interface to send a request to the SDP.
The request body must contain the endUserIdentifier, charge, and referenceCode
parameters.
 The SDP performs refund and sends a response to the App.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 23


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Process for refund by volume from the user's account


Figure 3-2 shows the process in which the App uses the Payment capability provided by the
SDP to refund by volume from users' accounts.

Figure 3-2 refundVolume service process

The process is as follows:


 The App uses the refundVolume interface to send a request to the SDP.
The request body must contain the endUserIdentifier, volume, billingText, and
referenceCode parameters.
 The SDP performs charging and sends a response to the App.

3.2 refundAmount
3.2.1 Function
The App (functioning as the client) invokes the refundAmount API provided by the
SDP(functioning as the server) to refund by fees to users when charging fails.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

3.2.2 Request URI


The request URI is the destination URI of refundAmountRequest messages sent by the App to
the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/AmountChargingService/services/AmountCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

3.2.3 Request
The App functions as the client and sends a refundAmountRequest message to the SDP to
refund fees to users.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 24


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/amount_charging/v3_1/local"
>
<soapenv:Header>
<ns1:RequestSOAPHeader
xmlns:ns1="http://www.huawei.com.cn/schema/common/v2_1">
<ns1:spId>35000001</ns1:spId>
<ns1:spPassword>C5216E519A071D601BEDD150F3FCD026</ns1:spPassword>
<ns1:serviceId>35000001000002</ns1:serviceId>
<ns1:timeStamp>20080101010101</ns1:timeStamp>
<ns1:OA>8613900000001</ns1:OA>
<ns1:FA>8613900000001</ns1:FA>
</ns1:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:refundAmount>
<loc:endUserIdentifier>8613900000001</loc:endUserIdentifier>
<loc:charge>
<description>sdf</description>
<currency>s</currency>
<amount>12</amount>
<code>10090</code>
</loc:charge>
<loc:referenceCode>asd</loc:referenceCode>
</loc:refundAmount>
</soapenv:Body>
</soapenv:Envelope>

Message Header Parameters


Table 3-1 describes parameters in a refundAmountRequest message header.

Table 3-1 Parameters in a refundAmount message header

Para Type Leng Lev Description


meter th el of
Req
uire
men
t

spId xsd: 21 Man Partner ID.


string dator The ID is automatically allocated by the SDP to partners
y after successful registration. To obtain the ID:
 An SP can log in to the SDP management portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.
 A Developer can log in to the Developer Portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 25


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Para Type Leng Lev Description


meter th el of
Req
uire
men
t
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Con Authentication key for the SDP to authenticate partners.
word string ditio The value is a character string encrypted from spId +
nal Password + timeStamp by MD5. The encryption
formula is: spPassword = MD5(spId + Password +
timeStamp). In the formula:
 spId and timeStamp: authentication ID and
timestamp.
 Password: password for partners to access the SDP.
 An SP can obtain the password from the email
notification received after successful registration.
 A Developer can log in to the Developer Portal,
choose Member Center > Account >
Registration Information > Invoke Password,
and set the password.
 An Enterprise must contact the carrier to obtain
the password.
The SDP supports authentication by SP ID + Password,
SP ID + IP address + Password, or SP ID + IP
address. Partners select an authentication mode during
registration. If a partner selects authentication by SP ID
+ Password or SP ID + IP address + Password, this
parameter is mandatory in requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb
servic xsd: 21 Man Service ID.
eId string dator The ID is automatically allocated by the SDP to services
y after successful release. An SP can log in to the SDP
management portal and query service information for the
ID.
This parameter is mandatory in an SP's request, and can
be left empty in a Developer's or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Con Timestamp (UTC time).
amp string ditio The value is used in MD5 encryption of spPassword.
nal
This parameter is mandatory when the spPassword
parameter is required.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 26


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Para Type Leng Lev Description


meter th el of
Req
uire
men
t
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Con Mobile number of the service originator.
string ditio  When the SP charges a user that subscribes to or
nal orders a service by fee, this parameter value is the
mobile number of the charged user.
 When the SP charges a user that receives a gift from
another user by fee, this parameter value is the mobile
number of the gift sender.
 In an Enterprise's or a Developer's request, the value
is the mobile number of the message recipient.
[Example]
989377123456
FA xsd: 30 Con Mobile number of the charged party.
string ditio The value must be the same as the OA value.
nal

Message Body Parameters


Table 3-2 describes parameters in a refundAmountRequest message body.

Table 3-2 Parameters in a refundAmountRequest message body

Paramet Type Length Level of Description


er Require
ment
endUserI xsd:any 30 Mandato Account of the user to whom a third party
dentifier URI ry needs to refund fees.
[Format]
[tel:][Prefix][Country code]Mobile number.
In the format, [tel:], [Prefix], and [Country
code] are optional. The value of [Prefix] can
be +, +0, +00, 0, or 00.
Set the parameter to a mobile number
containing the country code.
[Example]

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 27


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Paramet Type Length Level of Description


er Require
ment
tel:008612345678
008612345678
8612345678
charge commo - Mandato Charging information.
n:Charg ry For the detailed parameters, see Table 3-3.
ingI
informa
tion
reference xsd:stri 30 Mandato Unique ID of the refund request.
Code ng ry [Example]
225

Table 3-3 ChargingInformation parameters

Parameter Type Length Level of Description


Requirement

description xsd:string 255 Mandatory Charging description.


[Example]
charge
currency xsd:string 3 Mandatory Currency used for the
charging. See ISO 4217,
Codes for the
representation of
currencies and funds.
[Example]
USD
amount xsd:decimal 4 Mandatory Amount of the refund
fee. The SDP system
does not support the
decimal point currently.
[Example]
100
code xsd:string 30 Optional Charging code, which is
relevant to the contract
of the charged party.
[Example]
4523

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 28


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

3.2.4 Response
The SDP functions as the server, processes refundAmountRequest messages received from
the App, and sends refundAmountResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:refundAmountResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/amount_charging/v3_1/local"
/>
</soapenv:Body>
</soapenv:Envelope>

3.2.5 Error Codes


Table 3-4 describes refundAmount error codes that the SDP may return upon an exception.
For details about the error codes, see the SDP Solution Error Code Reference.

Table 3-4 Error codes of the refundAmount interface

Error Description Cause


Code

SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 ChargingInformation is null. The ChargingInformation value in
the request body is blank.
Description is null in The Description value in the request
ChargingInformation. body is blank.
Amount is null. The Amount value in the request
body is blank.
Invalid input value. A parameter value in the request is
invalid.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 29


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Error Description Cause


Code

SP ip is null! The IP address in the request header


is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.
The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.
The sp's Status is pre-deregistered. The SP is in the pre-deregistered
state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 30


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Error Description Cause


Code
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.
SVC0270 MDSP charge failed. An internal SDP service is abnormal.
POL0910 Minimum Amount per Transaction. The Amount value in the request is
out of the transaction amount range.

3.3 refundVolume
3.3.1 Function
The App (functioning as the client) invokes the refundVolume API provided by the
SDP(functioning as the server) to refund by volume to users when charging fails.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 31


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

3.3.2 Request URI


The request URI is the destination URI of refundVolumeRequest messages sent by the App to
the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/VolumeChargingService/services/VolumeCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

3.3.3 Request
The App functions as the client and sends a refundVolumeRequest message to the SDP to
refund fees to users by volume.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/volume_charging/v3_1/local"
>
<soapenv:Header>
<loc:RequestSOAPHeader>
<loc:spId>35000001</loc:spId>
<loc:spPassword>e6434ef249df55c7a21a0b45758a39bb1</loc:spPassword>
<loc:serviceId>35000001000001</loc:serviceId>
<loc:timeStamp>20100731064245</loc:timeStamp>
<loc:OA>8613300000010</loc:OA>
<loc:FA>8613300000010</loc:FA>
<loc:token/>
</loc:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:refundVolume>
<loc:endUserIdentifier>476</loc:endUserIdentifier>
<loc:volume>456</loc:volume>
<loc:billingText>4564</loc:billingText>
<loc:referenceCode>785</loc:referenceCode>
<loc:parameters>
<name>54254</name>
<value>78757</value>
</loc:parameters>
</loc:refundVolume>
</soapenv:Body>
</soapenv:Envelope>

Message Header Parameters


Table 3-5 describes parameters in a refundVolumeRequest message header.

Table 3-5 Parameters in a refundVolumeRequest message header

Para Type Leng Level of Description


meter th Requirement

spId xsd: 21 Mandatory Partner ID.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 32


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Para Type Leng Level of Description


meter th Requirement
string The ID is automatically allocated by the SDP
to partners after successful registration. To
obtain the ID:
 An SP can log in to the SDP management
portal and query account information, or
log in to the mailbox used for registration
and view the email notification received
after successful registration.
 A Developer can log in to the Developer
Portal and query account information, or
log in to the mailbox used for registration
and view the email notification received
after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Conditional Authentication key for the SDP to authenticate
word string partners.
The value is a character string encrypted from
spId + Password + timeStamp by MD5. The
encryption formula is: spPassword =
MD5(spId + Password + timeStamp). In the
formula:
 spId and timeStamp: authentication ID
and timestamp.
 Password: password for partners to access
the SDP.
 An SP can obtain the password from the
email notification received after
successful registration.
 A Developer can log in to the Developer
Portal, choose Member Center >
Account > Registration Information >
Invoke Password, and set the
password.
 An Enterprise must contact the carrier
to obtain the password.
The SDP supports authentication by SP ID +
Password, SP ID + IP address + Password,
or SP ID + IP address. Partners select an
authentication mode during registration. If a
partner selects authentication by SP ID +
Password or SP ID + IP address +
Password, this parameter is mandatory in
requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 33


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Para Type Leng Level of Description


meter th Requirement
servic xsd: 21 Mandatory Service ID.
eId string The ID is automatically allocated by the SDP
to services after successful release. An SP can
log in to the SDP management portal and
query service information for the ID.
This parameter is mandatory in an SP's
request, and can be left empty in a Developer's
or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Conditional Timestamp (UTC time).
amp string The value is used in MD5 encryption of
spPassword.
This parameter is mandatory when the
spPassword parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Conditional Mobile number of the service originator.
string  When the SP charges a user that subscribes
to or orders a service by fee, this parameter
value is the mobile number of the charged
user.
 When the SP charges a user that receives a
gift from another user by fee, this
parameter value is the mobile number of
the gift sender.
 In an Enterprise's or a Developer's request,
the value is the mobile number of the
message recipient.
[Example]
989377123456
FA xsd: 30 Conditional Mobile number of the charged party.
string The value must be the same as the OA value.

Message Body Parameters


Table 3-6 describes parameters in a refundVolumeRequest message body.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 34


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Table 3-6 Parameters in a refundVolumeRequest message body

Paramet Type Length Level of Description


er Require
ment
endUserI xsd:any 30 Mandato Account of the user to be refunded.
dentifier URI ry [Format]
[tel:][Prefix][Country code]Mobile number.
In the format, [tel:], [Prefix], and [Country
code] are optional. The value of [Prefix] can
be +, +0, +00, 0, or 00.
Set the parameter to a mobile number
containing the country code.
[Example]
tel:008612345678
008612345678
8612345678
volume xsd:lon 4 Mandato Unit for refund by traffic.
g ry
billingTe xsd:stri 255 Mandato Bill information.
xt ng ry
reference xsd:stri 30 Mandato Unique ID of the request.
Code ng ry [Example]
225
paramete Propert - Optional Extended information.
rs y NOTE
[0..unbo This parameter is not used in the SDP currently.
unded]

3.3.4 Response
The SDP functions as the server, processes refundVolumeRequest messages received from the
App, and sends refundVolumeResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:refundVolumeResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/volume_charging/v3_1/local"
/>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 35


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

</soapenv:Body>
</soapenv:Envelope>

3.3.5 Error Codes


Table 3-7 describes refundVolume error codes that the SDP may return upon an exception. For
details about the error codes, see the SDP Solution Error Code Reference.

Table 3-7 Error codes of the refundVolume interface

Error Cause
Code Description
SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 Invalid input value. A parameter value in the request is
invalid.
SVC0270 MDSP charge failed. An internal SDP service is abnormal.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.
The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 36


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Error Cause
Code Description

The sp's Status is pre-deregistered. The SP is in the pre-deregistered


state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 37


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 3 APIs for Refund

Error Cause
Code Description
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 38


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

4 APIs for Reserve Amount Charging

About This Chapter


4.1 Process
4.2 reserveAmount
4.3 chargeReservation
4.4 releaseReservation

4.1 Process
Figure 4-1 shows the process for the App to use the Payment capability provided by the SDP
to reserve amount for a user, deduct fees from the reserved amount, and cancel the amount
reservation.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 39


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Figure 4-1 Service Process

The process is as follows:


1. The App invokes the reserveAmount interface to reserve amount for a user.
a. Before a user uses services, the App invokes the reserveAmount interface to reserve
required amount from a user's mobile account.
The request body must contain the endUserIdentifier, charge, and referenceCode
parameters.
b. The SDP reserves amount for the user and sends a response containing the result
parameter to the App.
2. The App invokes the chargeReservation interface to deduct fees from the user's reserved
amount.
a. After the user uses services, the App invokes the chargeReservation interface to
deduct fees from the user's reserved amount.
The request body must contain the reservationIdentifier, charge, and
referenceCode parameters.
b. The SDP deducts fees and sends a response to the App.
3. The App invokes the releaseReservation interface to cancel the amount reservation.
a. When the user cancels a transaction or the transaction fails, the App invokes the
releaseReservation interface to cancel the user's amount reservation.
The request body must contain the reservationIdentifier parameter.
b. The SDP cancels the amount reservation and sends a response to the App.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 40


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

4.2 reserveAmount
4.2.1 Function
Before a user uses services, the App (functioning as the client) invokes the reserveAmount
interface provided by the SDP(functioning as the server) to reserve required amount from a
user's mobile account.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

4.2.2 Request URI


The request URI is the destination URI of reserveAmountRequest messages sent by the App
to the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/ReserveAmountChargingService/services/ReserveAmountCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

4.2.3 Request
The App functions as the client and sends a reserveAmountRequest message to the SDP to
reserve amount for users.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local">
<soapenv:Header>
<loc:RequestSOAPHeader>
<loc:spId>35000001</loc:spId>
<loc:spPassword>e6434ef249df55c7a21a0b45758a39bb</loc:spPassword>
<loc:serviceId>35000001000012</loc:serviceId>
<loc:timeStamp>20100731064245</loc:timeStamp>
<loc:OA>8613300000010</loc:OA>
<loc:FA>8613300000010</loc:FA>
</loc:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:reserveAmount>
<loc:endUserIdentifier>tel:8613300000010</loc:endUserIdentifier>
<loc:charge>
<description>desc</description>
<currency>CNY</currency>
<amount>1000</amount>
<code>1</code>
</loc:charge>
</loc:reserveAmount>
</soapenv:Body>
</soapenv:Envelope>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 41


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Message Header Parameters


Table 4-1 describes parameters in a reserveAmountRequest message header.

Table 4-1 Parameters in a reserveAmountRequest message header

Para Type Leng Level of Description


meter th Requirement
spId xsd: 21 Mandatory Partner ID.
string The ID is automatically allocated by the SDP
to partners after successful registration. To
obtain the ID:
 An SP can log in to the SDP management
portal and query account information, or
log in to the mailbox used for registration
and view the email notification received
after successful registration.
 A Developer can log in to the Developer
Portal and query account information, or
log in to the mailbox used for registration
and view the email notification received
after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Conditional Authentication key for the SDP to authenticate
word string partners.
The value is a character string encrypted from
spId + Password + timeStamp by MD5. The
encryption formula is: spPassword =
MD5(spId + Password + timeStamp). In the
formula:
 spId and timeStamp: authentication ID
and timestamp.
 Password: password for partners to access
the SDP.
An SP can obtain the password from the
email notification received after successful
registration.
The SDP supports authentication by SP ID +
Password, SP ID + IP address + Password,
or SP ID + IP address. Partners select an
authentication mode during registration. If a
partner selects authentication by SP ID +
Password or SP ID + IP address +
Password, this parameter is mandatory in
requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 42


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Para Type Leng Level of Description


meter th Requirement
servic xsd: 21 Mandatory Service ID.
eId string The ID is automatically allocated by the SDP
to services after successful release. An SP can
log in to the SDP management portal and
query service information for the ID.
This parameter is mandatory in an SP's
request, and can be left empty in a Developer's
or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Conditional Timestamp (UTC time).
amp string The value is used in MD5 encryption of
spPassword.
This parameter is mandatory when the
spPassword parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Conditional Mobile number of the service originator.
string  When the SP charges a user that subscribes
to or orders a service by fee, this parameter
value is the mobile number of the charged
user.
 When the SP charges a user that receives a
gift from another user by fee, this
parameter value is the mobile number of
the gift sender.
 In an Enterprise's or a Developer's request,
the value is the mobile number of the
message recipient.
[Example]
989377123456
FA xsd: 30 Conditional Mobile number of the charged party.
string The value must be the same as the OA value.

Message Body Parameters


Table 4-2 describes parameters in a reserveAmountRequest message body.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 43


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Table 4-2 Parameters in a reserveAmountRequest message body

Paramet Type Length Level of Description


er Require
ment
endUserI xsd:any 30 Mandato Account of the user to be charged.
dentifier URI ry [Format]
[tel:][Prefix][Country code]Mobile number.
In the format, [tel:], [Prefix], and [Country
code] are optional. The value of [Prefix] can
be +, +0, +00, 0, or 00.
Set the parameter to a mobile number
containing the country code.
tel:008612345678
008612345678
8612345678
charge commo - Mandato Charging information.
n:Charg ry For the detailed parameters, see Table 4-3.
ingI
informa
tion

Table 4-3 ChargingInformation parameters

Parameter Type Length Level of Description


Requirement
description xsd:string 255 Mandatory Charging description.
[Example]
charge
currency xsd:string 3 Mandatory Currency used for the
charging. See ISO 4217,
Codes for the
representation of
currencies and funds.
[Example]
USD
amount xsd:decimal 4 Mandatory Amount of the charged
fee. The SDP system
does not support the
decimal point currently.
[Example]
100
code xsd:string 30 Optional Charging code, which is
relevant to the contract

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 44


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Parameter Type Length Level of Description


Requirement
of the charged party.
[Example]
4523

4.2.4 Response
The SDP functions as the server, processes reserveAmountRequest messages received from
the App, and sends reserveAmountResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:reserveAmountResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local">
<ns1:result>012003011207181711000000001100</ns1:result>
</ns1:reserveAmountResponse>
</soapenv:Body>
</soapenv:Envelope>

Message Body Parameters


Table 4-4 describes parameters in a reserveAmountResponse message body.

Table 4-4 Parameters in a reserveAmountResponse message body

Parame Type Length Level of Description


ter Requireme
nt
result xsd:string 30 Mandatory Unique ID of the creation result of
the account for reserving amount.
NOTE
The value must be the same as the value
of reservationIdentifier in the request
sent by the App using the
ChargeReservation or
ReleaseReservation interface.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 45


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

4.2.5 Error Codes


Table 4-5 describes reserveAmount error codes that the SDP may return upon an exception.
For details about the error codes, see the SDP Solution Error Code Reference.

Table 4-5 Error codes of the reserveAmount interface

Error Cause
Code Description

SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 ChargingInformation is null. The ChargingInformation value in
the request body is blank.
Description is null in The Description value in the request
ChargingInformation. body is blank.
Amount is null. The Amount value in the request
body is blank.
Invalid input value. A parameter value in the request is
invalid.
SVC0270 MDSP charge failed. An internal SDP service is abnormal.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 46


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description

The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.
The sp's Status is pre-deregistered. The SP is in the pre-deregistered
state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 47


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.
POL0910 Minimum Amount per Transaction. The Amount value in the request is
out of the transaction amount range.

4.3 chargeReservation
4.3.1 Function
After the user uses services, the App(functioning as the client) invokes the chargeReservation
interface provided by the SDP(functioning as the server) to deduct fees from the user's
reserved amount.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

4.3.2 Request URI


The request URI is the destination URI of chargeReservationRequest messages sent by the
App to the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/ReserveAmountChargingService/services/ReserveAmountCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

4.3.3 Request
The App functions as the client and sends a chargeReservationRequest message to the SDP to
deduct fees from users' reserved amount.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local">
<soapenv:Header>
<loc:RequestSOAPHeader>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 48


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

<loc:spId>35000001</loc:spId>
<loc:spPassword>e6434ef249df55c7a21a0b45758a39bb</loc:spPassword>
<loc:serviceId>35000001000012</loc:serviceId>
<loc:timeStamp>20100731064245</loc:timeStamp>
<loc:OA>8613300000010</loc:OA>
<loc:FA>8613300000010</loc:FA>
</loc:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:chargeReservation>

<loc:reservationIdentifier>012003011207181711000000001100</loc:reservationIdentifi
er>
<loc:charge>
<description>desc</description>
<currency>CNY</currency>
<amount>1000</amount>
<code>1</code>
</loc:charge>
<loc:referenceCode>6</loc:referenceCode>
</loc:chargeReservation>
</soapenv:Body>
</soapenv:Envelope>

Message Header Parameters


Table 4-6 describes parameters in a chargeReservationRequest message header.

Table 4-6 Parameters in a chargeReservationRequest message header

Para Type Leng Level Description


meter th of
Requi
remen
t

spId xsd: 21 Mandat Partner ID.


string ory The ID is automatically allocated by the SDP to
partners after successful registration. To obtain the ID:
 An SP can log in to the SDP management portal
and query account information, or log in to the
mailbox used for registration and view the email
notification received after successful registration.
 A Developer can log in to the Developer Portal and
query account information, or log in to the mailbox
used for registration and view the email
notification received after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Conditi Authentication key for the SDP to authenticate
word string onal partners.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 49


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Para Type Leng Level Description


meter th of
Requi
remen
t
The value is a character string encrypted from spId +
Password + timeStamp by MD5. The encryption
formula is: spPassword = MD5(spId + Password +
timeStamp). In the formula:
 spId and timeStamp: authentication ID and
timestamp.
 Password: password for partners to access the
SDP.
An SP can obtain the password from the email
notification received after successful registration.
The SDP supports authentication by SP ID +
Password, SP ID + IP address + Password, or SP
ID + IP address. Partners select an authentication
mode during registration. If a partner selects
authentication by SP ID + Password or SP ID + IP
address + Password, this parameter is mandatory in
requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb
servic xsd: 21 Mandat Service ID.
eId string ory The ID is automatically allocated by the SDP to
services after successful release. An SP can log in to
the SDP management portal and query service
information for the ID.
This parameter is mandatory in an SP's request, and
can be left empty in a Developer's or an Enterprise's
request.
[Example]
3500001000012
timeSt xsd: 14 Conditi Timestamp (UTC time).
amp string onal The value is used in MD5 encryption of spPassword.
This parameter is mandatory when the spPassword
parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Conditi Mobile number of the service originator.
string onal  When the SP charges a user that subscribes to or
orders a service by fee, this parameter value is the
mobile number of the charged user.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 50


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Para Type Leng Level Description


meter th of
Requi
remen
t
 When the SP charges a user that receives a gift
from another user by fee, this parameter value is
the mobile number of the gift sender.
 In an Enterprise's or a Developer's request, the
value is the mobile number of the message
recipient.
[Example]
989377123456
FA xsd: 30 Conditi Mobile number of the charged party.
string onal The value must be the same as the OA value.

Message Body Parameters


Table 4-7 describes parameters in a chargeReservationRequest message body.

Table 4-7 Parameters in a chargeReservationRequest message body

Paramet Type Length Level of Description


er Require
ment
reservati xsd:stri 30 Mandato Unique ID of the creation result of the
onIdentif ng ry account for reserving amount.
ier NOTE
The value must be the same as the result value in
the response sent by the App using the
reserveAmount interface.

charge commo - Mandato Charging information.


n:Charg ry For the detailed parameters, see Table 4-8.
ingI
informa
tion
reference xsd:stri Mandato Unique ID of the request sent by the SP to
Code ng ry deduct fees from a user's reserved amount.
The value must be unique.
[Example]
225

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 51


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Table 4-8 ChargingInformation parameters

Parameter Type Length Level of Description


Requirement

description xsd:string 255 Mandatory Charging description.


[Example]
charge
currency xsd:string 3 Mandatory Currency used for the
charging. See ISO 4217,
Codes for the
representation of
currencies and funds.
[Example]
USD
amount xsd:decimal 4 Mandatory Amount of the charged
fee. The SDP system
does not support the
decimal point currently.
[Example]
100
code xsd:string 30 Optional Charging code, which is
relevant to the contract
of the charged party.
[Example]
4523

4.3.4 Response
The SDP functions as the server, processes chargeReservationRequest messages received
from the App, and sends chargeReservationResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:chargeReservationResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local"/>
</soapenv:Body>
</soapenv:Envelope>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 52


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

4.3.5 Error Codes


Table 4-9 describes chargeReservation error codes that the SDP may return upon an exception.
For details about the error codes, see the SDP Solution Error Code Reference.

Table 4-9 Error codes of the chargeReservation interface

Error Cause
Code Description

SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 ChargingInformation is null. The ChargingInformation value in
the request body is blank.
Description is null in The Description value in the request
ChargingInformation. body is blank.
Amount is null. The Amount value in the request
body is blank.
Invalid input value. A parameter value in the request is
invalid.
SVC0270 MDSP chargeCnfm failed. An internal SDP service is abnormal.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 53


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description

The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.
The sp's Status is pre-deregistered. The SP is in the pre-deregistered
state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 54


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.
POL0910 Minimum Amount per Transaction. The Amount value in the request is
out of the transaction amount range.

4.4 releaseReservation
4.4.1 Function
When the user cancels a transaction or the transaction fails, the App (functioning as the client)
invokes the releaseReservation interface provided by the SDP(functioning as the server) to
cancel the amount reservation.
Partners must code the App based on the API field requirements so that the App can send
correct requests to the SDP. The SDP sends a response within 60 seconds by default.

4.4.2 Request URI


The request URI is the destination URI of releaseReservationRequest messages sent by the
App to the SDP. The URI is provided by the SDP in the following format:
http://IP:Port/ReserveAmountChargingService/services/ReserveAmountCharging/v3
In the format, IP and Port indicate the service IP address and Parlay X 3.0 port number of the
API provided by the SDP. Contact carriers to obtain the IP address and port number.

4.4.3 Request
The App functions as the client and sends a releaseReservationRequest message to the SDP to
cancel users' reserved amount.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local">
<soapenv:Header>
<loc:RequestSOAPHeader>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 55


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

<loc:spId>35000001</loc:spId>
<loc:spPassword>e6434ef249df55c7a21a0b45758a39bb</loc:spPassword>
<loc:serviceId>35000001000012</loc:serviceId>
<loc:timeStamp>20100731064245</loc:timeStamp>
<loc:OA>8613300000010</loc:OA>
<loc:FA>8613300000010</loc:FA>
</loc:RequestSOAPHeader>
</soapenv:Header>
<soapenv:Body>
<loc:releaseReservation>

<loc:reservationIdentifier>012004011207181711000000001100</loc:reservationIdentifi
er>
</loc:releaseReservation>
</soapenv:Body>
</soapenv:Envelope>

Message Header Parameters


Table 4-10 describes parameters in a releaseReservationRequest message header.

Table 4-10 Parameters in a releaseReservationRequest message header

Para Type Leng Lev Description


meter th el of
Req
uire
men
t

spId xsd: 21 Man Partner ID.


string dator The ID is automatically allocated by the SDP to partners
y after successful registration. To obtain the ID:
 An SP can log in to the SDP management portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.
 A Developer can log in to the Developer Portal and
query account information, or log in to the mailbox
used for registration and view the email notification
received after successful registration.
 An Enterprise must contact the carrier.
[Example]
000201
spPass xsd: 100 Con Authentication key for the SDP to authenticate partners.
word string ditio The value is a character string encrypted from spId +
nal Password + timeStamp by MD5. The encryption
formula is: spPassword = MD5(spId + Password +
timeStamp). In the formula:
 spId and timeStamp: authentication ID and
timestamp.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 56


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Para Type Leng Lev Description


meter th el of
Req
uire
men
t
 Password: password for partners to access the SDP.
An SP can obtain the password from the email
notification received after successful registration.
The SDP supports authentication by SP ID + Password,
SP ID + IP address + Password, or SP ID + IP
address. Partners select an authentication mode during
registration. If a partner selects authentication by SP ID
+ Password or SP ID + IP address + Password, this
parameter is mandatory in requests sent by this partner.
[Example]
e6434ef249df55c7a21a0b45758a39bb
servic xsd: 21 Man Service ID.
eId string dator The ID is automatically allocated by the SDP to services
y after successful release. An SP can log in to the SDP
management portal and query service information for the
ID.
This parameter is mandatory in an SP's request, and can
be left empty in a Developer's or an Enterprise's request.
[Example]
3500001000012
timeSt xsd: 14 Con Timestamp (UTC time).
amp string ditio The value is used in MD5 encryption of spPassword.
nal
This parameter is mandatory when the spPassword
parameter is required.
[Format]
yyyyMMddHHmmss
[Example]
20100731064245
OA xsd: 30 Con Mobile number of the service originator.
string ditio  When the SP charges a user that subscribes to or
nal orders a service by fee, this parameter value is the
mobile number of the charged user.
 When the SP charges a user that receives a gift from
another user by fee, this parameter value is the mobile
number of the gift sender.
 In an Enterprise's or a Developer's request, the value
is the mobile number of the message recipient.
[Example]
989377123456

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 57


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Para Type Leng Lev Description


meter th el of
Req
uire
men
t

FA xsd: 30 Con Mobile number of the charged party.


string ditio The value must be the same as the OA value.
nal

Message Body Parameters


Table 4-11describes parameters in a releaseReservationRequest message body.

Table 4-11 Parameters in a releaseReservationRequest message body

Paramet Type Length Level of Description


er Require
ment
reservati xsd:stri 30 Mandato Unique ID of the creation result of the
onIdentif ng ry account for reserving amount.
ier NOTE
The value must be the same as the result value in
the response sent by the App using the
reserveAmount interface.

4.4.4 Response
The SDP functions as the server, processes releaseReservationRequest messages received
from the App, and sends releaseReservationResponse messages to the App.
This topic provides a success response example. If a request fails, the SDP sends an error
response that contains an error code. For details about error responses, see API Error
Responses.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:releaseReservationResponse
xmlns:ns1="http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v3_
1/local"/>
</soapenv:Body>
</soapenv:Envelope>

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 58


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

4.4.5 Error Codes


Table 4-12 describes releaseReservation error codes that the SDP may return upon an
exception. For details about the error codes, see the SDP Solution Error Code Reference.

Table 4-12 Error codes of the releaseReservation interface

Error Cause
Code Description

SVC0001 Waiting for response timed out, An internal SDP service is abnormal.
message type is %1.
MDSP AuthPrice failed, waiting for An internal SDP service is abnormal.
response timed out.
SVC0002 ChargingInformation is null. The ChargingInformation value in
the request body is blank.
Description is null in The Description value in the request
ChargingInformation. body is blank.
Amount is null. The Amount value in the request
body is blank.
Invalid input value. A parameter value in the request is
invalid.
SVC0270 MDSP chargeCnfm failed. An internal SDP service is abnormal.
SVC0901 SPID is null! The SPID value in the request header
is blank or does not exist in the SDP.
SPID %1 is invalid! The SPID value in the request header
is in an incorrect format.
SPID %1 is not exist! The SP specified by SPID in the
request header does not exist in the
SDP.
SP ip is null! The IP address in the request header
is blank.
Sp ip %1 is not accepted! The IP address in the request header
is incorrect.
Sp password is null! The password value in the request
header is blank.
Timestamp is empty in soapheader. The timeStamp value in the request
header is blank.
local SP password is null! An internal error occurs in the SDP.
Sp password is not accepted! The password value in the request
header is incorrect.
The authentication type is unknown! An internal SDP service is abnormal.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 59


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description

The Sp has not logged in. The Token value in the request
header does not exist in the SDP and
the SP needs to log in first.
SP %1 is in blacklist! The SP account is in the blacklist.
The sp's Status is pre-deregistered. The SP is in the pre-deregistered
state.
The sp's Status is deregistered. The SP is in the deregistered state.
SP status is locked. The SP is in the locked state.
The sp's Status is forbidden. The SP is in the forbidden state.
The sp 's status is pause. The SP is in the paused state.
The sp's Status is unknown. An internal SDP service is abnormal.
The ScfType %1 is inactive! An internal SDP service is abnormal.
The ScfType %1 is uninstalled! An internal SDP service is abnormal.
Service ID %1 is invalid! The serviceID value in the request
header is incorrect.
Service ID %1 is not existed! The serviceID value in the request
header does not exist in the SDP.
Service %1 is in blacklist! The serviceId value in the request
header in the blacklist.
The service status is configuring. The service specified by serviceId in
the request header is in the
configuring state.
The service status is suspended. The service specified by serviceId in
the request header is in the paused
state.
The service status is The service specified by serviceId in
pre-deregistered. the request header is in the
pre-deregistered state.
The service status is deregistered. The service specified by serviceId in
the request header is in the
deregistered state.
The service status is unknown. An internal SDP service is abnormal.
The API %1 is not existed. This SP does not have the permission
for using the API.
The API status is disabled. This SP does not have the permission
for using the API.
The sp %1 has not ordered the The SP has not subscribed to the

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 60


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 4 APIs for Reserve Amount Charging

Error Cause
Code Description
service %2! Payment service.
The service %1 has not orderd the An internal SDP service is abnormal.
api %2.
The service %1 has not orderd the An internal SDP service is abnormal.
SCF %2.
The sp %1 has not orderd the api %2 This SP does not have the permission
in current date. for using the API.
The sp %1 has not orderd the The SP has not subscribed to the
SCF %2. Payment service.
POL0910 Minimum Amount per Transaction. The Amount value in the request is
out of the transaction amount range.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 61


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 5 API Error Responses

5 API Error Responses

About This Chapter


5.1 Service Error Response
5.2 Policy Error Response

5.1 Service Error Response


A service error is caused by service operation exceptions irrelevant to policies. When a
service error occurs, the server sends a service error response to the client. This topic provides
a service error response example and describes parameters in the response.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>SVC0001</faultcode>
<faultstring>Waiting for response timed out, message type is
OutwardGetLocReq</faultstring>
<detail>
<ns1:ServiceException
xmlns:ns1="http://www.csapi.org/schema/parlayx/common/v2_1">
<messageId>SVC0001</messageId>
<text>Waiting for response timed out, message type is OutwardGetLocReq.</text>
<variables>OutwardGetLocReq</variables>
</ns1:ServiceException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Parameter Description
Table 5-1 describes parameters in a service error response.

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 1


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 5 API Error Responses

Table 5-1 Parameters in a service error response

Param Type Level of Description


eter Require
ment
faultco xsd:string Mandato Result code.
de ry [Format]
SVCABCD
In the format, SVC identifies a service error response,
and ABCD is a number ranging from 0001 to 9999.
[Example]
SVC0001
faultstri xsd:string Mandato Error description.
ng ry The value can contain the variable %# in definition.
When sending a response, the server replaces the
variable %# with the value of variables.
[Example]
Waiting for response timed out, message type is
OutwardGetLocReq.
messag xsd:string Mandato The value is the same as that of faultcode.
eId ry
text xsd:string Mandato The value is the same as that of faultstring.
ry
variabl xsd:string Optional Value of the variable defined in the value of
es [0..unbou faultstring.
nded] [Example]
OutwardGetLocReq

5.2 Policy Error Response


A policy error is caused by service level agreement (SLA) violation. When a policy error
occurs, the server sends a policy error response to the client. This topic provides a policy error
response example and describes parameters in the response.

Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>POL0006</faultcode>
<faultstring>GroupAddr is not supported</faultstring>
<detail>
<ns1:PolicyException
xmlns:ns1="http://www.csapi.org/schema/parlayx/common/v2_1">

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 2


Copyright © Huawei Technologies Co., Ltd.
SDP Solution
API Reference (Payment, ParlayX 3.0) 5 API Error Responses

<messageId>POL0006</messageId>
<text>GroupAddr is not supported</text>
<variables>GroupAddr</variables>
</ns1:PolicyException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Parameter Description
Table 5-2 describes parameters in a policy error response.

Table 5-2 Parameters in a policy error response

Param Type Level of Description


eter Require
ment

faultco xsd:string Mandato Result code.


de ry [Format]
POLABCD
In the format, POL identifies a policy error response,
and ABCD is a number ranging from 0001 to 9999.
[Example]
POL0006
faultstri xsd:string Mandato Error description.
ng ry The value can contain the variable %# in definition.
When sending a response, the server replaces the
variable %# with the value of variables.
[Example]
GroupAddr is not supported
messag xsd:string Mandato The value is the same as that of faultcode.
eId ry
text xsd:string Mandato The value is the same as that of faultstring.
ry
variabl xsd:string Conditio Value of the variable defined in the value of
es [0..unbou nal faultstring.
nded] [Example]
GroupAddr

Issue 01 (2014-01-04) Huawei Proprietary and Confidential 3


Copyright © Huawei Technologies Co., Ltd.

You might also like