Skip to main content

Overview

In sandbox, when you create a KYC validation for a person entity, the API can return an immediate mock result based on the entity’s taxId (document number). No external verification is performed; the response and webhooks match the outcome associated with that document in our test set. This lets you test all flows (approved, rejected, cancelled, RENAPER double-check, etc.) without going through a real verification.
Configure a webhook to receive responses!In sandbox, KYC results are updated asynchronously (same as production). While the API returns 201 immediately after creating the validation, the final result (approved, rejected, etc.) is sent via webhooks moments later.You must configure a webhook endpoint in your organization to receive validation notifications. Without a configured webhook, you won’t receive status updates.📚 Learn to set up webhooks: Webhook integration
Format does not matter. The entity’s taxId can be sent with or without formatting (e.g. 99.990.001 or 99990001). The API normalizes it before matching, so both work the same.

How It Works

  1. The person entity belongs to an organization that is in sandbox mode.
  2. You call POST /api/kyc/validations with that entity’s entityId.
  3. The API looks up the entity’s taxId in the sandbox test map (after normalizing: digits and letters only).
  4. If there is a match, a mock validation is created with pending status (201 Created) and moments later it’s updated to the final status (e.g. approved, rejected, cancelled).
  5. Webhooks are sent to your configured endpoint with the final result.
  6. If there is no match, the API follows the normal flow (creates a real verification session and returns providerSessionUrl).
Asynchronous flow: The sandbox behavior exactly replicates the production flow, which is asynchronous. The validation is created in pending state, then updated and notified via webhook. Do not attempt immediate polling to the GET endpoint after creating the validation - use webhooks to receive the result.

Synthetic Entity Preview (GET Only)

In sandbox, when you look up a catalog test document number and no real entity row exists, Gu1 can return a synthetic person instead of 404:
  • GET /api/entities/by-tax-id/{taxId}
  • GET /api/entities?taxId={taxId} (exact filter, zero real matches)
Response includes sandboxMock: true, id: null, and metadata.sandboxKycOutcome (expected KYC mock outcome for that number). Nothing is written to the database.
The synthetic preview is for discovery and documentation. To run POST /api/kyc/validations or POST /api/kyc/biometric/sessions with entityTaxId, you must create a real person entity first (same test taxId). KYC/biometric endpoints resolve against persisted rows only.
RENAPER in sandbox: If you send doubleCheckRenaper: true when creating the validation and the outcome is approved (or a RENAPER-related rejection), the response and webhook payload will include metadata.responseDoubleChecks.renaper with the same structure as in production.

Default Test Values

We provide a fixed set of test document numbers in four formats. Each number maps to one outcome. The lookup key is the normalized value (no dots, dashes, or spaces).

Outcome List (What Each Number Returns)

Argentina – DNI (8 digits)

Use any of these as the entity’s taxId (with or without dots). Normalized value is used for matching.

Argentina – CUIT (11 digits)

Format: 20-XXXXXXXX-X. Example: 20-99990001-9.

Brazil – CPF (11 digits)

Format: XXX.XXX.XXX-XX. Example: 999.900.001-01.

Brazil – CNPJ (14 digits)

Format: XX.XXX.XXX/XXXX-XX. Example: 99.990.000/0001-01.

Example: Approved with RENAPER

  1. Create a person entity in sandbox with taxId: 99990001 (or 99.990.001).
  2. Call POST /api/kyc/validations with entityId and doubleCheckRenaper: true (body or query).
  3. The API returns 201 with the validation; shortly after, the status is approved and the webhook kyc.validation_approved is sent.
  4. The webhook payload includes the full validation object, including metadata.responseDoubleChecks.renaper with verified: true, matchResult: "match", personalNumber, idTramitePrincipal, and renaperData (mock registry response).

Example Response (Mock Approved)

The response body and webhook payload follow the same structure as a real validation. Example shape for an approved mock (relevant fields):
When RENAPER double-check is not requested, metadata.responseDoubleChecks is not present for approved; when it is requested, it is present as above. For renaperData on rejections or service errors, see renaperData shape.

Embedded Biometric (Sandbox Mock)

After an approved KYC mock for the same entity, you can create an embedded biometric session (POST /api/kyc/biometric/sessions) that also runs in mock mode in sandbox—no hosted capture UI; Gu1 returns the result immediately.
Mock biometric uses the same sandbox organization and same test taxId map as KYC mock. Validations created via mock include metadata.sandboxMock: true. Biometric sessions created via mock include metadata.sandboxMock: true and metadata.sandboxMockOutcome (approved or rejected).

Prerequisites

  1. Organization in sandbox mode (same as KYC mock).
  2. Person entity with a test taxId whose KYC outcome is approved or approved_with_renaper (e.g. 99990001, 99990002, 99990011).
  3. Approved KYC for that entity (create via POST /api/kyc/validations first).

Default Biometric Outcomes by Test Document

For documents whose KYC mock is rejected or cancelled, you cannot create a biometric session (NO_KYC).

Override Outcome on the Same Entity

On any eligible mock entity, send metadata.sandboxMockOutcome in the create body:
Allowed values: approved, rejected. This only applies when the request qualifies for sandbox mock (sandbox org + approved KYC mock, or metadata.sandboxMock: true on the source KYC).

Example: Mock Approved

  1. Create person entity with taxId: 99990001.
  2. POST /api/kyc/validations → wait for webhook kyc.validation_approved (or poll GET until approved).
  3. POST /api/kyc/biometric/sessions with { "entityId": "..." }.
Response 201:
Webhooks: biometric.session_approved (org webhook and optional per-request webhookUrl). No iframe step is required for mock sessions.

Example: Mock Rejected

Option A — dedicated test document 99990011 (KYC approved, biometric rejected by default). Option B — same entity as 99990001 with "metadata": { "sandboxMockOutcome": "rejected" }. Response status is rejected; webhook event is biometric.session_rejected.

Real (Non-Mock) Biometric in Sandbox

If the entity taxId is not in the test map, or the organization is not sandbox, POST /api/kyc/biometric/sessions follows the production path: hosted capture UI, status: pending, and a Gu1-assigned hostedSessionId. Requires a valid reference portrait from approved KYC.

Retries and Active Sessions

  • If the latest biometric session for the entity is still pending or in_progress, create returns 409 ACTIVE_SESSION_EXISTS with activeSessionId. Cancel it with POST /api/kyc/biometric/sessions/:id/cancel before creating another.
  • If a previous create succeeded but your client retried, Gu1 reuses the existing row when the same hostedSessionId is returned (idempotent create).
See also: Embedded Biometric Session.

Custom Mock Data

The default set above is available to all sandbox organizations with no configuration.
Adding or changing mock document numbers for your sandbox:
If you need additional test documents or different outcomes for specific numbers, contact the Gu1 team. Custom mock data for sandbox is managed by Gu1 and cannot be configured by the client.

See Also