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:
| Level | Object | Defines | Set on |
|---|---|---|---|
| Service | invoice_configuration | What document is emitted and when | single_payments, subscriptions, payment_plans |
| Buyer | invoice_information | The 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_configurationorinvoice_informationyou send is rejected with400, 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
emit_document — inside the service object| Field | Type | Description |
|---|---|---|
emit_document | boolean | Master switch. When true, this service emits an electronic document for each paid statement. |
invoice_configuration — top-level object (sibling of the service object)
invoice_configuration — top-level object (sibling of the service object)| Field | Type | Allowed values | Description |
|---|---|---|---|
document | string (enum) | invoice, receipt, selectable | Document type. invoice = factura, receipt = boleta, selectable = decided per buyer from their tax data. |
emit_at | string (enum) | payment, due_date | When the document is emitted. |
vat_exempt | boolean | — | Emit as VAT-exempt (exento). |
ask_rut | boolean | — | Request the buyer's RUT at checkout. |
ask_address | boolean | — | Request 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_documentneeds an invoice configuration somewhere
emit_documentandinvoice_configurationare independent fields. Whenemit_documentistrue, emission uses the service'sinvoice_configurationif it has one, otherwise it falls back to the company-level invoice configuration.If
emit_documentistruebut 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 aninvoice_configurationexists — 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
invoice_information — nested inside the payable objectCarries the customer's tax identity. Nest it under the payable: single_payment_buyer.invoice_information, subscription_buyer.invoice_information, or payment_plan.invoice_information.
| Field | Type | Description |
|---|---|---|
rut | string | Customer tax ID. With activity present → a factura is emitted; otherwise a boleta. |
business_name | string | Razón social. |
activity | string | Giro / economic activity. |
address | string | Fiscal address. |
commune | string | Must be a valid Chilean commune. |
region | string | Chilean region. |
email | string | Email for document delivery. |
The document type for
invoice_informationis not a field you send — it is derived automatically:invoicewhen bothrutandactivityare present, otherwisereceipt.
Example 1 — Business customer → factura (invoice)
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)
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_informationis required when enrolling a buyer in a document-emitting serviceWhen creating a buyer whose service has
emit_documentenabled, you must includeinvoice_information, or the request fails with400 — 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_documentis disabled, anyinvoice_informationyou send is ignored.
A factura requires complete buyer tax data
If the document resolves to an
invoice(factura) — i.e.invoice_configuration.documentisinvoice, orselectablewithrut+activityprovided — 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 withask_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_configurationobject: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
| HTTP | Condition | error.message |
|---|---|---|
400 | invoice_configuration / invoice_information sent but the company has no TuFacturador integration | Invoicing is not enabled for this company. Set up the TuFacturador integration before sending invoice_configuration or invoice_information. |
400 | Enrolling a buyer (create) in a service with emit_document enabled, without invoice_information | Invoice information is required when the service emits documents |
400 | Invalid invoice_configuration.document | document must be one of: invoice, receipt, selectable |
400 | Invalid invoice_configuration.emit_at | emit_at must be one of: payment, due_date |
400 | commune is not a valid Chilean commune | Commune 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:
| Risk | Cause | How to avoid |
|---|---|---|
| Missing configuration | emit_document is true but no invoice_configuration exists at the service or company level | Always pair emit_document with an invoice configuration (service-level or company default). |
| Incomplete factura data | Document resolves to invoice but the buyer's invoice_information is missing one of rut, business_name, activity, address, commune, region | Send 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
regionfield is not validated, but you should send the region the commune belongs to (as grouped below) so the document carries consistent data.
| Region | Communes |
|---|---|
| Arica y Parinacota | Arica, Camarones, Putre, General Lagos |
| Tarapacá | Iquique, Alto Hospicio, Pozo Almonte, Camiña, Colchane, Huara, Pica |
| Antofagasta | Antofagasta, Mejillones, Sierra Gorda, Taltal, Calama, Ollagüe, San Pedro de Atacama, Tocopilla, María Elena |
| Atacama | Copiapó, Caldera, Tierra Amarilla, Chañaral, Diego de Almagro, Vallenar, Alto del Carmen, Freirina, Huasco |
| Coquimbo | La Serena, Coquimbo, Andacollo, La Higuera, Paiguano, Vicuña, Illapel, Canela, Los Vilos, Salamanca, Ovalle, Combarbalá, Monte Patria, Punitaqui, Río Hurtado |
| Valparaíso | Valparaí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'Higgins | Rancagua, 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 |
| Maule | Talca, 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 |
| Ñuble | Cobquecura, 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ío | Concepció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ía | Temuco, 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íos | Valdivia, Corral, Lanco, Los Lagos, Máfil, Mariquina, Paillaco, Panguipulli, La Unión, Futrono, Lago Ranco, Río Bueno |
| Los Lagos | Puerto 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én | Coihaique, Lago Verde, Aisén, Cisnes, Guaitecas, Cochrane, O'Higgins, Tortel, Chile Chico, Río Ibáñez |
| Magallanes | Punta Arenas, Laguna Blanca, Río Verde, San Gregorio, Cabo de Hornos (Ex Navarino), Antártica, Porvenir, Primavera, Timaukel, Natales, Torres del Paine |
| Región Metropolitana | Cerrillos, 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 |