# Explain a deposit without an invoice

`POST https://api.fiscalisto.com/v1/bank_transactions/{id}/classify`

A deposit no invoice explains: venta (not invoiced yet), prestamo, traspaso, devolucion or intereses. SAT can presume an unexplained deposit is income (CFF art. 59 fr. III).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |
| `Idempotency-Key` | header |  | Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `classification` | `venta`, `prestamo`, `traspaso`, `devolucion`, `intereses` | yes | venta (a sale not invoiced yet), prestamo (a loan), traspaso (between your own accounts), devolucion (a refund) or intereses (what the bank pays; taxable income). |
| `note` | string |  | A note for your team (where it came from, why). (up to 500 characters) |

Example:

```json
{
  "classification": "traspaso",
  "note": "De la cuenta de ahorro"
}
```

## With the TypeScript SDK

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

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

const bankTransaction = await fiscalisto.bankTransactions.classify("btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", {
  classification: "traspaso",
  note: "De la cuenta de ahorro",
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

bank_transaction = fiscalisto.bank_transactions.classify("btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", {
    "classification": "traspaso",
    "note": "De la cuenta de ahorro",
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$bankTransaction = $fiscalisto->bankTransactions->classify('btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx', [
    'classification' => 'traspaso',
    'note' => 'De la cuenta de ahorro',
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var bankTransaction = await fiscalisto.BankTransactions.ClassifyAsync("btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", new ClassifyBankTransactionParams
{
    Classification = "traspaso",
    Note = "De la cuenta de ahorro",
}, 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()

	bankTransaction, err := client.BankTransactions.Classify(ctx, "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", &fiscalisto.ClassifyBankTransactionParams{
		Classification: "traspaso",
		Note:           fiscalisto.String("De la cuenta de ahorro"),
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(bankTransaction.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.ClassifyBankTransactionParams;

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

var bankTransaction = fiscalisto.bankTransactions().classify("btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx", new ClassifyBankTransactionParams()
        .setClassification("traspaso")
        .setNote("De la cuenta de ahorro"), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(bankTransaction.getId());
```

## Response 200

OK.

A `BankTransaction` 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` | `"bank_transaction"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer. |
| `date` | string | yes | The day of the deposit (YYYY-MM-DD). |
| `amount` | number | yes | What was deposited, in pesos. |
| `description` | string | yes | The bank's concept. |
| `reference` | string or null | yes | The reference or tracking key, or null. |
| `account` | string or null | yes | The last 4 digits of the account, or null. |
| `payer_tax_id` | string or null | yes | The RFC of whoever deposited, if known. |
| `status` | `open`, `matched`, `classified` | yes | open (unreconciled), matched (it paid invoices) or classified (it isn't from an invoice). |
| `classification` | `venta`, `prestamo`, `traspaso`, `devolucion`, `intereses` or null | yes | classified: venta (not yet invoiced), prestamo, traspaso, devolucion or intereses; otherwise null. |
| `note` | string or null | yes | A note when classifying it, or null. |
| `invoices` | array of string | yes | The invoices (inv_…) it paid, if reconciled. |
| `payment` | string or null | yes | The payment complement (inv_…) stamped with it, or null. |
| `suggested_match` | object or null | yes | If it is open, the invoices it seems to pay (by amount, RFC, folio in the concept and date): invoices, what goes to each one (amounts), method, confidence (high or medium) and why (reasons). null if none fits. |
| `suggested_match.invoices` | array of string | yes | The invoices, like the body of POST /v1/invoices, with an optional reference. |
| `suggested_match.amounts` | object | yes | What the deposit would pay of each invoice (by inv_…). |
| `suggested_match.method` | `PPD`, `PUE` | yes | PUE: receivable invoices that become paid when reconciling; PPD: paid with their payment complement (POST /v1/payments). |
| `suggested_match.confidence` | `high`, `medium` | yes | high (the amount and also the RFC, name or folio match) or medium (check it first). |
| `suggested_match.reasons` | array of string | yes | Why it is suggested, in words. |
| `created_at` | string (date-time) or null | yes | When it was sent. |

```json
{
  "id": "btx_OufpKqnrvx9p9Rt4sLm2XyT5uBcW8sKdLx",
  "object": "bank_transaction",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "date": "2026-10-24",
  "amount": 5800,
  "description": "SPEI RECIBIDO INMOBILIARIA CVA · ICV060329BY0",
  "reference": "F-1024",
  "account": "4821",
  "payer_tax_id": "ICV060329BY0",
  "status": "classified",
  "classification": "traspaso",
  "note": "De la cuenta de ahorro",
  "invoices": [],
  "payment": null,
  "suggested_match": null,
  "created_at": "2026-10-25T09:00:00-06:00"
}
```

## Errors

- `bank_transaction_invalid` (400): The deposit can't be matched, classified or reopened that way. `message_es` says why.
- `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.
- `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.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

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