Skip to content

Sending a Callback

Sends a callback with receipt information when its status changes. The callback is configured in the merchant's personal account, in the shop's technical settings. Select the callback type SMZ Receipt Callback.

Method: POST

Parameters

Name Data type Description
receipt_id integer Unique receipt identifier
status string Receipt status
message string Error message if the receipt was not issued successfully
remote_url string URL of the generated receipt
merchant_inn string Legal entity's INN
merchant_name string Legal entity's name
client json Information about the self-employed individual associated with the receipt
{
  "receipt_id": 22,
  "status": "canceled",
  "message": null,
  "receipt_url": "https://lknpd.nalog.ru/api/v1/receipt/660911425203/211ff3ctvd/print",
  "merchant_name": "Рога и Копыта",
  "merchant_inn": "4086969419",
  "client": {
    "inn": "660911425203"
  }
}

Headers

The request headers also include:

  • X-Api-Key — unique shop identifier
  • X-Signature — request signature

Building the signature:

sha256({api-key}{request_body}{secret-key})

where request_body is the request body as a string:

{\"receipt_id\":22,\"status\":\"canceled\",\"message\":null,\"receipt_url\":\"https://lknpd.nalog.ru/api/v1/receipt/660911425203/211ff3ctvd/print\",\"merchant_name\":\"РогаиКопыта\",\"merchant_inn\":\"4086969419\",\"client\":{\"inn\":\"660911425203\"}}

Callback delivery

The callback is considered successfully delivered if the merchant's server returns HTTP code 200. Any other HTTP code in the response means the request was not delivered.

If the first attempt fails, five more attempts will be made at 10-minute intervals.