Simply Pay (English)
    Simply Pay (English)
    • Access Guidelines
    • Accessory Code Table
    • Signature Example
    • Solutions to common problems with signatures
    • payment
      • Payment Order Create
        POST
      • Payment Order Query
        GET
    • payout
      • Payout Order Create
        POST
      • Payout Order Query
        GET
    • account
      • Balance Query
        GET
    • webhook
      • payment webhook
      • payout webhook

    Solutions to common problems with signatures

    1. amount value issue.#

    Invalid decimal places in the category .0 .00 will be automatically erased when receiving and converting. Please remove some invalid decimal places in .0 .00.

    2. the encryption method problem.#

    The system signature encryption method is sha256, not md5.

    3. extra field value handling issues.#

    This is commonly seen in the Payment on Behalf section. In order to ensure the consistency of the signature string, when there is an extra field, the signature needs to be converted to a Map collection of the value of extra, according to the Unicode of the key for sorting. Then the parameters in the Map in the form of key1=value1&key2=value2&key3=value3 spliced into a new string as the value of the extra.
    The example is as follows:
    Request Data:
    {
        "amount":100,
        "appId":"appidxxx",
        "currency":"INR",
        "extra":{
            "accountName":"TEST",
            "accountNo":"123@gmail.com",
            "bankCode":"EMAIL"
        },
        "merOrderNo":"orderxxx",
        "notifyUrl":"http://example.com/notify"
    }
    
    The extra field value is processed as:
    "accountName=TEST&accountNo=123@gmail.com&bankCode=EMAIL"
    
    The final string to be signed:
    "amount=100&appId=appidxxx&currency=INR&extra=accountName=TEST&accountNo=123@gmail.com&bankCode=EMAIL&merOrderNo=orderxxx&notifyUrl=http://example.com/notify&key=xxxx"

    4. appId and signing key mismatch problem.#

    If there are two pairs of appId+keys in the system, please note that one pair is used for collection and the other pair is used for payment, so don't confuse them.
    If only one pair of appId+key exists in the system, ignore this part.
    (The specific appId+key can be viewed in the "Developer" page of the merchant's management background, if the timeout is not displayed, please reset it directly: when resetting, you need to fill in the login password of the management background).

    5. other field values for obj objects when shown correctly in the signature issue.#

    If the value of other parameters is an object, it will be converted to a JSON string and then participate in the encryption.
    This part is mostly seen in the collection of the order when the response data processing, which "params" field value for obj.
    The example is as follows:
    Response data:
    {
        "amount":100,
        "params":{
            "qrcode":"00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br/spi/v2/cobv/255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti Gestao Financeira6011Pato Branco61088550338162070503***63045F27",
            "url":"https://h5.simplypay.vip/payment/94230311013500999186060015?amount=100&currency=INR&qrcode=00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br%2Fspi%2Fv2%2Fcobv%2F255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti%20Gestao%20Financeira6011Pato%20Branco61088550338162070503***63045F27"
        },
        "orderStatus":1,
        "orderNo":"94230311013500999186060015",
        "currency":"INR",
        "createTime":1678498652499,
        "merOrderNo":"orderxxx",
        "updateTime":1678498652719
    }
    
    params field value after conversion:
    '{"qrcode":"00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br/spi/v2/cobv/255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti Gestao Financeira6011Pato Branco61088550338162070503***63045F27","url":"https://h5.simplypay.vip/payment/94230311013500999186060015?amount=100&currency=INR&qrcode=00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br%2Fspi%2Fv2%2Fcobv%2F255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti%20Gestao%20Financeira6011Pato%20Branco61088550338162070503***63045F27"}'
    
    The final string to be signed:
    "amount=100&createTime=1678498652499&currency=INR&merOrderNo=orderxxx&orderNo=94230311013500999186060015&orderStatus=1&params={"qrcode":"00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br/spi/v2/cobv/255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti Gestao Financeira6011Pato Branco61088550338162070503***63045F27","url":"https://h5.simplypay.vip/payment/94230311013500999186060015?amount=100&currency=INR&qrcode=00020126940014BR.GOV.BCB.PIX2572api-pix.bancobs2.com.br%2Fspi%2Fv2%2Fcobv%2F255f36f7-6d7d-48fc-9f56-47181be823aa520400005303986540530.005802BR5924Voluti%20Gestao%20Financeira6011Pato%20Branco61088550338162070503***63045F27"}&updateTime=1678498652719&key=xxxx"
    Note part: In order to avoid some programming languages in the map object to json string children, the default sorting and bad adjustment of the problem, this system in dealing with this kind of data, have been the map value in accordance with the key Unicode ascending order.

    6. some fields are not involved in the signature problem.#

    It is common that the signature is not matched when the response is returned. In this system, all business fields are required to participate in signature processing. In order to cope with the increase or decrease of business fields, it is recommended that the participating fields be flexibly adapted when signing the data (the fixed splicing pattern of strings will not be able to adapt to the increase or decrease of fields).
    Modified at 2024-06-20 07:32:24
    Previous
    Signature Example
    Next
    Payment Order Create
    Built with