Skip to content

xml2json

schweini edited this page May 13, 2018 · 3 revisions

API endpoint doc: https://tribunet.hacienda.go.cr/docs/esquemas/2016/v4.2/comprobantes-electronicos-api.html#

cat factura.xml |base64 -w0

https://flecharoja.com/blog/2017-11/integracion-factura-digital/

{
"clave": "50601011600310112345600100010100000000011999999999",
"fecha": "2016-01-01T00:00:00-0600",
"emisor": {
"tipoIdentificacion": "02",
"numeroIdentificacion": "3101123456"
},
"receptor": {
  "tipoIdentificacion": "02",
  "numeroIdentificacion": "3101123456"
},
"comprobanteXml":   
"PD94bWwgdmVyc2lvbj0iMS4wIiA/Pg0KDQo8ZG9tYWluIHhtbG5zPSJ1cm46amJvc3M6ZG9tYWluOjQuMCI+DQogICAgPGV4dGVuc2lvbnM+DQogICAgICAgIDxleHRlbnNpb24gbW9kdWxlPSJvcmcuamJvc3MuYXMuY2x1c3RlcmluZy5pbmZpbmlzcGFuIi8+DQogICAgICAgIDxleHRlbnNpb24gbW9kdWxlPSJvcmcuamJvc3MuYXMuY2x1c3RlcmluZy5qZ3JvdXBzIi8+DQogICAgICAgIDxleHRlbnNpb24gbW9kdWxlPSJvcmcuamJvc3MuYXMuY29ubmVjdG9yIi8+DQogICAgICAgIDxleHRlbnNpb24gbW..."
}
Clone this wiki locally