Facturar
Sectores
51 perfiles sectoriales. Cada tarjeta muestra qué pide el sector y su ejemplo en los 7 SDKs.
El detalle completo vive en la página de cada sector. `soportado` significa cobertura técnica del constructor, no homologación tributaria.
Sector 1 · Compra-venta estándar
Ver página del sector →Factura general de bienes y servicios. Es el caso por defecto con sector auto.
1const factura = await supay.invoices.emit({2 pointOfSaleId: POS_ID,3 customer: { documentType: "ci", documentNumber: "1234567", name: "Ada Lovelace" },4 items: [{ sku: "PLAN-PRO", quantity: 1, price: 150 }],5});Sector 24 · Notas crédito-débito
Ver página del sector →Ajustes sobre una factura original. Requiere layout y referencia a la factura.
1const nota = await supay.invoices.emit({2 pointOfSaleId: POS_ID,3 invoiceType: "credit_note",4 sector: "24",5 layout: "nota_credito_debito",6 referenceInvoiceId: FACTURA_ORIGINAL_ID,7 customer: { documentType: "ci", documentNumber: "9971522", name: "Ramiro" },8 items: [{ sku: "PROD-001", quantity: 1, price: 1250 }],9});Sector 29 · Conciliación
Ver página del sector →Concilia montos originales contra finales línea por línea con items[].data.
1const nota = await supay.invoices.emit({2 pointOfSaleId: POS_ID,3 invoiceType: "credit_note",4 sector: "29",5 referenceInvoiceId: FACTURA_ORIGINAL_ID,6 customer: { documentType: "ci", documentNumber: "9971522", name: "Ramiro" },7 items: [{ sku: "PROD-001", quantity: 1, price: 900,8 data: { monto_original: 1000, monto_final: 900, monto_conciliado: 100 } }],9});Sector 30 · Masiva (sin detalle)
Ver página del sector →Borrador con total y datos de pasajero. No admite emisión individual: solo por lote masiva.
1const borrador = await supay.invoices.create({2 pointOfSaleId: POS_ID,3 sector: "30",4 customer: { documentType: "ci", documentNumber: "1234567", name: "Pasajero" },5 total: 850,6 data: { numero_vuelo: "BO-101", origen: "LPB", destino: "CBB" },7});8await supay.bulk.sendMasiva({ pointOfSaleId: POS_ID, invoiceIds: [borrador.id] });Sector 47 · Devolución parcial
Ver página del sector →Nota de crédito por devolución. El SKU debe existir en la factura original.
1const devolucion = await supay.invoices.emit({2 pointOfSaleId: POS_ID,3 invoiceType: "credit_note",4 sector: "47",5 referenceInvoiceId: FACTURA_ORIGINAL_ID,6 customer: { documentType: "ci", documentNumber: "9971522", name: "Ramiro" },7 items: [{ sku: "PROD-001", quantity: 1, price: 1250 }],8});Sector 19 · Hoteles y hospedaje
Ver página del sector →Requiere detalle de huéspedes por línea en items[].data.
1await supay.invoices.emit({2 pointOfSaleId: POS_ID,3 sector: "19",4 customer: { documentType: "ci", documentNumber: "1234567", name: "Huésped" },5 items: [{ sku: "HAB-DOBLE", quantity: 2, price: 350,6 data: { detalle_huespedes: [{ nombre: "Ada", noches: 2 }] } }],7});