# Supplier payments

> Let your ERP prepare SPEI payments to your suppliers, have someone on your team sign them in the app, and let your ERP know when each transfer arrived.

With **Pagos** (in the app, **Compras y gastos › Pagos**), your company pays its suppliers by SPEI from its Fintoc account: it picks the invoices, someone signs with their passkey and the money goes out on its date to each supplier's verified account. With the API, your ERP (SAP, NetSuite, CONTPAQi or your own):

- sees **what's left to pay** on each received invoice, counting payment complements, credit notes and payments already made;
- **prepares pagos** that stay as drafts until someone on your team reviews and signs them in the app;
- knows **when each transfer arrived**, with its tracking key and its CEP, to reconcile it.

The API never does what moves money: it doesn't sign pagos, add or change a CLABE, or change signatures or limits. That's done in the app, with a passkey, with the waits and approvals your company configured. So a stolen key can, at most, leave a draft nobody will sign.

The objects:

- A **pago** (`pyo_…`): one or more transfers that go out together on their date. Its status: `draft` → `pending_approval` (signatures missing) → `approved` → `sending` → `paid`, `partially_paid` or `failed`; or `canceled` before going out.
- A **transfer** (`pyt_…`): to one supplier account, with the invoices it pays. `queued` → `sending` → `in_transit` → `succeeded`; or `failed`, `returning` and `returned` if the bank rejects or returns it.
- A **supplier account** (`pya_…`) and a **recurring pago** (`pym_…`): read only.

## Before you start

