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.
Endpoint
Section titled “Endpoint”POST /api/retentions
Authentication
Section titled “Authentication”Authorization: Bearer sk_live_YOUR_API_KEY or Authorization: Bearer JWT_TOKEN
Request body
Section titled “Request body”{ "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 } ]}Field reference
Section titled “Field reference”Root fields
Section titled “Root fields”| Field | Type | Required | Description |
|---|---|---|---|
series | string | Yes | Series. Must match pattern R\d{3} (e.g., R001) |
correlative | number | Yes | Sequential number |
issueDate | string | Yes | Issue date in YYYY-MM-DD format |
retentionType | string | Yes | Retention regime type code (see below) |
retentionRate | number | Yes | Retention rate percentage |
observations | string | No | Free-text observations |
supplier | object | Yes | Supplier (the party being retained) |
totalRetained | number | Yes | Total retention amount |
totalPaid | number | Yes | Total net amount paid |
items | array | Yes | Related documents (minimum 1) |
Retention type codes
Section titled “Retention type codes”| Code | Description | Rate |
|---|---|---|
01 | Tasa 3% | 3% |
02 | Tasa 6% | 6% |
Supplier object
Section titled “Supplier object”Same structure as the customer object. The supplier must have a valid RUC (identity type 6).
Item object (retention)
Section titled “Item object (retention)”| Field | Type | Required | Description |
|---|---|---|---|
documentType | string | Yes | Document type code of the referenced document |
documentId | string | Yes | Document ID (series-correlative) |
issueDate | string | Yes | Issue date of the referenced document |
currencyCode | string | Yes | Currency code (ISO 4217) |
totalAmount | number | Yes | Total amount of the referenced document |
paymentDate | string | Yes | Date of payment |
paymentAmount | number | Yes | Amount paid |
retentionAmount | number | Yes | Amount retained |
netPaidAmount | number | Yes | Net amount paid (payment - retention) |
exchangeRate | number | No | Exchange rate (if currency is not PEN) |
exchangeDate | string | No | Exchange rate date |
Response
Section titled “Response”Success (201 Created)
Section titled “Success (201 Created)”{ "id": "cm3pqr678", "documentId": "20123456789-20-R001-00000001", "status": "ACCEPTED", "cdrResponseCode": "0", "cdrDescription": "El Comprobante de Retencion numero R001-00000001, ha sido aceptado", "ticket": null}