alipay.overseas.tax.order.query
Call this interface to query the status of an Alipay tax refund order.
Request
Service address
Environment | HTTPS request URL |
Production environment |
Request parameters
Parameter | Description |
Basic parameter | |
app_id String(32) | The unique ID that is assigned by Alipay to identify an application.
|
method String(128) | Interface name
|
format String(40) | Only JSON is supported.
|
charset String(10) | The charset with which the request data are encoded, such as GBK, UTF-8, and GB2312.
|
sign_type String(10) | Sign type. RSA and RSA2 are supported. RSA2 is recommended to be used.
|
sign String(344) | The signature value
|
timestamp String(19) | The time when the request is sent. The format is yyyy-mm-dd hh:mm:ss.
|
version String(3) | The API version. The value is fixed as 1.0.
|
app_auth_token String(40) | See Overview of the app authorization for details. |
biz_content String | Collection of request parameters. JSON format. The maximum length is not limited. Except for common parameters, all other request parameters must be passed in to this parameter. |
Business parameter | |
out_order_no String(64) | The unique serial number that is assigned by tax refund organization to identify a tax refund order. The length of each serial number ranges from 3-64 bits, and only numbers and English characters can be passed.
|
Response
Parameter | Description |
Basic parameter | |
code String | Gateway return code, which indicates whether the request is accepted by Alipay gateway.
|
msg String | Description of the gateway return code
|
sub_code String | Processing result of the request.
|
sub_msg String | Description of the processing result of the request.
|
sign String(64) | The signature value |
Business parameter | |
out_order_no String(64) | The unique serial number that is assigned by tax refund organization to identify a tax refund order. The length of each serial number ranges from 3-64 bits, and only numbers and English characters can be passed.
|
tax_no String(64) | A unique serial number that is assigned by Alipay to identify a tax refund order.
|
status String(1) | The tax refund status. Possible values include:
|
identify_account_type String(32) | The Alipay account identifier type. Possible values include:
|
identify_account_no String(32) | The number that is used to identify an Alipay account. When the value of When the value of
|
success_time Date(20) | The time when the tax refund succeeds. The field is returned only when
|
Error codes
Error code | Description |
ILLEGAL_ARGUMENT | The parameter is incorrect. Check each request parameter according to the API specification. |
TAX_REFUND_RESULT_UNKNOWN | The tax refund status is unknown. |
SYSTEM_ERROR | The query result is unknown. The system is busy. |
Samples
Request sample
JAVA
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","app_id","your private_key","json","GBK","alipay_public_key","RSA2");
AlipayOverseasTaxOrderQueryRequest request = new AlipayOverseasTaxOrderQueryRequest(); request.setBizContent("{" +
"\"out_order_no\":\"0005520171122115751\"" +
" }");
AlipayOverseasTaxOrderQueryResponse response = alipayClient.execute(request); if(response.isSuccess()){
System.out.println("Call succeed");
} else {
System.out.println("Call failed");
}
PHP
$aop = new AopClient ();
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do'; $aop->appId = 'your app_id';
$aop->rsaPrivateKey = 'Fill in the developer's private key, one line'; $aop->alipayrsaPublicKey='Fill in the alipay_public_key_file, one line'; $aop->apiVersion = '1.0';
$aop->signType = 'RSA2';
$aop->postCharset='GBK';
$aop->format='json';
$request = new AlipayOverseasTaxOrderQueryRequest (); $request->setBizContent("{" . "\"out_order_no\":\"0005520171122115751\"" .
" }");
$result = $aop->execute ( $request);
$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response"; $resultCode = $result->$responseNode->code;
if(!empty($resultCode)&&$resultCode == 10000){
echo "Success";
} else {
echo "Fail";
}
.NET
IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", "app_id", "merchant_private_key", "json", "1.0", "RSA2", "alipay_public_key", "GBK", false); AlipayOverseasTaxOrderQueryRequest request= new AlipayOverseasTaxOrderQueryRequest() ; request.BizContent="{" +
"\"out_order_no\":\"0005520171122115751\"" +
" }";
AlipayOverseasTaxOrderQueryResponse response=client.execute(request); Console.WriteLine(response.Body);
HTTP edition:
https://openapi.alipay.com/gateway.do?timestamp=2013-01-01 08:08:08&method=alipay.overseas.tax.order.query&app_id=5097&sign_type=RSA2&sign=ERITJKEIJKJHKKKKKKKHJ EREEEEEEEEEEE&version=1.0&biz_content=
{ "out_order_no":"0005520171122115751"
}
// To ensure secure communication, verify whether the sign value in the response example is provided by Ant Financial.
Response sample
JSON edition:
{ "alipay_overseas_tax_order_query_response":{
"code":"10000",
"msg":"Success",
"out_order_no":"0005520171122115751",
"tax_no":"2017113000384435",
"status":"S",
"identify_account_type":"barcode",
"identify_account_no":"286139798480113981",
"success_time":"2017-11-15 11:23:04"
}
,"sign":"ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
}
Exception sample
JSON
{
"alipay_overseas_tax_order_query_response":{
"code":"20000","msg":"Service Currently Unavailable","sub_code":"isp.unknow-error","sub_msg":"system is busy"} ,"sign":"ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"}
}