[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Record bank payments on Alegra invoices

> Match incoming bank transfers to open Alegra invoices by client and amount and record each payment on the right bank account.

Source: https://cotlet.dev/integrations/alegra-api-mcp-server/record-invoice-payments

Money lands in your bank account, and each transfer still has to be matched to an open invoice and entered in Alegra with the right date, bank account and payment method.

Cotlet does it in your own Alegra account with list\_invoices, list\_bank\_accounts and record\_payment, called by your AI agent, an n8n workflow or a script.

[Sign up free](https://cotlet.dev/app/signup?app=alegra) [All Alegra tools](https://cotlet.dev/integrations/alegra-api-mcp-server.md)

Hosted · nothing to install or maintain

## Can Alegra do this on its own?

Alegra has an API that records payments, and Zapier has a Create Invoice Payment action (checked 14 Oct 2026). Alegra's official MCP server can read payments but cannot create one. Alegra does not match bank transfers to invoices for you outside of bank reconciliation.

## How you do it in Alegra today

1. You open the Ingresos menu, choose Facturas de venta and open the invoice the transfer belongs to.
2. You click + Agregar pago and fill the pop-up: Fecha, Cuenta bancaria and Método de pago, then click Agregar pago.
3. For anything unusual you click Ir a formulario avanzado, where one payment can be tied to several invoices at once.
4. Later you reconcile the bank account in Alegra, which only works for payments you entered.
5. A wrong payment is voided, not deleted, and only payments that are not reconciled can be deleted.

## How to record bank payments on Alegra invoices

Prompt

```
Here are yesterday's incoming transfers from my bank statement. Match each one to an open Alegra invoice by client and amount, record the payment on the Bancolombia account, and list anything that does not match.
```

1. 01  
### Find the invoice behind each transfer  
list\_invoices runs with status open and the client from the statement line. A transfer matches only when the amount equals the balance of exactly one open invoice for that client.
2. 02  
### Resolve the bank account once  
list\_bank\_accounts returns the account IDs, and the agent maps the account named in your prompt to its ID. An unknown account name stops the run before any payment.
3. 03  
### Hold back the doubtful ones  
A transfer that matches two invoices, a part payment, or no invoice goes to a list for you, with the closest candidate named.
4. 04  
### Record each payment  
record\_payment is called per match with the statement date, the amount and the method transfer. Each call asks for your confirmation by default, so a wrong match is stopped before it posts.
5. 05  
### Report what is still open  
The response of every call shows the new balance. The agent reports invoices now fully paid, those with a balance left and the transfers it could not place.

### What you get back

Example data

```
Transfers read: 4
Payments recorded: 2
- Northwind Studio, FV-0042, 1,130.50 on 2026-10-20, balance now 0.00
- Lumen Dental, FV-0035, 571.20 on 2026-10-20, balance now 0.00
Needs you: 2
- 300.00 from "J. Ortiz": no open invoice for that name
- 400.00 from Harbor Cafe: two open invoices of 400.00
```

### Other ways to ask

- Record the payment of 1,130.50 on FV-0042 as a transfer into my main account, dated October 20.
- List open invoices whose balance equals one of these amounts, but do not record anything.
- Every morning, record yesterday's transfers from this file and email me what did not match.
- Show payments received in the last 7 days with the invoice each one settled.

## What Alegra allows, and what to know first

- Alegra needs a date and a bank account ID for every payment, and the payment method is one of cash, check, transfer, deposit, credit-card or debit-card.
- One Alegra payment can settle several invoices, but record\_payment books one invoice per call so each match is confirmed on its own.
- Alegra does not delete a voided payment: it stays in the list and can be restored with Convertir a abierta.
- Only payments that are not yet reconciled with the bank can be deleted in Alegra.
- Alegra shows the total, the amount paid and the balance on the invoice, and a payment of the full balance leaves it at zero.

record\_payment asks for your OK by default. To run it daily without you, switch confirmation off for that tool in your dashboard.

Sources: [Alegra Help: Register and manage your received payments](https://ayuda.alegra.com/consulta-y-gestiona-tus-recibos-de-caja) · [Alegra Help: Manage your bank accounts in Alegra](https://ayuda.alegra.com/gestiona-tus-cuentas-de-banco-en-alegra) · [Alegra developers: Create a payment](https://developer.alegra.com/reference/post%5Fpayments-1) · [Alegra triggers and actions on Zapier](https://zapier.com/apps/alegra/integrations)

## Call record\_payment from a script

curl

```
curl -X POST https://cotlet.dev/api/v1/alegra/invoices/1042/payments \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":1130.5,"date":"2026-10-20","bank_account_id":"2","payment_method":"transfer"}'
```

Example response

```
{
"payment_id": "311",
"invoice_id": "1042",
"number": "FV-0042",
"date": "2026-10-20",
"amount": 1130.5,
"payment_method": "transfer",
"bank_account": {
"bank_account_id": "2",
"name": "Bancolombia"
},
"total": 1130.5,
"total_paid": 1130.5,
"balance": 0
}
```

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is alegra\_write → record\_payment. Example data.

[Schedule it in n8n, Make, Zapier or cron](https://cotlet.dev/integrations/alegra-api-mcp-server.md#automations)

## Alegra tools this automation uses

__Cotlet Alegra tools used to record bank payments on Alegra invoices__
| Tool | Parameters |
| -------------------- | -------------------------------------------------------------------- |
| list\_invoices | status, client\_id, due\_before, date\_from, date\_to, limit, cursor |
| list\_bank\_accounts | none |
| record\_payment | invoice\_id, amount, date, bank\_account\_id, payment\_method |

[All 10 Alegra tools with descriptions](https://cotlet.dev/integrations/alegra-api-mcp-server.md#tools)

## Frequently asked questions

### Is it safe to connect Alegra to Cotlet?

Yes. You sign in to Alegra yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Alegra once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

## More Alegra automations

- [Create and email Alegra invoices from a job list](https://cotlet.dev/integrations/alegra-api-mcp-server/create-and-email-invoices.md)
- [Chase unpaid Alegra invoices by email](https://cotlet.dev/integrations/alegra-api-mcp-server/chase-unpaid-invoices.md)
- [Alegra API and MCP server: every tool](https://cotlet.dev/integrations/alegra-api-mcp-server.md)
- [All use cases](https://cotlet.dev/use-cases.md)

## Give your agent access to Alegra.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Alegra.

[Sign up free](https://cotlet.dev/app/signup?app=alegra)

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
