Skip to content

Retenciones (20)

Comprobantes de Retencion (retentions) are issued by buyers who are designated as retention agents by SUNAT. They document IGV retained from supplier payments.

POST /api/retentions

Authorization: Bearer sk_live_YOUR_API_KEY or Authorization: Bearer JWT_TOKEN

{
"series": "R001",
"correlative": 1,
"issueDate": "2026-02-20",
"retentionType": "01",
"retentionRate": 3,
"observations": "Retencion por servicios de febrero",
"supplier": {
"identityType": "6",
"identityNumber": "20456789012",
"name": "Proveedor SAC",
"address": "Calle Los Olivos 456, Miraflores"
},
"totalRetained": 30.00,
"totalPaid": 970.00,
"items": [
{
"documentType": "01",
"documentId": "F001-00000015",
"issueDate": "2026-02-10",
"currencyCode": "PEN",
"totalAmount": 1000.00,
"paymentDate": "2026-02-20",
"paymentAmount": 1000.00,
"retentionAmount": 30.00,
"netPaidAmount": 970.00
}
]
}
FieldTypeRequiredDescription
seriesstringYesSeries. Must match pattern R\d{3} (e.g., R001)
correlativenumberYesSequential number
issueDatestringYesIssue date in YYYY-MM-DD format
retentionTypestringYesRetention regime type code (see below)
retentionRatenumberYesRetention rate percentage
observationsstringNoFree-text observations
supplierobjectYesSupplier (the party being retained)
totalRetainednumberYesTotal retention amount
totalPaidnumberYesTotal net amount paid
itemsarrayYesRelated documents (minimum 1)
CodeDescriptionRate
01Tasa 3%3%
02Tasa 6%6%

Same structure as the customer object. The supplier must have a valid RUC (identity type 6).

FieldTypeRequiredDescription
documentTypestringYesDocument type code of the referenced document
documentIdstringYesDocument ID (series-correlative)
issueDatestringYesIssue date of the referenced document
currencyCodestringYesCurrency code (ISO 4217)
totalAmountnumberYesTotal amount of the referenced document
paymentDatestringYesDate of payment
paymentAmountnumberYesAmount paid
retentionAmountnumberYesAmount retained
netPaidAmountnumberYesNet amount paid (payment - retention)
exchangeRatenumberNoExchange rate (if currency is not PEN)
exchangeDatestringNoExchange rate date
{
"id": "cm3pqr678",
"documentId": "20123456789-20-R001-00000001",
"status": "ACCEPTED",
"cdrResponseCode": "0",
"cdrDescription": "El Comprobante de Retencion numero R001-00000001, ha sido aceptado",
"ticket": null
}