Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solutionDOCS

      alipay.commerce.qrcode.modifyStatus

      Call this interface to modify the status of the QR code.

      #Request

      #Service address

      Environment

      HTTPS request URL

      Production environment

      https://intlmapi.alipay.com/gateway.do

      Test environment

      https://mapi.alipaydev.com/gateway.do

      #Request parameters

      ParameterDescription
      Basic parameter

      service

      String Required

      Interface name

      Example:alipay.commerce.qrcode.modifyStatus

      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. 

      Example:2088*********662

      _input_charset

      String Required

      The charset with which the request data is encoded. UTF-8, GBK, and GB2312 are supported. 

      Example:UTF-8

      sign_type

      String Required

      Sign type. MD5, RSA, RSA2 are supported. Use uppercase. 

      Example:MD5

      sign

      String Required

      Sign value

      Example:5d479b28fac070e8e5a935685a3b7611

      timestamp

      String Required

      The time ( Beijing Time) of calling the interface, and the call will expire in a certime time (default 30 minutes). The time format is :yyyy-MM-dd HH:mm:ss。

      Example:2012-12-21 17:11:16

      notify_url

      URL(200)

      The URL for receiving asynchronous notifications after the payment is completed.

      Example:https://www.test.com/alipay/notify_url.php

      Business parameter

      biz_type

      String Required

      Business type that is defined by Alipay, with a value of OVERSEASHOPQRCODE

      Example:OVERSEASHOPQRCODE

      qrcode

      String Required

      The returned QR code value after the code is generated successfully.

      Example:https://qr.alipay.com/ocx07358e3pxwresfpqpzed

      status

      String Required

      QR code status. The value can be one of the following item:

      • STOP: QR code stopped. If the user scans the stopped QR code, the user is to be notified that the QR code is invalid.
      • RESTART: QR code restarted. The QR code can be used after being restarted.
      • DELETE: QR code deleted. If the user scans the deleted QR code, the user is to be notified that the QR code is invalid. The QR code can’t be restarted after being deleted.

      Example:STOP

      Note:

      Do not use halfwidth quotation mark (") in parameter values.

      #Response

      #Synchronous response

      ParameterDescription

      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. 

      Example:T

      sign_type

      String

      Sign type

      Example:MD5

      sign

      String

      Sign value

      Example:8342649bb0b3b818c9bed5952503b3df

      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.

      Example:ILLEGAL_SIGN

      Business parameter

      qrcode

      String Required

      QR code

      Example:https://qr.alipay.com/9446219319446735

      #Error codes

      #Business errors

      Error codeDescription
      AE_BARCODE_GENERAL_CODE_FAIL_AND_RETRYModifying a QR code is failed. You can try to modify the QR code again.
      AE_BARCODE_GENERAL_CODE_FAIL_AND_NOT_RETRYModifying a QR code failed. You can try to modify the QR code again.
      ILLEGAL_ARGUMENTParameter error, check and then retry.

      #System errors

      Error code

      Description
      ILLEGAL_SIGNInvalid signature
      ILLEGAL_DYN_MD5_KEYInvalid dynamic key
      ILLEGAL_ENCRYPTInvalid encryption
      ILLEGAL_ARGUMENTInvalid argument
      ILLEGAL_SERVICEInvalid service name
      ILLEGAL_USERInvalid user ID
      ILLEGAL_PARTNERInvalid partner ID
      ILLEGAL_EXTERFACEInterface configure error.
      ILLEGAL_PARTNER_EXTERFACEPartner ID do not have access privilege.
      ILLEGAL_SECURITY_PROFILEThe key is not available.
      ILLEGAL_AGENTInvalid Agent ID
      ILLEGAL_SIGN_TYPEInvalid sign type
      ILLEGAL_CHARSETIllegal character set
      HAS_NO_PRIVILEGENo priviledge
      INVALID_CHARACTER_SETInvalid character set

      #Samples

      #Request

      https://intlmapi.alipay.com/gateway.do?service=alipay.commerce.qrcode.modifyStatus&partner=208xxxxxxxxx5500&_input_charset=UTF-8&sign_type=MD5&notify_url=https%3A%2F%2Fwww.mikascoffee.com%2Fnotify&timestamp=2019-09-10%2014%3A43%3A12&biz_type=OVERSEASHOPQRCODE&qrcode=https%3A%2F%2Fqr.alipay.com%2Focx09863drhqewuprmuzm68&status=STOP&sign=d337749dec8b1da1defb95567379287b


      #Response

      Request succeeds:

      copy
      <alipay>
          <is_success>T</is_success>
          <request>
              <param name="partner">208xxxxxxxxx5500</param>
              <param name="service">alipay.commerce.qrcode.modifyStatus</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">d337749dec8b1da1defb95567379287b</param>
              <param name="notify_url">https://www.mikascoffee.com/notify</param>
              <param name="sign_type">MD5</param>
              <param name="timestamp">2019-09-10 14:43:12</param>
              <param name="status">STOP</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:

      copy
      <alipay>
      <is_success>F</is_success>
      <error>ILLEGAL_SIGN</error>
      </alipay>