e-HDM API
With the VCR REST API, your website, CRM or accounting system files fiscal receipts with the State Revenue Committee itself. One HTTP request, one receipt: the response carries the fiscal number and the receipt link. The API is free, and so is VCR.
What the API does
- Sales, paid in cash, by card or mixed, with the receipt emailed to the buyer.
- Refunds, full or partial, naming the lines.
- Prepayments: taking one, checking the balance, applying it to a sale, refunding it.
- Catalogue, departments, cashiers: create and edit them. A sale can describe a new product inline, and it is added to the catalogue along with the receipt.
- Classifier search and the Central Bank of Armenia rate for sales in other currencies.
- Register management: activation, certificate upload, closure.
How it works
- JSON over HTTPS, with the key in the
X-API-Keyheader. Amounts and quantities travel as strings, so nothing is lost to rounding. - An
Idempotency-Keyheader: repeating the same request with the same key does not create a second receipt. - Errors name the exact field that failed, not a bare "400".
- The full specification in OpenAPI format: /api/v1/openapi.json.
Official SDKs
- TypeScript / Node.js
@blob-solutions/vcr-am-sdknpm- PHP
blob-solutions/vcr-am-sdkPackagist- Laravel
blob-solutions/laravel-vcr-am- WordPress
- the ready-made WooCommerce plugin, no code needed.
For other languages, generate a client from the OpenAPI specification.
How to start
- 1Create a register in VCR. Start with a sandbox one: it works without the tax authority, and its receipts are marked TEST.
- 2Create an API key under "API keys" for your business and send your first sale, using the example below.
Your first sale
bashcurl https://vcr.am/api/v1/sales \ -H "X-API-Key: $VCR_AM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "cashier": { "id": 1 }, "items": [{ "offer": { "externalId": "SKU-001" }, "department": { "id": 1 }, "quantity": "1", "price": "20000", "unit": "pc" }], "amount": { "nonCash": "20000" }, "buyer": { "type": "individual", "receipt": { "email": "buyer@example.com", "language": "en" } } }' - 3Register the real register with the tax authority (how to register an e-HDM) and switch the integration to its key. The requests look the same.
The details are in the API documentation. If you integrate many businesses at once, see the Partner API.