Мы используем cookie-файлы
Хорошо
Directory of API methods - Receipts (for the Russian Federation)

You can use the API to get information about receipts for which you have sent data via Paybox.

To access the receipts resource, the following methods will be available:
  • POST v1/receipts - Creating a receipt
  • GET v1/receipts - Getting a list of receipts
  • GET v1/receipts/{receipt_id} - Getting information on the receipt
Receipt object

The receipt object (pg_receipt) contains up-to-date information about the receipt created for payment or refund.
Nested parameters of the company object
Nested parameters of the positions array
Nested parameters of the positions.mark_quantity object
Nested array parameters positions.payment_object_industry_details
Nested parameters of the positions.mark_code_type object
Nested parameters of the positions.supplier object
Nested array parameters settlements
Nested parameters of the additional_user_props object
Nested array parameters receipt_industry_details
Nested parameters of the receipt_operating_details object

{
    "data": {
        "merchant_id": "542088",
        "receipt_id": "bb938d6c-6c1c-44a0-aa54-32c3e14fddb7",
        "operation_type": "sell",
        "receipt_format": "ru_1_05",
        "status": "registered",
        "fiscal_document_number": 10605,
        "fiscal_storage_number": "9999078900006286",
        "fiscal_attribute": 923085333,
        "registered_at": "29.03.2023 17:37:00",
        "created_at": "29.03.2023 20:39:16",
        "fiscal_provider_id": "5e402526-0c20-41c3-b30a-b52e7f903922",
        "positions": [
            {
                "name": "Товар №1",
                "quantity": 2,
                "price": 50,
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 100
            },
            {
                "name": "Товар №2",
                "quantity": 1,
                "price": 100,
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 100
            }
        ],
        "total": 200,
        "settlements": [
            {
                "type": "cashless",
                "sum": 200
            }
        ],
        "receipt_method": "separately",
        "error": null,
        "link": "https: //consumer.1-ofd-test.ru/v1?fn=9999078900006286&fp=923085333&i=10605&t=20230329T173700&s=7&n=2",
        "payment_id": "764239789"
    }
}

Creating a receipt
The request allows you to send the data for the formation of the receipt to your online cash register.

Using this request, you can generate a prepayment offset receipt if you use the Receipt method with payment. Also, you need to use this request to create a receipt and a receipt return receipt, if you have enabled the Receipt method separately from the payment.

Вложенные параметры объекта customer
Nested parameters of the company object
Nested parameters of the positions array
Nested parameters of the positions.mark_quantity object
Nested array parameters positions.payment_object_industry_details
Nested parameters of the positions.mark_code_type object
Nested parameters of the positions.supplier object
Nested array parameters settlements
Nested parameters of the additional_user_props object
Nested array parameters receipt_industry_details
Nested parameters of the receipt_operating_details object
Request example

curl --location --request POST 'https://api.freedompay.uz/v5/receipts' \
--header 'Accept: application/json' \
--header 'X-JWS-Signature: {{Ваш JWS-токен}}' \
--header 'Content-Type: application/json' \
--data-raw \
'{
  "receipt_format": "ru_1_05",
  "merchant_id": 542088,
  "payment_id": 764239789,
  "operation_type": "sell",
  "customer": {
    "email": "[email protected]"
  },
  "positions": [
    {
      "price": 50.00,
      "name": "Товар №1",
      "quantity": 2.00,
      "vat_code": "vat_20",
      "payment_method": "full_payment",
      "payment_object": "goods"
    },
    {
      "price": 100.00,
      "name": "Товра №2",
      "quantity": 1.00,
      "vat_code": "vat_20",
      "payment_method": "full_payment",
      "payment_object": "goods"
    }
  ],
  "settlements": [
    {
      "type": "cashless",
      "sum": 200.00
    }
  ]
}'

Example of the response body

{
    "data": {
        "merchant_id": "542088",
        "receipt_id": "adec9d48-be2a-4bf4-8ca1-3432fd8920c5",
        "operation_type": "sell",
        "receipt_format": "ru_1_05",
        "status": "pending",
        "fiscal_document_number": "",
        "fiscal_storage_number": null,
        "fiscal_attribute": "",
        "registered_at": null,
        "created_at": "10.04.202315:34:12",
        "fiscal_provider_id": null,
        "positions": [
            {
                "name": "Товар №1",
                "quantity": 2,
                "price": 50,
                "measure": "piece",
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 10
            },
            {
                "name": "Товар №2",
                "quantity": 1,
                "price": 100,
                "measure": "piece",
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 2
            }
        ],
        "total": 200,
        "settlements": [
            {
                "type": "cashless",
                "sum": 200
            }
        ],
        "company": {
            "inn": "5544332219",
            "email": "[email protected]",
            "tax_system": "osn",
            "payment_address": "shop.ru"
        },
        "receipt_method": "separately",
        "error": null,
        "link": null,
        "payment_id": "764239789"
    }
}

Getting a list of receipts

This request allows you to get a list of store receipts filtered by certain criteria. The criteria can be different, for example, the list can be filtered by the number of payment or refund, by the name of the product or the amount of the receipt.

Request parameters
nested array parameters created_at
Request example

curl --location --globoff --request GET 'https://api.freedompay.uz/v5/receipts?created_at[gte]=2023-03-01&created_at[lte]=2023-03-31&offset=1&limit=2&utc=3' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'

Example of the response body

