---
updatedAt: 2026-07-21T18:41:07.000Z
agentTools:
  projectIndex: https://docs.ventipay.com/llms.txt
---

# Crear

Crea un nuevo objeto `Loan`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "servers": [
    {
      "url": "https://api.ventipay.com/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "info": {
    "title": "Préstamos",
    "description": "Endpoints para gestionar préstamos (BNPL) y cuotas.",
    "version": "1"
  },
  "tags": [
    {
      "name": "Préstamos",
      "description": "Un `Loan` representa un préstamo o financiamiento otorgado a un cliente (BNPL)."
    }
  ],
  "paths": {
    "/loans": {
      "post": {
        "summary": "Crear",
        "description": "Crea un nuevo objeto `Loan`.",
        "operationId": "loans-create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Monto del préstamo.",
                    "format": "int32"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Código de moneda ISO de tres letras.",
                    "enum": [
                      "clp",
                      "clf"
                    ]
                  },
                  "customer_id": {
                    "type": "string",
                    "description": "ID de customer. Debe enviarse customer_id o customer_email."
                  },
                  "customer_email": {
                    "type": "string",
                    "description": "Email de customer. Si no existe, se creará."
                  },
                  "description": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "string",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "Préstamos"
        ]
      }
    }
  }
}
```