1. The RFC pays with Fintoc: in the app, under **Pagos**, connect its Fintoc account. Otherwise these routes return `400` `payouts_not_enabled`.
2. The RFC is an issuer of your API account: the RFCs of the company where you created the key already are (`type: "own"`), and the key uses their pagos while whoever created it may pay that RFC's suppliers in the app (and see payroll, for `/v1/payroll_payouts`); if not, or if they left the company, it returns `403` `team_permission_denied`. A key created by someone with the Desarrollador role doesn't see CLABEs or pagos; if the pagos are in another of your companies, connect it in [Desarrolladores › Emisores](/desarrolladores/emisores) with **Conectar una empresa**, like the [supplier portal](https://fiscalisto.com/en/docs/api/portal-de-proveedores), with **Usar también sus pagos a proveedores** on (or later, **Usar sus pagos** in its row's menu). Only someone of that company who may pay suppliers and change **Configurar pagos** of that RFC turns that on, and it works while that person still may: if they leave the company or lose the permission, these routes and their events return `403` `issuer_linked_empresa` until someone else who may turns them on. `/v1/payroll_payouts` also needs them to be able to see payroll.
3. To prepare pagos, someone allowed to change the payment settings turns on, in **Pagos › Configurar pagos**, «Dejar que la API y los asistentes (ChatGPT, Claude) preparen pagos». It starts off, and turning it on waits like any other change that loosens security. While it's off, `POST /v1/payouts` returns `403` `payouts_api_disabled`; reading always works.

## What's left to pay

The received invoices with something left to pay, as in **Pagos › Por pagar**:

```bash tab="cURL"
curl -G https://api.fiscalisto.com/v1/payable_invoices \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -d supplier_tax_id=AAA010101AAA
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.payableInvoices.list({ supplier_tax_id: "AAA010101AAA" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.payable_invoices.list({"supplier_tax_id": "AAA010101AAA"})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->payableInvoices->list(['supplier_tax_id' => 'AAA010101AAA'])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payableInvoiceList, err := client.PayableInvoices.List(ctx, &fiscalisto.ListPayableInvoicesParams{
		SupplierTaxID: fiscalisto.String("AAA010101AAA"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payableInvoiceList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ListPayableInvoicesParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payableInvoiceList = fiscalisto.payableInvoices().list(new ListPayableInvoicesParams().setSupplierTaxId("AAA010101AAA"));
System.out.println(payableInvoiceList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payableInvoiceList = await fiscalisto.PayableInvoices.ListAsync(new ListPayableInvoicesParams
{
    SupplierTaxId = "AAA010101AAA",
});
```

Each one has `total`, `paid` and `amount_due` in its currency (`total` and `amount_due` already without withholdings: `withheld` has the ISR and VAT withheld, which the company pays to SAT, or null; with an accepted early payment from the supplier portal, `amount_due` is the total less the discount until the nota de crédito arrives, and `early_payment` has `status`, `pay_on`, `discount` and `discount_pending`), `in_payout` (the open pago it's already in, or null; if it was split across several pagos, the first of them: `amount_due` is still the whole balance and a new pago can only take what those don't cover), `credit_notes_subtracted` (the notas de crédito the supplier related to the invoice that already came off `amount_due`, with `uuid`, `series_folio`, `date` and `amount`), `credit_notes_to_review` (if the company chose **Esperar a que alguien las acepte** under **Notas de crédito relacionadas con la factura** in Configurar pagos: the notas de crédito the supplier related to the invoice that don't come off `amount_due` yet, with `uuid`, `series_folio`, `date`, `amount` and `declined`, true if someone chose **No restarla**; they're accepted in the app with **Aceptar nota de crédito** or by applying them in a pago of that same invoice with `credit_notes`; empty if the company subtracts them on their own; preparing a payout of that invoice without applying it says so in `warnings`), `payment_hold` (if a [rule](https://fiscalisto.com/en/docs/api/reglas) with `hold_payment` held its payment: `rule`, `note` and `held_at`; it isn't paid until someone allowed taps **Liberar el pago** in the app; otherwise null) and `warnings` (what the before-paying rules found: canceled at the SAT, supplier on the 69-B list…). With `uuid` you ask for exact invoices, paid or not (up to 100, comma separated). An invoice [marked paid without a complemento](https://fiscalisto.com/en/docs/api/pagadas-sin-complemento), or a PUE whose money source was noted (`mark_paid` with `money_source`, the app or a rule), has `amount_due` 0 and can't be paid until the mark is removed (`mark_unpaid`).

## Prepare a pago

Send the folios fiscales (UUIDs); without `amount`, it pays everything left on each one. A supplier's invoices go in one transfer to its approved account:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payouts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pago-erp-8841" \
  -d '{ "pay_on": "2026-11-27", "note": "Fletes de octubre", "invoices": [{ "uuid": "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B" }] }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payout = await fiscalisto.payouts.create({
  pay_on: "2026-11-27",
  note: "Fletes de octubre",
  invoices: [
    {
      uuid: "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
    },
  ],
}, { idempotencyKey: "pago-erp-8841" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payout = fiscalisto.payouts.create({
    "pay_on": "2026-11-27",
    "note": "Fletes de octubre",
    "invoices": [
        {
            "uuid": "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
        },
    ],
}, idempotency_key="pago-erp-8841")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payout = $fiscalisto->payouts->create([
    'pay_on' => '2026-11-27',
    'note' => 'Fletes de octubre',
    'invoices' => [
        [
            'uuid' => '9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B',
        ],
    ],
], ['idempotency_key' => 'pago-erp-8841']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from 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"),
		Note:  fiscalisto.String("Fletes de octubre"),
		Invoices: []fiscalisto.CreatePayoutParamsInvoice{
			{UUID: "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B"},
		},
	}, fiscalisto.WithIdempotencyKey("pago-erp-8841"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payout.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayoutParams;
import com.fiscalisto.model.CreatePayoutParamsInvoice;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = fiscalisto.payouts().create(new CreatePayoutParams()
        .setPayOn("2026-11-27")
        .setNote("Fletes de octubre")
        .setInvoices(List.of(
                new CreatePayoutParamsInvoice()
                        .setUuid("9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B")
        )), RequestOptions.idempotencyKey("pago-erp-8841"));
System.out.println(payout.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = await fiscalisto.Payouts.CreateAsync(new CreatePayoutParams
{
    PayOn = "2026-11-27",
    Note = "Fletes de octubre",
    Invoices = new()
    {
        new()
        {
            Uuid = "9F1C2B3A-4D5E-4F60-8A7B-1C2D3E4F5A6B",
        },
    },
}, new RequestOptions { IdempotencyKey = "pago-erp-8841" });
```

It returns `201` with the pago in `draft`. It's checked like in the app: if an invoice is already paid or in another pago, the supplier has no approved account, a rule blocks it or a limit is passed, it returns `400` `payout_invalid` and the message says which line and why. Always send `Idempotency-Key`: if the network fails and the request is repeated, no pago is made twice. The same key with a different request (other invoices, amounts or day) returns `409` `idempotency_key_reused`, even after more than 24 hours: use a new one for each pago.

An invoice in dollars or another currency is paid in pesos at the day's official exchange rate (the FIX published in the DOF); if none is published yet, it returns `400` `payout_invalid`. In a scheduled pago, `exchange_rate` decides what happens if the official rate moves before its day: `official` holds it if it moved past the **Configurar pagos** tolerance, to be signed with that day's rate; `fixed` goes for today's pesos. Without it, it takes what **Configurar pagos** says. Before it goes out, each invoice is checked again: if it was canceled at the SAT, paid some other way, or a scheduled pago's rate moved more than **Configurar pagos** allows, the pago doesn't go out and stays `approved` until someone fixes it in the app.

The pago doesn't go out on its own. Someone on your team opens it at `app_url`, reviews it and signs it with their passkey; whoever signs first counts as who prepared it, so if your company asks for someone else to sign, another person's signature is still missing. When it has all its signatures, `payout.approved` arrives and it goes out on its date.

### Payments without an invoice

To pay something that has no supplier invoice (a payroll, an advance, a refund), send `payments` instead of `invoices`, or along with them: the RFC of whoever receives it (`tax_id`, with an approved account in Cuentas de proveedores), their `name`, the `amount` in pesos and `description`. With `no_invoice_reason` the pago never asks for an invoice and doesn't show in Pagos sin factura, as in a payroll, whose CFDI is the recibo; without it, the invoice is asked for like any payment without one. Those to one RFC go in a single transfer, and up to 500 go across both arrays:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payouts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nomina-2026-11-q1" \
  -d '{ "pay_on": "2026-11-14", "name": "Nómina 1.ª quincena", "payments": [{ "tax_id": "GOMA850101AB1", "name": "Ana Gómez", "amount": 9850.5, "description": "Nómina 1.ª quincena de noviembre", "no_invoice_reason": "Nómina: el CFDI es el recibo" }] }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payout = await fiscalisto.payouts.create({
  pay_on: "2026-11-14",
  name: "Nómina 1.ª quincena",
  payments: [
    {
      tax_id: "GOMA850101AB1",
      name: "Ana Gómez",
      amount: 9850.5,
      description: "Nómina 1.ª quincena de noviembre",
      no_invoice_reason: "Nómina: el CFDI es el recibo",
    },
  ],
}, { idempotencyKey: "nomina-2026-11-q1" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payout = fiscalisto.payouts.create({
    "pay_on": "2026-11-14",
    "name": "Nómina 1.ª quincena",
    "payments": [
        {
            "tax_id": "GOMA850101AB1",
            "name": "Ana Gómez",
            "amount": 9850.5,
            "description": "Nómina 1.ª quincena de noviembre",
            "no_invoice_reason": "Nómina: el CFDI es el recibo",
        },
    ],
}, idempotency_key="nomina-2026-11-q1")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payout = $fiscalisto->payouts->create([
    'pay_on' => '2026-11-14',
    'name' => 'Nómina 1.ª quincena',
    'payments' => [
        [
            'tax_id' => 'GOMA850101AB1',
            'name' => 'Ana Gómez',
            'amount' => 9850.5,
            'description' => 'Nómina 1.ª quincena de noviembre',
            'no_invoice_reason' => 'Nómina: el CFDI es el recibo',
        ],
    ],
], ['idempotency_key' => 'nomina-2026-11-q1']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from 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-14"),
		Name:  fiscalisto.String("Nómina 1.ª quincena"),
		Payments: []fiscalisto.CreatePayoutParamsPayment{
			{
				TaxID:           "GOMA850101AB1",
				Name:            fiscalisto.String("Ana Gómez"),
				Amount:          9850.5,
				Description:     fiscalisto.String("Nómina 1.ª quincena de noviembre"),
				NoInvoiceReason: fiscalisto.String("Nómina: el CFDI es el recibo"),
			},
		},
	}, fiscalisto.WithIdempotencyKey("nomina-2026-11-q1"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payout.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayoutParams;
import com.fiscalisto.model.CreatePayoutParamsPayment;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = fiscalisto.payouts().create(new CreatePayoutParams()
        .setPayOn("2026-11-14")
        .setName("Nómina 1.ª quincena")
        .setPayments(List.of(
                new CreatePayoutParamsPayment()
                        .setTaxId("GOMA850101AB1")
                        .setName("Ana Gómez")
                        .setAmount(9850.5)
                        .setDescription("Nómina 1.ª quincena de noviembre")
                        .setNoInvoiceReason("Nómina: el CFDI es el recibo")
        )), RequestOptions.idempotencyKey("nomina-2026-11-q1"));
System.out.println(payout.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = await fiscalisto.Payouts.CreateAsync(new CreatePayoutParams
{
    PayOn = "2026-11-14",
    Name = "Nómina 1.ª quincena",
    Payments = new()
    {
        new()
        {
            TaxId = "GOMA850101AB1",
            Name = "Ana Gómez",
            Amount = 9850.5m,
            Description = "Nómina 1.ª quincena de noviembre",
            NoInvoiceReason = "Nómina: el CFDI es el recibo",
        },
    },
}, new RequestOptions { IdempotencyKey = "nomina-2026-11-q1" });
```

## Know when it arrived

Listen on your [webhooks](https://fiscalisto.com/en/docs/api/webhooks):

| Event | When |
| --- | --- |
| `payout_transfer.succeeded` | A transfer arrived. It has `tracking_key`, the invoices it paid and, shortly after, `cep_url`. |
| `payout_transfer.failed` | It didn't go out; `failure_reason` says why. Its invoices go back to Por pagar. |
| `payout_transfer.returned` | The supplier's bank returned it; the money goes back to your Fintoc account. |
| `payout.paid` | Every transfer of the pago arrived. |
| `payout.partially_paid` / `payout.failed` | It ended with transfers that didn't arrive, or none arrived. |
| `payout.canceled` | It was canceled before going out. |

Or ask for the pago:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payouts/pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payout = await fiscalisto.payouts.get("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payout = fiscalisto.payouts.get("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payout = $fiscalisto->payouts->get('pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payout, err := client.Payouts.Get(ctx, "pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payout.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = fiscalisto.payouts().get("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx");
System.out.println(payout.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = await fiscalisto.Payouts.GetAsync("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx");
```

`GET /v1/payouts` lists them, newest first, with `status`, `pay_on_from` and `pay_on_to`. It includes the ones made in the app.

## Cancel

One the API prepared, while nothing has gone out:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payouts/pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx/cancel \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Se pagó por fuera" }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payout = await fiscalisto.payouts.cancel("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx", { reason: "Se pagó por fuera" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payout = fiscalisto.payouts.cancel("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx", {"reason": "Se pagó por fuera"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payout = $fiscalisto->payouts->cancel('pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx', ['reason' => 'Se pagó por fuera']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payout, err := client.Payouts.Cancel(ctx, "pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx", &fiscalisto.CancelPayoutParams{
		Reason: fiscalisto.String("Se pagó por fuera"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payout.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CancelPayoutParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = fiscalisto.payouts().cancel("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx", new CancelPayoutParams().setReason("Se pagó por fuera"));
System.out.println(payout.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payout = await fiscalisto.Payouts.CancelAsync("pyo_OufpKqnrvx9p4Pq9mZr1XyT5uBcW8sKdLx", new CancelPayoutParams { Reason = "Se pagó por fuera" });
```

Its invoices go back to Por pagar and `payout.canceled` arrives. Each API account cancels only what its own keys prepared: one prepared in the app, or by another API account connected to the company, is canceled there (`400` `payout_not_from_api`).

## Pause all pagos

The empresa's emergency stop, for a security tool that sees something odd or a button in your ERP. At once no transfer goes out (signed pagos, retries or recurring ones), and the admins get an alert with the reason:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payouts/pause \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Acceso sospechoso a la cuenta de tesorería" }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payoutsPause = await fiscalisto.payouts.pause({
  reason: "Acceso sospechoso a la cuenta de tesorería",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payouts_pause = fiscalisto.payouts.pause({
    "reason": "Acceso sospechoso a la cuenta de tesorería",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payoutsPause = $fiscalisto->payouts->pause([
    'reason' => 'Acceso sospechoso a la cuenta de tesorería',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payoutsPause, err := client.Payouts.Pause(ctx, &fiscalisto.PausePayoutsParams{
		Reason: "Acceso sospechoso a la cuenta de tesorería",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payoutsPause)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.PausePayoutsParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payoutsPause = fiscalisto.payouts().pause(new PausePayoutsParams()
        .setReason("Acceso sospechoso a la cuenta de tesorería"));
System.out.println(payoutsPause);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payoutsPause = await fiscalisto.Payouts.PauseAsync(new PausePayoutsParams
{
    Reason = "Acceso sospechoso a la cuenta de tesorería",
});
```

It returns the state (`payouts_pause`) with `paused: true`; `GET /v1/payouts/pause` reads it. The API never resumes: the people in **Quién firma** sign it in the app, each with their passkey, in **Pagos › Configurar pagos**. It works only where the empresa lets the API work with its pagos (otherwise `403` `payouts_api_disabled`), and pausing what's already paused changes nothing. Whoever created the key must be in **Pausar todos los pagos** for that RFC (otherwise `403` `team_permission_denied`), and since a pause stops the payments of every RFC of the empresa, a key limited to some issuers pauses only when it reaches every one that pays (otherwise `403` `issuer_not_allowed`).

## Accounts and recurring pagos

`GET /v1/payee_accounts` says which account each supplier is paid to, who the holder the bank confirmed is, whether it can be paid yet (`usable`) and how it was verified (`verification`: `bank` if the bank confirmed the supplier's RFC, `by_name` if the bank gave no RFC and the holder's name is the supplier's per the SAT (when the empresa allows it), `by_hand` if someone verified it by hand because the bank's RFC differed only in its homoclave, `third_party` if it was authorized as a third party's). A supplier can have several accounts: `is_default` marks the default one, which a pago uses when no other is chosen, and `account_number` has its account number if one was noted beside the CLABE. `GET /v1/payout_mandates` lists the recurring pagos (rent, services) with their next date. Both are read only: a new CLABE or a recurring pago is added and signed in the app.
