Overview
When integrating your Electronic Cash Register (ECR) with Maya Terminals, every transaction sent through the ECR interface returns a status code.
This status represents the current state or result of the transaction and helps your system determine what action to take next.
This guide outlines all supported ECR command statuses, their meanings, and the recommended actions to ensure smooth transaction handling.
Supported ECR Command Statuses
Below are the possible statuses returned by the Maya Terminal when processing ECR commands.
| Status | Meaning | Description | Recommended Action |
|---|---|---|---|
P | Transaction in progress | The terminal is processing the payment and waiting for completion. | Wait until the transaction is completed. Do NOT restart or cancel the transaction. |
A | Accepted or the transaction was approved | The transaction was processed successfully and accepted by the Maya Terminal. | No action needed. Proceed with post-payment steps such as printing receipts or updating records. |
V | Voided | The payment has already been voided and cannot be processed again. | Do not retry the same transaction. If needed, initiate a new sale transaction. |
R | Rejected, or the transaction failed | The payment was declined by the issuer or processor. | Notify the customer and request another card or payment method. Review the terminal for the decline reason. See Understanding Errors in ECR Integration |
C | Cancelled | The transaction was cancelled due to a timeout, user action, invalid amount, or expired card. See Handling Cancellation in ECR-Integrated Terminal | You may retry the transaction once the cause is resolved (e.g., reconnect, re-enter the amount, retry the card). |
Getting the ECR Command Statuses
Status values are included in the serial COM data response from the terminal. Check the data.status field to identify the transaction’s outcome and handle it accordingly.
Example:
"status": "A"
In this example, A means the transaction was Accepted.
Sample JSON Responses
Status C (Cancelled)
C (Cancelled)Sample response when the user cancels the transaction by pressing the Back button on the card wait screen:
{
"data": {
"responseText": "User Cancelled",
"status": "C",
"txnType": "sale"
},
"dataType": "trans"
}
Status R (Rejected)
R (Rejected)Sample response when the card was not read properly or the transaction failed:
{
"data": {
"responseText": "Transaction Aborted",
"status": "R",
"txnType": "sale"
},
"dataType": "trans"
}
FAQs
Q: Can I retry a transaction that was cancelled (Status C)?
C)?A: Yes. Once the cause (e.g., connection loss, invalid input) is fixed, you can safely retry the transaction.
Q: What should I do when a transaction is rejected (Status R)?
R)?A: Inform the customer that the transaction failed and advise them to use another payment method. If rejection persists, email [email protected] and provide the following:
- Merchant Name
- MID (Merchant ID)
- Maya Terminal Model and Serial Number
- Details/background of the problem
Q: Is there a difference between Voided (V) and Cancelled (C)?
V) and Cancelled (C)?Answer:
Yes. They are different:
- Voided (V): The transaction has already been reversed and is no longer valid.
- Cancelled (C): The transaction was stopped before completion and can be retried.
Q: Can multiple statuses occur in a single transaction?
A: No. Each transaction has only one final status (A, V, R, or C). You may receive an interim P (Processing) before it transitions to its final state.
Next Steps
- Review the ECR Interface Specifications to understand how to parse responses and map statuses in your application.
- Implement proper error handling in your ECR system based on returned statuses.
- Test all transaction flows Using the ECR Simulator Tool before deployment.
