APITMS Logo

APITMS

Cargando Plataforma...

SUNAT TIPO DE CAMBIO OFICIAL
COMPRA S/ 3.356
VENTA S/ 3.362
EN VIVO

APIs de Alta Velocidad para
RUC & DNI

La solución definitiva en Perú para Facturación Electrónica, ERPs, E-commerce y Sistemas Web. Integración instantánea con respuestas JSON ultra ligeras.

Latencia < 50ms

Consultas optimizadas al instante

+300 Clientes

Empresas confían en nuestra API

99.9% Uptime

Infraestructura de alta disponibilidad

Planes Flexibles

Consultas S/ 10 | Facturación S/ 15

API BUSCAR RUC

CONSULTA RUC EN TIEMPO REAL

Consulta el padrón completo de SUNAT desde cualquier lenguaje de programación (PHP, C#, JS, Python, C++, Java).

Planes desde S/ 10.00 / mes o S/ 50.00 / año

API BUSCAR DNI

CONSULTA DNI INSTANTÁNEA

Obtén Nombres y Apellidos completos para agilizar facturación electrónica, ventas y registros de clientes.

LEY N° 29733 PROTECCIÓN DE DATOS PERSONALES
SOLO DNI, NOMBRES Y APELLIDOS
NO BRINDAMOS OTROS DATOS
No brindamos datos sensibles, domicilios privados, teléfonos ni biometría. Uso exclusivo para facturación electrónica y validación comercial legítima.
Planes desde S/ 10.00 / mes o S/ 50.00 / año

API FACTURACIÓN SUNAT

EMISIÓN DE COMPROBANTES UBL 2.1

Conecta tu propio sistema, ERP, POS o app web en PHP, Java, JS, C#, Python o cURL. Genera el XML UBL 2.1, lo firma con el certificado de tu empresa, lo envía a SUNAT / OSE y devuelve el CDR oficial y PDF con QR.

Facturas & Boletas XML UBL 2.1 + CDR PDF Ticket / A4 + QR API REST JSON
1 Solo RUC (Mono-RUC) S/ 15.00 / mes
Varios RUCs (*) Multi-Empresa S/ 50.00 / mes
+ OFICIAL PERÚ VERSIÓN 1.0.0 LISTA
WooCommerce 5.0 - 9.x+ Compatible HPOS PHP 7.4 - 8.3+

Plugin Oficial para WooCommerce

Autocompleta y valida RUC y DNI en tiempo real durante el Checkout de tu tienda virtual. Permite a tus compradores elegir entre Boleta de Venta o Factura con un solo clic.

Autocompletado en 1s

El comprador ingresa su DNI o RUC y sus datos se completan automáticamente sin errores.

Validación SUNAT en Vivo

Verifica estado ACTIVO y condición HABIDO, evitando multas por facturas inválidas.

Boleta y Factura Nativa

Selector directo en el checkout. Los datos se guardan en el pedido de WooCommerce y correos.

Descarga 100% Gratuita

El plugin es libre de costo. Solo requieres un Token de nuestra API (S/ 10 / mes o S/ 50 / año).

Descargar APITMS Plugin (.ZIP)
Instalación en 3 clics desde Plugins > Añadir nuevo > Subir plugin en tu WordPress.
Checkout WooCommerce
En Tiempo Real
Boleta (DNI)
Factura (RUC)
RUC ACTIVO y HABIDO: TECHNOLOGY AND MULTIPLE SERVICES GYE E.I.R.L.
Razón Social: TECHNOLOGY AND MULTIPLE SERVICES GYE E.I.R.L.
Domicilio Fiscal: CAL. SAN MARTIN NRO. 123 - LIMA
ACTIVO HABIDO 0.2s
1
Descarga el archivo ZIP

Haz clic en el botón de descarga para obtener apitms.zip gratis.

2
Súbelo a tu WordPress

En el panel ve a Plugins > Añadir nuevo > Subir plugin y presiona Activar.

3
Pega tu Token de API

Ingresa en WooCommerce > Ajustes > Facturación Perú, pega tu token y ¡a vender!

API REST FACTURACIÓN SUNAT ESTÁNDAR UBL 2.1
PHP Node.js C# (.NET) Python cURL

Conecta tu Sistema a SUNAT en Minutos

Diseñado para desarrolladores, programadores y empresas que cuentan con un sistema propio (Punto de Venta POS, ERP, software de escritorio o app web) y necesitan emitir comprobantes electrónicos sin la pesada tarea de programar SOAP, digest criptográfico y complejas normas UBL 2.1.

¿CÓMO FUNCIONA LA API?
1 Envías los datos de tu venta en JSON

Desde cualquier sistema o lenguaje (PHP, Python, Java, C#, JS, cURL), envías una petición HTTP POST con la información de tu comprobante, cliente y productos.

2 La API genera el XML UBL 2.1 y lo firma digitalmente

El motor construye el archivo XML bajo el estándar oficial exigido por SUNAT y aplica la firma digital con el certificado de tu negocio de forma automática.

3 Conexión directa y validación con SUNAT

La API se conecta en tiempo real al Web Service de SUNAT, envía el comprobante empaquetado y recibe la Constancia de Recepción oficial (CDR).

4 Respuesta instantánea con CDR y PDF con QR

Recibes la respuesta en milisegundos con el estado ACEPTADO, el archivo XML firmado, el CDR oficial de SUNAT y el PDF listo para imprimir en Ticket (80mm) o A4.

Manual de Integración →
EJEMPLO DE ENVÍO JSON:
factura_payload.json
JSON (UBL 2.1)
// =========================================================================
// ESTRUCTURA JSON OFICIAL PARA ENVIAR A LA API SUNAT UBL 2.1
// Endpoint: POST https://apisunat.techmultiscrv.com/api/emitir
// Cabecera: Authorization: Bearer TU_API_KEY
// =========================================================================
{
  // 1. Datos de la empresa emisora
  "empresa": {
    "ruc": "20601234567",                // RUC de 11 dígitos de tu empresa
    "razon_social": "MI EMPRESA S.A.C.",  // Nombre o Razón Social registrada en SUNAT
    "entorno": "produccion"               // 'produccion' (validez fiscal oficial) o 'beta' (pruebas)
  },

  // 2. Datos del cliente comprador
  "cliente": {
    "tipo_documento": "6",               // '6'=RUC (Factura), '1'=DNI (Boleta), '0'=Sin Documento (Boleta < S/ 700), '4'=Carnet Ext.
    "numero_documento": "20555555551",    // Número de RUC o DNI del cliente comprador
    "nombre": "CLIENTE EMPRESA S.A.C.",  // Razón Social o Nombres y Apellidos del comprador
    "direccion": "AV. LARCO 123, LIMA"   // Dirección fiscal del cliente (opcional)
  },

  // 3. Cabecera del comprobante
  "comprobante": {
    "tipo": "01",                        // '01'=Factura, '03'=Boleta, '07'=Nota de Crédito, '08'=Nota de Débito
    "serie": "F001",                     // Serie: 'F001' (Facturas), 'B001' (Boletas), 'FC01'/'BC01' (Notas)
    "correlativo": "10",                 // Número correlativo sin ceros adelante (ej: 10, 20, 150)
    "fecha_emision": "2026-11-26",       // Fecha en formato YYYY-MM-DD (opcional, por defecto hoy)
    "moneda": "PEN",                     // 'PEN' (Soles peruanos) o 'USD' (Dólares americanos)
    "forma_pago": "CONTADO"              // 'CONTADO' o 'CREDITO'
  },

  // 4. Detalle de productos vendidos
  "productos": [
    {
      "codigo": "PROD01",                // Código interno de tu artículo, repuesto o servicio
      "descripcion": "SERVICIO DE INTEGRACIÓN API SUNAT", // Detalle o descripción del producto vendido
      "unidad": "NIU",                   // Unidad de medida: 'NIU' (Unidades/Bienes físicos), 'ZZ' (Servicios)
      "cantidad": 1,                     // Cantidad vendida (número entero o con decimales)
      "precio_unitario": 118.00,         // PRECIO FINAL UNITARIO (INCLUYE IGV, lo que paga tu cliente)
      "valor_unitario": 100.00,          // VALOR NETO UNITARIO (SIN IGV = precio_unitario / 1.18)
      "tipo_igv": "10",                  // Tipo afectación: '10'=Gravado (18%), '20'=Exonerado, '30'=Inafecto, '21'=Gratuito
      "igv": 18.00,                      // Total IGV del item = valor_unitario * cantidad * 0.18
      "importe_total": 118.00            // Total a pagar por este item = precio_unitario * cantidad
    }
  ],

  // 5. Resumen de totales
  "totales": {
    "operacion_gravada": 100.00,         // Subtotal neto de ventas gravadas al 18% (sin IGV)
    "operacion_exonerada": 0.00,         // Subtotal de productos exonerados de IGV (opcional)
    "operacion_inafecta": 0.00,          // Subtotal de productos inafectos de IGV (opcional)
    "igv": 18.00,                        // Total IGV del comprobante (18% de las operaciones gravadas)
    "total": 118.00                      // TOTAL A COBRAR AL CLIENTE (operacion_gravada + igv)
  }
}
EN VIVO (BETA OFICIAL SUNAT) Prueba en Vivo en Tiempo Real
Prueba gratis antes de comprar
Endpoint HTTP probado en vivo: POST /api/emitir JSON REST

Haz clic en un botón para enviar un JSON real por HTTP POST al endpoint oficial y emitir el comprobante contra el Web Service de SUNAT:

DEMO EN VIVO // PLAYGROUND API
EN LÍNEA
Playground de Prueba en Vivo 10 CONSULTAS GRATIS

Obtén un Token de Acceso temporal para probar la velocidad y precisión de nuestra API en tiempo real.

TOKEN DE PRUEBA ACTIVO DEMO-...

Buscador activado. Puedes ingresar un RUC o DNI en los campos inferiores.

Te quedan: 10 / 10
Has completado tus 10 consultas de prueba gratuitas

Para integrar la API en tus sistemas y continuar consultando sin límites, obtén tu Token Oficial desde S/ 10.00 / mes.

LEY N° 29733 PROTECCIÓN DE DATOS PERSONALES DEL PERÚ
Esta API provee ÚNICAMENTE DNI, NOMBRES Y APELLIDOS.
NO BRINDAMOS OTROS DATOS (no entregamos domicilios privados, teléfonos, estado civil ni biometría).
Conforme al Art. 2 y Art. 14 (incisos 1 y 5) de la Ley N° 29733 y D.S. N° 003-2013-JUS, estos datos no sensibles están autorizados exclusivamente para la preparación/ejecución de relaciones comerciales y emisión de comprobantes de pago (facturas y boletas ante SUNAT).

PHP cURL
<?php
$token = "TU_TOKEN_AQUI";
$ruc = "20525426778";

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.apifacturacion.com/ruc/'.$ruc,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array('token' => $token),
  CURLOPT_CUSTOMREQUEST => 'POST'
));

