➕ Create new documents
Postman collection
To help you with your integration, download our Postman Collection here: https://github.com/koyweforest/api-billing-postman
Invoice (Factura electrónica)
In order to create a new peruvian invoice, you need to use the /documents endpoint with the proper parameters.
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Invoice on exports use case (Factura electrónica para casos de exportación)
In order to create a new peruvian export invoice, you need to use the /documents endpoint with the proper parameters. Please note that unlike other countries, the document type remains the same as regular invoices, as this is just a special use case of the regular e-invoice.
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Receipt (Boleta electrónica)
In order to create a new peruvian receipt, you need to use the /documents endpoint with the proper parameters. You can issue receipts to recipients identified with a DNI by using the field “receiver_tax_id_type” with the value “PE-DNI”.
IMPORTANT: When issuing receipts, you MUST use TODAY issue_date. Otherwise you will receive a “Error 1079: Solo puede enviar el comprobante en un resumen diario” which means that you are not allowed to issue individuals receipts for previous dates.
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Receipt under 700 soles (Boleta electrónica)
If the total amount of the receipt is less than 700 soles, it is not necessary to include the customer’s information.
In order to create a new peruvian receipt, you need to use the /documents endpoint with the proper parameters. You can issue receipts to recipients identified with a DNI by using the field “receiver_tax_id_type” with the value “PE-DNI”.
IMPORTANT: When issuing receipts, you MUST use TODAY issue_date. Otherwise you will receive a “Error 1079: Solo puede enviar el comprobante en un resumen diario” which means that you are not allowed to issue individuals receipts for previous dates.
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Receipt issued to a foreign customer (Boleta electrónica nominativa con receptor extranjero)
In order to create a new Peruvian receipt, you need to use the /documents endpoint with the proper parameters. You can issue receipts to both local and foreign recipients by setting the receiver_tax_id_type field accordingly. For example, use “PE-DNI” for Peruvian national IDs, or “US-EIN” for recipients identified with a U.S.
IMPORTANT: When issuing receipts, you MUST use TODAY issue_date. Otherwise you will receive a “Error 1079: Solo puede enviar el comprobante en un resumen diario” which means that you are not allowed to issue individuals receipts for previous dates.
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Credit note for Invoice (Nota de crédito electrónica para Factura)
In order to create a new peruvian credit note, you need to use the /documents endpoint with the proper parameters and add a reference field
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Credit note for Receipt (Nota de crédito electrónica para Boleta)
In order to create a new peruvian credit note, you need to use the /documents endpoint with the proper parameters and add a reference field
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Debit note (Nota de débito electrónica)
In order to create a new peruvian debit note, you need to use the /documents endpoint with the proper parameters and add a reference field
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Bill of lading (Guía de remisión electrónica)
In order to create a new peruvian bill of lading, you need to use the /documents endpoint with the proper parameters and add the additional shipping fields
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*
Retention receipt (Comprobante de retención)
In order to create a new peruvian retention receipt, you need to use the /documents endpoint with the proper parameters and add the retention fields
- Endpoint: https://api-billing.koywe.com/V1/documents
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer <token>
- Accept: */*