HrContract Docs

Emzagar / Hovita

Gateway, inbound auth, callback, mock sign

Vendor: Hovita — API host branded Emzagar.

Outbound (createEmzagarClient)

  • POST /auth/get/token
  • POST /get/pay/info
  • POST /gateway/link/get
  • POST /sign/get/status

Sandbox: https://apisandbox.emzagar.com
Production: https://api.emzagar.com

Inbound (Emzagar → your app)

EndpointPurpose
POST /api/emzagar/auth/tokenIssue HMAC bearer for Emzagar
GET|POST /api/emzagar/documentReturn base64 PDF for trackId (built on the fly from contentHtml; not read from an unsigned/ folder)
POST /api/emzagar/callbackReceive signed PDF → complete session + QR

Register these URLs in the Emzagar acquirer panel. EMZAGAR_PUBLIC_BASE_URL must be HTTPS reachable from Emzagar (tunnel in local dev).

Mock mode

EMZAGAR_MOCK=true skips the real gateway and opens /contract/sign/mock, which calls /api/contract/sign/mock-complete and runs the same completeContractSignSession path (signed file + QR stamp).

Sign roles

contractor | ceo — CEO credentials from EmzagarSettings singleton (id=global).

Critical product rule

Next Hovita round always uses the canonical signed/ PDF — never the QR-stamped file.