$response = curl_exec($curl);
curl_close($curl);

$empresa = json_decode($response, true);
print_r($empresa);
?>
JavaScript (Fetch / Async)
const token = "TU_TOKEN_AQUI";
const ruc = "20525426778";

const formData = new FormData();
formData.append("token", token);

fetch(`https://api.apifacturacion.com/ruc/${ruc}`, {
  method: "POST",
  body: formData
})
  .then(response => response.json())
  .then(data => {
    console.log("Razón Social:", data.razon_social);
    console.log("Estado:", data.estado);
  })
  .catch(error => console.error("Error:", error));
Python (requests)
import requests

token = "TU_TOKEN_AQUI"
ruc = "20525426778"
url = f"https://api.apifacturacion.com/ruc/{ruc}"

payload = {"token": token}
response = requests.post(url, data=payload)

if response.status_code == 200:
    data = response.json()
    print("Razón Social:", data.get("razon_social"))
    print("Estado:", data.get("estado"))
else:
    print("Error:", response.status_code)
C# HttpClient
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        string token = "TU_TOKEN_AQUI";
        string ruc = "20525426778";
        string url = $"https://api.apifacturacion.com/ruc/{ruc}";

        using (var client = new HttpClient()) {
            var values = new Dictionary<string, string> { { "token", token } };
            var content = new FormUrlEncodedContent(values);

            HttpResponseMessage response = await client.PostAsync(url, content);
            string jsonResult = await response.ContentAsStringAsync();
            Console.WriteLine(jsonResult);
        }
    }
}
C++ (libcurl)
#include <iostream>
#include <string>
#include <curl/curl.h>

