Professional Documents
Culture Documents
_______________________________________________________________
[API Reference
(Payment, ParlayX 3.0)]
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
3.3.3 Request.................................................................................................................................................. 32
3.3.4 Response ............................................................................................................................................... 35
3.3.5 Error Codes ........................................................................................................................................... 36
1 Overview
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.
Type Description
</soapenv:Envelope>
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.
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.
<parameter>…</parameter>
…
<detail>
<parameter>…</parameter>
…
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
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.
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
1.6 SOAPAction
Leave the SOAPAction parameter empty.
The following is an example of the SOAPAction parameter setting in an HTTP header:
SOAPAction: ""
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.
The request body must contain the endUserIdentifier, charge, 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.
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>
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>
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
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
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.
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.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>
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"
/>
</soapenv:Body>
</soapenv:Envelope>
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.
Error Cause
Code Description
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.
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.
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.3 Request
The App functions as the client and sends a refundAmountRequest message to the SDP to
refund fees to users.
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>
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>
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.
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.
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>
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"
/>
</soapenv:Body>
</soapenv:Envelope>
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.
Error Cause
Code Description
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.
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.
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.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>
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>
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.
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
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.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>
<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>
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>
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.
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
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.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>
<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>
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>
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.
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
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.
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.
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">
<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.