> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital contract

> How a new customer contracts and signs their Maihue service from the e-mail link, step by step, and what happens next.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/contract/{id}` (public, with a one-time link) |
| Menu | Outside the menu: entered from the contract e-mail |
| Feature flag | None |
| Who sees it | The account holder and, in companies, each signing administrator |
| Last verified | 2026-11-10 against `develop` (`c10d24f33d`) |

## What it is for

The digital contract is the wizard a new customer uses to get their Maihue service ready without paper: they validate their identity, review the contract summary, enrol a payment method, sign their documents electronically and create their portal password. They enter with a one-time link received by e-mail, without needing a password. **Nothing is charged during the wizard.**

## How to get there

1. The customer receives a Maihue e-mail to continue their contracting.
2. They open the link, which takes them to `/{locale}/contract/{id}?action_link=…`.
3. The wizard shows the step where they left off; if they come back later with a new link, they resume from there.

![Digital contract journey: e-mail link, Welcome, Validate ID, Contract summary, Payment method, Sign documents and Create password, which leads to the portal. The Reject button is available from Validate ID to Sign; Summary and Payment can be revisited before signing.](https://mintcdn.com/bbrands/w6DX1nTsRjzB7VQp/images/portal-customer-manual/digital-contract-navigation.svg?fit=max\&auto=format\&n=w6DX1nTsRjzB7VQp\&q=85\&s=c6f4b2e7eb8bed0af3f1e07a3d49850c)

Digital contract journey

## What the customer sees

> [tab] Desktop
>
> ![Contract wizard with the step bar on top and the Reject button on the right.](https://mintcdn.com/bbrands/_NKN45Wilc9LnqQU/images/portal-customer-screens/digital-contract/identity.en.desktop.webp?fit=max\&auto=format\&n=_NKN45Wilc9LnqQU\&q=85\&s=9173786e618321f2d328b89a533580d5)
>
> The step bar and the Reject button

> [tab] Mobile
>
> ![Contract wizard with the step bar on top and the Reject button on the right.](https://mintcdn.com/bbrands/_NKN45Wilc9LnqQU/images/portal-customer-screens/digital-contract/identity.en.mobile.webp?fit=max\&auto=format\&n=_NKN45Wilc9LnqQU\&q=85\&s=6eaa9514633d37830b72457e9e202bff)
>
> The step bar and the Reject button

| Element | What it does |
| - | - |
| Step bar | **Validate ID** → **Contract Summary** → **Payment Method** → **Sign Documents** → **Create Password** |
| **Reject** | Opens the confirmation to abandon the contracting (from Validate ID to Sign) |
| Back arrow | Goes back to Summary or Payment before signing |

## Step by step

**1. Welcome**

Accepts terms and privacy. See [Welcome](https://docs.bbrands.io/portal-customer/digital-contract/welcome.md).

**2. Validate ID**

RUT and document number, checked with the Civil Registry. See [Validate ID](https://docs.bbrands.io/portal-customer/digital-contract/validate-id.md).

**3. Contract Summary**

Reads and accepts the key points. See [Contract summary](https://docs.bbrands.io/portal-customer/digital-contract/contract-summary.md).

**4. Payment Method**

Enrols a card or PAC and picks monthly or annual. See [Payment method](https://docs.bbrands.io/portal-customer/digital-contract/payment-method.md).

**5. Sign Documents**

Reviews each document and signs with a code from the e-mail. See [Sign documents](https://docs.bbrands.io/portal-customer/digital-contract/sign-documents.md).

**6. Create Password**

Creates the password and enters the portal signed in. See [Create password](https://docs.bbrands.io/portal-customer/digital-contract/create-password.md).

### Abandon the contracting

With **Reject** the customer sees the confirmation "Do you want to abandon the process?": "If you abandon now, progress on this contracting will be lost and you will have to start again." They can carry on with **No, continue** or leave with **Abandon process**.

> [tab] Desktop
>
> ![Confirmation to abandon the process with the No, continue and Abandon process buttons.](https://mintcdn.com/bbrands/_NKN45Wilc9LnqQU/images/portal-customer-screens/digital-contract/abandon.en.desktop.webp?fit=max\&auto=format\&n=_NKN45Wilc9LnqQU\&q=85\&s=a12a918538e936b852460123a1004389)

> [tab] Mobile
>
> ![Confirmation to abandon the process with the No, continue and Abandon process buttons.](https://mintcdn.com/bbrands/_NKN45Wilc9LnqQU/images/portal-customer-screens/digital-contract/abandon.en.mobile.webp?fit=max\&auto=format\&n=_NKN45Wilc9LnqQU\&q=85\&s=068cce90ee2bef103ac1ce51471d51f3)

## Business rules

| ID | Rule |
| - | - |
| R-01 | Entry is with a one-time e-mail link; no password is asked until the end |
| R-02 | The wizard never charges; it only enrols the payment method for later billing |
| R-03 | Only the account holder goes through Payment method; later company administrators skip it |
| R-04 | **Reject** is available from Validate ID to Sign; not on Welcome or Password. Only the account holder can abandon |
| R-05 | Before signing, Summary or Payment can be revisited; after signing they cannot ("You cannot go back during the contract.") |
| R-06 | Changing the payment method or period after the documents were prepared discards and regenerates them |
| R-07 | The contract becomes active only after Maihue operations review it and Maihue countersigns |

## States and messages

| Contract status | What it means for the customer |
| - | - |
| `draft` | Completing identity, summary and payment |
| `pending_signature` / `in_signature` | Documents being prepared or ready to sign |
| `partially_signed` | In companies: at least one administrator signed, others remain |
| `pending_review` | The customer is done; Maihue reviews the contract |
| `awaiting_enterprise_signature` / `signed` | Maihue countersigns and seals the documents |
| `active` | Contract and subscription in force; the confirmation e-mail arrives |
| `cancelled` / `rejected` / `expired` | The customer abandoned, Maihue rejected or an administrator closed it |

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| "You cannot go back during the contract." | Tried to go back after signing | `customer-already-signed` (409) | Explain that signed content is not edited; if there is a mistake, Maihue must cancel and register a new contract |
| "We could not abandon the process" | Cancellation failed or the requester is not the account holder | `POST /contract/{id}/cancel` (403/409) | Retry; a later administrator cannot abandon, only the account holder can |

Each step's errors are on its own page.

## Why it works this way

![Full process: registration and e-mail, the customer completes identity, summary and payment, documents are prepared, the customer signs and creates a password; then, without the customer, operations reviews, Maihue countersigns and the contract is activated.](https://mintcdn.com/bbrands/w6DX1nTsRjzB7VQp/images/portal-customer-manual/digital-contract-process.svg?fit=max\&auto=format\&n=w6DX1nTsRjzB7VQp\&q=85\&s=73a50fd6815d0c0c55217232d7688ae1)

Full digital contract process

* **No paper and no prior password.** The e-mail link is the credential, so a new customer can contract without an account.
* **Payment is enrolled, not charged.** The method is ready to bill once the contract is active.
* **Maihue signs last.** Customer signatures never activate the contract on their own: operations reviews and Maihue countersigns, to avoid active contracts with wrong data.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `app/[locale]/(public)/contract/[contractId]/contract-orchestrator.tsx` |
| Steps | `app/components/digital-contract/steps/*` |
| State | `GET /api/v3/contract/{id}` → `ContractState` (`stage`, `flags`, `payment`, `signing`) |
| Abandon | `POST /api/v3/contract/{id}/cancel` |
| Realtime | Pusher `contract.*` (`app/lib/realtime/use-contract-channel.ts`) |
| Texts | `messages/{es,en}.json` › `contract` |
| Initiative | `portal-customer/digital-contracting` |

Endpoints, states and workers are detailed in [Digital contracting (technical docs)](https://docs.bbrands.io/digital-contracting/introduction.md).

## FAQ and support cases

> [accordion] Is the customer charged during the contract?
>
> No. The payment step only enrols the method for later billing.

> [accordion] The customer signed but their service is not active
>
> Expected while the contract is in operations review (`pending_review`) or being countersigned. Once active, they receive a confirmation e-mail.

> [accordion] The customer got a detail wrong after signing
>
> Signed content cannot be edited. Maihue must cancel the contract and register a new one.

> [accordion] The customer abandoned by mistake
>
> The registration was cancelled; a new contract must be registered and a new e-mail sent.

## Related and history

* [Links and access recovery](https://docs.bbrands.io/portal-customer/digital-contract/links-and-recovery.md)
* [Company administrator](https://docs.bbrands.io/portal-customer/digital-contract/company-admin.md)
* [Digital contracting (technical)](https://docs.bbrands.io/digital-contracting/flows.md)

| Date | Change |
| - | - |
| 2026-11-10 | First version |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.