Card Payment Terminal
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.roCard Payment Terminal
Collect card payments on a terminal
Collect card payments on a payment terminal directly from Odoo, and keep on each payment the references the bank needs: RRN, authorization code, masked card number and terminal receipt.
- Pay an invoice on the terminalIn the Register Payment window of a customer invoice, Pay on Terminal sends the amount to the user's terminal. The payment is recorded only after the bank approves it, in the bank journal of the terminal.
- Card data on the paymentRRN, authorization code, masked card number, card brand, terminal ID and the terminal receipt are copied on the payment, in a Card tab.
- Void from the paymentVoid on Terminal voids the card transaction and cancels the payment once the terminal confirms, typically on the same day, before the settlement.
- No double chargeEvery transaction has a unique reference, used as idempotency key with the driver. A transaction whose result is unknown (lost connection, timeout) is marked To verify and is never charged again by mistake: it is resumed with the same reference or resolved by an accounting manager after checking the terminal.
- Terminal per userEach user sets the terminal in front of them, in their preferences.
- Close the dayClose the Day runs the settlement of the terminal.
- Simulated terminalA built-in simulated protocol answers without a device, for training, demonstrations and automated tests. The last two digits of the amount choose the outcome (01 declined, 02 insufficient funds, 03 incorrect PIN, 04 cancelled by the customer, 05 result unknown).
The module is the base of the Terrabit card terminal integrations: the protocol adapters (local drivers and terminal brands) are separate modules that plug into it. The protocol logic runs on the Odoo server; the browser only carries the requests to the driver on the cashier's computer, so it also works with Odoo in the cloud.
- Go to Invoicing > Configuration > Payment Terminals and create a terminal: name, protocol, the bank journal in which its card payments are recorded and, optionally, the payment method.
- For a protocol that uses a local driver, fill in the Device Reference (the terminal id in the driver) and the Local Driver URL.
- Set the terminal of each user: Settings > Users > Preferences > Payment Terminal, or by the user in My Preferences.
To try the module without a device, choose the Simulated (no device) protocol. The answer of
the next transaction is chosen in this order: Next Simulated Answer (set by a test through the
ORM, terminal._simulator_set_next("declined"), or from the Virtual devices panel, once or
until stopped), then the cents of the amount:
| The amount ends in | Answer |
|---|---|
,01 |
declined |
,02 |
insufficient funds |
,03 |
incorrect PIN |
,04 |
cancelled by the customer |
,05 |
approved, but the answer is lost (to verify, then approved on resume) |
The unplugged cable and the terminal that does not answer have no amount: they are chosen only as the next answer. In the panel, Customer cancels cancels the transaction in progress.
Accounting (Romania)
The money of a card payment reaches the bank account only at the settlement, one or two days later. Until then it is an amount in transit:
- on collection:
Dr 5125 Sume în curs de decontare = Cr 4111 Clienți; - on the bank statement:
Dr 5121 (net amount) + Dr 627 (bank fee) = Cr 5125 (gross amount).
Keep the bank journal of the terminal on 5121 and set the outstanding receipts account of its payment method to a dedicated analytic of 5125 (for example 512501 "Încasări card în curs de decontare"; 5125 itself is the suspense account of bank statements in the Romanian chart): the payment stays In Process until it is matched with the statement. Do not post card payments directly on 5121. The bank fee is known only from the statement and is recorded at the reconciliation, preferably with a reconciliation model.
A void is possible only while the payment is not matched with the bank statement. Do not put the 5121 account of the journal on the payment method: the payment would count as settled at once and the void would no longer be available.
The module covers invoices paid at the office by companies (B2B). Sales to individuals (B2C) must be registered on a fiscal cash register (OUG 28/1999): use the Point of Sale integration for them.
Set up the terminal
- In Invoicing > Configuration > Payment Terminals, create the terminal: protocol, bank journal and, optionally, payment method. Close the Day runs the settlement of the terminal.
- Set the terminal of each user, in the Preferences tab of the user (or in My Preferences).
Collect an invoice by card
- Open a posted customer invoice and click Pay. Next to Create Payment, click Pay on Terminal. The amount can be lowered for a partial payment.
- The Card Payment window follows the transaction: Waiting for the card, then waiting for the bank. While the customer has not paid, the cashier can click Cancel Payment.
- Once Approved, the window shows the RRN and the authorization code, and the payment is recorded in the journal of the terminal. A declined card records nothing: the invoice stays unpaid.
- After Close, the invoice is paid. The payment opens from the Payments button; its Card tab shows the RRN, the authorization code, the masked card number, the card brand, the terminal ID and the terminal receipt.
With the recommended setup (see Configuration), the journal entry of the payment debits the outstanding receipts account of the terminal's payment method and credits the receivable; the bank account is debited only at the reconciliation with the bank statement.
Void a card payment
On the payment, Void on Terminal voids the card transaction. Once the terminal confirms, the payment is Canceled and the invoice is open again. The button is available only before the settlement, while the payment is not matched with the bank statement. After the settlement the money has already moved: return it with a refund (a new outgoing payment, after a credit note when it is a return), not by voiding the original payment.
Card transactions and transactions to verify
Invoicing > Customers > Card Transactions lists every transaction: terminal, user, kind, amount, RRN, payment and state. A transaction whose answer was lost is To verify, in red: the card may have been charged. Do not collect the amount again.
Open the transaction and:
- click Resume to ask the driver again for the result of the same transaction; or
- after checking the last transactions on the terminal, an accounting manager clicks Mark as Approved (the payment is recorded) or Mark as Not Approved.
If the bank approved a sale but the payment could not be recorded, the transaction shows the reason; fix it and click Create Payment. The card is not charged again.
Close the day
Close the Day on the terminal runs the settlement; the Settlement transaction keeps the report of the terminal in its Receipt tab.
Simulate the answers of the terminal (Simulated protocol)
For demonstrations, training and tests, without a device.
- On a terminal with the Simulated (no device) protocol, Next Simulated Answer sets the result of the next transaction (approved, declined, insufficient funds, incorrect PIN, cancelled by the customer, approved but the answer is lost, cable unplugged, the terminal does not answer). It wins over the cents of the amount. It is used once, unless Keep the Simulated Answer is checked.
- With
deltatech_ecr_connectinstalled, the Simulation button of the top bar opens the Virtual devices panel, above the Card Payment window. The terminal section shows the screen of the terminal (the transaction, its state and message), Customer cancels (cancels the transaction in progress, as the customer pressing Cancel on the terminal), the Next answer (By amount (automatic) when empty), Until stopped and the Delay.
- Cable unplugged ends the transaction in Error, "The connection with the terminal was lost (cable unplugged)", without a payment. The terminal does not answer leaves it To verify; Resume then ends it in Error, "The terminal has no record of this transaction": the card was not charged.
20.0.1.1.3 (2026-11-27)
- Migration to Odoo 20: access rights in
ir.access(the multi-company rules kept), the payment dialog and the simulated terminal on Owl 3, the card terminal of a user editable from the user's own preferences, and the void allowed on a payment in the Paid or Reconciled state of Odoo 20.
19.0.1.1.2 (2026-11-09)
- Apps Store page generated with the Terrabit template (it had the plain README page).
19.0.1.1.1 (2026-11-07)
- Transactions made on a simulated terminal are marked Simulated (from the protocol of the terminal, never from the caller), and so are their payments (Simulated Card Payment, with a warning on the Card tab).
19.0.1.1.0 (2026-11-07)
- [ADD] Simulated terminal: Next Simulated Answer (approved, declined, insufficient funds,
incorrect PIN, cancelled by the customer, approved but the answer is lost, cable unplugged, the
terminal does not answer) and Keep the Simulated Answer. It wins over the cents of the amount;
the cable and the silent terminal are chosen only here. Test helper:
terminal._simulator_set_next("declined"). - [ADD] The terminal section of the "Virtual devices" panel (
deltatech_ecr_connect): the screen fed by the steps of the relay (terminalRelayBus), the Customer cancels button (cancels the transaction in progress), the next answer and the delay. The relay answer now carriesterminal_id.
19.0.1.0.2 (2026-11-07)
- After the cashier closes the dialog of an approved sale, the server can return a follow-up
action (
_terminal_followup_action), used by the store sale to print the fiscal receipt. - Tests: the payment wizard gets the terminal journal explicitly, so that they also pass next to
deltatech_sale_store, which leaves the journal empty by default.
19.0.1.0.1 (2026-11-06)
- The relay answer also carries the card brand and the terminal receipt (used by the Point of Sale).
19.0.1.0.0 (2026-11-06)
- First version: payment terminals, card transactions with idempotent reference, invoice payment on the terminal from Register Payment, void from the payment, settlement, terminal per user, transactions to verify with manager resolution, and a simulated protocol for tests and demonstrations.
- Transactions are changed only by the terminal actions: users have no direct write access, so the result of a card transaction cannot be forged through RPC.
- Void on Terminal only before the payment is matched with the bank statement; an approved refund no longer cancels the original payment. Accounting recommendation (5125) in the configuration notes.
- A void or a refund is checked on the server when it is created (approved sale of the same terminal, only one void, payment not matched with the bank statement), and a payment matched with the statement while the void was at the terminal is not cancelled.
- A void cancels the posted entry of the payment directly: the entry stays Cancelled with its number, which is no longer reused by the next payment.
- The simulated settlement receipt shows the number and total of the sales and voids of the batch; the Card Payment window labels the authorization code.
- Consultant sheet with screenshots (RO) and usage with screenshots (EN); the module is for invoices paid by companies (B2B), sales to individuals go through a fiscal cash register.
- Consultant sheet: recovery of an approved sale without payment (Create Payment) and two more messages in the error table.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
More apps by Terrabit
Other modules from the same publisher, built to work together. All apps →
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 1378 |
| Technical Name |
deltatech_payment_terminal |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module