The Spanish version is the authoritative reference. View in Spanish
sendBill
Synchronous method that receives an electronic receipt or document: invoice, sales ticket, credit note, debit note, withholding/perception receipt or DAE.
Input parameters
AtributoTipoDescripción
fileNamestringName of the ZIP file to send, per Annex 4. Example: 20556695548-01-FB98-00100412.zip
contentFilebase64BinaryContent of the ZIP file Base64-encoded, represented as a byte array.
Output parameters
AtributoTipoDescripción
applicationResponsebase64BinaryContent of the OSE's CDR Base64-encoded, represented as a byte array.
Examples
sendBill
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://service.sunat.gob.pe"
xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<ns2:Security>
<ns2:UsernameToken>
<ns2:Username>20556695548CLHBIHCVK</ns2:Username>
<ns2:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
x#1F^BTAn(3t
</ns2:Password>
</ns2:UsernameToken>
</ns2:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:sendBill>
<fileName>20556695548-01-FB98-00100412.zip</fileName>
<contentFile>UEsDBBQAAAgIA...<!-- Base64 truncado --></contentFile>
</ns1:sendBill>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>Notes
Authentication
The SOAP-ENV:Header header must include the WS-Security token with the Username in {RUC}{username} format and the password in plain text (PasswordText).
fileName format
The file name varies depending on the receipt type. See File naming for the complete reference.
CDR in Base64
The applicationResponse response is the OSE's CDR Base64-encoded. You must decode it to obtain the XML response with the receipt status.