Skip to content

FousAFPnet

Turn AFPnet into an API

Read your planillas (contribution payrolls) and liquidaciones previas (presumed debt notices) from AFPnet with one API call each. Or have a workflow check each morning for unpaid planillas and send you only what is new.

Works with your own AFPnet account. Fous is an independent product.

What you can build on AFPnet

  • Get planillas and their estado

    Build this

    Searches Aportes > Consulta y Pago de Planillas (planilla search and payment) for a periodo de devengue and reads each planilla's AFP, estado and amounts.

    Takes
    Periodo de devengue from, to (optional), estado (optional)
    Returns
    Planilla number, AFP, periodo de devengue, tipo de trabajo, estado, ticket number, fondo, seguro, comisión, total
  • Check liquidaciones previas

    Build this

    Reads Liquidaciones Previas > Consulta Liquidaciones Previas (presumed debt notices from the AFPs) with each one's estado and its detail lines.

    Takes
    AFP (optional), estado (optional)
    Returns
    AFP, liquidación number, mes de devengue, estado, worker CUSPP, document number, estado de detalle
  • Look up a worker's AFP

    Build this

    Uses Afiliados > Consulta de Afiliados Unitaria (single member lookup) to find a worker's CUSPP and, for a periodo de devengue, the AFP and commission.

    Takes
    Document type, document number, periodo de devengue (optional)
    Returns
    CUSPP, name, AFP, comisión sobre remuneración, devengue máximo a aportar, motivo de pensión
  • Emit a payment ticket for a planilla

    Build this

    Finds a planilla in estado PRESENTADA under Consulta y Pago de Planillas, selects EMITIR TICKET and reads the ticket that AFPnet creates.

    Takes
    Planilla number
    Returns
    Ticket number, AFP, planilla number, amount, payable from date and time

Automate AFPnet with a workflow

A workflow runs your methods as one process, with nobody at the screen. A schedule or a call from your own system starts it, the steps run in order, and the result arrives in your inbox or in the systems you already use.

  • Planillas presented but not yet paid

    Build this
    Starts
    Every weekday at 8:00
    Step 1
    Get the planillas for the current and previous periodo de devengue.
    Step 2
    Keep the ones whose estado is still PRESENTADA.
    Step 3
    Email you the list with planilla number, AFP, periodo de devengue, ticket number and total.
  • New liquidaciones previas, sent to your HR system

    Build this
    Starts
    Every weekday at 9:00
    Step 1
    Check the liquidaciones previas in estado Pendiente.
    Step 2
    Keep the ones that were not there on the last run.
    Step 3
    Post each one to your webhook with AFP, mes de devengue and each worker's CUSPP and document number.
  • Payment tickets for the month's presented planillas

    Build this
    Starts
    When your system calls the workflow's webhook with a periodo de devengue
    Step 1
    Get the planillas for that periodo de devengue in estado PRESENTADA.
    Step 2
    For each planilla, emit a payment ticket.
    Step 3
    Email you each ticket number with its AFP, amount and the time the banks accept it.

You can run a workflow by hand on every plan, Free included. Schedules and webhook triggers come with the paid plans, from $29 a month.

Once built, one call from your code

Once you have built a method, it is one POST to /v1/runs from your backend, or a tool an AI agent calls over MCP. This is what “Get planillas and their estado” would look like.

Example request
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "www.afpnet.com.pe/get_planillas",
    "input": {
      "periodo_devengue_desde": "2026-09",
      "periodo_devengue_hasta": "2026-10"
    }
  }'
Example response
{
  "status": "completed",
  "data": {
    "ruc": "20512345678",
    "planillas": [
      {
        "numero_planilla": "6614023587",
        "afp": "Integra",
        "periodo_devengue": "2026-10",
        "tipo_trabajo": "Normal",
        "estado": "PRESENTADA",
        "numero_ticket": "8810374",
        "fondo": 4120,
        "seguro": 563.9,
        "comision": 87.55,
        "total": 4771.45
      }
    ],
    "count": 1
  }
}

