fiscalisto 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +100 -11
- package/dist/core.d.ts +18 -1
- package/dist/core.js +32 -4
- package/dist/error-codes.d.ts +15 -3
- package/dist/error-codes.js +15 -3
- package/dist/generated.d.ts +263 -7
- package/dist/generated.js +86 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mock-routes.gen.d.ts +2 -0
- package/dist/mock-routes.gen.js +3 -0
- package/dist/mock.d.ts +7 -0
- package/dist/mock.js +237 -0
- package/dist/webhooks.d.ts +1 -1
- package/dist/webhooks.js +4 -1
- package/package.json +7 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Generado por `bun run openapi` (mock-gen.ts) desde la especificación OpenAPI: no lo edite.
|
|
2
|
+
/** [método, ruta, estado, tipo de contenido, ejemplo] de cada ruta de la API. */
|
|
3
|
+
export const MOCK_ROUTES = [["GET", "/v1/account", 200, "application/json", { "id": "org_39c5a6b2-02b3-8453-9c35-aba6b43c876a", "object": "account", "livemode": false, "name": "Mi plataforma", "api_version": "2026-10-24", "latest_api_version": "2026-10-24", "key": { "id": "key_vFQbeTxgHVoTlowHaTLR", "name": "Pruebas", "issuers": null, "read_only": false, "expires_at": null, "sandbox": null } }], ["POST", "/v1/account", 200, "application/json", { "id": "org_39c5a6b2-02b3-8453-9c35-aba6b43c876a", "object": "account", "livemode": false, "name": "Mi plataforma", "api_version": "2026-10-24", "latest_api_version": "2026-10-24", "key": { "id": "key_vFQbeTxgHVoTlowHaTLR", "name": "Pruebas", "issuers": null, "read_only": false, "expires_at": null, "sandbox": null } }], ["POST", "/v1/test_data/reset", 200, "application/json", { "object": "test_data_reset", "livemode": false, "issuers": 1, "deleted_rows": 214, "deleted_events": 37, "customers_created": 3, "products_created": 3 }], ["POST", "/v1/sandboxes", 201, "application/json", { "id": "sbx_4kQm8ZtR2wLp9XbN", "object": "sandbox", "livemode": false, "name": "Ana", "issuers": 1, "created_at": "2026-10-25T09:40:00-06:00" }], ["GET", "/v1/sandboxes", 200, "application/json", { "object": "list", "data": [{ "id": "sbx_4kQm8ZtR2wLp9XbN", "object": "sandbox", "livemode": false, "name": "Ana", "issuers": 1, "created_at": "2026-10-25T09:40:00-06:00" }], "has_more": false, "url": "/v1/sandboxes" }], ["GET", "/v1/sandboxes/{id}", 200, "application/json", { "id": "sbx_4kQm8ZtR2wLp9XbN", "object": "sandbox", "livemode": false, "name": "Ana", "issuers": 1, "created_at": "2026-10-25T09:40:00-06:00" }], ["DELETE", "/v1/sandboxes/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/issuers/{id}/test_clock", 201, "application/json", { "id": "clk_0q1Vmmw52sbD", "object": "test_clock", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "frozen_time": "2026-12-01T09:00:00-06:00", "status": "ready", "created_at": "2026-10-25T09:40:00-06:00", "advanced": { "recurring_invoices": 2, "quotes_expired": 1, "global_invoices": 1 } }], ["GET", "/v1/issuers/{id}/test_clock", 200, "application/json", { "id": "clk_0q1Vmmw52sbD", "object": "test_clock", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "frozen_time": "2026-12-01T09:00:00-06:00", "status": "ready", "created_at": "2026-10-25T09:40:00-06:00", "advanced": { "recurring_invoices": 2, "quotes_expired": 1, "global_invoices": 1 } }], ["DELETE", "/v1/issuers/{id}/test_clock", 200, "application/json", { "id": "clk_0q1Vmmw52sbD", "object": "test_clock", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "frozen_time": "2026-12-01T09:00:00-06:00", "status": "ready", "created_at": "2026-10-25T09:40:00-06:00", "advanced": { "recurring_invoices": 2, "quotes_expired": 1, "global_invoices": 1 } }], ["POST", "/v1/issuers/{id}/test_clock/advance", 200, "application/json", { "id": "clk_0q1Vmmw52sbD", "object": "test_clock", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "frozen_time": "2026-12-01T09:00:00-06:00", "status": "ready", "created_at": "2026-10-25T09:40:00-06:00", "advanced": { "recurring_invoices": 2, "quotes_expired": 1, "global_invoices": 1 } }], ["GET", "/v1/balance", 200, "application/json", { "object": "balance", "livemode": true, "available": 20, "unlimited": false, "low_balance_at": 100, "auto_recharge": null, "packs": [{ "timbres": 20, "remaining": 20, "purchased_at": "2026-10-24T10:15:42-06:00", "expires_at": null }] }], ["POST", "/v1/issuers", 201, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["GET", "/v1/issuers", 200, "application/json", { "object": "list", "data": [{ "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], "has_more": false, "url": "/v1/issuers" }], ["GET", "/v1/issuers/{id}", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["POST", "/v1/issuers/{id}", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["DELETE", "/v1/issuers/{id}", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["POST", "/v1/issuers/{id}/certificates", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["POST", "/v1/issuers/{id}/efirma", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["DELETE", "/v1/issuers/{id}/efirma", 200, "application/json", { "id": "iss_OufpKqnrvx9p", "object": "issuer", "livemode": false, "tax_id": "TOL190312KT4", "legal_name": "TOLPI", "tax_system": "601", "zip": "64000", "status": "active", "requirement": null, "certificate": { "serial_number": "30001000000500003416", "expires_at": "2027-05-18T05:43:51-06:00" }, "sat_downloads": { "available": true, "efirma_expires_at": null }, "employer_registration": null, "curp": null, "stamps_as": "EKU9003173C9", "sandbox": null, "test_clock": null, "created_at": "2026-10-24T10:15:42-06:00", "archived_at": null, "metadata": { "cliente": "42" } }], ["POST", "/v1/issuers/{id}/onboarding_links", 201, "application/json", { "object": "issuer_onboarding_link", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "url": "https://fiscalisto.com/alta/fko_8Xc1nQ2VbT0aLm3Rk7Yp9WdZs4Hf6Jg5Ue1Oi2Ky", "return_url": "https://miplataforma.mx/configuracion/facturas", "expires_at": "2026-10-25T10:15:00-06:00", "created_at": "2026-10-24T10:15:00-06:00" }], ["POST", "/v1/invoices", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["GET", "/v1/invoices", 200, "application/json", { "object": "list", "data": [{ "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], "has_more": false, "url": "/v1/invoices" }], ["GET", "/v1/invoices/{id}", 200, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["GET", "/v1/invoices/{id}/pdf", 200, "application/pdf", null], ["GET", "/v1/invoices/{id}/xml", 200, "application/xml", null], ["POST", "/v1/invoices/{id}/send", 200, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/invoices/{id}/cancel", 200, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/invoices/{id}/substitute", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/invoices/{id}/mark_paid", 200, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/invoices/{id}/mark_unpaid", 200, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["GET", "/v1/receivables", 200, "application/json", { "object": "list", "data": [{ "id": "ICV060329BY0:MXN", "object": "receivable", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "amount_due": 34800, "open_invoices": 2, "oldest_invoice_date": "2026-09-01" }], "has_more": false, "url": "/v1/receivables" }], ["POST", "/v1/bank_transactions", 201, "application/json", null], ["GET", "/v1/bank_transactions", 200, "application/json", { "object": "list", "data": [{ "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", "object": "bank_transaction", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-24", "amount": 5800, "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0", "reference": "F-1024", "account": "4821", "payer_tax_id": "ICV060329BY0", "status": "open", "classification": null, "note": null, "invoices": [], "payment": null, "suggested_match": { "invoices": ["inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN"], "amounts": { "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN": 5800 }, "method": "PUE", "confidence": "high", "reasons": ["Mismo monto", "RFC del cliente en el concepto"] }, "created_at": "2026-10-25T09:00:00-06:00" }], "has_more": false, "url": "/v1/bank_transactions" }], ["GET", "/v1/bank_transactions/{id}", 200, "application/json", { "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", "object": "bank_transaction", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-24", "amount": 5800, "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0", "reference": "F-1024", "account": "4821", "payer_tax_id": "ICV060329BY0", "status": "open", "classification": null, "note": null, "invoices": [], "payment": null, "suggested_match": { "invoices": ["inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN"], "amounts": { "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN": 5800 }, "method": "PUE", "confidence": "high", "reasons": ["Mismo monto", "RFC del cliente en el concepto"] }, "created_at": "2026-10-25T09:00:00-06:00" }], ["POST", "/v1/bank_transactions/{id}/match", 200, "application/json", { "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", "object": "bank_transaction", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-24", "amount": 5800, "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0", "reference": "F-1024", "account": "4821", "payer_tax_id": "ICV060329BY0", "status": "open", "classification": null, "note": null, "invoices": [], "payment": null, "suggested_match": { "invoices": ["inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN"], "amounts": { "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN": 5800 }, "method": "PUE", "confidence": "high", "reasons": ["Mismo monto", "RFC del cliente en el concepto"] }, "created_at": "2026-10-25T09:00:00-06:00" }], ["POST", "/v1/bank_transactions/{id}/classify", 200, "application/json", { "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", "object": "bank_transaction", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-24", "amount": 5800, "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0", "reference": "F-1024", "account": "4821", "payer_tax_id": "ICV060329BY0", "status": "open", "classification": null, "note": null, "invoices": [], "payment": null, "suggested_match": { "invoices": ["inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN"], "amounts": { "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN": 5800 }, "method": "PUE", "confidence": "high", "reasons": ["Mismo monto", "RFC del cliente en el concepto"] }, "created_at": "2026-10-25T09:00:00-06:00" }], ["POST", "/v1/bank_transactions/{id}/reopen", 200, "application/json", { "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", "object": "bank_transaction", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-24", "amount": 5800, "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0", "reference": "F-1024", "account": "4821", "payer_tax_id": "ICV060329BY0", "status": "open", "classification": null, "note": null, "invoices": [], "payment": null, "suggested_match": { "invoices": ["inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN"], "amounts": { "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN": 5800 }, "method": "PUE", "confidence": "high", "reasons": ["Mismo monto", "RFC del cliente en el concepto"] }, "created_at": "2026-10-25T09:00:00-06:00" }], ["POST", "/v1/payments", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/credit_notes", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/advances", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["GET", "/v1/advances", 200, "application/json", { "object": "list", "data": [{ "object": "advance", "uuid": "D7BDBADC-7E6E-41E0-8D94-7E5FC4BB796E", "date": "2026-10-24", "series": null, "folio": "1", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "amount": 1000, "total": 1160, "iva": "0.16", "currency": "MXN" }], "has_more": false, "url": "/v1/advances" }], ["POST", "/v1/advances/{id}/apply", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/retentions", 201, "application/json", { "id": "ret_OufpKqnrvx9p5tENFcmUXpXJ58XxnF67kv", "object": "retention", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "valid", "uuid": "9A6F6BF3-6786-4747-800A-C9964E6509AE", "folio": 1, "internal_folio": "RET1", "date": "2026-10-24T10:15:42", "code": "01", "description": null, "recipient": { "foreign": false, "tax_id": "PEPJ800101AB1", "legal_name": "JUAN PEREZ PEREZ", "zip": "33826", "curp": null }, "period": { "year": 2026, "from_month": 9, "to_month": 9 }, "totals": { "operation": 10000, "taxed": 10000, "exempt": 0, "withheld": 2066.67 }, "taxes": [{ "tax": "isr", "base": 10000, "amount": 1000, "payment_type": "04" }, { "tax": "iva", "base": 10000, "amount": 1066.67, "payment_type": "01" }], "cancellation": null, "email": null, "error": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "proveedor": "42" } }], ["GET", "/v1/retentions", 200, "application/json", { "object": "list", "data": [{ "id": "ret_OufpKqnrvx9p5tENFcmUXpXJ58XxnF67kv", "object": "retention", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "valid", "uuid": "9A6F6BF3-6786-4747-800A-C9964E6509AE", "folio": 1, "internal_folio": "RET1", "date": "2026-10-24T10:15:42", "code": "01", "description": null, "recipient": { "foreign": false, "tax_id": "PEPJ800101AB1", "legal_name": "JUAN PEREZ PEREZ", "zip": "33826", "curp": null }, "period": { "year": 2026, "from_month": 9, "to_month": 9 }, "totals": { "operation": 10000, "taxed": 10000, "exempt": 0, "withheld": 2066.67 }, "taxes": [{ "tax": "isr", "base": 10000, "amount": 1000, "payment_type": "04" }, { "tax": "iva", "base": 10000, "amount": 1066.67, "payment_type": "01" }], "cancellation": null, "email": null, "error": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "proveedor": "42" } }], "has_more": false, "url": "/v1/retentions" }], ["GET", "/v1/retentions/{id}", 200, "application/json", { "id": "ret_OufpKqnrvx9p5tENFcmUXpXJ58XxnF67kv", "object": "retention", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "valid", "uuid": "9A6F6BF3-6786-4747-800A-C9964E6509AE", "folio": 1, "internal_folio": "RET1", "date": "2026-10-24T10:15:42", "code": "01", "description": null, "recipient": { "foreign": false, "tax_id": "PEPJ800101AB1", "legal_name": "JUAN PEREZ PEREZ", "zip": "33826", "curp": null }, "period": { "year": 2026, "from_month": 9, "to_month": 9 }, "totals": { "operation": 10000, "taxed": 10000, "exempt": 0, "withheld": 2066.67 }, "taxes": [{ "tax": "isr", "base": 10000, "amount": 1000, "payment_type": "04" }, { "tax": "iva", "base": 10000, "amount": 1066.67, "payment_type": "01" }], "cancellation": null, "email": null, "error": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "proveedor": "42" } }], ["GET", "/v1/retentions/{id}/pdf", 200, "application/pdf", null], ["GET", "/v1/retentions/{id}/xml", 200, "application/xml", null], ["POST", "/v1/retentions/{id}/send", 200, "application/json", { "id": "ret_OufpKqnrvx9p5tENFcmUXpXJ58XxnF67kv", "object": "retention", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "valid", "uuid": "9A6F6BF3-6786-4747-800A-C9964E6509AE", "folio": 1, "internal_folio": "RET1", "date": "2026-10-24T10:15:42", "code": "01", "description": null, "recipient": { "foreign": false, "tax_id": "PEPJ800101AB1", "legal_name": "JUAN PEREZ PEREZ", "zip": "33826", "curp": null }, "period": { "year": 2026, "from_month": 9, "to_month": 9 }, "totals": { "operation": 10000, "taxed": 10000, "exempt": 0, "withheld": 2066.67 }, "taxes": [{ "tax": "isr", "base": 10000, "amount": 1000, "payment_type": "04" }, { "tax": "iva", "base": 10000, "amount": 1066.67, "payment_type": "01" }], "cancellation": null, "email": null, "error": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "proveedor": "42" } }], ["POST", "/v1/retentions/{id}/cancel", 200, "application/json", { "id": "ret_OufpKqnrvx9p5tENFcmUXpXJ58XxnF67kv", "object": "retention", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "valid", "uuid": "9A6F6BF3-6786-4747-800A-C9964E6509AE", "folio": 1, "internal_folio": "RET1", "date": "2026-10-24T10:15:42", "code": "01", "description": null, "recipient": { "foreign": false, "tax_id": "PEPJ800101AB1", "legal_name": "JUAN PEREZ PEREZ", "zip": "33826", "curp": null }, "period": { "year": 2026, "from_month": 9, "to_month": 9 }, "totals": { "operation": 10000, "taxed": 10000, "exempt": 0, "withheld": 2066.67 }, "taxes": [{ "tax": "isr", "base": 10000, "amount": 1000, "payment_type": "04" }, { "tax": "iva", "base": 10000, "amount": 1066.67, "payment_type": "01" }], "cancellation": null, "email": null, "error": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "proveedor": "42" } }], ["POST", "/v1/employees", 201, "application/json", { "id": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "object": "employee", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "9", "name": "ANA GÓMEZ RUIZ", "tax_id": "GORA800101JK2", "curp": "GORA800101MDFMZN09", "social_security_number": "12345678903", "zip": "06000", "email": null, "start_date": "2024-03-04", "end_date": null, "daily_salary": 320, "integrated_daily_salary": 334.66, "contract_type": "01", "workday_type": "01", "regime_type": "02", "periodicity": "02", "risk_class": "1", "state": "CMX", "border_zone": false, "unionized": false, "department": null, "position": null, "warnings": [], "created_at": "2026-10-20T09:02:11-06:00" }], ["GET", "/v1/employees", 200, "application/json", { "object": "list", "data": [{ "id": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "object": "employee", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "9", "name": "ANA GÓMEZ RUIZ", "tax_id": "GORA800101JK2", "curp": "GORA800101MDFMZN09", "social_security_number": "12345678903", "zip": "06000", "email": null, "start_date": "2024-03-04", "end_date": null, "daily_salary": 320, "integrated_daily_salary": 334.66, "contract_type": "01", "workday_type": "01", "regime_type": "02", "periodicity": "02", "risk_class": "1", "state": "CMX", "border_zone": false, "unionized": false, "department": null, "position": null, "warnings": [], "created_at": "2026-10-20T09:02:11-06:00" }], "has_more": false, "url": "/v1/employees" }], ["GET", "/v1/employees/{id}", 200, "application/json", { "id": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "object": "employee", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "9", "name": "ANA GÓMEZ RUIZ", "tax_id": "GORA800101JK2", "curp": "GORA800101MDFMZN09", "social_security_number": "12345678903", "zip": "06000", "email": null, "start_date": "2024-03-04", "end_date": null, "daily_salary": 320, "integrated_daily_salary": 334.66, "contract_type": "01", "workday_type": "01", "regime_type": "02", "periodicity": "02", "risk_class": "1", "state": "CMX", "border_zone": false, "unionized": false, "department": null, "position": null, "warnings": [], "created_at": "2026-10-20T09:02:11-06:00" }], ["POST", "/v1/employees/{id}", 200, "application/json", { "id": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "object": "employee", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "9", "name": "ANA GÓMEZ RUIZ", "tax_id": "GORA800101JK2", "curp": "GORA800101MDFMZN09", "social_security_number": "12345678903", "zip": "06000", "email": null, "start_date": "2024-03-04", "end_date": null, "daily_salary": 320, "integrated_daily_salary": 334.66, "contract_type": "01", "workday_type": "01", "regime_type": "02", "periodicity": "02", "risk_class": "1", "state": "CMX", "border_zone": false, "unionized": false, "department": null, "position": null, "warnings": [], "created_at": "2026-10-20T09:02:11-06:00" }], ["DELETE", "/v1/employees/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/payroll_receipts", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/payroll_receipts/preview", 200, "application/json", { "object": "payroll_receipt_preview", "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "periodicity": "02", "period": { "start": "2026-10-10", "end": "2026-10-16", "payment_date": "2026-10-16" }, "days": 7, "contribution_base_salary": 334.66, "perceptions": [{ "type": "001", "key": "001", "concept": "Sueldo", "taxed": 2240, "exempt": 0 }], "deductions": [{ "type": "001", "key": "001", "concept": "Cuotas IMSS", "amount": 55.63 }, { "type": "002", "key": "002", "concept": "ISR", "amount": 37.73 }], "other_payments": [{ "type": "002", "key": "002", "concept": "Subsidio para el empleo del Decreto que otorga el subsidio para el empleo (DOF 1 de mayo de 2024)", "amount": 0, "subsidy_caused": 123.34, "subsidy_applied": 123.34 }], "isr": { "tariff": 161.07, "subsidy": 123.34, "withheld": 37.73, "exempt_minimum": false }, "totals": { "salaries": 2240, "taxed": 2240, "exempt": 0, "perceptions": 2240, "other_deductions": 55.63, "taxes_withheld": 37.73, "deductions": 93.36, "other_payments": 0, "subtotal": 2240, "net": 2146.64 } }], ["POST", "/v1/invoice_batches", 202, "application/json", { "id": "bat_OufpKqnrvx9p4hMdcoapAo5aaGJEme7mXj", "object": "invoice_batch", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Cuotas de octubre", "status": "completed", "total": 2, "stamped": 1, "failed": 1, "created_at": "2026-10-24T10:15:42-06:00", "completed_at": "2026-10-24T10:15:42-06:00", "processing": 0, "invoices": [{ "index": 0, "reference": "depto-101", "status": "valid", "invoice": "inv_OufpKqnrvx9p0mn7VjQ6JlfipKAkHWstOK", "uuid": "DB494B07-D6DE-4F70-8ED0-C8B864FF8717", "total": 1740, "error": null }, { "index": 1, "reference": "depto-102", "status": "failed", "invoice": null, "uuid": null, "total": 1740, "error": "El SAT no reconoce el nombre del cliente. Escríbalo exactamente como en su constancia de situación fiscal, en mayúsculas y sin «S.A. de C.V.» ni otro régimen de capital." }] }], ["GET", "/v1/invoice_batches", 200, "application/json", { "object": "list", "data": [{ "id": "bat_OufpKqnrvx9p4hMdcoapAo5aaGJEme7mXj", "object": "invoice_batch", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Cuotas de octubre", "status": "completed", "total": 2, "stamped": 1, "failed": 1, "created_at": "2026-10-24T10:15:42-06:00", "completed_at": "2026-10-24T10:15:42-06:00", "processing": 0, "invoices": [{ "index": 0, "reference": "depto-101", "status": "valid", "invoice": "inv_OufpKqnrvx9p0mn7VjQ6JlfipKAkHWstOK", "uuid": "DB494B07-D6DE-4F70-8ED0-C8B864FF8717", "total": 1740, "error": null }, { "index": 1, "reference": "depto-102", "status": "failed", "invoice": null, "uuid": null, "total": 1740, "error": "El SAT no reconoce el nombre del cliente. Escríbalo exactamente como en su constancia de situación fiscal, en mayúsculas y sin «S.A. de C.V.» ni otro régimen de capital." }] }], "has_more": false, "url": "/v1/invoice_batches" }], ["GET", "/v1/invoice_batches/{id}", 200, "application/json", { "id": "bat_OufpKqnrvx9p4hMdcoapAo5aaGJEme7mXj", "object": "invoice_batch", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Cuotas de octubre", "status": "completed", "total": 2, "stamped": 1, "failed": 1, "created_at": "2026-10-24T10:15:42-06:00", "completed_at": "2026-10-24T10:15:42-06:00", "processing": 0, "invoices": [{ "index": 0, "reference": "depto-101", "status": "valid", "invoice": "inv_OufpKqnrvx9p0mn7VjQ6JlfipKAkHWstOK", "uuid": "DB494B07-D6DE-4F70-8ED0-C8B864FF8717", "total": 1740, "error": null }, { "index": 1, "reference": "depto-102", "status": "failed", "invoice": null, "uuid": null, "total": 1740, "error": "El SAT no reconoce el nombre del cliente. Escríbalo exactamente como en su constancia de situación fiscal, en mayúsculas y sin «S.A. de C.V.» ni otro régimen de capital." }] }], ["POST", "/v1/tax_ids/validate", 200, "application/json", { "object": "tax_id_validation", "tax_id": "ICV060329BY0", "kind": "company", "valid": false, "checked_with_sat": true, "errors": [{ "param": "legal_name", "code": "legal_name_capital_regime", "message": "Sin «S.A. de C.V.»: en CFDI 4.0 el nombre va sin régimen de capital, como en la constancia.", "suggestion": "INMOBILIARIA CVA" }, { "param": "zip", "code": "zip_mismatch", "message": "El código postal no es el del domicilio fiscal que tiene el SAT.", "suggestion": "33826" }], "warnings": [], "sat_record": { "legal_name": "INMOBILIARIA CVA", "zip": "33826", "tax_systems": ["601"] }, "sat_error": null, "sat_lists": { "object": "sat_list_check", "tax_id": "ICV060329BY0", "name": null, "listed": false, "risk": "none", "lists": [], "lists_updated_at": "2026-10-24T00:12:40-06:00" } }], ["POST", "/v1/customers", 201, "application/json", { "id": "cus_OufpKqnrvx9p1", "object": "customer", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "email": "pagos@cva.example", "use": "G03", "foreign": null, "ieps_taxpayer": false, "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["GET", "/v1/customers", 200, "application/json", { "object": "list", "data": [{ "id": "cus_OufpKqnrvx9p1", "object": "customer", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "email": "pagos@cva.example", "use": "G03", "foreign": null, "ieps_taxpayer": false, "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], "has_more": false, "url": "/v1/customers" }], ["GET", "/v1/customers/{id}", 200, "application/json", { "id": "cus_OufpKqnrvx9p1", "object": "customer", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "email": "pagos@cva.example", "use": "G03", "foreign": null, "ieps_taxpayer": false, "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["POST", "/v1/customers/{id}", 200, "application/json", { "id": "cus_OufpKqnrvx9p1", "object": "customer", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "email": "pagos@cva.example", "use": "G03", "foreign": null, "ieps_taxpayer": false, "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["DELETE", "/v1/customers/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/customer_data_requests", 201, "application/json", { "id": "cdr_0q1Vmmw52sbD4cHPqLfBvX0AkFg3hX2Ys", "object": "customer_data_request", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "status": "completed", "url": null, "reference": "cliente-8812", "description": "Para facturar su suscripción de octubre.", "expires_at": "2026-12-23T10:15:00-06:00", "created_at": "2026-10-24T10:15:00-06:00", "submission": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "use": "G03", "email": "facturas@inmobiliariacva.mx", "source": "constancia", "customer": "cus_0q1Vmmw52sbD1", "applied": true, "submitted_at": "2026-10-24T11:02:41-06:00" } }], ["GET", "/v1/customer_data_requests", 200, "application/json", { "object": "list", "data": [{ "id": "cdr_0q1Vmmw52sbD4cHPqLfBvX0AkFg3hX2Ys", "object": "customer_data_request", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "status": "completed", "url": null, "reference": "cliente-8812", "description": "Para facturar su suscripción de octubre.", "expires_at": "2026-12-23T10:15:00-06:00", "created_at": "2026-10-24T10:15:00-06:00", "submission": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "use": "G03", "email": "facturas@inmobiliariacva.mx", "source": "constancia", "customer": "cus_0q1Vmmw52sbD1", "applied": true, "submitted_at": "2026-10-24T11:02:41-06:00" } }], "has_more": false, "url": "/v1/customer_data_requests" }], ["GET", "/v1/customer_data_requests/{id}", 200, "application/json", { "id": "cdr_0q1Vmmw52sbD4cHPqLfBvX0AkFg3hX2Ys", "object": "customer_data_request", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "status": "completed", "url": null, "reference": "cliente-8812", "description": "Para facturar su suscripción de octubre.", "expires_at": "2026-12-23T10:15:00-06:00", "created_at": "2026-10-24T10:15:00-06:00", "submission": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "use": "G03", "email": "facturas@inmobiliariacva.mx", "source": "constancia", "customer": "cus_0q1Vmmw52sbD1", "applied": true, "submitted_at": "2026-10-24T11:02:41-06:00" } }], ["DELETE", "/v1/customer_data_requests/{id}", 200, "application/json", { "id": "cdr_0q1Vmmw52sbD4cHPqLfBvX0AkFg3hX2Ys", "object": "customer_data_request", "livemode": false, "issuer": "iss_0q1Vmmw52sbD", "status": "completed", "url": null, "reference": "cliente-8812", "description": "Para facturar su suscripción de octubre.", "expires_at": "2026-12-23T10:15:00-06:00", "created_at": "2026-10-24T10:15:00-06:00", "submission": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826", "use": "G03", "email": "facturas@inmobiliariacva.mx", "source": "constancia", "customer": "cus_0q1Vmmw52sbD1", "applied": true, "submitted_at": "2026-10-24T11:02:41-06:00" } }], ["POST", "/v1/products", 201, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": null, "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "unit_price": 2500, "open_price": false, "taxability": "02", "iva": "0.16", "ieps": null, "ieps_factor": null, "iva_retention": 0, "isr_retention": 0, "local_taxes": [], "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["GET", "/v1/products", 200, "application/json", { "object": "list", "data": [{ "id": "prd_OufpKqnrvx9p1", "object": "product", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": null, "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "unit_price": 2500, "open_price": false, "taxability": "02", "iva": "0.16", "ieps": null, "ieps_factor": null, "iva_retention": 0, "isr_retention": 0, "local_taxes": [], "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], "has_more": false, "url": "/v1/products" }], ["GET", "/v1/products/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": null, "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "unit_price": 2500, "open_price": false, "taxability": "02", "iva": "0.16", "ieps": null, "ieps_factor": null, "iva_retention": 0, "isr_retention": 0, "local_taxes": [], "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["POST", "/v1/products/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": null, "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "unit_price": 2500, "open_price": false, "taxability": "02", "iva": "0.16", "ieps": null, "ieps_factor": null, "iva_retention": 0, "isr_retention": 0, "local_taxes": [], "created_at": "2026-10-20T09:02:11-06:00", "updated_at": "2026-10-24T10:15:42-06:00" }], ["DELETE", "/v1/products/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["GET", "/v1/sat_catalogs/{name}", 200, "application/json", { "object": "list", "data": [{ "code": "80131500", "description": "Alquiler de propiedades", "similar_words": "renta" }], "has_more": false, "url": "/v1/sat_catalogs/{name}" }], ["GET", "/v1/sat_lists/{tax_id}", 200, "application/json", { "object": "sat_list_check", "tax_id": "AAA080808HL8", "name": "EMPRESA SIMULADORA SA DE CV", "listed": true, "risk": "high", "lists": [{ "list": "69b", "source": "69b", "source_name": "69-B (operaciones simuladas)", "situation": "Definitivo", "published_on": null, "details": { "Publicación página SAT definitivos": "15/03/2024", "Número y fecha de oficio global de definitivos": "500-05-2024-1234 de fecha 01/03/2024" } }], "lists_updated_at": "2026-10-24T00:12:40-06:00" }], ["POST", "/v1/sat_lists/check", 200, "application/json", { "object": "list", "data": [{ "object": "sat_list_check", "tax_id": "AAA080808HL8", "name": "EMPRESA SIMULADORA SA DE CV", "listed": true, "risk": "high", "lists": [{ "list": "69b", "source": "69b", "source_name": "69-B (operaciones simuladas)", "situation": "Definitivo", "published_on": null, "details": { "Publicación página SAT definitivos": "15/03/2024", "Número y fecha de oficio global de definitivos": "500-05-2024-1234 de fecha 01/03/2024" } }], "lists_updated_at": "2026-10-24T00:12:40-06:00" }], "has_more": false, "url": "/v1/sat_lists/check" }], ["POST", "/v1/sat_downloads", 202, "application/json", { "id": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc", "object": "sat_download", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "direction": "received", "from": "2026-09-01", "to": "2026-09-30", "type": null, "counterparty_tax_id": null, "uuid": null, "status": "completed", "new_invoices": 8, "error": null, "created_at": "2026-10-24T10:20:00-06:00", "completed_at": "2026-10-24T10:27:41-06:00" }], ["GET", "/v1/sat_downloads", 200, "application/json", { "object": "list", "data": [{ "id": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc", "object": "sat_download", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "direction": "received", "from": "2026-09-01", "to": "2026-09-30", "type": null, "counterparty_tax_id": null, "uuid": null, "status": "completed", "new_invoices": 8, "error": null, "created_at": "2026-10-24T10:20:00-06:00", "completed_at": "2026-10-24T10:27:41-06:00" }], "has_more": false, "url": "/v1/sat_downloads" }], ["GET", "/v1/sat_downloads/{id}", 200, "application/json", { "id": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc", "object": "sat_download", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "direction": "received", "from": "2026-09-01", "to": "2026-09-30", "type": null, "counterparty_tax_id": null, "uuid": null, "status": "completed", "new_invoices": 8, "error": null, "created_at": "2026-10-24T10:20:00-06:00", "completed_at": "2026-10-24T10:27:41-06:00" }], ["GET", "/v1/sat_invoices", 200, "application/json", { "object": "list", "data": [{ "id": "sat_OufpKqnrvx9p1F", "object": "sat_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "uuid": "9B2D4E61-7C3A-4F18-8E5D-0A6B9C1D2E3F", "direction": "received", "type": "I", "date": "2026-09-12T11:04:00", "series": "A", "folio": "4821", "issued_by": { "tax_id": "XIA190128J61", "legal_name": "XENON INDUSTRIAL ARTICLES" }, "issued_to": { "tax_id": "TOL190312KT4", "legal_name": "TOLPI" }, "currency": "MXN", "exchange_rate": null, "payment_method": "PUE", "payment_form": "03", "use": "G03", "subtotal": 18400, "total": 21344, "taxes": { "iva": 2944, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "ieps_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "sat_status": "active", "sat_download": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc", "downloaded_at": "2026-10-24T10:27:40-06:00" }], "has_more": false, "url": "/v1/sat_invoices" }], ["GET", "/v1/sat_invoices/{id}", 200, "application/json", { "id": "sat_OufpKqnrvx9p1F", "object": "sat_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "uuid": "9B2D4E61-7C3A-4F18-8E5D-0A6B9C1D2E3F", "direction": "received", "type": "I", "date": "2026-09-12T11:04:00", "series": "A", "folio": "4821", "issued_by": { "tax_id": "XIA190128J61", "legal_name": "XENON INDUSTRIAL ARTICLES" }, "issued_to": { "tax_id": "TOL190312KT4", "legal_name": "TOLPI" }, "currency": "MXN", "exchange_rate": null, "payment_method": "PUE", "payment_form": "03", "use": "G03", "subtotal": 18400, "total": 21344, "taxes": { "iva": 2944, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "ieps_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "sat_status": "active", "sat_download": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc", "downloaded_at": "2026-10-24T10:27:40-06:00" }], ["GET", "/v1/sat_invoices/{id}/xml", 200, "application/xml", null], ["POST", "/v1/sat_declarations/refresh", 200, "application/json", { "object": "sat_declarations_refresh", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "status": "completed", "found": 10, "downloaded": 10, "pending": 0, "warning": null, "refreshed_at": "2026-10-26T09:12:00-06:00", "next_refresh_at": "2026-10-26T09:22:00-06:00" }], ["GET", "/v1/sat_declarations", 200, "application/json", { "object": "list", "data": [{ "id": "dcl_OufpKqnrvx9p1F", "object": "sat_declaration", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "source": "monthly", "year": 2026, "month": 9, "period": "Septiembre", "type": "normal", "complementary_type": null, "operation_number": "92026090000001", "payment_line": "0426TEST2026090001", "filed_on": "2026-10-15", "profit_coefficient": 0.0219, "isr_due": 7718.53, "vat_due": 16520, "total_due": 24238.53, "sections": [{ "tax": "ISR personas morales", "fields": [{ "label": "INGRESOS NOMINALES DEL PERIODO", "value": 292500 }, { "label": "COEFICIENTE DE UTILIDAD", "value": 0.0219 }, { "label": "IMPUESTO A CARGO", "value": 7718.53 }] }], "receipt": { "concepts": [{ "concept": "ISR personas morales", "due": 7718.53, "amount_due": 7718.53, "amount_to_pay": 7718.53 }, { "concept": "IVA personas morales", "due": 16520, "amount_due": 16520, "amount_to_pay": 16520 }], "total": 24238.53, "payment_line": "0426TEST2026090001", "valid_until": null }, "files": { "pdf": true, "receipt": true, "financial_statements": false }, "files_error": null, "created_at": "2026-10-26T09:12:00-06:00", "updated_at": "2026-10-26T09:12:04-06:00" }], "has_more": false, "url": "/v1/sat_declarations" }], ["GET", "/v1/sat_declarations/{id}", 200, "application/json", { "id": "dcl_OufpKqnrvx9p1F", "object": "sat_declaration", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "source": "monthly", "year": 2026, "month": 9, "period": "Septiembre", "type": "normal", "complementary_type": null, "operation_number": "92026090000001", "payment_line": "0426TEST2026090001", "filed_on": "2026-10-15", "profit_coefficient": 0.0219, "isr_due": 7718.53, "vat_due": 16520, "total_due": 24238.53, "sections": [{ "tax": "ISR personas morales", "fields": [{ "label": "INGRESOS NOMINALES DEL PERIODO", "value": 292500 }, { "label": "COEFICIENTE DE UTILIDAD", "value": 0.0219 }, { "label": "IMPUESTO A CARGO", "value": 7718.53 }] }], "receipt": { "concepts": [{ "concept": "ISR personas morales", "due": 7718.53, "amount_due": 7718.53, "amount_to_pay": 7718.53 }, { "concept": "IVA personas morales", "due": 16520, "amount_due": 16520, "amount_to_pay": 16520 }], "total": 24238.53, "payment_line": "0426TEST2026090001", "valid_until": null }, "files": { "pdf": true, "receipt": true, "financial_statements": false }, "files_error": null, "created_at": "2026-10-26T09:12:00-06:00", "updated_at": "2026-10-26T09:12:04-06:00" }], ["GET", "/v1/sat_declarations/{id}/pdf", 200, "application/pdf", null], ["GET", "/v1/sat_declarations/{id}/receipt", 200, "application/pdf", null], ["GET", "/v1/sat_declarations/{id}/financial_statements", 200, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", null], ["POST", "/v1/tickets", 201, "application/json", { "id": "tkt_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "object": "ticket", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "folio": "A1042", "code": "A1042-K7QX", "status": "pending", "url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c?c=A1042-K7QX", "total": 580, "tip": 0, "payment_form": "04", "description": "Consumo de alimentos", "product_key": "90101501", "sold_at": "2026-10-24T14:32:00-06:00", "invoiceable_until": "2026-10-31", "invoice": null, "global_invoice": null, "customer": null, "created_at": "2026-10-24T14:32:05-06:00" }], ["GET", "/v1/tickets", 200, "application/json", { "object": "list", "data": [{ "id": "tkt_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "object": "ticket", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "folio": "A1042", "code": "A1042-K7QX", "status": "pending", "url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c?c=A1042-K7QX", "total": 580, "tip": 0, "payment_form": "04", "description": "Consumo de alimentos", "product_key": "90101501", "sold_at": "2026-10-24T14:32:00-06:00", "invoiceable_until": "2026-10-31", "invoice": null, "global_invoice": null, "customer": null, "created_at": "2026-10-24T14:32:05-06:00" }], "has_more": false, "url": "/v1/tickets" }], ["GET", "/v1/tickets/{id}", 200, "application/json", { "id": "tkt_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "object": "ticket", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "folio": "A1042", "code": "A1042-K7QX", "status": "pending", "url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c?c=A1042-K7QX", "total": 580, "tip": 0, "payment_form": "04", "description": "Consumo de alimentos", "product_key": "90101501", "sold_at": "2026-10-24T14:32:00-06:00", "invoiceable_until": "2026-10-31", "invoice": null, "global_invoice": null, "customer": null, "created_at": "2026-10-24T14:32:05-06:00" }], ["DELETE", "/v1/tickets/{id}", 200, "application/json", { "id": "tkt_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "object": "ticket", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "folio": "A1042", "code": "A1042-K7QX", "status": "pending", "url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c?c=A1042-K7QX", "total": 580, "tip": 0, "payment_form": "04", "description": "Consumo de alimentos", "product_key": "90101501", "sold_at": "2026-10-24T14:32:00-06:00", "invoiceable_until": "2026-10-31", "invoice": null, "global_invoice": null, "customer": null, "created_at": "2026-10-24T14:32:05-06:00" }], ["GET", "/v1/issuers/{id}/self_invoicing", 200, "application/json", { "object": "self_invoicing", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "portal_url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c", "window": "month", "window_days": 7, "global_periodicity": "04" }], ["POST", "/v1/issuers/{id}/self_invoicing", 200, "application/json", { "object": "self_invoicing", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "portal_url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c", "window": "month", "window_days": 7, "global_periodicity": "04" }], ["GET", "/v1/accounting/journal_entries", 200, "application/json", { "object": "list", "data": [{ "id": "D-202610-00001", "object": "journal_entry", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "date": "2026-10-02", "description": "Factura A1042 INMOBILIARIA CVA", "invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "uuid": "5F3C1B2A-9D8E-4F7A-B6C5-1D2E3F4A5B6C", "tax_id": "ICV060329BY0", "total": 5800, "currency": "MXN", "exchange_rate": null, "lines": [{ "account": "105-01", "account_name": "Clientes nacionales", "grouping_code": "105.01", "debit": 5800, "credit": 0 }, { "account": "401-01", "account_name": "Ventas y/o servicios gravados a la tasa general", "grouping_code": "401.01", "debit": 0, "credit": 5000 }, { "account": "208-01", "account_name": "IVA trasladado cobrado", "grouping_code": "208.01", "debit": 0, "credit": 800 }] }], "has_more": false, "url": "/v1/accounting/journal_entries" }], ["GET", "/v1/accounting/trial_balance", 200, "application/json", { "object": "trial_balance", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "month": "2026-10", "journal_entries": 1, "accounts": [{ "object": "ledger_account", "number": "105-01", "name": "Clientes nacionales", "grouping_code": "105.01", "nature": "debit", "opening_balance": 0, "debit": 5800, "credit": 0, "closing_balance": 5800 }, { "object": "ledger_account", "number": "208-01", "name": "IVA trasladado cobrado", "grouping_code": "208.01", "nature": "credit", "opening_balance": 0, "debit": 0, "credit": 800, "closing_balance": 800 }, { "object": "ledger_account", "number": "401-01", "name": "Ventas y/o servicios gravados a la tasa general", "grouping_code": "401.01", "nature": "credit", "opening_balance": 0, "debit": 0, "credit": 5000, "closing_balance": 5000 }], "totals": { "debit": 5800, "credit": 5800 } }], ["GET", "/v1/accounting/accounts", 200, "application/json", { "object": "list", "data": [{ "object": "ledger_account", "number": "105-01", "name": "Clientes nacionales", "grouping_code": "105.01", "nature": "debit" }], "has_more": false, "url": "/v1/accounting/accounts" }], ["GET", "/v1/accounting/electronic_accounting", 200, "application/zip", null], ["GET", "/v1/accounting/diot", 200, "application/json", { "object": "diot", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "month": "2026-09", "proportion": 1, "lines": [{ "tax_id": "CACX7605101P8", "name": "XOCHILT CASAS CHAVEZ", "third_party_type": "04", "operation_type": "03", "paid": { "base_16": 12000, "base_8": 0, "base_0": 0, "exempt": 0, "not_taxable": 0, "vat": 1920 }, "returns": { "base_16": 0, "base_8": 0, "base_0": 0, "exempt": 0, "not_taxable": 0, "vat": 0 }, "blacklisted": false }], "warnings": [] }], ["GET", "/v1/accounting/diot/file", 200, "text/plain", null], ["POST", "/v1/store_connections", 201, "application/json", { "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "object": "store_connection", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "platform": "shopify", "shop": "mi-tienda.myshopify.com", "status": "active", "authorize_url": null, "settings": { "product_key": "53101600", "unit_key": null, "iva": "0.16", "description": null, "folio_prefix": "SHOP-", "payment_form": null, "payment_forms": { "paypal": "31" }, "auto_invoice": null }, "orders_count": 128, "last_order_at": "2026-10-25T10:12:44-06:00", "last_error": null, "created_at": "2026-10-01T09:00:00-06:00" }], ["GET", "/v1/store_connections", 200, "application/json", { "object": "list", "data": [{ "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "object": "store_connection", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "platform": "shopify", "shop": "mi-tienda.myshopify.com", "status": "active", "authorize_url": null, "settings": { "product_key": "53101600", "unit_key": null, "iva": "0.16", "description": null, "folio_prefix": "SHOP-", "payment_form": null, "payment_forms": { "paypal": "31" }, "auto_invoice": null }, "orders_count": 128, "last_order_at": "2026-10-25T10:12:44-06:00", "last_error": null, "created_at": "2026-10-01T09:00:00-06:00" }], "has_more": false, "url": "/v1/store_connections" }], ["GET", "/v1/store_connections/{id}", 200, "application/json", { "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "object": "store_connection", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "platform": "shopify", "shop": "mi-tienda.myshopify.com", "status": "active", "authorize_url": null, "settings": { "product_key": "53101600", "unit_key": null, "iva": "0.16", "description": null, "folio_prefix": "SHOP-", "payment_form": null, "payment_forms": { "paypal": "31" }, "auto_invoice": null }, "orders_count": 128, "last_order_at": "2026-10-25T10:12:44-06:00", "last_error": null, "created_at": "2026-10-01T09:00:00-06:00" }], ["POST", "/v1/store_connections/{id}", 200, "application/json", { "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "object": "store_connection", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "platform": "shopify", "shop": "mi-tienda.myshopify.com", "status": "active", "authorize_url": null, "settings": { "product_key": "53101600", "unit_key": null, "iva": "0.16", "description": null, "folio_prefix": "SHOP-", "payment_form": null, "payment_forms": { "paypal": "31" }, "auto_invoice": null }, "orders_count": 128, "last_order_at": "2026-10-25T10:12:44-06:00", "last_error": null, "created_at": "2026-10-01T09:00:00-06:00" }], ["DELETE", "/v1/store_connections/{id}", 200, "application/json", { "id": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "object": "store_connection", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "platform": "shopify", "shop": "mi-tienda.myshopify.com", "status": "active", "authorize_url": null, "settings": { "product_key": "53101600", "unit_key": null, "iva": "0.16", "description": null, "folio_prefix": "SHOP-", "payment_form": null, "payment_forms": { "paypal": "31" }, "auto_invoice": null }, "orders_count": 128, "last_order_at": "2026-10-25T10:12:44-06:00", "last_error": null, "created_at": "2026-10-01T09:00:00-06:00" }], ["POST", "/v1/store_connections/{id}/import_orders", 200, "application/json", { "object": "store_import", "livemode": false, "store_connection": "stc_OufpKqnrvx9p3Kd8sLm2XyT5uBcW8sKdLx", "since": "2026-10-18", "tickets": 14, "invoiced": 0, "skipped": [{ "order": "1042", "reason": "está en USD; solo se registran pedidos en pesos." }] }], ["POST", "/v1/recurring_invoices", 201, "application/json", { "id": "rin_OufpKqnrvx9p7Hq2mZr1XyT5uBcW8sKdLx", "object": "recurring_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Renta oficina 3", "status": "active", "schedule": { "frequency": "monthly", "interval": 1, "day_of_month": 1, "hour": 7, "time_zone": "America/Mexico_City" }, "next_invoice_on": "2026-11-01", "last_invoiced_on": "2026-10-01", "last_invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "last_error": null, "send_email": true, "catch_up": "all", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "items": [{ "description": "Renta de oficina de {mes} {año}", "product_key": "80131500", "quantity": 1, "unit_key": "E48", "unit_price": 15000 }], "total": 17400, "created_at": "2026-09-28T11:02:14-06:00" }], ["GET", "/v1/recurring_invoices", 200, "application/json", { "object": "list", "data": [{ "id": "rin_OufpKqnrvx9p7Hq2mZr1XyT5uBcW8sKdLx", "object": "recurring_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Renta oficina 3", "status": "active", "schedule": { "frequency": "monthly", "interval": 1, "day_of_month": 1, "hour": 7, "time_zone": "America/Mexico_City" }, "next_invoice_on": "2026-11-01", "last_invoiced_on": "2026-10-01", "last_invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "last_error": null, "send_email": true, "catch_up": "all", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "items": [{ "description": "Renta de oficina de {mes} {año}", "product_key": "80131500", "quantity": 1, "unit_key": "E48", "unit_price": 15000 }], "total": 17400, "created_at": "2026-09-28T11:02:14-06:00" }], "has_more": false, "url": "/v1/recurring_invoices" }], ["GET", "/v1/recurring_invoices/{id}", 200, "application/json", { "id": "rin_OufpKqnrvx9p7Hq2mZr1XyT5uBcW8sKdLx", "object": "recurring_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Renta oficina 3", "status": "active", "schedule": { "frequency": "monthly", "interval": 1, "day_of_month": 1, "hour": 7, "time_zone": "America/Mexico_City" }, "next_invoice_on": "2026-11-01", "last_invoiced_on": "2026-10-01", "last_invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "last_error": null, "send_email": true, "catch_up": "all", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "items": [{ "description": "Renta de oficina de {mes} {año}", "product_key": "80131500", "quantity": 1, "unit_key": "E48", "unit_price": 15000 }], "total": 17400, "created_at": "2026-09-28T11:02:14-06:00" }], ["POST", "/v1/recurring_invoices/{id}", 200, "application/json", { "id": "rin_OufpKqnrvx9p7Hq2mZr1XyT5uBcW8sKdLx", "object": "recurring_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Renta oficina 3", "status": "active", "schedule": { "frequency": "monthly", "interval": 1, "day_of_month": 1, "hour": 7, "time_zone": "America/Mexico_City" }, "next_invoice_on": "2026-11-01", "last_invoiced_on": "2026-10-01", "last_invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "last_error": null, "send_email": true, "catch_up": "all", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "items": [{ "description": "Renta de oficina de {mes} {año}", "product_key": "80131500", "quantity": 1, "unit_key": "E48", "unit_price": 15000 }], "total": 17400, "created_at": "2026-09-28T11:02:14-06:00" }], ["DELETE", "/v1/recurring_invoices/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/recurring_invoices/{id}/skip", 200, "application/json", { "id": "rin_OufpKqnrvx9p7Hq2mZr1XyT5uBcW8sKdLx", "object": "recurring_invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Renta oficina 3", "status": "active", "schedule": { "frequency": "monthly", "interval": 1, "day_of_month": 1, "hour": 7, "time_zone": "America/Mexico_City" }, "next_invoice_on": "2026-11-01", "last_invoiced_on": "2026-10-01", "last_invoice": "inv_OufpKqnrvx9p6hW1yQbT3mZr8sKdLx0VeN", "last_error": null, "send_email": true, "catch_up": "all", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA" }, "currency": "MXN", "items": [{ "description": "Renta de oficina de {mes} {año}", "product_key": "80131500", "quantity": 1, "unit_key": "E48", "unit_price": 15000 }], "total": 17400, "created_at": "2026-09-28T11:02:14-06:00" }], ["POST", "/v1/recurring_invoices/{id}/run", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["POST", "/v1/quotes", 201, "application/json", { "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], ["GET", "/v1/quotes", 200, "application/json", { "object": "list", "data": [{ "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], "has_more": false, "url": "/v1/quotes" }], ["GET", "/v1/quotes/{id}", 200, "application/json", { "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], ["POST", "/v1/quotes/{id}", 200, "application/json", { "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], ["DELETE", "/v1/quotes/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/quotes/{id}/send", 200, "application/json", { "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], ["POST", "/v1/quotes/{id}/accept", 200, "application/json", { "id": "quo_OufpKqnrvx9p3Kd8wQm2XyT5uBcW8sKdLx", "object": "quote", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "COT-12", "version": 1, "status": "sent", "url": "https://fiscalisto.com/cotizacion/7Hq2mZr1XyT5uBcW8sKdLx0VeNOufpKq", "customer": { "tax_id": "ICV060329BY0", "name": "INMOBILIARIA CVA", "email": "compras@cva.example", "catalog_id": "cus_OufpKqnrvx9p42" }, "currency": "MXN", "items": [{ "description": "Desarrollo del sitio web", "product_key": "81112103", "quantity": 1, "unit_key": "E48", "unit_price": 45000 }], "total": 52200, "valid_until": "2026-11-09", "terms": "50% de anticipo, entrega en 4 semanas.", "notes": null, "auto_invoice": true, "customer_comment": null, "sent_at": "2026-10-25T10:12:00-06:00", "viewed_at": null, "decided_at": null, "decided_by": null, "invoice": null, "created_at": "2026-10-25T10:05:00-06:00" }], ["POST", "/v1/quotes/{id}/invoice", 201, "application/json", { "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "I04", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Mensualidad", "product_key": "86121700", "unit_key": "E48", "unit_name": "Unidad de servicio", "sku": "MEN-1", "quantity": 2, "unit_price": 2500, "taxability": "02", "iva": "0.16" }], "subtotal": 5000, "discount": 0, "taxes": { "iva": 800, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 5800, "payment_status": "paid", "amount_due": 0, "amount_paid": 5800, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} }], ["GET", "/v1/quotes/{id}/pdf", 200, "application/pdf", null], ["POST", "/v1/webhook_endpoints", 201, "application/json", { "id": "whe_0q1Vmmw52sbDpmtsKD1E", "object": "webhook_endpoint", "livemode": false, "sandbox": null, "url": "https://mi-plataforma.mx/webhooks/fiscalisto", "description": null, "events": ["invoice.stamped"], "status": "enabled", "disabled_reason": null, "failing_since": null, "previous_secret_expires_at": null, "api_version": null, "created_at": "2026-10-24T10:15:42-06:00", "secret": "whsec_MfKQ9r7Cq1ZzR0nN3xY2bW8eT5uV6sA4" }], ["GET", "/v1/webhook_endpoints", 200, "application/json", { "object": "list", "data": [{ "id": "whe_0q1Vmmw52sbDpmtsKD1E", "object": "webhook_endpoint", "livemode": false, "sandbox": null, "url": "https://mi-plataforma.mx/webhooks/fiscalisto", "description": null, "events": ["invoice.stamped"], "status": "enabled", "disabled_reason": null, "failing_since": null, "previous_secret_expires_at": null, "api_version": null, "created_at": "2026-10-24T10:15:42-06:00", "secret": "whsec_MfKQ9r7Cq1ZzR0nN3xY2bW8eT5uV6sA4" }], "has_more": false, "url": "/v1/webhook_endpoints" }], ["GET", "/v1/webhook_endpoints/{id}", 200, "application/json", { "id": "whe_0q1Vmmw52sbDpmtsKD1E", "object": "webhook_endpoint", "livemode": false, "sandbox": null, "url": "https://mi-plataforma.mx/webhooks/fiscalisto", "description": null, "events": ["invoice.stamped"], "status": "enabled", "disabled_reason": null, "failing_since": null, "previous_secret_expires_at": null, "api_version": null, "created_at": "2026-10-24T10:15:42-06:00", "secret": "whsec_MfKQ9r7Cq1ZzR0nN3xY2bW8eT5uV6sA4" }], ["POST", "/v1/webhook_endpoints/{id}", 200, "application/json", { "id": "whe_0q1Vmmw52sbDpmtsKD1E", "object": "webhook_endpoint", "livemode": false, "sandbox": null, "url": "https://mi-plataforma.mx/webhooks/fiscalisto", "description": null, "events": ["invoice.stamped"], "status": "enabled", "disabled_reason": null, "failing_since": null, "previous_secret_expires_at": null, "api_version": null, "created_at": "2026-10-24T10:15:42-06:00", "secret": "whsec_MfKQ9r7Cq1ZzR0nN3xY2bW8eT5uV6sA4" }], ["DELETE", "/v1/webhook_endpoints/{id}", 200, "application/json", { "id": "prd_OufpKqnrvx9p1", "object": "product", "deleted": true }], ["POST", "/v1/webhook_endpoints/{id}/roll_secret", 200, "application/json", { "id": "whe_0q1Vmmw52sbDpmtsKD1E", "object": "webhook_endpoint", "livemode": false, "sandbox": null, "url": "https://mi-plataforma.mx/webhooks/fiscalisto", "description": null, "events": ["invoice.stamped"], "status": "enabled", "disabled_reason": null, "failing_since": null, "previous_secret_expires_at": null, "api_version": null, "created_at": "2026-10-24T10:15:42-06:00", "secret": "whsec_MfKQ9r7Cq1ZzR0nN3xY2bW8eT5uV6sA4" }], ["POST", "/v1/webhook_endpoints/{id}/test", 200, "application/json", { "object": "webhook_test", "event": { "id": "evt_0PKhIdhYuAGwzmMQYfkc", "object": "event", "type": "invoice.stamped", "api_version": "2026-10-24", "livemode": false, "created_at": "2026-10-24T10:15:42-06:00", "data": { "object": { "id": "inv_OufpKqnrvx9p28SINJVjjWKYRhojBTJb8P", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "G03", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Consultoría", "product_key": "80101500", "unit_key": "E48", "unit_name": "Unidad de servicio", "quantity": 1, "unit_price": 1000, "taxability": "02", "iva": "0.16" }], "subtotal": 1000, "discount": 0, "taxes": { "iva": 160, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 1160, "payment_status": "paid", "amount_due": 0, "amount_paid": 1160, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} } } }, "delivery": { "ok": true, "status": 200, "error": null, "response_body": "{\"received\":true}", "duration_ms": 182 } }], ["GET", "/v1/events", 200, "application/json", { "object": "list", "data": [{ "id": "evt_0PKhIdhYuAGwzmMQYfkc", "object": "event", "type": "invoice.stamped", "api_version": "2026-10-24", "livemode": false, "created_at": "2026-10-24T10:15:42-06:00", "data": { "object": { "id": "inv_OufpKqnrvx9p28SINJVjjWKYRhojBTJb8P", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "G03", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Consultoría", "product_key": "80101500", "unit_key": "E48", "unit_name": "Unidad de servicio", "quantity": 1, "unit_price": 1000, "taxability": "02", "iva": "0.16" }], "subtotal": 1000, "discount": 0, "taxes": { "iva": 160, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 1160, "payment_status": "paid", "amount_due": 0, "amount_paid": 1160, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} } } }], "has_more": false, "url": "/v1/events" }], ["GET", "/v1/events/{id}", 200, "application/json", { "id": "evt_0PKhIdhYuAGwzmMQYfkc", "object": "event", "type": "invoice.stamped", "api_version": "2026-10-24", "livemode": false, "created_at": "2026-10-24T10:15:42-06:00", "data": { "object": { "id": "inv_OufpKqnrvx9p28SINJVjjWKYRhojBTJb8P", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "type": "I", "status": "valid", "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718", "series": null, "folio": "1", "date": "2026-10-24T10:15:42", "customer": { "tax_id": "ICV060329BY0", "legal_name": "INMOBILIARIA CVA", "tax_system": "601", "zip": "33826" }, "use": "G03", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "exchange_rate": null, "items": [{ "description": "Consultoría", "product_key": "80101500", "unit_key": "E48", "unit_name": "Unidad de servicio", "quantity": 1, "unit_price": 1000, "taxability": "02", "iva": "0.16" }], "subtotal": 1000, "discount": 0, "taxes": { "iva": 160, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 1160, "payment_status": "paid", "amount_due": 0, "amount_paid": 1160, "related": null, "cancellation": null, "email": null, "error": null, "recurring_invoice": null, "created_at": "2026-10-24T10:15:42-06:00", "metadata": {} } } }]];
|
package/dist/mock.d.ts
ADDED
package/dist/mock.js
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { API_VERSION } from "./core.js";
|
|
2
|
+
import { MOCK_ROUTES } from "./mock-routes.gen.js";
|
|
3
|
+
const ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
4
|
+
const random = (n) => Array.from(crypto.getRandomValues(new Uint8Array(n)), (b) => ALPHABET[b % 62]).join("");
|
|
5
|
+
const isObj = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
6
|
+
const clone = (v) => (v === undefined ? v : JSON.parse(JSON.stringify(v)));
|
|
7
|
+
function buildRoutes() {
|
|
8
|
+
const paths = new Set(MOCK_ROUTES.map(([m, p]) => `${m} ${p}`));
|
|
9
|
+
return MOCK_ROUTES.map(([method, path, status, type, example]) => {
|
|
10
|
+
const pattern = new RegExp(`^${path.replace(/\{[a-z_]+\}/g, "([^/]+)")}$`);
|
|
11
|
+
const item = /^(.*)\/\{id\}$/.exec(path)?.[1];
|
|
12
|
+
const collection = item ?? (paths.has(`GET ${path}/{id}`) ? path : null);
|
|
13
|
+
const kind = item
|
|
14
|
+
? method === "GET"
|
|
15
|
+
? "get"
|
|
16
|
+
: method === "DELETE"
|
|
17
|
+
? "delete"
|
|
18
|
+
: "update"
|
|
19
|
+
: collection
|
|
20
|
+
? method === "GET"
|
|
21
|
+
? "list"
|
|
22
|
+
: "create"
|
|
23
|
+
: "action";
|
|
24
|
+
return { method, path, pattern, status, type, example, collection, kind };
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** `example` with what `body` sets, where the types agree (an id where the example has an object stays the example's). */
|
|
28
|
+
function merge(example, body) {
|
|
29
|
+
if (body === undefined)
|
|
30
|
+
return clone(example);
|
|
31
|
+
if (isObj(example) && isObj(body)) {
|
|
32
|
+
const out = clone(example);
|
|
33
|
+
for (const [k, v] of Object.entries(body))
|
|
34
|
+
if (k in example)
|
|
35
|
+
out[k] = merge(example[k], v);
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
if (example === null || typeof example === typeof body)
|
|
39
|
+
return clone(body);
|
|
40
|
+
return clone(example);
|
|
41
|
+
}
|
|
42
|
+
const nowIso = () => {
|
|
43
|
+
// Mexico City time, as the API writes them.
|
|
44
|
+
const d = new Date(Date.now() - 6 * 3600_000);
|
|
45
|
+
return `${d.toISOString().slice(0, 19)}-06:00`;
|
|
46
|
+
};
|
|
47
|
+
export function createMock() {
|
|
48
|
+
const routes = buildRoutes();
|
|
49
|
+
const store = new Map();
|
|
50
|
+
const replays = new Map();
|
|
51
|
+
const items = (collection) => {
|
|
52
|
+
let m = store.get(collection);
|
|
53
|
+
if (!m) {
|
|
54
|
+
m = new Map();
|
|
55
|
+
store.set(collection, m);
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
const error = (status, type, code, message, param) => json(status, {
|
|
60
|
+
error: {
|
|
61
|
+
type,
|
|
62
|
+
code,
|
|
63
|
+
message,
|
|
64
|
+
...(param ? { param } : {}),
|
|
65
|
+
doc_url: `https://fiscalisto.com/docs/api/errores#${code}`,
|
|
66
|
+
request_id: `req_mock${random(12)}`,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const json = (status, body, headers = {}) => new Response(JSON.stringify(body), {
|
|
70
|
+
status,
|
|
71
|
+
headers: {
|
|
72
|
+
"content-type": "application/json; charset=utf-8",
|
|
73
|
+
"request-id": `req_mock${random(12)}`,
|
|
74
|
+
"fiscalisto-version": API_VERSION,
|
|
75
|
+
"fiscalisto-mock": "true",
|
|
76
|
+
...headers,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
const missing = (id) => error(404, "not_found_error", "resource_missing", `No existe un objeto con el id ${id}.`, "id");
|
|
80
|
+
async function answer(request, route, params, body) {
|
|
81
|
+
const url = new URL(request.url);
|
|
82
|
+
const id = params[0] ?? "";
|
|
83
|
+
const stored = route.collection ? items(route.collection) : null;
|
|
84
|
+
const example = route.example;
|
|
85
|
+
switch (route.kind) {
|
|
86
|
+
case "create": {
|
|
87
|
+
const obj = merge(example, body);
|
|
88
|
+
const prefix = isObj(example) && typeof example.id === "string"
|
|
89
|
+
? example.id.split("_")[0]
|
|
90
|
+
: "obj";
|
|
91
|
+
obj.id = `${prefix}_${random(14)}`;
|
|
92
|
+
if ("livemode" in obj)
|
|
93
|
+
obj.livemode = false;
|
|
94
|
+
if ("created_at" in obj)
|
|
95
|
+
obj.created_at = nowIso();
|
|
96
|
+
if ("updated_at" in obj)
|
|
97
|
+
obj.updated_at = nowIso();
|
|
98
|
+
if (isObj(body.metadata))
|
|
99
|
+
obj.metadata = body.metadata;
|
|
100
|
+
stored?.set(obj.id, obj);
|
|
101
|
+
return json(route.status, obj);
|
|
102
|
+
}
|
|
103
|
+
case "list": {
|
|
104
|
+
const all = [...(stored?.values() ?? [])].reverse();
|
|
105
|
+
const limit = Math.min(Math.max(Number(url.searchParams.get("limit") ?? 10) || 10, 1), 100);
|
|
106
|
+
const after = url.searchParams.get("starting_after");
|
|
107
|
+
const from = after ? all.findIndex((o) => o.id === after) + 1 : 0;
|
|
108
|
+
const page = all.slice(from, from + limit);
|
|
109
|
+
return json(200, {
|
|
110
|
+
object: "list",
|
|
111
|
+
url: url.pathname,
|
|
112
|
+
has_more: from + limit < all.length,
|
|
113
|
+
data: page,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
case "get": {
|
|
117
|
+
const obj = stored?.get(id);
|
|
118
|
+
return obj ? json(200, obj) : missing(id);
|
|
119
|
+
}
|
|
120
|
+
case "update": {
|
|
121
|
+
const obj = stored?.get(id);
|
|
122
|
+
if (!obj)
|
|
123
|
+
return missing(id);
|
|
124
|
+
const next = merge(obj, body);
|
|
125
|
+
if ("updated_at" in next)
|
|
126
|
+
next.updated_at = nowIso();
|
|
127
|
+
if (isObj(body.metadata))
|
|
128
|
+
next.metadata = body.metadata;
|
|
129
|
+
stored?.set(id, next);
|
|
130
|
+
return json(route.status, next);
|
|
131
|
+
}
|
|
132
|
+
case "delete": {
|
|
133
|
+
const obj = stored?.get(id);
|
|
134
|
+
if (!obj)
|
|
135
|
+
return missing(id);
|
|
136
|
+
stored?.delete(id);
|
|
137
|
+
return json(route.status, { id, object: obj.object, deleted: true });
|
|
138
|
+
}
|
|
139
|
+
default: {
|
|
140
|
+
if (route.type !== "application/json") {
|
|
141
|
+
const content = route.type === "application/pdf"
|
|
142
|
+
? "%PDF-1.4\n% Fiscalisto mock\n%%EOF\n"
|
|
143
|
+
: route.type === "application/xml"
|
|
144
|
+
? '<?xml version="1.0" encoding="UTF-8"?>\n<!-- Fiscalisto mock -->\n<cfdi:Comprobante xmlns:cfdi="http://www.sat.gob.mx/cfd/4" Version="4.0"/>\n'
|
|
145
|
+
: "Fiscalisto mock\n";
|
|
146
|
+
return new Response(content, {
|
|
147
|
+
status: route.status,
|
|
148
|
+
headers: { "content-type": route.type, "fiscalisto-mock": "true" },
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// An action on an object kept here (cancel, send, run…): the answer is that object
|
|
152
|
+
// with what the example says changed, when it's the same kind of object.
|
|
153
|
+
const parent = /^\/v1\/([a-z_]+)\/\{id\}\//.test(route.path)
|
|
154
|
+
? store.get(`/v1/${route.path.split("/")[2]}`)?.get(id)
|
|
155
|
+
: undefined;
|
|
156
|
+
if (parent && isObj(example) && example.object === parent.object) {
|
|
157
|
+
const next = { ...parent };
|
|
158
|
+
for (const [k, v] of Object.entries(example))
|
|
159
|
+
if (!(k in next))
|
|
160
|
+
next[k] = clone(v);
|
|
161
|
+
if (typeof example.status === "string")
|
|
162
|
+
next.status = example.status;
|
|
163
|
+
store.get(`/v1/${route.path.split("/")[2]}`)?.set(id, next);
|
|
164
|
+
return json(route.status, next);
|
|
165
|
+
}
|
|
166
|
+
return json(route.status, merge(example, route.method === "POST" ? body : undefined));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
reset() {
|
|
172
|
+
store.clear();
|
|
173
|
+
replays.clear();
|
|
174
|
+
},
|
|
175
|
+
async fetch(request) {
|
|
176
|
+
const url = new URL(request.url);
|
|
177
|
+
const path = url.pathname.replace(/\/+$/, "") || "/";
|
|
178
|
+
const auth = request.headers.get("authorization") ?? "";
|
|
179
|
+
const matches = routes.filter((r) => r.pattern.test(path));
|
|
180
|
+
const route = matches.find((r) => r.method === request.method);
|
|
181
|
+
if (!matches.length)
|
|
182
|
+
return error(404, "invalid_request_error", "route_not_found", `No existe ${request.method} ${path}.`);
|
|
183
|
+
if (!route)
|
|
184
|
+
return error(405, "invalid_request_error", "method_not_allowed", `${path} acepta ${matches.map((r) => r.method).join(", ")}.`);
|
|
185
|
+
if (!auth.startsWith("Bearer "))
|
|
186
|
+
return error(401, "authentication_error", "missing_api_key", "Falta el encabezado Authorization: Bearer fk_test_….");
|
|
187
|
+
if (!auth.startsWith("Bearer fk_test_"))
|
|
188
|
+
return error(401, "authentication_error", "invalid_api_key", "El servidor de prueba solo acepta llaves fk_test_ (cualquiera, como fk_test_mock).");
|
|
189
|
+
let body = {};
|
|
190
|
+
const text = request.method === "POST" ? await request.text() : "";
|
|
191
|
+
if (text.trim()) {
|
|
192
|
+
try {
|
|
193
|
+
const parsed = JSON.parse(text);
|
|
194
|
+
if (!isObj(parsed))
|
|
195
|
+
throw new Error();
|
|
196
|
+
body = parsed;
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
return error(400, "invalid_request_error", "invalid_json", "El cuerpo no es un objeto JSON válido.");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const key = request.method === "POST" ? request.headers.get("idempotency-key") : null;
|
|
203
|
+
// As the API: the same JSON written another way (spaces, key order) is the same request.
|
|
204
|
+
const sorted = (v) => Array.isArray(v)
|
|
205
|
+
? v.map(sorted)
|
|
206
|
+
: isObj(v)
|
|
207
|
+
? Object.fromEntries(Object.keys(v)
|
|
208
|
+
.sort()
|
|
209
|
+
.map((k) => [k, sorted(v[k])]))
|
|
210
|
+
: v;
|
|
211
|
+
const query = new URLSearchParams(url.search);
|
|
212
|
+
query.sort();
|
|
213
|
+
const fingerprint = `${request.method} ${path}?${query} ${JSON.stringify(sorted(body))}`;
|
|
214
|
+
if (key) {
|
|
215
|
+
const seen = replays.get(key);
|
|
216
|
+
if (seen && seen.fingerprint !== fingerprint)
|
|
217
|
+
return error(409, "idempotency_error", "idempotency_key_reused", "Esa Idempotency-Key ya se usó con otra solicitud.");
|
|
218
|
+
if (seen)
|
|
219
|
+
return new Response(seen.body, {
|
|
220
|
+
status: seen.status,
|
|
221
|
+
headers: {
|
|
222
|
+
"content-type": "application/json; charset=utf-8",
|
|
223
|
+
"idempotent-replayed": "true",
|
|
224
|
+
"fiscalisto-mock": "true",
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
const params = route.pattern.exec(path)?.slice(1).map(decodeURIComponent) ?? [];
|
|
229
|
+
const response = await answer(request, route, params, body);
|
|
230
|
+
if (key && response.headers.get("content-type")?.includes("json")) {
|
|
231
|
+
const copy = await response.clone().text();
|
|
232
|
+
replays.set(key, { fingerprint, status: response.status, body: copy });
|
|
233
|
+
}
|
|
234
|
+
return response;
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
}
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { Event } from "./generated.js";
|
|
|
7
7
|
export declare class FiscalistoWebhookError extends Error {
|
|
8
8
|
readonly name = "FiscalistoWebhookError";
|
|
9
9
|
}
|
|
10
|
-
/** Headers,
|
|
10
|
+
/** Headers, los de Node (IncomingHttpHeaders) o un objeto con los nombres en mayúsculas o minúsculas. */
|
|
11
11
|
export type WebhookHeaders = Headers | Record<string, string | string[] | undefined>;
|
|
12
12
|
export interface VerifyOptions {
|
|
13
13
|
/** Cuántos segundos de diferencia acepta con la hora del webhook. Por omisión 300. */
|
package/dist/webhooks.js
CHANGED
|
@@ -9,7 +9,10 @@ export class FiscalistoWebhookError extends Error {
|
|
|
9
9
|
const header = (headers, name) => {
|
|
10
10
|
if (typeof headers.get === "function")
|
|
11
11
|
return headers.get(name);
|
|
12
|
-
|
|
12
|
+
// Node lowercases them; AWS Lambda and others pass them as sent (Webhook-Signature).
|
|
13
|
+
const record = headers;
|
|
14
|
+
const key = name in record ? name : Object.keys(record).find((k) => k.toLowerCase() === name);
|
|
15
|
+
const value = key === undefined ? undefined : record[key];
|
|
13
16
|
return Array.isArray(value) ? value[0] : value;
|
|
14
17
|
};
|
|
15
18
|
const fromBase64 = (text) => Uint8Array.from(atob(text), (c) => c.charCodeAt(0));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiscalisto",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "SDK y CLI de la API de facturación electrónica (CFDI 4.0) de Fiscalisto, para TypeScript y JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cfdi",
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
".": {
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./mock": {
|
|
30
|
+
"types": "./dist/mock.d.ts",
|
|
31
|
+
"default": "./dist/mock.js"
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
"files": [
|
|
@@ -43,6 +47,7 @@
|
|
|
43
47
|
"fiscalisto": "dist/cli.js"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
|
-
"@types/node": "^
|
|
50
|
+
"@types/node": "^20.19.37",
|
|
51
|
+
"typescript": "^6.0.2"
|
|
47
52
|
}
|
|
48
53
|
}
|