Service


Click here for a complete list of operations.

BFEAuthorize

Autoriza un comprobante, devolviendo su CAE correspondiente

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /wsbfe/service.asmx HTTP/1.1
Host: wswhomo.afip.gov.ar
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ar.gov.afip.dif.bfe/BFEAuthorize"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <BFEAuthorize xmlns="http://ar.gov.afip.dif.bfe/">
      <Auth>
        <Token>string</Token>
        <Sign>string</Sign>
        <Cuit>long</Cuit>
      </Auth>
      <Cmp>
        <Id>long</Id>
        <Tipo_doc>short</Tipo_doc>
        <Nro_doc>long</Nro_doc>
        <Zona>short</Zona>
        <Tipo_cbte>short</Tipo_cbte>
        <Punto_vta>int</Punto_vta>
        <Cbte_nro>long</Cbte_nro>
        <Imp_total>double</Imp_total>
        <Imp_tot_conc>double</Imp_tot_conc>
        <Imp_neto>double</Imp_neto>
        <Impto_liq>double</Impto_liq>
        <Impto_liq_rni>double</Impto_liq_rni>
        <Imp_op_ex>double</Imp_op_ex>
        <Imp_perc>double</Imp_perc>
        <Imp_iibb>double</Imp_iibb>
        <Imp_perc_mun>double</Imp_perc_mun>
        <Imp_internos>double</Imp_internos>
        <Imp_moneda_Id>string</Imp_moneda_Id>
        <Imp_moneda_ctz>double</Imp_moneda_ctz>
        <Fecha_cbte>string</Fecha_cbte>
        <Items>
          <Item>
            <Pro_codigo_ncm>string</Pro_codigo_ncm>
            <Pro_codigo_sec>string</Pro_codigo_sec>
            <Pro_ds>string</Pro_ds>
            <Pro_qty>double</Pro_qty>
            <Pro_umed>int</Pro_umed>
            <Pro_precio_uni>double</Pro_precio_uni>
            <Imp_bonif>double</Imp_bonif>
            <Imp_total>double</Imp_total>
            <Iva_id>short</Iva_id>
          </Item>
          <Item>
            <Pro_codigo_ncm>string</Pro_codigo_ncm>
            <Pro_codigo_sec>string</Pro_codigo_sec>
            <Pro_ds>string</Pro_ds>
            <Pro_qty>double</Pro_qty>
            <Pro_umed>int</Pro_umed>
            <Pro_precio_uni>double</Pro_precio_uni>
            <Imp_bonif>double</Imp_bonif>
            <Imp_total>double</Imp_total>
            <Iva_id>short</Iva_id>
          </Item>
        </Items>
        <CbtesAsoc>
          <CbteAsoc>
            <Tipo_cbte>short</Tipo_cbte>
            <Punto_vta>int</Punto_vta>
            <Cbte_nro>long</Cbte_nro>
          </CbteAsoc>
          <CbteAsoc>
            <Tipo_cbte>short</Tipo_cbte>
            <Punto_vta>int</Punto_vta>
            <Cbte_nro>long</Cbte_nro>
          </CbteAsoc>
        </CbtesAsoc>
      </Cmp>
    </BFEAuthorize>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <BFEAuthorizeResponse xmlns="http://ar.gov.afip.dif.bfe/">
      <BFEAuthorizeResult>
        <BFEResultAuth>
          <Id>long</Id>
          <Cuit>long</Cuit>
          <Cae>string</Cae>
          <Fch_venc_Cae>string</Fch_venc_Cae>
          <Fch_cbte>string</Fch_cbte>
          <Resultado>string</Resultado>
          <Reproceso>string</Reproceso>
          <Obs>string</Obs>
        </BFEResultAuth>
        <BFEErr>
          <ErrCode>int</ErrCode>
          <ErrMsg>string</ErrMsg>
        </BFEErr>
        <BFEEvents>
          <EventCode>int</EventCode>
          <EventMsg>string</EventMsg>
        </BFEEvents>
      </BFEAuthorizeResult>
    </BFEAuthorizeResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /wsbfe/service.asmx HTTP/1.1
