Integrate 1C-Bitrix with Taxcom EDO System
Imagine: 150 orders per day, each requiring its own UPD. A manager prepares the document in 1C, then manually uploads it to the Taxcom personal account — spending 15–20 minutes. Result: 40 hours per week on routine. Errors in details lead to rejections in 12% of cases, and counterparties delay signing by an average of 4 days. The situation worsens if the client has specific document requirements (medical goods with serials and expiration dates).
We have specialized in Bitrix for over 10 years and have completed 30+ EDO integration projects. Our standard implementation is automatic UPD sending from Bitrix via the Taxcom operator without manager involvement: signing status is tracked in the admin panel. This approach reduces order processing time by 80% and eliminates manual entry errors. At 100 orders per month, savings reach 350,000 rubles per year. For a B2B construction materials supplier, the implementation reduced document processing costs by 1.2 million rubles annually.
More about account setup
To connect the cloud signature, simply register in the Taxcom personal account, obtain a Client ID and Secret. Our PHP client then automatically receives a token.Common Problems Companies Face
- Manual document export. The manager creates a UPD in 1C, then uploads it to the Taxcom personal account — 15–20 minutes per order. At 50 orders per day, that's 12–17 hours of pure routine.
- No link to order statuses. The document is not sent automatically upon shipment — it may be forgotten or delayed.
- Difficulties with counterparties. Finding a new counterparty's BoxId takes time, and errors in details lead to document rejection.
- Incomplete document package. For medical goods, acts with serials and expiration dates are needed — the standard UPD does not contain them.
Our experience shows that 90% of these problems are solved by a proper integration of Bitrix with Taxcom via REST API. Get a consultation on your project.
How Taxcom Integration with Bitrix Works
Authentication is done via OAuth 2.0 Client Credentials. We cache the token for 3500 seconds (slightly less than its lifetime) to avoid hitting the API on every request:
class TaxcomClient
{
private string $baseUrl = 'https://edo.taxcom.ru/api/v1';
private string $accessToken;
public function __construct(
private string $clientId,
private string $clientSecret
) {
$this->accessToken = $this->getAccessToken();
}
private function getAccessToken(): string
{
$cached = \Bitrix\Main\Data\Cache::createInstance();
if ($cached->startDataCache(3500, 'taxcom_token', '/taxcom/')) {
$response = $this->httpPost('https://auth.taxcom.ru/oauth/token', [
'grant_type' => 'client_credentials',
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
'scope' => 'edo',
]);
$cached->endDataCache(['token' => $response['access_token']]);
return $response['access_token'];
}
$data = $cached->getVars();
return $data['token'];
}
}
Creating and Sending a Document
After obtaining the token, we generate the document XML and send it in three steps: file upload, signing, message sending:
public function sendDocument(\Bitrix\Sale\Order $order): array
{
$xmlContent = $this->generateUPDXml($order);
// Step 1: upload file
$uploadResponse = $this->apiPost('/documents/upload', [
'FileName' => "UPD_{$order->getId()}.xml",
'Content' => base64_encode($xmlContent),
'ContentType' => 'application/xml',
]);
$fileId = $uploadResponse['FileId'];
// Step 2: signing (CryptoPro or Taxcom cloud signature)
$signature = $this->signFile($xmlContent);
// Step 3: send document
return $this->apiPost('/messages/send', [
'RecipientBoxId' => $this->getRecipientBoxId($order),
'Documents' => [[
'FileId' => $fileId,
'Signature' => base64_encode($signature),
'DocType' => 'UniversalTransferDocument',
'Function' => 'ДОП',
]],
]);
}
Taxcom supports a cloud signature via the "Taxcom-Crypto" service — the certificate is stored on Taxcom's side, and signing is done through the API without requiring CryptoPro on the server. This simplifies infrastructure and reduces costs compared to purchasing a separate license key.
Finding a Counterparty's BoxId
On first contact with a new counterparty, the system searches for their BoxId by INN/KPP:
public function findRecipientBoxId(string $inn, string $kpp = ''): ?string
{
$response = $this->apiGet('/organizations/search', [
'inn' => $inn,
'kpp' => $kpp,
]);
foreach ($response['Organizations'] as $org) {
if ($org['Inn'] === $inn && ($kpp === '' || $org['Kpp'] === $kpp)) {
return $org['BoxId'];
}
}
return null;
}
The found identifier is saved in the buyer's user field (UF_TAXCOM_BOX_ID) — subsequent sends proceed without further queries.
Why Choose Cloud Signature?
Taxcom cloud signature is an alternative to purchasing and setting up CryptoPro. Key differences:
| Criteria | CryptoPro on Server | Taxcom Cloud Signature |
|---|---|---|
| License cost | + license per server | 0, included in EDO tariff |
| Installation required | + setup and configuration | not required |
| Key storage | on client's server | at operator (FSS certified) |
| API integration | + need to write wrapper | ready-made function in API |
Cloud signature is 40–60% cheaper than the classic one due to no licenses and maintenance.
Case Study: EDO for a Medical Distributor (from our practice)
A medical consumables distributor, ~400 B2B clients, working with government hospitals and private clinics. Government institutions often have their own EDO operators with roaming, some work directly with Taxcom.
Peculiarity: besides UPD, medical goods require acceptance acts with extended requisites (serial, expiration date, registration certificate). The standard UPD format does not cover all fields.
Solution:
We developed a composite document: UPD + annex with extended medical requisites as an additional XML file in the same Taxcom message. Both files are signed with one signature.
$documents = [
[
'FileId' => $updFileId,
'Signature' => base64_encode($updSignature),
'DocType' => 'UniversalTransferDocument',
],
[
'FileId' => $annexFileId,
'Signature' => base64_encode($annexSignature),
'DocType' => 'Attachment', // supplement to main document
'Comment' => 'Medical product requisites',
],
];
In Bitrix, product requisites (serial, expiration date) are stored as order item properties. When generating XML, they are extracted from \Bitrix\Sale\BasketItem::getPropertyCollection().
| Metric | Before | After |
|---|---|---|
| Average time to send document package | 45 min/order | Automatic upon shipment |
| Document package completeness | Regular complaints from pharmacies | 100% according to checklist |
| Signing status tracking | Monitored via phone calls | Auto-monitoring, notifications |
Savings for the client amounted to 1.2 million rubles per year due to reduced manual labor and late document penalties.
Monitoring Document Queue
For document flow control — an admin section in Bitrix with a table of sent documents:
- Order → Taxcom Document → Status → Signing Date
Data is taken from the local_taxcom_documents table + periodic polling of the Taxcom API to update statuses (cron every 10 minutes).
What's Included in the Work
- Taxcom account setup — obtaining Client ID/Secret, cloud signature (if required).
- PHP client development — class for REST API interaction, token caching, error handling.
- XML generation — creating UPD, acts, composite documents based on order data.
- Counterparty directory — loading BoxId, saving in Bitrix user field.
- Event-driven sending — binding to order statuses: shipment → automatic sending.
- Status monitoring — admin panel with table, error notifications, auto-update.
- Documentation and training — code handover, manager instructions, launch consultation.
Timelines and How to Start
Basic integration (UPD, cloud signature, monitoring) takes 3 to 5 weeks. Extended integration with composite documents and specific formats takes 6 to 9 weeks. Cost is calculated individually after analyzing your document flow. We will assess your project within 2 business days — contact us for a consultation and accurate estimate. Order a test run on one document type.







