> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.recurrente.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.recurrente.com/_mcp/server.

# Obtener una planilla con el pago de cada persona

GET https://app.recurrente.com/api/payroll_runs/{id}

Reference: https://docs.recurrente.com/referencia-api/api-reference/payroll/get-payroll-run

## Authentication

- `X-SECRET-KEY` header (required) — Tu clave secreta de API. Una llave de cuenta (`sk_live_...`, `sk_test_...`) opera sobre su propia cuenta y, con `X-ACCOUNT-ID`, sobre sus cuentas conectadas. La llave también fija el ambiente: una `sk_test_` solo lista y resuelve objetos de prueba (`live_mode: false`) y una `sk_live_` solo objetos reales. Un ID del otro ambiente responde `404` (`401` en `/customers`). Una llave de organización (`sk_org_live_...`, `sk_org_test_...`) alcanza todas las cuentas de una organización y solo sirve para leer: saldos, movimientos y reportes. Para operar sobre una cuenta debe nombrarla con `X-ACCOUNT-ID`; omitirlo en una lectura devuelve todas las cuentas de la organización. Cualquier otro endpoint responde `403` con `code: organization_key_unsupported`.

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

La planilla

- `id` (string, optional)
- `account_id` (string, optional)
- `kind` (enum, optional)
  - Allowed values: `regular`, `extra`, `liquidacion`, `aguinaldo`, `bono14`
- `label` (string, optional)
- `status` (enum, optional) — `draft` hasta que la pagas; `in_review` cuando es la primera de la cuenta y espera la revisión de Recurrente; `paid`; `cancelled`.
  - Allowed values: `draft`, `in_review`, `paid`, `cancelled`
- `pay_on` (date, optional)
- `period_start_on` (date, optional)
- `period_end_on` (date, optional)
- `totals` (list of PayrollRunTotalsItems, optional) — Por moneda: en un borrador, lo que pagarla tomará del balance; ya confirmada, lo que envió.
- `confirmed_at` (datetime, optional, nullable)
- `reviewed_at` (datetime, optional, nullable)
- `lines` (list of PayrollRunLine, optional)
- `created_at` (datetime, optional)

## Errors

### 404 Not Found Error

No existe en esta cuenta

- `message` (string, optional) — Mensaje de error
- `code` (string, optional) — Código estable legible por máquinas, cuando aplica
- `refund_id` (string, optional) — ID del reembolso relacionado cuando aplica
- `endpoint` (string, optional) — Acción de API rechazada, cuando aplica
- `errors` (ErrorErrors, optional) — Detalles de errores por campo

## Types

### PayrollRunTotalsItems

- `currency` (string, optional)
- `amount_in_cents` (integer, optional)

### PayrollRunLine

- `member_id` (string, optional)
- `member_name` (string, optional)
- `status` (enum, optional) — Antes de pagarse, `pending` o `skipped`. Ya enviado, el estado del pago: `paid` (lo recibió), `processing` (en revisión), `unclaimed` (espera que lo reclame en su WhatsApp), `rejected` o `expired` (regresó al balance).
  - Allowed values: `pending`, `skipped`, `cancelled`, `paid`, `processing`, `unclaimed`, `rejected`, `expired`
- `amount_in_cents` (integer, optional) — El neto que recibe, después de descuentos.
- `currency` (string, optional)
- `days_worked` (integer, optional, nullable)
- `extra_amount_in_cents` (integer, optional, nullable)
- `transfer_id` (string, optional, nullable) — El envío que le pagó, en `GET /transfers/{id}`.
- `items` (list of PayrollRunLineItemsItems, optional) — Las filas de su boleta.

### ErrorErrors

Detalles de errores por campo

- map from string to ErrorErrorsOneOf0
- list of string
- string

### PayrollRunLineItemsItems

- `kind` (enum, optional) — `employer` es un costo del empleador (IGSS patronal, IRTRA, INTECAP) que no sale del pago de la persona.
  - Allowed values: `earning`, `deduction`, `employer`
- `code` (string, optional)
- `label` (string, optional)
- `amount_in_cents` (integer, optional)
- `adjustment_id` (string, optional, nullable)

### ErrorErrorsOneOf0

- list of string
- string

## Examples

**Response**

```json
{
  "id": "pr_ab12cd34",
  "account_id": "string",
  "kind": "regular",
  "label": "Planilla del 15 de noviembre",
  "status": "draft",
  "pay_on": "2023-01-15",
  "period_start_on": "2023-01-15",
  "period_end_on": "2023-01-15",
  "totals": [
    {
      "currency": "string",
      "amount_in_cents": 1
    }
  ],
  "confirmed_at": "2024-01-15T09:30:00Z",
  "reviewed_at": "2024-01-15T09:30:00Z",
  "lines": [
    {
      "member_id": "string",
      "member_name": "string",
      "status": "pending",
      "amount_in_cents": 1,
      "currency": "string",
      "days_worked": 1,
      "extra_amount_in_cents": 1,
      "transfer_id": "string",
      "items": [
        {
          "kind": "earning",
          "code": "igss_laboral",
          "label": "IGSS laboral",
          "amount_in_cents": 1,
          "adjustment_id": "string"
        }
      ]
    }
  ],
  "created_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://app.recurrente.com/api/payroll_runs/id"

headers = {"X-SECRET-KEY": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.recurrente.com/api/payroll_runs/id';
const options = {method: 'GET', headers: {'X-SECRET-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://app.recurrente.com/api/payroll_runs/id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-SECRET-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.recurrente.com/api/payroll_runs/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-SECRET-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.recurrente.com/api/payroll_runs/id")
  .header("X-SECRET-KEY", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.recurrente.com/api/payroll_runs/id', [
  'headers' => [
    'X-SECRET-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.recurrente.com/api/payroll_runs/id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-SECRET-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-SECRET-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.recurrente.com/api/payroll_runs/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```