Overview
Preparing the documents
Confirming the payment method starts the pipeline:
The portal shows the document cards as soon as they are ready. Worker B does
not email the customer: the customer is already in the wizard. The View
button opens a preview that the portal serves itself; horizon-api also exposes
GET /api/v3/contract/{id}/preview.pdf?kind=contract|annex, which returns the
best PDF it has: sealed, else original, else a preliminary one generated on
the fly.
POST /api/v3/contract/{id}/signature/send lets the signature step start the
pipeline itself if it is not running yet. When the contract is already in the
signing pipeline it starts nothing and answers { stage } or, once Worker B
opened the group, documents, signing and stage, republished as
contract.signature_requested; from pending_review or
awaiting_enterprise_signature it answers 409.
Requesting a code
POST /api/v3/signature/{id}/signer/{signer}/otp sends a 6-digit one-time
code to the signer’s email and answers the masked address and the expiry
time. Codes expire, and both resends and wrong attempts are limited.
The signing gesture
POST /api/v3/signature/{id}/signer/{signer}/sign with action: "sign" and
the otp_code signs every document of the group at once. The portal
sends only the code; when document_number is omitted, the backend uses the
signer’s RUT verified within the contract window (for the primary signer with
no identity record at all, the RUT on their person account or, else, the RUT
of the contract’s account) and records it, hashed, in the
evidence.
The API also accepts action: "reject" with a rejection_reason. The
portal does not send it; see
Flows — Exceptions.
Before the code is sent or the gesture is registered, the backend checks:
After each signature
The signing milestones (signature requested, status changes, contract signed)
are also published on
private-contract-{id}, so every open tab follows the
signature live. See
Realtime — Channels & Events.
Company signers
Customer seats sign in their signing order. A person contract has a single seat, so the order never applies.- Administrator N can request a code or sign only after administrator N−1 signed.
- Each administrator signs the same PDFs, after their own identity and summary steps.
- When an administrator signs and others are still pending, the next one receives their one-time link right away.
Operations review
The customer does not wait for this step: right after signing, each signer creates their portal password and leaves for the customer portal (see Session and access). When every customer signer has signed, the contract waits inpending_review
until Maihue operations decide with PATCH /api/v3/contract/{id}/review
(permission contract:review):
- Approve moves the contract to
awaiting_enterprise_signatureand queues the enterprise worker (contract-enterprise-sign), which applies the countersignature of Maihue’s representatives and seals the PDFs. - Reject requires a reason and cancels the signature group and the
contract. It is also allowed from
awaiting_enterprise_signature.
Each workflow says whether Maihue signs after the customers (
last, used by
the seeded workflows) or before them (first). With first, the
countersignature runs when the group opens and there is no review step.Evidence export
GET /api/v3/contract/{id}/evidence (permission contract:evidence) exports
the evidence package of a contract — the audit chain and the evidence of
each signer — for compliance.