---
title: Generar Facturas
slug: generar-facturas
description: Learn how to generate invoices using JSON format with this comprehensive code example. Discover how to include crucial information such as invoice type, date, currency, payment condition, total amount, customer details, and items. Additionally, find examp
createdAt: 2021-11-05T13:28:07.000Z
---



:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://staging-api.mobbex.com/p/billing",
  "name": "Generar Factura",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Tipo de Documento: \"invoice\", \"credit_note\", \"debit_note\""
      },
      {
        "kind": "optional",
        "name": "customer",
        "type": "Object",
        "description": "Cliente de la Factura"
      },
      {
        "kind": "optional",
        "name": "items",
        "type": "string",
        "description": "Items a Facturar"
      },
      {
        "kind": "optional",
        "name": "total",
        "type": "string",
        "description": "Total de la Factura"
      },
      {
        "kind": "optional",
        "name": "condition",
        "type": "string",
        "description": "Condición de Facturación: valores"
      },
      {
        "kind": "optional",
        "name": "date",
        "type": "string",
        "description": "Fecha de Emisión"
      },
      {
        "kind": "optional",
        "name": "reference",
        "type": "string",
        "description": "ID Unico de la Factura"
      },
      {
        "kind": "optional",
        "name": "webhook",
        "type": "string",
        "description": "URL para notificar la creación y enviar la información de la Factura"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "wO4x32IWZ_hSqfv3plZz4",
        "code": "{\n    \"result\": true,\n    \"data\": {\n        \"uid\": \"\",\n        \"status\": \"COMPLETED\",\n        \"authorizationMode\": \"online\",\n        \"number\": \"00005-00000000001\",\n        \"authorizationCode\": \"1234567899\",\n        \"authorizationCodeExpiration\": \"22/10/2021\",\n        \"message\": \"OK\",\n        \"pdf\": \"https://...\",\n        \"extras\": {\n            \"fiscalQrCode\": \"\"\n        }\n    }\n}",
        "language": "200"
      },
      {
        "id": "l_F_lY6j-OdPkL7TGSeFk",
        "code": "{\n    \"message\": \"Ain't no cake like that.\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "wO4x32IWZ_hSqfv3plZz4"
  },
  "examples": {
    "languages": [
      {
        "id": "8Vm-p0F-_DTchJQzpUEnD",
        "code": "{\n    \"type\": \"invoice\",\n    \"date\": {\n        \"day\": 12,\n        \"month\": 10,\n        \"year\": 2021\n    },\n    \"currency\": \"ARS\",\n    \"condition\": {\n        \"type\": \"credit_card\",\n        \"installments\": 12\n    },\n    \"total\": 1000.10,\n    \"reference\": \"unique_id:123\",\n    \"customer\": {\n        \"type\": \"arg.cuit\",\n        \"id\": \"20121231235\",\n        \"email\": \"demo@mobbex.com\",\n        \"phone\": \"12123123\",\n        \"street\": \"\",\n        \"streetNumber\": \"\",\n        \"addressNote\": \"\",\n        \"state\": \"\",\n        \"city\" : \"\",\n        \"zipCode\": \"5000\"\n\n    },\n    \"items\": [\n        {\n            \"quantity\": 1,\n            \"description\": \"Producto 1\",\n            \"unitPrice\": 12.50,\n            \"vat\": \"arg.21\",\n            \"discount\": 1,\n            \"surcharge\": 2\n        }\n    ],\n    \"surcharge\": {\n        \"description\": \"Esto es un Recargo General\",\n        \"total\": 10.2\n    },\n    \"discount\": {\n        \"description\": \"Esto es un Descuento General\",\n        \"total\": 10.2\n    },\n    \"webhook\": \"\"\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "8Vm-p0F-_DTchJQzpUEnD"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "generar-factura",
  "legacyHash": "bnQZBQ1Cpn7Z2_-kEJ1pg"
}
```
:::

