The translation was generated automatically and may contain mistakes

How to Form a Seller's Signature

Signature of the seller merchant_sign is passed as a parameter inside JSON objects data and guarantees that the payment window was formed with the knowledge of the seller and he is ready to receive payment with the specified amount and order number, as well as to charge a cashback at the specified time and in the specified amount.

merchant_sign SHA256 hash from string concatenation merchant_data and merchant_private_key where:

  • merchant_private_key - the private key of the seller, which you receive after the conclusion of the contract with the payment system;
  • merchant_data A BASE64 line from a JSON object that includes payment window parameters.
$merchant_sign = sha256($merchant_data.$merchant_private_key)

To form the signature of the seller:

  1. 1.
  2. 2.
  3. 3.
  4. 4.

Step 1. Create a JSON object merchant_data

JSON object merchant_data It includes payment window parameters : amount , cashback , currency , order_id and ts . Other parameters in merchant_data It shouldn't be.

**Example JSON object merchant_data **

JSON
{ "order_id": "1554384451.84747666", "cashback": { "pay_time": 1554384571, "amount_percent": "30" }, "ts": 1554384451, "amount": "1", "currency": "RUB" }

Step 2. Encode the generated object field merchant_data in the BASE64 line

Example field merchant_data encoded in the BASE64 string

eyJvcmRlcl9pZCI6IjE1NTQzODQ0NTEuODQ3NDc2NjYiLCJjYXNoYmFjayI6eyJwYXlfdGltZSI6MTU1NDM4NDU3MSwiYW1vdW50X3BlcmNlbnQiOiIzMCJ9LCJ0cyI6MTU1NDM4NDQ1MSwiYW1vdW50IjoiMSIsImN1cnJlbmN5IjoiUlVCIn0=

Step 3. Concatenate the BASE64 string obtained in the previous step with the seller’s private key

Private key of the seller merchant_private_key : 627fdbfa24232a5b62f9c295baa93f7db9752873.

Example of field concatenation data and private key

eyJvcmRlcl9pZCI6IjE1NTQzODQ0NTEuODQ3NDc2NjYiLCJjYXNoYmFjayI6eyJwYXlfdGltZSI6MTU1NDM4NDU3MSwiYW1vdW50X3BlcmNlbnQiOiIzMCJ9LCJ0cyI6MTU1NDM4NDQ1MSwiYW1vdW50IjoiMSIsImN1cnJlbmN5IjoiUlVCIn0=627fdbfa24232a5b62f9c295baa93f7db9752873

Step 4. From the string obtained after combining, calculate the cryptographic hash SHA256 in the HEX representation

86ebbd9e89f81e62db6e724707ace59b27fc4756

Done! Use the resulting value when sending a request in the parameter params.data.merchant_sign .