Overview
Issue and receive comprobantes fiscales electrónicos (e-CF) with the DGII.
The API issues your e-CF to the DGII and receives the e-CF that other taxpayers send you. It signs each e-CF with your certificate, sends it to the DGII, follows it to the DGII's verdict and delivers it to a buyer who is an electronic receptor. Events tell your server how each e-CF ends.
You send the items, and the API computes every amount of the e-CF. Amounts are in cents, and every DGII catalog value is the DGII's code as a string, such as "31" for a factura de crédito fiscal or "1" for ITBIS at 18%. Each field of the API reference names the DGII field that it fills, such as RNCComprador.
Environments
The DGII runs three environments, and your issuer works in one of them at a time.
| Environment | DGII name | Use |
|---|---|---|
test | TesteCF | Pre-certification. Try your integration with e-CF that have no fiscal value. |
certification | CerteCF | The tests of the DGII certification portal. |
production | eCF | Real e-CF, once the DGII authorizes you as an emisor electrónico. |
Each e-NCF range, issued e-CF and received e-CF stays in the environment where it was created. Move to production says what changes when the issuer moves.
From test to production
- Apply to the DGII as an emisor electrónico, which opens the
testenvironment to you (Certify with the DGII). - Set up the issuer in
testand upload its certificate. - Record a range of each type that you sell with, then issue an e-CF of each type and follow it to the DGII's verdict.
- Register the receptor URL, so that the DGII, your suppliers and your buyers can send you e-CF and commercial approvals.
- Move the issuer to
certificationand pass the steps of the certification portal. - Once the DGII authorizes you, move the issuer to production.
Events
Every e-CF event goes to your organization's webhook endpoint, which an owner or admin sets in the Webhooks section of the dashboard. The events follow the rules of Webhook events, which lists their IDs.
| Type | When |
|---|---|
ecf.accepted | The DGII accepted the e-CF, with or without conditions |
ecf.rejected | The DGII rejected the e-CF |
ecf.errored | The e-CF ended without a verdict of the DGII |
ecf.delivered | The buyer's receptor acknowledged the e-CF |
ecf.delivery-refused | The buyer's receptor refused the e-CF |
ecf.delivery-failed | The e-CF could not reach the buyer's receptor |
ecf.commercial-approval-received | The buyer approved or rejected the e-CF, or two approvals disagree |
received-ecf.created | Your receptor received an e-CF |
received-ecf.not-verified | The DGII does not confirm a received e-CF |
received-ecf.commercial-approval-sent | Your approval or rejection of a received e-CF was sent |
received-ecf.commercial-approval-failed | Your approval or rejection of a received e-CF could not be sent |
ecf-cancellation.accepted | The DGII cancelled the numbers of a cancellation |
ecf-cancellation.partially-accepted | The DGII cancelled some of the numbers of a cancellation |
ecf-cancellation.rejected | The DGII refused a cancellation |
ecf-issuer.certificate-expiring | The certificate expires in 30, 7 or 1 days |
ecf-sequence.running-low | A range has fewer numbers left than 10% of its size or 100, whichever is larger |
ecf-sequence.expiring | A range expires in 30 days |