Skip to content

Instantly share code, notes, and snippets.

@javorosas
Last active November 11, 2019 18:47
Show Gist options
  • Save javorosas/290a3f7524b1c47c7c573446c6f61458 to your computer and use it in GitHub Desktop.
Save javorosas/290a3f7524b1c47c7c573446c6f61458 to your computer and use it in GitHub Desktop.
Factura con impuestos compuestos usando Facturapi

Ejemplo para crear una factura con impuestos compuestos.

NOTA: withholding es un boleano para marcar el impuesto como retención.

{
  "customer": {
    "legal_name": "John Wick",
    "tax_id": "WXKE800401B12"
  },
  "items": [{
    "quantity": 1,
    "product": {
      "description": "Mi producto",
      "product_key": "60131324",
      "price": 123.45,
      "taxes": [{
        "type": "IVA",
        "rate": 0.16
      }, {
        "type": "IVA",
        "rate": 0.1,
        "withholding": true
      }, {
        "type": "ISR",
        "rate": 0.28,
        "withholding": true
      }]
    }
  }],
  "payment_form": "08"
}

Consulta la documentación completa

Facturapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment