# Prepare a supplier payout

`POST https://api.fiscalisto.com/v1/payouts`

A draft payout with these invoices, checked as in the app: the rules before paying, the limits and each supplier's approved accounts. Those of one supplier go in one transfer. It never goes out on its own: someone on the team opens it at app_url and signs it with their passkey. Only if the empresa allows it in Pagos › Configurar pagos (if not, 403 payouts_api_disabled); what can't be paid answers 400 payout_invalid with the reason. It requires Idempotency-Key: if the response is lost, repeat it with the same value and it answers the same payout, never a new one. The same key with a different request (other invoices, amounts or day) answers 409 idempotency_key_reused, even after more than 24 hours.

## Before you call

- **A Fintoc account in the issuer's name**, to pay suppliers: it's opened in the app, in **Pagos › Abrir la cuenta**.
- **The empresa letting the API prepare payouts**, in the app, in **Pagos › Configurar pagos**. Even so, someone on the team signs each payout.
- **The `Idempotency-Key` header**, a new one for each call (for example, the order's id in your system). If the response is lost, repeat the call with the same one and it isn't done twice: [Idempotency](https://fiscalisto.com/en/docs/api/idempotencia).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | yes | A new one per CFDI (8 to 255 characters; your order id works). If the response is lost, repeat the request with the same value: it answers the same and never stamps twice. |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer` | string |  | The issuer (iss_…). By default, your only issuer. |
| `pay_on` | string |  | The day it goes out (YYYY-MM-DD, today or later). Today by default: it goes out as soon as it's signed. |
| `name` | string or null |  | The lote's name («Fletes»), to find it in the app among the open lotes. Without one, the app calls it by its day («Lote del jueves 27 nov»). |
| `note` | string or null |  | A note for whoever reviews and signs it. |
| `exchange_rate` | `official`, `fixed` |  | In a scheduled pago with invoices in another currency: official (the official exchange rate; if it moved past the Configurar pagos tolerance by the day it goes, it's held until signed again) or fixed (it goes at today's rate whether it moves or not). By default, what Configurar pagos says. |
| `invoices` | array of object |  | The received invoices to pay (up to 500). Those of one supplier go in a single transfer to its approved account. Send invoices, payments or both. (up to 500) |
| `invoices[].uuid` | string | yes | The received invoice's folio fiscal. |
| `invoices[].amount` | number |  | How much to pay, in the invoice's currency. By default, everything left (amount_due). (greater than 0) |
| `invoices[].reason` | string or null |  | Why you pay less than what's left («Parcial», «Anticipo»…). |
| `payments` | array of object |  | Payments without an invoice (up to 500 across both arrays): a payroll, an advance, a refund. Those to one RFC go in a single transfer. (up to 500) |
| `payments[].tax_id` | string | yes | The RFC of whoever receives it (a supplier or a person), with an approved account in Cuentas de proveedores. |
| `payments[].name` | string or null |  | Their name, as the pago shows it. |
| `payments[].amount` | number | yes | How much to send, in pesos. (greater than 0) |
| `payments[].description` | string or null |  | What is paid («Nómina 1.ª quincena de noviembre», «Anticipo»). Required when Configurar pagos asks for it. |
| `payments[].no_invoice_reason` | string or null |  | If it will never have an invoice (a payroll, whose CFDI is the recibo; a refund), why: no invoice is asked for and it doesn't show in Pagos sin factura. Without it, the invoice is asked for like any payment without one. |

Example:

```json
{
  "pay_on": "2026-11-27",
  "name": "Fletes",
  "note": "Pagos del viernes",
  "invoices": [
    {
      "uuid": "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B"
    },
    {
      "uuid": "5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F",
      "amount": 5000,
      "reason": "Parcial"
    }
  ]
}
```

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payout = await fiscalisto.payouts.create({
  pay_on: "2026-11-27",
  name: "Fletes",
  note: "Pagos del viernes",
  invoices: [
    {
      uuid: "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
    },
    {
      uuid: "5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F",
      amount: 5000,
      reason: "Parcial",
    },
  ],
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payout = fiscalisto.payouts.create({
    "pay_on": "2026-11-27",
    "name": "Fletes",
    "note": "Pagos del viernes",
    "invoices": [
        {
            "uuid": "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
        },
        {
            "uuid": "5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F",
            "amount": 5000,
            "reason": "Parcial",
        },
    ],
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payout = $fiscalisto->payouts->create([
    'pay_on' => '2026-11-27',
    'name' => 'Fletes',
    'note' => 'Pagos del viernes',
    'invoices' => [
        [
            'uuid' => '9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B',
        ],
        [
            'uuid' => '5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F',
            'amount' => 5000,
            'reason' => 'Parcial',
        ],
    ],
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = await fiscalisto.Payouts.CreateAsync(new CreatePayoutParams
{
    PayOn = "2026-11-27",
    Name = "Fletes",
    Note = "Pagos del viernes",
    Invoices = new()
    {
        new()
        {
            Uuid = "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
        },
        new()
        {
            Uuid = "5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F",
            Amount = 5000,
            Reason = "Parcial",
        },
    },
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payout, err := client.Payouts.Create(ctx, &fiscalisto.CreatePayoutParams{
		PayOn: fiscalisto.String("2026-11-27"),
		Name:  fiscalisto.String("Fletes"),
		Note:  fiscalisto.String("Pagos del viernes"),
		Invoices: []fiscalisto.CreatePayoutParamsInvoice{
			{UUID: "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B"},
			{
				UUID:   "5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F",
				Amount: fiscalisto.Float64(5000),
				Reason: fiscalisto.String("Parcial"),
			},
		},
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payout.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayoutParams;
import com.fiscalisto.model.CreatePayoutParamsInvoice;
import java.util.List;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = fiscalisto.payouts().create(new CreatePayoutParams()
        .setPayOn("2026-11-27")
        .setName("Fletes")
        .setNote("Pagos del viernes")
        .setInvoices(List.of(
                new CreatePayoutParamsInvoice()
                        .setUuid("9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B"),
                new CreatePayoutParamsInvoice()
                        .setUuid("5B2E8D41-7C3A-4E19-9F60-2A1B3C4D5E6F")
                        .setAmount(5000)
                        .setReason("Parcial")
        )), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(payout.getId());
```

## Response 201

OK. Repeating the request with the same Idempotency-Key answers the same, with the same status and the idempotent-replayed: true header.

A `Payout` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"payout"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer (iss_…) that pays. |
| `number` | integer | yes | Its number in the empresa (Pago 12), as in the app. (from -9007199254740991 to 9007199254740991) |
| `status` | `draft`, `pending_approval`, `approved`, `sending`, `paid`, `partially_paid`, `failed`, `canceled` | yes | draft (someone still has to sign it in the app), pending_approval (signatures missing), approved (signed: it goes out on its day), sending, paid (all arrived), partially_paid (some arrived), failed (none arrived) or canceled. |
| `name` | string or null | yes | The lote's name («Fletes»), or null: the app calls it by its day. |
| `pay_on` | string | yes | The day it goes out (YYYY-MM-DD, Mexico City time). |
| `exchange_rate` | `official`, `fixed` or null | yes | In a scheduled pago with invoices in another currency, how it takes the exchange rate: official (the official one; if it moved past the Configurar pagos tolerance by the day it goes, it's held until signed again) or fixed (it goes at the rate it was signed with). null in pesos or if it goes today. |
| `total` | number | yes | The sum of its transfers, in pesos. |
| `currency` | `"MXN"` | yes | Always MXN: SPEI transfers are in pesos. |
| `note` | string or null | yes | The note for whoever reviews it, or null. |
| `source` | `app`, `api`, `assistant`, `rule`, `recurring` | yes | Where it came from: app, api, assistant (an assistant such as ChatGPT or Claude), rule (a rule that pays on its own) or recurring (a recurring payment). |
| `payout_mandate` | string or null | yes | The recurring payment (pym_…) that made it, or null. |
| `signatures` | object | yes | required: how many signatures it requires (null while it is a draft); given: how many people have already signed. The API never signs. |
| `signatures.required` | integer or null | yes | How many signatures it requires, or null while it is a draft. |
| `signatures.given` | integer | yes | How many people have already signed it in the app. (from -9007199254740991 to 9007199254740991) |
| `app_url` | string | yes | Where someone on the team reviews and signs it, in the app. |
| `transfers` | array of object | yes | Its transfers, one per supplier and account. |
| `transfers[].id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `transfers[].livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `transfers[].object` | `"payout_transfer"` | yes | What kind of object it is («invoice», «customer»…). |
| `transfers[].issuer` | string | yes | The issuer (iss_…) that pays. |
| `transfers[].payout` | string | yes | The payout (pyo_…) it belongs to. |
| `transfers[].supplier_tax_id` | string | yes | The supplier's RFC. |
| `transfers[].supplier_name` | string or null | yes | The supplier's name, or null. |
| `transfers[].payee_account` | string | yes | The supplier account (pya_…) it goes to. |
| `transfers[].clabe` | string | yes | The 18-digit CLABE it goes to. |
| `transfers[].bank` | string or null | yes | The CLABE's bank, or null. |
| `transfers[].amount` | number | yes | How much, in pesos. |
| `transfers[].currency` | `"MXN"` | yes | Always MXN. |
| `transfers[].concept` | string | yes | The concept the supplier sees at their bank. |
| `transfers[].reference` | string or null | yes | The SPEI numeric reference, or null. |
| `transfers[].status` | `queued`, `sending`, `in_transit`, `unknown`, `succeeded`, `failed`, `returning`, `returned`, `not_sent`, `removed` | yes | queued (about to go out), sending, in_transit, unknown (to be confirmed with the bank), succeeded (arrived), failed (didn't go out), returning (the bank is returning it), returned, not_sent or removed (taken out of the payout). |
| `transfers[].tracking_key` | string or null | yes | The SPEI tracking key, or null before it goes out. |
| `transfers[].cep_url` | string or null | yes | The link to Banxico's CEP, or null until it arrives. |
| `transfers[].failure_reason` | string or null | yes | Why it didn't go out or why it was returned, or null. |
| `transfers[].invoices` | array of object | yes | What it pays: each invoice (uuid) with its amount in its currency, or a payment without an invoice (without_invoice, with description). |
| `transfers[].invoices[].uuid` | string or null | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `transfers[].invoices[].amount` | number | yes | Amount. |
| `transfers[].invoices[].currency` | string | yes | Currency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default. |
| `transfers[].invoices[].without_invoice` | boolean | yes | true if it is a payment without an invoice (advance, deposit…). |
| `transfers[].invoices[].description` | string or null | yes | Description. |
| `transfers[].sent_at` | string (date-time) or null | yes | When it went out, or null. |
| `transfers[].settled_at` | string (date-time) or null | yes | When it arrived or was resolved, or null. |
| `cancel_reason` | string or null | yes | Why it was canceled, or null. |
| `created_by_api` | boolean | yes | true if the API prepared it. |
| `created_at` | string (date-time) or null | yes | When it was prepared. |
| `approved_at` | string (date-time) or null | yes | When it got all its signatures, or null. |
| `sent_at` | string (date-time) or null | yes | When its transfers started going out, or null. |
| `settled_at` | string (date-time) or null | yes | When it finished (all arrived or were resolved), or null. |
| `canceled_at` | string (date-time) or null | yes | When it was canceled, or null. |

```json
{
  "id": "pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx",
  "object": "payout",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "number": 12,
  "status": "paid",
  "name": "Fletes",
  "pay_on": "2026-11-18",
  "exchange_rate": null,
  "total": 11600,
  "currency": "MXN",
  "note": "Fletes de octubre",
  "source": "api",
  "payout_mandate": null,
  "signatures": {
    "required": 1,
    "given": 1
  },
  "app_url": "https://fiscalisto.com/k7x2m9/pagos/po_4b1e2c3d4f504a618b729c83d4e5f601",
  "transfers": [
    {
      "id": "pyt_OufpKqnrvx9p5Rt7mZr1XyT5uBcW8sKdLx",
      "object": "payout_transfer",
      "livemode": false,
      "issuer": "iss_OufpKqnrvx9p",
      "payout": "pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx",
      "supplier_tax_id": "AAA010101AAA",
      "supplier_name": "Fletes del Norte",
      "payee_account": "pya_OufpKqnrvx9p6Ac3mZr1XyT5uBcW8sKdLx",
      "clabe": "002010077777777771",
      "bank": "BANAMEX",
      "amount": 11600,
      "currency": "MXN",
      "concept": "Pago 12 A120",
      "reference": "1200001",
      "status": "succeeded",
      "tracking_key": "FNTC2026111800012",
      "cep_url": "https://www.banxico.org.mx/cep/go?i=90646&s=20210302&d=FNTC2026111800012",
      "failure_reason": null,
      "invoices": [
        {
          "uuid": "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
          "amount": 11600,
          "currency": "MXN",
          "without_invoice": false,
          "description": null
        }
      ],
      "sent_at": "2026-11-18T09:00:04-06:00",
      "settled_at": "2026-11-18T09:00:41-06:00"
    }
  ],
  "cancel_reason": null,
  "created_by_api": true,
  "created_at": "2026-11-17T16:20:00-06:00",
  "approved_at": "2026-11-17T18:02:00-06:00",
  "sent_at": "2026-11-18T09:00:00-06:00",
  "settled_at": "2026-11-18T09:00:41-06:00",
  "canceled_at": null
}
```

## Errors

- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `idempotency_key_missing` (400): Stamping requires the Idempotency-Key header (8 to 255 characters, a new one per document), so a retry never stamps twice.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.
- `payout_invalid` (400): The pago can't be prepared or changed like that (an invoice already paid or in another pago, a supplier without an approved account, a rule that blocks it, a limit, or it already went out). `message_es` says why, line by line.
- `payouts_api_disabled` (403): The empresa doesn't let the API prepare pagos: turn it on in the app, under Pagos › Configurar pagos.
- `payouts_not_enabled` (400): The issuer's RFC doesn't pay suppliers with Fiscalisto: connect Fintoc in the app, under Pagos.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).
- `team_permission_denied` (403): The key acts as the person who created it, with their access in the empresa: they lack the permission for this, what you asked would give more than they have, or they're no longer a member.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
