alipay.commerce.qrcode.modifyStatus
Call this interface to modify the status of the QR code.
Request
Service address
Environment | HTTPS request URL |
Production environment | Priority: https://globalmapi.alipay.com/gateway.do |
Test environment | https://mapi.alipaydev.com/gateway.do |
Note:
If you use POST
method, please specify _input_charset
in the request URL.
For example: https://mapi.alipaydev.com/gateway.do?_input_charset=UTF-8
Request parameters
Parameter | Description |
Basic parameter | |
service String | Interface name
|
partner String(16) | The partner ID that is assigned by Alipay to identify an Alipay account. The partner ID is composed of 16 digits and begins with 2088.
|
_input_charset String | The charset with which the request data are encoded. UTF-8 is supported.
|
sign_type String | Sign type. RSA, RSA2 and MD5 are supported. Use uppercase.
|
sign String | Sign value
|
timestamp String | The time when the merchant server sends the request. The time is in GMT+8, with a format of yyyy-MM-dd HH:mm:ss. By default, the request expires in 30 minutes.
|
notify_url URL(200) | The URL for receiving asynchronous notifications after the payment is completed.
|
Business parameter | |
biz_type String | Business type that is defined by Alipay, with a value of OVERSEASHOPQRCODE
|
qrcode String | The returned QR code value after the code is generated successfully.
|
status String | QR code status. The value can be one of the following items:
|
Response
Synchronous response
Parameter | Description |
Basic parameter | |
is_success String | Indicates whether the request succeeds or not, with a value of T for success and F for failure. Note: a successful request does not mean the business is accepted and processed successfully.
|
sign_type String | Sign type. RSA, RSA2 and MD5 are supported. Use uppercase.
|
sign String | Sign value
|
error String | Error code that is returned when the request is failed to describe the request failure reason. For more information, see the Error Code section in this document.
|
Business parameter | |
qrcode String | QR code
|
Error codes
Business error
Error code | Specification |
AE_BARCODE_GENERAL_CODE_FAIL_AND_RETRY | Modifying a QR code is failed. This error code supports retrial. |
AE_BARCODE_GENERAL_CODE_FAIL_AND_NOT_RETRY | Modifying a QR code is failed. This error code supports retrial. |
ILLEGAL_ARGUMENT | Parameter error, check and then retry. |
System error
Error code | Specification |
ILLEGAL_SIGN | Invalid signature |
ILLEGAL_DYN_MD5_KEY | Invalid dynamic key |
ILLEGAL_ENCRYPT | Invalid encryption |
ILLEGAL_ARGUMENT | Invalid argument |
ILLEGAL_SERVICE | Invalid service name |
ILLEGAL_USER | Invalid user ID |
ILLEGAL_PARTNER | Invalid partner ID |
ILLEGAL_EXTERFACE | Interface configure error. |
ILLEGAL_PARTNER_EXTERFACE | The partner ID does not have access privilege. |
ILLEGAL_SECURITY_PROFILE | The key is not available |
ILLEGAL_AGENT | Invalid Agent ID |
ILLEGAL_SIGN_TYPE | Invalid sign type |
ILLEGAL_CHARSET | Illegal character set |
HAS_NO_PRIVILEGE | No priviledge |
INVALID_CHARACTER_SET | Invalid character set. |
Samples
Request
https://intlmapi.alipay.com/gateway.do?service=alipay.commerce.qrcode.modifyStatus&partner=208xxxxxxxxx8155&_input_charset=UTF-8&sign_type=MD5¬ify_url=https%3A%2F%2Fwww.mikascoffee.com%2Fnotify&biz_type=OVERSEASHOPQRCODE&qrcode=https%3A%2F%2Fqr.alipay.com%2Focx07305q83kwul5nb8ii2e&status=STOP&sign=7dbd6662f85e23ed98591e4d975ae398
Response
The returned data of a successful request:
<alipay>
<is_success>T</is_success>
<request>
<param name="partner">208xxxxxxxxx8155</param>
<param name="service">alipay.commerce.qrcode.modifyStatus</param>
<param name="_input_charset">UTF-8</param>
<param name="qrcode">https://qr.alipay.com/ocx07305q83kwul5nb8ii2e</param>
<param name="biz_type">OVERSEASHOPQRCODE</param>
<param name="sign">7dbd6662f85e23ed98591e4d975ae398</param>
<param name="notify_url">https://www.mikascoffee.com/notify</param>
<param name="sign_type">MD5</param>
<param name="status">STOP</param>
</request>
<response>
<qrcodeinfo>
<qrcode>https://qr.alipay.com/ocx07305q83kwul5nb8ii2e</qrcode>
</qrcodeinfo>
</response>
<sign>8c76d8c145f49a2201c0e1e752f927e5</sign>
<sign_type>MD5</sign_type>
</alipay>
The response for a failed request:
<alipay>
<is_success>F</is_success>
<error>ILLEGAL_SIGN</error>
</alipay>