Rápido Pagos
Electronic invoicing

Issue an e-CF

POST
/ecf

Computes the e-CF's amounts from its items, takes the next e-NCF of the active range of its type and creates it pending. A workflow then signs it, sends it to the DGII and follows it to the DGII's verdict, which an ecf.accepted, ecf.rejected or ecf.errored event reports. A request with the externalId of an existing e-CF returns that e-CF.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key of the organization the request acts for, created in the dashboard and sent as "Authorization: Bearer ".

Request Body

The e-CF to issue

application/json
  1. body
type*string

TipoeCF: 31 crédito fiscal, 32 consumo, 33 nota de débito, 34 nota de crédito, 41 compras, 43 gastos menores, 44 regímenes especiales, 45 gubernamental, 46 exportaciones, 47 pagos al exterior

Example"31"
Value in"31""32""33""34""41""43""44""45""46""47"
externalId?string

The e-CF's ID in the merchant's system, unique per organization

Length1 <= length <= 256
Example"order-12345"
issuedOn?string

FechaEmision, by default today in Santo Domingo, never in the future

Formatdate
Example"2026-10-19"
currency?string

Currency of every amount of the request. A USD e-CF carries its amounts converted to DOP.

Default"DOP"
Example"DOP"
Value in"DOP""USD"
incomeType?string

TipoIngresos, by default 01, for the types other than 41, 43 and 47

Example"01"
Value in"01""02""03""04""05""06"
payment?

How the buyer pays, optional for types 43 and 47 only

buyer?

Who buys. Required for types 31, 41, 44, 45 and 46, and refused for type 43.

pricesIncludeItbis?boolean

IndicadorMontoGravado: true when unit prices include the ITBIS. Refused for types 43, 44, 46 and 47.

Examplefalse
items*array<>

DetallesItems, 1 to 1000 lines

Items1 <= items <= 1000
reference?

The document a type 33 or 34 modifies, required for both and refused for the others. A type 34 issued more than 30 days after reference.issuedOn carries IndicadorNotaCredito 1, and for goods taxed with ITBIS it may then return only the price paid, without the ITBIS (Informe Técnico e-CF §10).

Response Body

The e-CF that already has this externalId

application/json
  1. response

An electronic fiscal document (e-CF) that the issuer of the organization issued to the DGII

id*string
Formatuuid
Example"5f2c8e1a-9b4d-4a7e-8c3f-2d6b0e9a1c47"
externalId*|

The e-CF's ID in the merchant's system, or null

Example"order-12345"
type*string

TipoeCF

Example"31"
Value in"31""32""33""34""41""43""44""45""46""47"
encf*string

The e-NCF the e-CF took from its range: E, the type and 10 digits

Example"E310000000001"
environment*string

The DGII environment of the issuer when the e-CF was created

Example"test"
Value in"test""certification""production"
status*string

pending until the bytes are signed, signed once they are stored, submitted while the DGII holds it without a verdict, then accepted, conditionally-accepted, rejected or errored. The last four are final.

Value in"pending""signed""submitted""accepted""conditionally-accepted""rejected""errored"
statusReason*|

The DGII's estado for a verdict, or why the e-CF ended errored, such as certificate-expired

issuedOn*string

FechaEmision

Formatdate
Example"2026-10-19"
buyer*

RNCComprador and RazonSocialComprador, each null when absent

currency*string

The currency of the request

Example"DOP"
Value in"DOP""USD"
totals*

MontoGravadoTotal, MontoExento, TotalITBIS and MontoTotal in DOP cents, converted half up for a USD e-CF

securityCode*|

CodigoSeguridad, the first 6 characters of SignatureValue, or null before signing

Example"Ab3+9z"
signedAt*|

FechaHoraFirma, or null before signing

Formatdate-time
stampUrl*|

The text of the QR of the printed representation, a consultatimbre URL, or consultatimbrefc for a type 32 under RD$250,000. Null before signing.

Formaturi
dgii*

The DGII's trackId (null for an RFCE, which gets none, and for an e-CF that the service follows through consultatrackids after a rejected resend), its messages and secuenciaUtilizada of a rejection

buyerDelivery*

The delivery to an electronic buyer: pending, not-applicable without a buyer RNC or in certification, not-electronic, acknowledged, refused or failed

commercialApproval*

The buyer's commercial approval, each field null until one arrives. decision is conflicting when two trusted approvals disagree, and signerSubject names the certificate that signed the approval.

createdAt*string
Formatdate-time
Example"2026-10-19T16:45:18.000Z"
updatedAt*string
Formatdate-time
Example"2026-10-19T16:45:21.000Z"
Issue an e-CF
curl -X POST 'https://api.rapidopagos.com/ecf' \  -H 'Content-Type: application/json' \  -d '{  "type": "31",  "externalId": "order-12345",  "issuedOn": "2026-10-19",  "currency": "DOP",  "incomeType": "01",  "pricesIncludeItbis": false,  "items": [    {      "name": "Cemento gris 42.5 kg",      "goodOrService": "1",      "billingIndicator": "1",      "quantity": 10,      "unit": "43",      "unitPrice": {        "amount": 150000,        "currency": "DOP"      }    }  ]}'
Example Response
{  "id": "5f2c8e1a-9b4d-4a7e-8c3f-2d6b0e9a1c47",  "externalId": "order-12345",  "type": "31",  "encf": "E310000000001",  "environment": "test",  "status": "pending",  "statusReason": "string",  "issuedOn": "2026-10-19",  "buyer": {    "rnc": "string",    "name": "string"  },  "currency": "DOP",  "totals": {    "taxable": {      "amount": 0,      "currency": "DOP"    },    "exempt": {      "amount": 0,      "currency": "DOP"    },    "itbis": {      "amount": 0,      "currency": "DOP"    },    "total": {      "amount": 0,      "currency": "DOP"    }  },  "securityCode": "Ab3+9z",  "signedAt": "2019-08-24T14:15:22Z",  "stampUrl": "http://example.com",  "dgii": {    "trackId": "string",    "messages": [      {        "code": "string",        "message": "string"      }    ],    "sequenceUsed": true  },  "buyerDelivery": {    "status": "pending",    "reason": "string"  },  "commercialApproval": {    "decision": "approved",    "reason": "string",    "receivedAt": "2019-08-24T14:15:22Z",    "signerSubject": "string"  },  "createdAt": "2026-10-19T16:45:18.000Z",  "updatedAt": "2026-10-19T16:45:21.000Z"}