Skip to content

Partner API — overview

The Partner API is for products that invoice on behalf of their own customers — a POS issuing tiquetes for each restaurant, a marketplace billing for each seller. Each end customer becomes its own EmiteCR tenant; the partner provisions and manages them through a control plane, without any of those customers ever seeing EmiteCR.

Plane Credential Scope Lives in
Control plane x-partner-key: ecp_live_… The whole fleet — provision tenants, upload credentials, mint keys, register webhooks Your backend vault, one credential
Data plane x-api-key: ec_live_… One tenant — emit and read documents Your backend vault, one key per customer × environment

The control-plane credential is powerful (it touches every managed tenant), so it’s used only for rare operations — onboarding, configuration. The per-customer data-plane key is what runs in the hot path of every sale, and a leak is contained to a single customer.

Partner routes live under /v1/partner/* and authenticate with their own guard; they never mix with the tenant/JWT auth.

Your customer does — never the partner. Each end customer is its own EmiteCR tenant, registered with its own cédula, its own Hacienda certificate and its own consecutive numbering, and every comprobante is issued in its name. The partner operates the tenant on the customer’s behalf but is not the issuer and does not appear in the XML. The tenant belongs to the taxpayer: detaching it from the partner leaves it, and its fiscal history, intact.

Documents the partner issues itself — for example, invoicing its customers for its own subscription — are not Partner API traffic: the partner is the issuer there, so they are emitted from the partner’s own tenant like any other EmiteCR customer’s.

The Partner API currently serves Futura Byte’s own products; partner registration is not open to third parties.

A tenant provisioned by a partner is headless — no users, no memberships, and no EmiteCR notices (the partner hears everything by webhook). It’s white-label: the end customer never logs into EmiteCR. The one email that can go out is the document to the tenant’s customer, and it starts off: the partner turns it on with customerEmail in the config, and it then goes out in the tenant’s name, without EmiteCR’s brand.

Provisioning is idempotent per (partner, cédula): retrying the same cédula returns the existing tenant (created: false); a cédula already owned by another tenant returns 409 PARTNER_TENANT_CEDULA_CONFLICT.

Managed tenants aren’t billed in EmiteCR. Their features come from the partner’s entitlement template — a fixed feature set (invoicing, PDF branding, email attachments, unlimited reception) with a monthly document cap as a safety circuit breaker, not a commercial meter. The partner’s own agreement covers commercials.

  • Provision → upload ATV credentials → configure branches/terminals → mint a data-plane key. See Provisioning tenants.
  • Grant access — optionally invite a human owner (a real email invitation) so the customer can later self-serve.
  • Detach — revoke the partner’s keys and unlink; the fiscal history is never deleted.
  • Release — undo a tenant provisioned by mistake (wrong cédula): keys revoked, ATV credentials deleted, cédula freed. Only while it has no production documents; provisioning that cédula again revives the same tenant.
  • Revoke the partner — cascades: every key it minted is revoked at once.
  • Provisioning tenants — the onboarding calls.
  • Partner webhooks — one endpoint per environment for the whole fleet.
  • TypeScript SDK — @emitecr/sdk/partner is the typed control-plane client. It isn’t on npm yet: partner integrations receive it directly from Futura Byte.
  • Two-phase emit — partner-minted keys can sign with ?submit=async: the consecutivo/clave return instantly (voucher printing) and EmiteCR submits to ATV in the background, pushing the verdict through your partner webhook endpoint.