int main() {
    CURL* curl = curl_easy_init();
    if(curl) {
        std::string token = "TU_TOKEN_AQUI";
        std::string ruc = "20525426778";
        std::string url = "https://api.apifacturacion.com/ruc/" + ruc;
        std::string fields = "token=" + token;

        curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields.c_str());

        CURLcode res = curl_easy_perform(curl);
        if(res != CURLE_OK) {
            std::cerr << "Error libcurl: " << curl_easy_strerror(res) << std::endl;
        }
        curl_easy_cleanup(curl);
    }
    return 0;
}
Java HttpClient
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String token = "TU_TOKEN_AQUI";
        String ruc = "20525426778";
        String url = "https://api.apifacturacion.com/ruc/" + ruc;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("Content-Type", "application/x-www-form-urlencoded")
                .POST(HttpRequest.BodyPublishers.ofString("token=" + token))
                .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
Go (net/http)
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "net/url"
)

func main() {
    token := "TU_TOKEN_AQUI"
    ruc := "20525426778"
    apiURL := "https://api.apifacturacion.com/ruc/" + ruc

    formData := url.Values{}
    formData.Set("token", token)

    resp, err := http.PostForm(apiURL, formData)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Formato de Respuesta JSON API RUC Padrón SUNAT Oficial
{
  "ruc": "20525426778",
  "razon_social": "COMPAÑIA NACIONAL DE CHOCOLATES DE PERU S.A.",
  "direccion": "CAL. MANUEL ARGUMANIZ NRO. 261",
  "ubigeo": "150104",
  "estado": "ACTIVO",
  "condicion": "HABIDO",
  "departamento": "LIMA",
  "provincia": "LIMA",
  "distrito": "BARRANCO"
}

PHP cURL
<?php
$token = "TU_TOKEN_AQUI";
$dni = "42116577";

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.apifacturacion.com/dni/'.$dni,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array('token' => $token),
  CURLOPT_CUSTOMREQUEST => 'POST'
));

