Transaction Pos Ecr Session Failed

Notification that a transaction for the ECR session has been failed, cancelled, timed out or aborted and the payment could not be captured.

Overview

This webhook is triggered when a session is failed, cancelled, timed out or aborted. It confirms that the payment associated with the session could not be captured.

The webhook will contain relevant data that you can retrieve using the Session Retrieval API call, allowing you to access detailed information about the session and transaction.

You should confirm the payment result with the combination of SessionId and TerminalId parameters. You should then check the Success parameter to validate the status of the transaction and the Amount to validate the amount received, before updating a transaction’s status on your system. As an extra layer of confirmation, you have the option to use the Retrieve Transaction API

Webhook configuration

To enable within the Viva banking app:

1. Log in to Viva, demo or live , and select the required account

2. Visit Settings > API Access > Webhooks

3. Click on the Create Webhook link.
The New Webhook dialog box is displayed

4. Enter your webhook URL in the URL field

5. Click on the Verify link.
If verified successfully, a confirmation message is displayed

6. Contact Viva.com to proceed with the configuration.

Response example

You may find below the sample response with EventTypeId 1803.

{
    "Url": "Your Webhook Url",
    "EventData":
    {
        "Aid": "A0000000041010",
        "Tid": "16003510",
        "Amount": 9905,
        "EventId": 1006,
        "Preauth": false,
        "Success": false,
        "Message": "Transaction declined by server",
        "SessionId": "eb31f877-64f7-4519-9ced-a4d37e065cbd",
        "TipAmount": 0,
        "MerchantId": "51638f3b-4d32-4837-a47d-b6917953a183",
        "OrderCode": "4313168927003510",
        "Installments": 0,
        "TerminalId": "16003510",
        "AbortSuccess": false,
        "AbortOperation": false,
        "CurrencyCode": "978",
        "PanEntryMode": "07",
        "TransactionId": "52b2beb0-ec3f-4c34-b608-a791ef6b6dc0",
        "ReferenceNumber": 562654,
        "CashRegisterId": "TEST1010ID",
        "DccDetails": null,
        "ShortOrderCode": "4313168927",
        "TransactionTypeId": null,
        "AuthorizationId": null,
        "ApplicationLabel": "DEBIT MASTERCARD",
        "LoyaltyInfo": null,
        "AadeTransactionId": null,
        "MerchantReference": "some-reference",
        "VerificationMethod": "CONTACTLESS - NO CVM",
        "AbortAckTime": null,
        "RetrievalReferenceNumber": 431316562654,
        "PrimaryAccountNumberMasked": "528539******5449",
        "TransactionDateTime": "2024-11-08T16:59:14.35+00:00"
    },
    "Created": "2024-11-08T16:59:29.8440518Z",
    "CorrelationId": "24-313-CF379B9A5847",
    "EventTypeId": 1803,
    "Delay": null,
    "RetryCount": 0,
    "RetryDelay": null,
    "MessageId": "d062c44f-5c27-4f5e-b415-9d9f6054d179",
    "RecipientId": "51638f3b-4d32-4837-a47d-b6917953a183",
    "MessageTypeId": 512
}

To see the full list of EventId, please check the section Error Ids under the EFT POS API documentation.

Webhook body

You can find below the body parameters of this webhook

Parameter Description Example
Aid A string indicating the AID of the card. (Used in successful receipts) A000000003101001
Tid The ID of the terminal, as returned in the transaction response 16031291
Amount Total amount authorized, including tip amount 1220
EventId Indicates the error code associated with the transaction. For a complete list of Event IDs and their corresponding error details, please refer to section Error Ids under the EFT POS API documentation. 1000
Preauth Boolean flag indicating a preauth false
Success Indicates successful authorization result true
Message Description of the status Transaction successful
SessionId Transaction session identification - set by the merchant 4bdebe62-c211-4ca0-a994-b2fbea2061c5
TipAmount The amount for the tip which is linked with the payment order 50
MerchantId The MerchantId of the Merchant bdf4c6b3-c26d-4046-b5df-5c443ec39d09
OrderCode Order code of completed sale transaction 2329122555031291
Installments Number of card installments 0
TerminalId The ID of the target terminal, as sent in the original request 16000010
AbortSuccess Indicates whether status of abort operation was successful false
AbortOperation Indicates if this transaction should be aborted false
CurrencyCode The numeric code of the order's currency as defined in ISO 4217 978
PanEntryMode Indicates the method used for PAN entry to initiate a transaction.
For a complete list of PanEntryMode and their corresponding details, please refer to this section.
07
TransactionId Transaction identification value 580e0bfc-ad68-420f-af02-2900fb74496a
AbortAckTime Timestamp indicating when the POS retrieved the request to abort transaction
CashRegisterId Cash register identification - set by the merchant XDE384678UY
MerchantReference Free text value used by the merchant to reference the transaction for their own records some-reference
AuthorizationId Authorization Id response from the authorizing institution 266207
TransactionTypeId Transaction type: 5 - sale / 4 - refund / 7 - reversal
For a complete list of TransactionTypeId and their corresponding details, please refer to this section.
5
RetrievalReferenceNumber Unique transaction identification 206922748800
ApplicationLabel Selected application label, VISA / AMEX etc VISA Debit
PrimaryAccountNumberMasked Masked PAN number 479275XXXXXX9999
TransactionDateTime Transaction date time in ISO 8601 format 2022-03-11 19:34:58.0163 +02:00
LoyaltyInfo Details about the loyalty program associated with the transaction.(For merchants located in Greece)
VerificationMethod The payment verification method used CONTACTLESS - NO CVM
ShortOrderCode 10-digit integer 2328182546
ReferenceNumber STAN number 325495
AadeTransactionId An AADE-specific transaction ID
DccDetails Details about currency conversion

Get Support

If you would like to integrate with Viva, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!