Alegra integration
Connect Alegra once: every open invoice gets a VEX Pay payment link, and the payment is recorded on the invoice in Alegra.
What it does
The Alegra integration is being tested and is not available to sellers yet. This page describes how it will work; details can still change before launch.
For businesses that invoice in Alegra. You connect your Alegra account once in the VEX Pay portal. Every open invoice then gets its own VEX Pay payment link for what is left to pay, with the invoice number in its description. Your customer gets the link by email, or you share it on WhatsApp. When the customer pays, VEX Pay records the payment on the invoice in Alegra. Nothing in Alegra is ever deleted, and no code is needed.
For business owners: a short overview of the Alegra integration, in Spanish, at vexpay.app/alegra-colombia.
Requirements
- A VEX Pay account approved to take payments (Live).
- Integraciones turned on for your account by VEX Pay. Until then the portal does not show the page.
- An Alegra account, with the email you sign in with and its API token.
- You connect it yourself while signed in to the portal as the account owner.
Connect Alegra
- Copy your Alegra API token
In Alegra, open Settings (Configuración), then the integrations area, and copy the API token next to your account email.
- Open Integraciones
In the VEX Pay portal, go to Cobrar → Integraciones. Enter your Alegra email and the token, and press Verificar. Nothing is saved yet.
- Choose the account
Pick the Alegra bank or cash account where payments are recorded. Only active accounts are listed.
- Set the rules and connect
Choose which invoices to collect and whether VEX Pay emails the link, then press Conectar. The token is stored encrypted and never shown again.
Collection rules
- Which invoices: all open invoices, or only the ones of one numbering template (for example only your electronic invoices).
- Email: on by default. VEX Pay emails the link to the invoice’s customer when the invoice has an email address. Turn it off to share links yourself. Test mode never sends email.
- Changes apply from the next sync. You can change the account, the template and the email setting at any time with Guardar reglas.
How it works
- VEX Pay reads your open invoices about every 15 minutes. Sincronizar ahora runs it at once.
- Each open invoice gets one link for what is left to pay, in the invoice’s currency.
- An invoice that is edited, or part-paid in Alegra, gets a new link for the new amount; the old link is canceled.
- An invoice that is voided or paid in full by other means has its link canceled.
- An invoice with no customer email shows Sin correo: share the link yourself.
- Enviar por WhatsApp opens WhatsApp with the customer’s number and the link written for you; you press send. VEX Pay never starts a WhatsApp chat itself.
How the payment is recorded
When the customer pays the link, VEX Pay adds a payment to the invoice in Alegra with the amount of the link (in the invoice’s currency), the date of the payment (Venezuela time), the account you chose and the VEX Pay reference (VEXPAY-…) in its notes.
- Never twice: before writing, VEX Pay checks the invoice for its reference, so a retry after a lost answer does not record a second payment.
- Nothing is deleted or changed in Alegra other than adding that payment.
- The invoice list shows Pagada y registrada en Alegra once it is recorded.
Invoices paid twice
If the customer pays the link after the invoice was already paid, voided or deleted in Alegra, VEX Pay does not record the payment (it would overpay the invoice). The row shows Pagada dos veces and VEX Pay’s team is alerted. Contact VEX Pay support to agree how to return or apply the extra payment.
Currencies
| Invoice currency | Supported |
|---|---|
| USD | Yes |
| VES (bolívares) | Yes |
| COP (Colombian pesos) | Yes, when Colombian pesos are enabled on your account |
| Any other (EUR, MXN, PEN…) | No: the invoice is listed as Moneda no soportada and gets no link |
An invoice with no currency set is in your Alegra company’s currency. Links follow your account’s usual limits: an amount below the minimum or above the maximum is listed with the reason and gets no link.
Errors and retries
- Alegra refuses the payment (for example a closed accounting period): VEX Pay retries on its own, waiting longer each time, for several hours. After that the row shows Pagada en VEX Pay, no registrada en Alegra with Alegra’s reason. Fix the cause (reopen the period) and press Reintentar.
- Alegra unavailable: retried the same way; nothing to do.
- Wrong or changed credentials: the connection shows Revisa la conexión and you get one email. Press Desconectar, then connect again with the new token. A payment received while the connection had the error and not yet recorded stays marked as not recorded after you disconnect: record it in Alegra yourself.
Disconnecting
Desconectar deletes the stored token and stops the sync. Links already sent keep working, but their payments are no longer recorded in Alegra: the list shows them as paid in VEX Pay and not recorded, and you record them in Alegra yourself. You can connect again at any time.