Skip to main content

Fiscalization of the self-employed

You can carry out fiscalization separately from the payment—that is, register the payment to the self-employed in the Federal Tax Agency and receive a receipt.

This method is available upon request. To learn more, apply to a Bank 131 manager.

If the receipt was issued by mistake, you can cancel the fiscalization.

How to perform fiscalization

Step 1. Create a payment session

Send a session/create request and obtain the session_id. The request body is empty.

Creating a session
curl -X POST \
https://demo.bank131.ru/api/v1/session/create \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{}'

Step 2. Send the fiscalization request

Create the request through the fiscalization method.

In the session_id parameter, pass the session identifier created at the previous step.

In the professional_income_taxpayer object, enter:

  • into the payer_type field, the legal value (if the payment is sent by a Russian company)
  • into the payer_tax_number field, the Taxpayer Identification Number (INN in Russia) of the company sending the payment (required if payer_type: legal)
  • into the tax_reference field, specify the Taxpayer Identification Number (INN in Russia) of the self-employed
  • into the services field, details for generating a check
Request example
curl -X POST
https://demo.bank131.ru/api/v1/fiscalization \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"session_id": "ps_2704",
"fiscalization_details": {
"professional_income_taxpayer": {
"tax_reference": "123456789012",
"payer_type": "legal",
"payer_tax_number": "3316004777",
"payer_name": "OOO Vector",
"services": [
{
"name": "Goods delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
}
},
{
"name": "Component delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
}
}
]
}
}
}'
Successful response example
{
"status": "ok",
"session": {
"id": "ps_2704",
"status": "in_progress",
"created_at": "2021-05-27T08:13:33.736384Z",
"updated_at": "2021-05-27T08:13:33.871729Z",
"payments": [
{
"id": "po_2705",
"status": "in_progress",
"created_at": "2021-05-27T08:13:33.860754Z",
"amount_details": {
"amount": 15000,
"currency": "rub"
},
"amounts": {
"gross": {
"amount": 15000,
"currency": "rub"
}
},
"fiscalization_details": {
"professional_income_taxpayer": {
"services": [
{
"name": "Goods delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 2
},
{
"name": "Component delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 1
}
],
"tax_reference": "123456789012",
"payer_type": "legal",
"payer_tax_number": "3316004777",
"payer_name": "ООО Vector"
}
}
}
]
}
}

Step 3. Wait to be notified of the result

Bank 131 will send you a payment_finished webhook. The body of the webhook will contain all the data that you sent in the request and a link to the receipt from the tax office in the fiscalization_details.receipt parameter.

Webhook example
{
"type": "payment_finished",
"session": {
"id": "ps_2704",
"status": "accepted",
"created_at": "2021-06-08T09:07:34.689353Z",
"updated_at": "2021-06-08T09:07:53.491653Z",
"payments": [
{
"id": "po_23695",
"status": "succeeded",
"created_at": "2021-06-08T09:07:42.591416Z",
"finished_at": "2021-06-08T09:07:53.319963Z",
"amount_details": {
"amount": 15000,
"currency": "rub"
},
"amounts": {
"net": {
"amount": 15000,
"currency": "rub"
},
"gross": {
"amount": 15000,
"currency": "rub"
}
},
"fiscalization_details": {
"professional_income_taxpayer": {
"services": [
{
"name": "Goods delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 2
},
{
"name": "Component delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 1
}
],
"tax_reference": "645493572846",
"receipt": {
"id": "203zpt6nu5",
"link": "https://himself-ktr.nalog.ru/api/v1/receipt/645493572846/203zpt6nu5/print"
},
"payer_type": "legal",
"payer_tax_number": "3316004790",
"payer_name": "ООО Vector"
}
}
}
]
}
}

How to cancel fiscalization

Occasionally it's necessary to cancel fiscalization and annul the issued check. For example, if the payment failed or the check was issued by mistake.

Send a fiscalization cancellation request

Create a session/refund request. Into the session_id field, enter the session identifier from the fiscalization that you are canceling. In the amount field, specify the entire check amount.

Request example
curl -X POST \
https://demo.bank131.ru/api/v1/session/refund \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"session_id": "ps_2704"
}'

Wait for a payment_refunded webhook

Bank 131 will send a payment_refunded webhook with a link to the annulled check.

Upon cancellation of fiscalization, Bank 131 transmits the tax office the reason for cancellation as “The check was generated erroneously.”

Webhook example
{
"type": "payment_refunded",
"session": {
"id": "ps_2704",
"status": "accepted",
"created_at": "2021-06-08T09:07:34.689353Z",
"updated_at": "2021-06-08T09:16:48.624196Z",
"payments": [
{
"id": "po_23695",
"status": "succeeded",
"created_at": "2021-06-08T09:07:42.591416Z",
"finished_at": "2021-06-08T09:07:53.319963Z",
"amount_details": {
"amount": 15000,
"currency": "rub"
},
"amounts": {
"net": {
"amount": 15000,
"currency": "rub"
},
"gross": {
"amount": 15000,
"currency": "rub"
}
},
"fiscalization_details": {
"professional_income_taxpayer": {
"services": [
{
"name": "Goods delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 2
},
{
"name": "Component delivery",
"amount_details": {
"amount": 5000,
"currency": "rub"
},
"quantity": 1
}
],
"tax_reference": "645493572846",
"receipt": {
"id": "203zpt6nu5",
"link": "https://himself-ktr.nalog.ru/api/v1/receipt/645493572846/203zpt6nu5/print"
},
"payer_type": "legal",
"payer_tax_number": "3316004790",
"payer_name": "ООО Vector"
}
},
"refunds": [
{
"id": "rf_249",
"status": "accepted",
"created_at": "2021-06-08T09:16:42.897606Z",
"finished_at": "2021-06-08T09:16:48.517040Z",
"amount_details": {
"amount": 15000,
"currency": "rub"
}
}
]
}
]
}
}