Invocing (TuFacturador)

Emit electronic tax documents (facturas and boletas) automatically when statements are paid, by attaching invoicing data to your services and buyers through the integration API.

In this guide, service refers to a single payment, subscription, or payment plan.

Invoicing data attaches at two levels:

LevelObjectDefinesSet on
Serviceinvoice_configurationWhat document is emitted and whensingle_payments, subscriptions, payment_plans
Buyerinvoice_informationThe customer's tax identity (RUT, giro, address)single_payment_buyers, subscription_buyers, payment_plans

Before you start

  • Invoicing is only available for companies with an active TuFacturador integration. If the company has no TuFacturador credential, any invoice_configuration or invoice_information you send is rejected with 400, and these fields are omitted from API responses.
  • All communes must be valid Chilean communes.

1. Service configuration

Applies to create and update of single_payments, subscriptions, and payment_plans.

emit_document — inside the service object

FieldTypeDescription
emit_documentbooleanMaster switch. When true, this service emits an electronic document for each paid statement.

invoice_configuration — top-level object (sibling of the service object)

FieldTypeAllowed valuesDescription
documentstring (enum)invoice, receipt, selectableDocument type. invoice = factura, receipt = boleta, selectable = decided per buyer from their tax data.
emit_atstring (enum)payment, due_dateWhen the document is emitted.
vat_exemptbooleanEmit as VAT-exempt (exento).
ask_rutbooleanRequest the buyer's RUT at checkout.
ask_addressbooleanRequest the buyer's address at checkout.

Example — create a subscription with invoicing enabled:

{
  "subscription": {
    "name": "Monthly Plan",
    "recurrence": "month",
    "dop": 5,
    "emit_document": true
  },
  "products": [{ "name": "Membership", "value": 5000, "currency": "CLP" }],
  "invoice_configuration": {
    "document": "selectable",
    "emit_at": "payment",
    "ask_rut": true,
    "ask_address": true
  }
}

⚠️

emit_document needs an invoice configuration somewhere

emit_document and invoice_configuration are independent fields. When emit_document is true, emission uses the service's invoice_configuration if it has one, otherwise it falls back to the company-level invoice configuration.

If emit_document is true but there is no invoice configuration at either level (service or company), the document cannot be emitted — the background job has no configuration to apply and fails silently (no document, no error on the API response).

Recommendation: whenever you enable emit_document, make sure an invoice_configuration exists — either send one in the same request, or confirm the company has a default invoice configuration set up.


2. Enrolling a service_buyer

Applies to create/update of single_payment_buyers, subscription_buyers, and create of payment_plans.

invoice_information — nested inside the payable object

Carries the customer's tax identity. Nest it under the payable: single_payment_buyer.invoice_information, subscription_buyer.invoice_information, or payment_plan.invoice_information.

FieldTypeDescription
rutstringCustomer tax ID. With activity present → a factura is emitted; otherwise a boleta.
business_namestringRazón social.
activitystringGiro / economic activity.
addressstringFiscal address.
communestringMust be a valid Chilean commune.
regionstringChilean region.
emailstringEmail for document delivery.

The document type for invoice_information is not a field you send — it is derived automatically: invoice when both rut and activity are present, otherwise receipt.

Example 1 — Business customer → factura (invoice)

Both rut and activity are present, so the derived document is invoice.

POST /api/v1/integration/subscription_buyers

{
  "subscription_buyer": {
    "subscription_id": "a1b2c3d4-0000-1111-2222-333344445555",
    "buyer_id": "f9e8d7c6-aaaa-bbbb-cccc-ddddeeeeffff",
    "invoice_information": {
      "rut": "76.123.456-7",
      "business_name": "Acme SpA",
      "activity": "Servicios informáticos",
      "address": "Av. Apoquindo 1234, Oficina 802",
      "commune": "Las Condes",
      "region": "Metropolitana de Santiago",
      "email": "[email protected]"
    }
  }
}

Example 2 — End consumer → boleta (receipt)

No rut/activity, so the derived document is receipt. Only the fields you require via ask_rut/ask_address are needed.

POST /api/v1/integration/single_payment_buyers

{
  "single_payment_buyer": {
    "single_payment_id": "11112222-3333-4444-5555-666677778888",
    "buyer_id": "99990000-aaaa-bbbb-cccc-ddddeeeeffff",
    "invoice_information": {
      "address": "Pasaje Los Aromos 45",
      "commune": "Maipú",
      "region": "Metropolitana de Santiago",
      "email": "[email protected]"
    }
  }
}

