# Create Cash-In

Creates a new cash-in operation that allows users to deposit money at physical locations.

- Amount Limits: 10 - 6000 MXN (may vary by physical location)
- Expiration: 3 days from creation (on closed references)
- Reference: 20-digit unique reference number

Open References: Some clients can create "open references" without specifying an amount upfront.
When creating an open reference, the amount parameter can be omitted, and the actual amount
will be determined at the time of payment at the physical location.

Endpoint: POST /api/v1/cash/cash_in
Version: 1.0.0
Security: ClientAuth, HMACSignature, Timestamp

## Header parameters:

  - `X-Client-Id` (string, required)
    Client API key (32-character hex)
    Example: "4a8a08f09d37b73795649038408b5f33"

  - `X-Signature` (string, required)
    HMAC-SHA256 signature generated using api_secret
    Example: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

  - `X-Timestamp` (string, required)
    Unix timestamp (seconds since epoch)
    Example: "1705312200"

## Request fields (application/json):

  - `amount` (integer)
    Transaction amount in MXN (required for standard cash-in, optional for open references)
    Example: 500

  - `external_user_id` (string, required)
    Unique identifier for the end user
    Example: "USER123456"

  - `document_type` (string)
    Type of identification document (optional)
    Enum: "INE", "CURP", "RFC"

  - `document_id` (string)
    Document identification number (optional)
    Example: "1234567890123"

  - `phone` (string)
    User's phone number - exactly 10 digits (optional)
    Example: "5512345678"

## Response 201 fields (application/json):

  - `response_code` (string)
    Response code ("0" for success)
    Example: "0"

  - `response_text` (string)
    Response message
    Example: "Operacion creada"

  - `result` (object)

  - `result.operation_id` (integer)
    Unique identifier for the operation
    Example: 123

  - `result.kind` (string)
    Operation type
    Enum: "cash_in", "cash_out"

  - `result.reference` (string)
    20-digit unique reference number for payment at physical locations
    Example: "10511175512161627448"

  - `result.status` (string)
    Current operation status
    Enum: "close", "paid", "expired", "reversed"

  - `result.transaction_id` (string)
    25-character unique transaction identifier
    Example: "FMXdbnBuiw2SHqSyfzSkqN71q"

  - `result.amount` (integer)
    Transaction amount in MXN (0 for open references until paid)
    Example: 500

  - `result.created_at` (string)
    ISO 8601 timestamp of operation creation
    Example: "2025-01-15T10:30:00Z"

  - `result.expire_at` (string)
    ISO 8601 timestamp when operation expires
    Example: "2025-01-18T10:30:00Z"

## Response 400 fields (application/json):

  - `response_code` (string)
    Error code identifier
    Enum: "1", "60", "64"

  - `response_text` (string)
    Human-readable error message
    Example: "Parámetros Incorrectos"

  - `result` (object)
    Additional error context

  - `result.amount` (integer)
    Requested amount (if applicable)
    Example: 100

  - `result.external_user_id` (string)
    User identifier (if applicable)
    Example: "12345"

  - `result.reference` (string)
    Reference number (if applicable)
    Example: "10511397875282322627"

## Response 401 fields (application/json):

  - `error` (string)
    Error message
    Example: "Unauthorized"


