Skip to content

Register Fiscal Receipt API

This API sends a transaction to the fiscal system (OFD) to generate a fiscal receipt. It registers a cash payment in the OFD system.

Old endpoint (will be deprecated)

plaintext
POST BASE_URL/merchant/registerFiscalReceipt/

New Enpoint

plaintext
POST BASE_URL/merchant/fiscalization/register/

Endpoints

Method: POST
URL: BASE_URL/merchant/fiscalization/register/
Headers:

plaintext
  api-key: "merchant_secure_api_key"

Request body

FieldTypeRequiredDescription
transactionIdstringNoUnique identifier for the transaction. Required if it is a Card payment.
itemsarrayYesList of items to be included in the fiscal receipt.
externalIdstringNoUnique identifier for the fiscal receipt. Required if it is a Cash payment.
phoneNumberstringNoClient phone number who made the payment. Format: +998*******. Required if it is a Cash payment.

Item Object (inside items)

FieldTypeRequiredDescription
titlestringYesName of the item.
priceintegerYesPrice of the item (before discounts), expressed in tiyn
discountintegerNoDiscount applied to the item. Cannot exceed the price.
countintegerYesQuantity of the item. Must be at least 1.
codestringYesUnique code for the item.
vat_percentintegerYesVAT percentage applicable to the item.
package_codestringYesPackage type code.
pinflstringNoIndividual Taxpayer Number (must be 14 digits if provided).
tinstringNoTaxpayer Identification Number (must be 9 digits if provided). INN

💡 Note: pinfl or tin must be provided, but not both


Request Example

Example Request for Card Payment

json
 {
"transactionId": "e2da46c6-8c89-400e-8bd9-037297b2e8b1",
"items": [
		{
		"title": "title",
		"price": 10000,  # 10000 = 100 UZS
		"discount": 0,
		"count": 1,
		"code": "01902001001000000",
		"vat_percent": 12,
		"package_code": "1437667",
		"tin": "310100000"
		}
			]
}

Request example with eternalId and phoneNumber for Cash Payments

json
 {
	"externalId": "646",
  "phoneNumber": "+998910000000",
	"items": [
		{
		"title": "title",
		"price": 10000,  # 10000 = 100 UZS
		"discount": 0,
		"count": 1,
		"code": "01902001001000000",
		"vat_percent": 12,
		"package_code": "1437667",
		"tin": "310100000"
		}
			]
}

Response format

Success Response

json
json
{"result": {
  "ofd": {
    "receiptUrl": "https://ofd.example.com/receipt/12345",
    "terminalId": "T123456",
    "receiptId": 987654,
    "fiscalSign": "FS123ABC"
  }
}
}
FieldTypeDescription
receiptUrlstringURL to the generated fiscal receipt.
terminalIdstringTerminal ID used for the transaction.
receiptIdintegerUnique ID of the fiscal receipt.
fiscalSignstringFiscal signature of the receipt.

Error responses

Error CodeDescription
receipt_not_available_for_operationThe transaction is not eligible for fiscal receipt generation.
field_requiredRequired field missing (e.g., items).
ofd_check_already_generatedThe transaction already has a fiscal receipt.
invalid_amountThe total price of items does not match the transaction amount.
ofd_errorAn issue occurred while processing with OFD.
fiscal_receipt_not_generatedFiscal receipt was not generated successfully.