curl --request POST \
--url https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"modificationCode": 3,
"reason": "Cargo por entrega no facturado",
"items": [
{
"description": "Entrega a domicilio",
"quantity": 1,
"unitPrice": 500
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
modificationCode: 3,
reason: 'Cargo por entrega no facturado',
items: [{description: 'Entrega a domicilio', quantity: 1, unitPrice: 500}]
})
};
fetch('https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes"
payload = {
"modificationCode": 3,
"reason": "Cargo por entrega no facturado",
"items": [
{
"description": "Entrega a domicilio",
"quantity": 1,
"unitPrice": 500
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'modificationCode' => 3,
'reason' => 'Cargo por entrega no facturado',
'items' => [
[
'description' => 'Entrega a domicilio',
'quantity' => 1,
'unitPrice' => 500
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"modificationCode\": 3,\n \"reason\": \"Cargo por entrega no facturado\",\n \"items\": [\n {\n \"description\": \"Entrega a domicilio\",\n \"quantity\": 1,\n \"unitPrice\": 500\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13",
"status": "accepted",
"statusMessage": null,
"securityCode": "a1B2c3",
"stampUrl": "https://ecf.dgii.gov.do/testecf/ConsultaTimbre?RncEmisor=101000000&RncComprador=131793916&ENCF=E310000000001&FechaEmision=27-09-2026&MontoTotal=3541.18&FechaFirma=27-09-2026%2010:15:00&CodigoSeguridad=a1B2c3",
"signedAt": "2026-09-27T14:15:00.000Z",
"issuedAt": "2026-09-27T14:14:58.000Z",
"environment": "test",
"currency": "DOP",
"subtotal": 3001,
"itbis": 540.18,
"total": 3541.18,
"encf": "E340000000003",
"ecfType": 34,
"invoiceId": "3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13",
"invoiceEncf": "E310000000001",
"modificationCode": 3,
"reason": "Devolución parcial de mercancía",
"items": [
{
"description": "Servicio de mantenimiento mensual",
"quantity": 2,
"unitPrice": 1500.5,
"itbisRate": 18,
"subtotal": 3001
}
]
}Emitir una nota de débito (E33)
Emite una nota de débito que modifica la factura {id} (cargos o intereses no facturados). Se emite por líneas (items) o por monto (amount), no con ambos. La respuesta suele llegar con status: pending; el estado se actualiza solo: recíbelo con un webhook o consúltalo con GET /v1/notes/{id}.
Límite mensual: si alcanzaste el límite mensual de este tipo de e-CF responde 429 sin Retry-After (el 429 por exceso de solicitudes sí lo trae); consulta tu consumo con GET /v1/limits. Consultar, descargar y anular siguen funcionando, y reintentar un documento ya emitido no vuelve a contar. Ese 429 no se guarda: cuando se amplíe el límite puedes reintentar con la misma Idempotency-Key.
curl --request POST \
--url https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"modificationCode": 3,
"reason": "Cargo por entrega no facturado",
"items": [
{
"description": "Entrega a domicilio",
"quantity": 1,
"unitPrice": 500
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
modificationCode: 3,
reason: 'Cargo por entrega no facturado',
items: [{description: 'Entrega a domicilio', quantity: 1, unitPrice: 500}]
})
};
fetch('https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes"
payload = {
"modificationCode": 3,
"reason": "Cargo por entrega no facturado",
"items": [
{
"description": "Entrega a domicilio",
"quantity": 1,
"unitPrice": 500
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'modificationCode' => 3,
'reason' => 'Cargo por entrega no facturado',
'items' => [
[
'description' => 'Entrega a domicilio',
'quantity' => 1,
'unitPrice' => 500
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://e-cf.acpay.do/sandbox/v1/invoices/{id}/debit-notes");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"modificationCode\": 3,\n \"reason\": \"Cargo por entrega no facturado\",\n \"items\": [\n {\n \"description\": \"Entrega a domicilio\",\n \"quantity\": 1,\n \"unitPrice\": 500\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13",
"status": "accepted",
"statusMessage": null,
"securityCode": "a1B2c3",
"stampUrl": "https://ecf.dgii.gov.do/testecf/ConsultaTimbre?RncEmisor=101000000&RncComprador=131793916&ENCF=E310000000001&FechaEmision=27-09-2026&MontoTotal=3541.18&FechaFirma=27-09-2026%2010:15:00&CodigoSeguridad=a1B2c3",
"signedAt": "2026-09-27T14:15:00.000Z",
"issuedAt": "2026-09-27T14:14:58.000Z",
"environment": "test",
"currency": "DOP",
"subtotal": 3001,
"itbis": 540.18,
"total": 3541.18,
"encf": "E340000000003",
"ecfType": 34,
"invoiceId": "3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13",
"invoiceEncf": "E310000000001",
"modificationCode": 3,
"reason": "Devolución parcial de mercancía",
"items": [
{
"description": "Servicio de mantenimiento mensual",
"quantity": 2,
"unitPrice": 1500.5,
"itbisRate": 18,
"subtotal": 3001
}
]
}Autorizaciones
Llave de API de AC-PAY del ambiente de esta URL.
Encabezados
Identificador único que generas por operación (p. ej. un UUID), de 1 a 255 caracteres ASCII imprimibles. Si repites la solicitud con la misma llave en las siguientes 24 h recibes la respuesta original (con Idempotent-Replayed: true) sin ejecutarla de nuevo.
"5b0f7c1e-2f7a-4d8e-9d3c-7f1e2a9b4c60"
Parámetros de ruta
Identificador del documento (UUID).
"3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13"
Cuerpo
Código de modificación: 1 anulación total, 2 corrige textos, 3 corrige montos, 4 reemplazo de un comprobante emitido en contingencia.
1, 2, 3, 4 3
Motivo de la nota.
500"Devolución parcial de mercancía"
Líneas de la nota (1 a 500). Envía items o amount, no ambos.
Show child attributes
Show child attributes
Monto total de la nota en RD$, con ITBIS (máximo 2 decimales). Envía items o amount, no ambos.
0 < x <= 99999999.991180
ITBIS incluido en amount (máximo 2 decimales, no mayor que amount). Solo junto con amount.
0 <= x <= 99999999.99180
Respuesta
Nota creada y enviada a la DGII.
"3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13"
pending: enviado, esperando a la DGII (se actualiza solo en segundo plano, y también al consultar). accepted / accepted_with_observations: válido. rejected: la DGII lo rechazó (ver statusMessage). cancelled: anulado. error: no se pudo procesar (se puede reintentar).
pending, accepted, accepted_with_observations, rejected, cancelled, error "accepted"
Detalle del estado (motivo de rechazo u observaciones).
null
Código de seguridad del e-CF (va impreso en la representación impresa).
"a1B2c3"
URL de consulta de la DGII (contenido del código QR).
"https://ecf.dgii.gov.do/testecf/ConsultaTimbre?RncEmisor=101000000&RncComprador=131793916&ENCF=E310000000001&FechaEmision=27-09-2026&MontoTotal=3541.18&FechaFirma=27-09-2026%2010:15:00&CodigoSeguridad=a1B2c3"
"2026-09-27T14:15:00.000Z"
"2026-09-27T14:14:58.000Z"
test, live "test"
DOP "DOP"
Monto sin ITBIS.
3001
ITBIS total.
540.18
Total con ITBIS.
3541.18
e-NCF de la nota. null mientras no se haya asignado.
"E340000000003"
33 nota de débito, 34 nota de crédito.
33, 34 34
Factura que modifica la nota.
"3f1c2b9e-8a4d-4f6e-9c1a-2b7d5e8f0a13"
e-NCF de la factura modificada.
"E310000000001"
1 anulación total, 2 corrige textos, 3 corrige montos, 4 reemplazo de un comprobante en contingencia.
1, 2, 3, 4 3
"Devolución parcial de mercancía"
Show child attributes
Show child attributes