$response = curl_exec($curl);
curl_close($curl);

$persona = json_decode($response, true);
print_r($persona);
?>
JavaScript (Fetch / Async)
const token = "TU_TOKEN_AQUI";
const dni = "42116577";

const formData = new FormData();
formData.append("token", token);

fetch(`https://api.apifacturacion.com/dni/${dni}`, {
  method: "POST",
  body: formData
})
  .then(response => response.json())
  .then(data => {
    console.log("Nombre Completo:", data.cliente);
  })
  .catch(error => console.error("Error:", error));
Python (requests)
import requests

token = "TU_TOKEN_AQUI"
dni = "42116577"
url = f"https://api.apifacturacion.com/dni/{dni}"

payload = {"token": token}
response = requests.post(url, data=payload)

if response.status_code == 200:
    data = response.json()
    print("Nombre Completo:", data.get("cliente"))
else:
    print("Error:", response.status_code)
C# HttpClient
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        string token = "TU_TOKEN_AQUI";
        string dni = "42116577";
        string url = $"https://api.apifacturacion.com/dni/{dni}";

        using (var client = new HttpClient()) {
            var values = new Dictionary<string, string> { { "token", token } };
            var content = new FormUrlEncodedContent(values);

            HttpResponseMessage response = await client.PostAsync(url, content);
            string jsonResult = await response.ContentAsStringAsync();
            Console.WriteLine(jsonResult);
        }
    }
}
C++ (libcurl)
#include <iostream>
#include <string>
#include <curl/curl.h>

int main() {
    CURL* curl = curl_easy_init();
    if(curl) {
        std::string token = "TU_TOKEN_AQUI";
        std::string dni = "42116577";
        std::string url = "https://api.apifacturacion.com/dni/" + dni;
        std::string fields = "token=" + token;

        curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields.c_str());

        CURLcode res = curl_easy_perform(curl);
        if(res != CURLE_OK) {
            std::cerr << "Error libcurl: " << curl_easy_strerror(res) << std::endl;
        }
        curl_easy_cleanup(curl);
    }
    return 0;
}
Java HttpClient
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String token = "TU_TOKEN_AQUI";
        String dni = "42116577";
        String url = "https://api.apifacturacion.com/dni/" + dni;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("Content-Type", "application/x-www-form-urlencoded")
                .POST(HttpRequest.BodyPublishers.ofString("token=" + token))
                .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
Go (net/http)
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "net/url"
)

func main() {
    token := "TU_TOKEN_AQUI"
    dni := "42116577"
    apiURL := "https://api.apifacturacion.com/dni/" + dni

    formData := url.Values{}
    formData.Set("token", token)

    resp, err := http.PostForm(apiURL, formData)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Formato JSON: Solo DNI, Nombres y Apellidos LEY N° 29733
{
  "dni": "42116577",
  "nombres": "JUAN CARLOS",
  "apellidoPaterno": "PEREZ",
  "apellidoMaterno": "GARCIA",
  "cliente": "JUAN CARLOS PEREZ GARCIA"
}
En cumplimiento de la Ley N° 29733, esta API está limitada a datos no sensibles para emisión de comprobantes y validación contractual. No se suministran datos biométricos, domicilios privados ni datos sensibles.