Host: wswhomo.afip.gov.ar
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <BFEAuthorize xmlns="http://ar.gov.afip.dif.bfe/">
      <Auth>
        <Token>string</Token>
        <Sign>string</Sign>
        <Cuit>long</Cuit>
      </Auth>
      <Cmp>
        <Id>long</Id>
        <Tipo_doc>short</Tipo_doc>
        <Nro_doc>long</Nro_doc>
        <Zona>short</Zona>
        <Tipo_cbte>short</Tipo_cbte>
        <Punto_vta>int</Punto_vta>
        <Cbte_nro>long</Cbte_nro>
        <Imp_total>double</Imp_total>
        <Imp_tot_conc>double</Imp_tot_conc>
        <Imp_neto>double</Imp_neto>
        <Impto_liq>double</Impto_liq>
        <Impto_liq_rni>double</Impto_liq_rni>
        <Imp_op_ex>double</Imp_op_ex>
        <Imp_perc>double</Imp_perc>
        <Imp_iibb>double</Imp_iibb>
        <Imp_perc_mun>double</Imp_perc_mun>
        <Imp_internos>double</Imp_internos>
        <Imp_moneda_Id>string</Imp_moneda_Id>
        <Imp_moneda_ctz>double</Imp_moneda_ctz>
        <Fecha_cbte>string</Fecha_cbte>
        <Items>
          <Item>
            <Pro_codigo_ncm>string</Pro_codigo_ncm>
            <Pro_codigo_sec>string</Pro_codigo_sec>
            <Pro_ds>string</Pro_ds>
            <Pro_qty>double</Pro_qty>
            <Pro_umed>int</Pro_umed>
            <Pro_precio_uni>double</Pro_precio_uni>
            <Imp_bonif>double</Imp_bonif>
            <Imp_total>double</Imp_total>
            <Iva_id>short</Iva_id>
          </Item>
          <Item>
            <Pro_codigo_ncm>string</Pro_codigo_ncm>
            <Pro_codigo_sec>string</Pro_codigo_sec>
            <Pro_ds>string</Pro_ds>
            <Pro_qty>double</Pro_qty>
            <Pro_umed>int</Pro_umed>
            <Pro_precio_uni>double</Pro_precio_uni>
            <Imp_bonif>double</Imp_bonif>
            <Imp_total>double</Imp_total>
            <Iva_id>short</Iva_id>
          </Item>
        </Items>
        <CbtesAsoc>
          <CbteAsoc>
            <Tipo_cbte>short</Tipo_cbte>
            <Punto_vta>int</Punto_vta>
            <Cbte_nro>long</Cbte_nro>
          </CbteAsoc>
          <CbteAsoc>
            <Tipo_cbte>short</Tipo_cbte>
            <Punto_vta>int</Punto_vta>
            <Cbte_nro>long</Cbte_nro>
          </CbteAsoc>
        </CbtesAsoc>
      </Cmp>
    </BFEAuthorize>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <BFEAuthorizeResponse xmlns="http://ar.gov.afip.dif.bfe/">
      <BFEAuthorizeResult>
        <BFEResultAuth>
          <Id>long</Id>
          <Cuit>long</Cuit>
          <Cae>string</Cae>
          <Fch_venc_Cae>string</Fch_venc_Cae>
          <Fch_cbte>string</Fch_cbte>
          <Resultado>string</Resultado>
          <Reproceso>string</Reproceso>
          <Obs>string</Obs>
        </BFEResultAuth>
        <BFEErr>
          <ErrCode>int</ErrCode>
          <ErrMsg>string</ErrMsg>
        </BFEErr>
        <BFEEvents>
          <EventCode>int</EventCode>
          <EventMsg>string</EventMsg>
        </BFEEvents>
      </BFEAuthorizeResult>
    </BFEAuthorizeResponse>
  </soap12:Body>
</soap12:Envelope>