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:
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"
}
Response parameters
id— unique identifier of the created receiptact_id— identifier of the service acceptance certificate (акт оказанных услуг) the receipt is linked to;nullif the receipt was created without a linked certificatemerchant_inn— legal entity's INNmerchant_name— legal entity's nameclient— information about the self-employed individual linked to the receiptamount— receipt amount, in kopecksservice_name— service name on the receiptdescription— commentstatus— receipt status:created— the receipt has been createdprocessing— the receipt is being registeredawait_confirm— the receipt is registered and awaiting income confirmation from the self-employed individualfailed— an error occurred while generating the receiptcanceling— the receipt is being canceledcanceled— the receipt has been canceledready— the receipt is registered and ready for payoutpaid— the receipt has been successfully paid out
message— error message if the receipt was not successfully issuedremote_url— URL of the generated receiptcreated_at— receipt creation date