{
    "data": [
        {
            "merchant_id": "542088",
            "receipt_id": "8e6fa8d3-bf01-4a93-b453-4a018f15318d",
            "operation_type": "sell",
            "receipt_format": "ru_1_05",
            "status": "registered",
            "fiscal_document_number": "11900",
            "fiscal_storage_number": "9999078900006369",
            "fiscal_attribute": "790695398",
            "registered_at": "30.03.202315:20:00",
            "created_at": "30.03.202315:20:29",
            "fiscal_provider_id": "da7d533f-b547-46ca-b127-d0b2ba6cf9f1",
            "positions": [
                {
                    "name": "Товар №1",
                    "quantity": 1,
                    "price": 100,
                    "measure": "piece",
                    "vat_code": "vat_20",
                    "payment_method": "full_payment",
                    "payment_object": "goods",
                    "sum": 100
                },
                {
                    "name": "Товар №2",
                    "quantity": 2,
                    "price": 50,
                    "measure": "piece",
                    "vat_code": "vat_20",
                    "payment_method": "full_payment",
                    "payment_object": "goods",
                    "sum": 100
                }
            ],
            "total": 200,
            "settlements": [
                {
                    "type": "cashless",
                    "sum": 200
                }
            ],
            "company": {
                "inn": "5544332219",
                "email": "[email protected]",
                "tax_system": "osn",
                "payment_address": "shop.ru"
            },
            "receipt_method": "separately",
            "error": null,
            "link": "https://consumer.1-ofd-test.ru/v1?fn=9999078900006369&fp=790695398&i=11900&t=20230330T152000&s=7&n=1",
            "payment_id": "764239789"
        },
        {
            "merchant_id": "542088",
            "receipt_id": "4e7dcdef-ccfc-485c-b63f-1f83dc66845c",
            "operation_type": "sell",
            "receipt_format": "ru_1_05",
            "status": "registered",
            "fiscal_document_number": "11552",
            "fiscal_storage_number": "9999078900006286",
            "fiscal_attribute": "3717461957",
            "registered_at": "30.03.202315:10:00",
            "created_at": "30.03.202315:12:37",
            "fiscal_provider_id": "f3b26edd-a098-42c9-952c-e981a0cff900",
            "positions": [
                {
                    "name": "Товар №1",
                    "quantity": 1,
                    "price": 300,
                    "measure": "piece",
                    "vat_code": "vat_20",
                    "payment_method": "full_payment",
                    "payment_object": "goods",
                    "sum": 300
                },
                {
                    "name": "Товар №2",
                    "quantity": 3,
                    "price": 50,
                    "measure": "piece",
                    "vat_code": "vat_20",
                    "payment_method": "full_payment",
                    "payment_object": "goods",
                    "sum": 150
                }
            ],
            "total": 450,
            "settlements": [
                {
                    "type": "cashless",
                    "sum": 150
                }
            ],
            "company": {
                "inn": "5544332219",
                "email": "[email protected]",
                "tax_system": "osn",
                "payment_address": "shop.ru"
            },
            "receipt_method": "separately",
            "error": null,
            "link": "https://consumer.1-ofd-test.ru/v1?fn=9999078900006286&fp=3717461957&i=11552&t=20230330T151000&s=7&n=1",
            "payment_id": "763548541"
        }
    ]
}

In response to the request, a list of receipts will be returned, taking into account the filters sent. The list will contain information about receipts for the entire period of activity of a particular store, the ID of which was transmitted when generating the JWT. The list will be sorted by the time the receipts were created in descending order.

Getting information on the receipt

The request allows you to get information about the current status of the receipt by its unique identifier.

Request example

In the URL, you need to pass the ID of the receipt to Paybox.


curl --location --request GET 'https://api.freedompay.uz/v5/receipts/1a624e49-41c3-4d0f-84d3-497483e81153' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'

Example of the response body
In response to the request, the receipt object will be sent in the current status.

{
    "data": {
        "merchant_id": "542088",
        "receipt_id": "1a624e49-41c3-4d0f-84d3-497483e81153",
        "operation_type": "sell",
        "receipt_format": "ru_1_05",
        "status": "registered",
        "fiscal_document_number": "9322",
        "fiscal_storage_number": "9999078900006369",
        "fiscal_attribute": "855240058",
        "registered_at": "28.03.202314:24:00",
        "created_at": "28.03.202317:24:02",
        "fiscal_provider_id": "509a911b-5d96-43ac-9df0-3e5d05cfc16a",
        "positions": [
            {
                "name": "Товар №1",
                "quantity": 1,
                "price": 100,
                "measure": "piece",
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 100
            },
            {
                "name": "Товар №2",
                "quantity": 2,
                "price": 50,
                "measure": "piece",
                "vat_code": "vat_20",
                "payment_method": "full_payment",
                "payment_object": "goods",
                "sum": 100
            }
        ],
        "total": 100,
        "settlements": [
            {
                "type": "cashless",
                "sum": 100
            }
        ],
        "company": {
            "inn": "5544332219",
            "email": "[email protected]",
            "tax_system": "osn",
            "payment_address": "shop.ru"
        },
        "receipt_method": "together",
        "error": null,
        "link": "https://consumer.1-ofd-test.ru/v1?fn=9999078900006369&fp=855240058&i=9322&t=20230328T142400&s=7&n=1",
        "payment_id": "762881172"
    }
}