An example with invented data, not a ready-made endpoint. The method exists in your organization once you build it, and its name, inputs and fields follow your request.

AFPnet’s own options

AFPnet is free for every employer. Its guides describe declaring planillas by uploading an Excel or text file, and paying online from your bank account or with a ticket at a bank. They describe no API or web service for employers: results and planillas download as text files, PDF and Excel.

OptionWhat it coversWhat it takes
Planilla file uploadAFPnet builds a planilla for each AFP and tipo de trabajo from one file of your workers, with fondo, seguro and comisión calculated.An Excel or text file in AFPnet's format, loaded and presented by a person under Aportes > Presentación y Pago de planillas.
Pago en línea (online payment)Pays a planilla or regularización from your bank account, with an optional doble firma (second approver).A subscription at your bank: BanBif, BBVA, Scotiabank, Interbank, BCP or Citibank. Available until 9:00 pm.
AFPnet by handConsulta y Pago de Planillas, Liquidaciones Previas and Consulta de Afiliados, one search at a time, with text, PDF and Excel downloads.A free AFPnet registration for your RUC, and usuarios created by your administrator with the options they need.

Read on November 12, 2026: Guía rápida para Empleadores, Declarar y pagar planillas y regularizaciones, Gestionar Liquidaciones Previas y descargos.

Signing in to AFPnet

AFPnet signs you in with your company's RUC, a usuario such as ADM0001 or EMP0001 and a contraseña, and asks for a new contraseña every 110 days. Each usuario sees only the options its administrator assigned. With Fous you sign in once through AFPnet's own sign-in with your own account: the login is sealed with AES-256, and an expired session is signed back in.

Worth knowing

The work tray is cleared every night
You can leave AFPnet and come back to an uploaded planilla file the same day. Overnight the bandeja de trabajo (work tray) is emptied, so an unpresented file has to be loaded again the next day.
Tickets reach the banks at set times
A ticket emitted by 11 am can be paid from 12 pm, one emitted between 11 am and 2 pm from 3 pm, and a later one from the next day. To pay, the bank needs only the AFP and the ticket number.
A second signature lasts one day
Doble firma starts on the third day after you request it. The second usuario confirms under Aportes > Pagos pendientes de 2da firma the same day, or the pending payment is deleted at the end of the day.
The usuario needs the right options
Seeing planilla detail needs the Ver detalle de planillas check, and liquidaciones previas need their own options. A method can read only what the usuario you sign in with has been given.

More in Government: Latin America

Other industries: KRA iTax, e-Zamówienia, ePortal ESTV, The Compliance Engine, ApplyOnline, E-Verify.

Frequently asked questions

Not one that AFPnet documents for employers. Its guides describe the web platform, free for every employer: planillas are declared by uploading an Excel or text file, paid online or with a bank ticket, and searches download as text files, PDF and Excel.

Search for it under Aportes > Consulta y Pago de Planillas. A planilla shows as PRESENTADA, PAGADA or ANULADA. While it is PRESENTADA you can pay it online, print it, request its anulación or emit a ticket for a bank.

In the first fortnight of the month after the contributions were due. AFPnet shows a notice listing the new ones when a usuario signs in. Each liquidación previa is Pendiente, En proceso or Cerrada, and a descargo can be filed only for lines that are Sin descargo or Rechazado.

Yes, by requesting its anulación in AFPnet, for example when it is incomplete, duplicated or for the wrong periodo de devengue. The usuario who requests it needs the option Aportes > Presentación y Pago de Planillas.

No. Fous is an independent product. You use it with your own AFPnet usuario, and a method reads and does only what that usuario can.

Put AFPnet behind an API call

Describe one job in Studio and see the method it builds, with 100 credits a month and no credit card, or book a demo and bring the sites your team signs in to.

Read nextARBASEACESECOP IIKRA iTaxHow methods workHow workflows run

Fous is an independent product: it is not affiliated with, endorsed by or sponsored by the operator of AFPnet (Asociación de AFP). The name is used only to say which system this page is about. Something here wrong or out of date? Write to legal@fous.com.