⚠️

invoice_information is required when enrolling a buyer in a document-emitting service

When creating a buyer whose service has emit_document enabled, you must include invoice_information, or the request fails with 400 — Invoice information is required when the service emits documents.

This is enforced on creation only — updating a buyer that already has tax data does not require resending it. If emit_document is disabled, any invoice_information you send is ignored.

⚠️

A factura requires complete buyer tax data

If the document resolves to an invoice (factura) — i.e. invoice_configuration.document is invoice, or selectable with rut + activity provided — emission requires all of: rut, business_name, activity, address, commune, region. If any are missing, the service_buyer is created successfully but the document is silently not emitted (no error, no retry). A boleta only requires the fields you flagged with ask_rut / ask_address.


3. Response fields

Returned only when the company has a TuFacturador integration.

Service responses (single_payments, subscriptions, payment_plans) include:

  • emit_document (boolean)
  • invoice_configuration object: document, emit_at, vat_exempt, ask_rut, ask_address

ServiceBuyer / payment-plan responses include an invoice_information object:

  • document (read-only, derived), rut, business_name, activity, address, commune, region, email

Example response fragment (factura):

"invoice_information": {
  "document": "invoice",
  "rut": "76.123.456-7",
  "business_name": "Acme SpA",
  "activity": "Servicios informáticos",
  "address": "Av. Apoquindo 1234, Oficina 802",
  "commune": "Las Condes",
  "region": "Metropolitana de Santiago",
  "email": "[email protected]"
}

4. Error reference

HTTPConditionerror.message
400invoice_configuration / invoice_information sent but the company has no TuFacturador integrationInvoicing is not enabled for this company. Set up the TuFacturador integration before sending invoice_configuration or invoice_information.
400Enrolling a buyer (create) in a service with emit_document enabled, without invoice_informationInvoice information is required when the service emits documents
400Invalid invoice_configuration.documentdocument must be one of: invoice, receipt, selectable
400Invalid invoice_configuration.emit_atemit_at must be one of: payment, due_date
400commune is not a valid Chilean communeCommune is not a valid Chilean commune

5. Known risks (silent non-emission)

Two situations return 200 on the API call but result in no document being emitted and no error surfaced. Watch for both:

RiskCauseHow to avoid
Missing configurationemit_document is true but no invoice_configuration exists at the service or company levelAlways pair emit_document with an invoice configuration (service-level or company default).
Incomplete factura dataDocument resolves to invoice but the buyer's invoice_information is missing one of rut, business_name, activity, address, commune, regionSend the full invoice_information block whenever a factura may be emitted.

6. Valid regions and communes

The commune value is validated against the list below — it must match exactly as written (accents and capitalization included; e.g. Santiago, not santiago). An unrecognized value returns 400 — Commune is not a valid Chilean commune.

The region field is not validated, but you should send the region the commune belongs to (as grouped below) so the document carries consistent data.

