Skip to content

Generating a Receipt

Method for creating and generating a receipt for a self-employed individual.

URL

Method: POST

  • Production: https://api.baas.kvell.group/v1/smz/receipts
  • Stage: https://api.baas.stage.kvell.group/v1/smz/receipts

Request parameters

Name
Data type Required Description
inn string Yes Self-employed individual's INN
amount integer Yes Receipt amount in kopecks
service_name string Yes Service name on the receipt
description string No Comment
merchant_inn string No If not passed, the INN of the requesting legal entity is used
merchant_name string No If not passed, the name of the requesting legal entity is used

Request example

{
  "inn": "230900456295",
  "amount": 100,
  "service_name": "Test service 2",
  "description": "string",
  "merchant_inn": "7819853660", 
  "merchant_name": "Рога и Копыта"
}

Request headers

Name Data type Required Description
X-Api-Key string Yes Unique shop identifier
X-Signature string Yes Signature

The X-Signature signature is generated by concatenating X-Api-Key, inn, amount, and secret_key. It is computed as sha256 of the resulting string:

sha256({X-Api-Key}{inn}{amount}{secret_key})

where secret_key is the secret key found in the merchant's shop settings.

Response

Response example

{
  "id": 0,
  "act_id": null,
  "merchant_inn": "string",
  "merchant_name": "string",
  "client": {
    "id": 0,
    "inn": "string",
    "phone": "string",
    "email": "string",
    "created_at": "2024-07-10T18:26:56.931Z"
  },
  "amount": 0,
  "service_name": "string",
  "description": "string",
  "status": "string",
  "message": "string",
  "remote_url": "string",
  "created_at": "2024-07-10T18:26:56.931Z"
}
{
  "errors": [
    {
      "code": 0,
      "message": "string"
    }
  ]
}

Response parameters

  • id — unique identifier of the created receipt
  • act_id — identifier of the service acceptance certificate (акт оказанных услуг) the receipt is linked to; null if the receipt was created without a linked certificate
  • merchant_inn — legal entity's INN
  • merchant_name — legal entity's name
  • client — information about the self-employed individual linked to the receipt
  • amount — receipt amount, in kopecks
  • service_name — service name on the receipt
  • description — comment
  • status — receipt status:
    • created — the receipt has been created
    • processing — the receipt is being registered
    • await_confirm — the receipt is registered and awaiting income confirmation from the self-employed individual
    • failed — an error occurred while generating the receipt
    • canceling — the receipt is being canceled
    • canceled — the receipt has been canceled
    • ready — the receipt is registered and ready for payout
    • paid — the receipt has been successfully paid out
  • message — error message if the receipt was not successfully issued
  • remote_url — URL of the generated receipt
  • created_at — receipt creation date