alipay.commerce.qrcode.modify
Call this interface to modify the QR code information.
Request
Service address
Environment | HTTPS request URL |
Production environment | |
Test environment |
Request parameters
Parameter | Description |
Basic parameter | |
service String Required | Interface name
|
partner String(16) Required | 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 Required | The charset with which the request data is encoded. UTF-8, GBK, and GB2312 are supported.
|
sign_type String Required | Sign type. Only MD5 is supported. Use uppercase.
|
sign String Required | Sign value
|
timestamp String Required | The time when the merchant server sends request. The time is in GMT+8, and in 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 Required | Business type that is defined by Alipay, with a value of OVERSEASHOPQRCODE
|
qrcode String Required | The returned QR code value after the code is generated successfully.
|
biz_data String(2000) Required | Business data, which is in the JSON format. For more information, see biz_data.
|
biz_data
Parameter | Description |
secondary_merchant_industry String(4) Required | Business category code of the secondary merchant. For more information about the business category code, see MCC list. Example:0001 |
secondary_merchant_id String(32) Required | The unique ID assigned by the partner to identify a secondary merchant. The ID can contain letters, numbers, and underscores.
|
secondary_merchant_name String(32) Required | Registration legal name of the secondary merchant, shown in the Alipay Wallet and the reconciliation file to identify a secondary merchant. Example:xxx Store |
store_id String Required | The unique ID that is assigned by the partner to identify a store of a merchant, which can contain letters, numbers, and underscores. Note: This field is optional for the taxi business (MCC=4121).
|
store_name String Required | Store name. Note: This field is optional for the taxi business (MCC=4121).
|
taxi_operation_id String | Taxi operation ID, which is compulsory for the taxi business (MCC=4121).
|
taxi_number String | Taxi number, which is compulsory for the taxi business (MCC=4121).
|
taxi_driver_name String | Taxi driver name, which is compulsory for the taxi business (MCC=4121) and is to be used in the transaction history of Alipay wallet.
|
taxi_driver_mobile String | Mobile number of the taxi driver, which is compulsory for the taxi business. (MCC=4121)
|
trans_currency String Required | Pricing currency for the transaction
|
currency String Required | The currency to settle with the merchant. Only HKD is supported.
|
sys_service_provider_id String | System service provider ID. Can’t be modified.
|
channel_fee String | Channel fee. For more information, see channel_fee. Note: If this field exists when the QR code is created, this field cannot be deleted when the QR code is modified. This field is in a format of JSON.
|
country_code String Required | The country code that consists of two letters (alpha-2 code). Refer to ISO 3166-1 for details.
|
address String Required | The address of the store where the code is created. Use postal address format.
|
passback_parameters String | The response parameters returned to the merchant in a JSON format after the payment succeeds. Merchants can define the parameters. Note: Nested JSON is not supported.
|
notify_mobile String | Phone number of the merchant legal representative. Must be numbers only.
|
notify_wangwang String | Wangwang name of the merchant legal representative
|
notify_alipay_account String | Alipay account of the merchant legal representative
|
channel_fee
Parameter | Description |
type String Required | Channel fee type. The value can be FIXED to indicate the fee is a fixed amount or RATE to indicate the fee is calculated based on a certain percentage.
|
value String Required | 1. If the channel fee type is FIXED, the value range is [0, 5% of the original oder amount]. The unit of the value is HKD and is accurate to two decimal places. 2. If the channel fee type is RATE, the value range is [0, 0.05]. (In promotion season, the channel fee can be 0.)
|
Note:
Do not use the halfwidth quotation mark (") in parameter values.
Response
Synchronous response
Parameter | Description |
Basic parameter | |
is_success String Required | 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
|
sign String | Sign value
|
error String | Error code that is returned when the request is not successful, to describe the request failure reason. If the request is successful, this field is not returned. For more information, see the Error Code section in this document.
|
Business parameter | |
qrcode String Required | QR code
|
Error codes
Business errors
Error code | Description |
AE_BARCODE_GENERAL_CODE_FAIL_AND_RETRY | QR code generation fails. You can try again later. |
AE_BARCODE_GENERAL_CODE_FAIL_AND_NOT_RETRY | QR code generation fails. You can try again later. |
ILLEGAL_ARGUMENT | Pamameter error. Check and try again. |
System errors
Error code | Description |
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
Response
Request succeeds:
<alipay>
<is_success>T</is_success>
<request>
<param name="partner">208xxxxxxxxx5500</param>
<param name="service">alipay.commerce.qrcode.modify</param>
<param name="_input_charset">UTF-8</param>
<param name="qrcode">https://qr.alipay.com/ocx09863drhqewuprmuzm68</param>
<param name="biz_type">OVERSEASHOPQRCODE</param>
<param name="sign">9ea53d5a5d36b8e97bb086b5da64b76d</param>
<param name="notify_url">https://www.mikascoffee.com/notify</param>
<param name="biz_data">
{"secondary_merchant_industry":"5499","secondary_merchant_id":"1314520","secondary_merchant_name":"Mika's coffee shop","store_id":"1993","store_name":"Mika's coffee shop","trans_currency":"HKD","currency":"HKD","country_code":"US","address":"3 Old Concord Rd, Burlington, MA 01804美国","notify_sign_type":"RSA","notify_charset":"UTF-8"}
</param>
<param name="sign_type">MD5</param>
<param name="timestamp">2019-09-10 14:43:12</param>
</request>
<response>
<qrcodeinfo>
<qrcode>https://qr.alipay.com/ocx09863drhqewuprmuzm68</qrcode>
</qrcodeinfo>
</response>
<sign>39c65ea091096e63f934506582035005</sign>
<sign_type>MD5</sign_type>
</alipay>
Request is failed:
<alipay>
<is_success>F</is_success>
<error>ILLEGAL_SIGN</error>
</alipay>