RegionCommunes
Arica y ParinacotaArica, Camarones, Putre, General Lagos
TarapacáIquique, Alto Hospicio, Pozo Almonte, Camiña, Colchane, Huara, Pica
AntofagastaAntofagasta, Mejillones, Sierra Gorda, Taltal, Calama, Ollagüe, San Pedro de Atacama, Tocopilla, María Elena
AtacamaCopiapó, Caldera, Tierra Amarilla, Chañaral, Diego de Almagro, Vallenar, Alto del Carmen, Freirina, Huasco
CoquimboLa Serena, Coquimbo, Andacollo, La Higuera, Paiguano, Vicuña, Illapel, Canela, Los Vilos, Salamanca, Ovalle, Combarbalá, Monte Patria, Punitaqui, Río Hurtado
ValparaísoValparaíso, Casablanca, Concón, Juan Fernández, Puchuncaví, Quintero, Viña del Mar, Isla de Pascua, Los Andes, Calle Larga, Rinconada, San Esteban, La Ligua, Cabildo, Papudo, Petorca, Zapallar, Quillota, Calera, Hijuelas, La Cruz, Nogales, San Antonio, Algarrobo, Cartagena, El Quisco, El Tabo, Santo Domingo, San Felipe, Catemu, Llaillay, Panquehue, Putaendo, Santa María, Quilpué, Limache, Olmué, Villa Alemana
O'HigginsRancagua, Codegua, Coinco, Coltauco, Doñihue, Graneros, Las Cabras, Machalí, Malloa, Mostazal, Olivar, Peumo, Pichidegua, Quinta de Tilcoco, Rengo, Requínoa, San Vicente, Pichilemu, La Estrella, Litueche, Marchihue, Navidad, Paredones, San Fernando, Chépica, Chimbarongo, Lolol, Nancagua, Palmilla, Peralillo, Placilla, Pumanque, Santa Cruz
MauleTalca, Constitución, Curepto, Empedrado, Maule, Pelarco, Pencahue, Río Claro, San Clemente, San Rafael, Cauquenes, Chanco, Pelluhue, Curicó, Hualañé, Licantén, Molina, Rauco, Romeral, Sagrada Familia, Teno, Vichuquén, Linares, Colbún, Longaví, Parral, Retiro, San Javier, Villa Alegre, Yerbas Buenas
ÑubleCobquecura, Coelemu, Ninhue, Portezuelo, Quirihue, Ránquil, Treguaco, Bulnes, Chillán Viejo, Chillán, El Carmen, Pemuco, Pinto, Quillón, San Ignacio, Yungay, Coihueco, Ñiquén, San Carlos, San Fabián, San Nicolás
BiobíoConcepción, Coronel, Chiguayante, Florida, Hualqui, Lota, Penco, San Pedro de la Paz, Santa Juana, Talcahuano, Tomé, Hualpén, Lebu, Arauco, Cañete, Contulmo, Curanilahue, Los Álamos, Tirúa, Los Ángeles, Antuco, Cabrero, Laja, Mulchén, Nacimiento, Negrete, Quilaco, Quilleco, San Rosendo, Santa Bárbara, Tucapel, Yumbel, Alto Biobío
AraucaníaTemuco, Carahue, Cunco, Curarrehue, Freire, Galvarino, Gorbea, Lautaro, Loncoche, Melipeuco, Nueva Imperial, Padre las Casas, Perquenco, Pitrufquén, Pucón, Saavedra, Teodoro Schmidt, Toltén, Vilcún, Villarrica, Cholchol, Angol, Collipulli, Curacautín, Ercilla, Lonquimay, Los Sauces, Lumaco, Purén, Renaico, Traiguén, Victoria
Los RíosValdivia, Corral, Lanco, Los Lagos, Máfil, Mariquina, Paillaco, Panguipulli, La Unión, Futrono, Lago Ranco, Río Bueno
Los LagosPuerto Montt, Calbuco, Cochamó, Fresia, Frutillar, Los Muermos, Llanquihue, Maullín, Puerto Varas, Castro, Ancud, Chonchi, Curaco de Vélez, Dalcahue, Puqueldón, Queilén, Quellón, Quemchi, Quinchao, Osorno, Puerto Octay, Purranque, Puyehue, Río Negro, San Juan de la Costa, San Pablo, Chaitén, Futaleufú, Hualaihué, Palena
AysénCoihaique, Lago Verde, Aisén, Cisnes, Guaitecas, Cochrane, O'Higgins, Tortel, Chile Chico, Río Ibáñez
MagallanesPunta Arenas, Laguna Blanca, Río Verde, San Gregorio, Cabo de Hornos (Ex Navarino), Antártica, Porvenir, Primavera, Timaukel, Natales, Torres del Paine
Región MetropolitanaCerrillos, Cerro Navia, Conchalí, El Bosque, Estación Central, Huechuraba, Independencia, La Cisterna, La Florida, La Granja, La Pintana, La Reina, Las Condes, Lo Barnechea, Lo Espejo, Lo Prado, Macul, Maipú, Ñuñoa, Pedro Aguirre Cerda, Peñalolén, Providencia, Pudahuel, Quilicura, Quinta Normal, Recoleta, Renca, Santiago, San Joaquín, San Miguel, San Ramón, Vitacura, Puente Alto, Pirque, San José de Maipo, Colina, Lampa, Tiltil, San Bernardo, Buin, Calera de Tango, Paine, Melipilla, Alhué, Curacaví, María Pinto, San Pedro, Talagante, El Monte, Isla de Maipo, Padre Hurtado, Peñaflor