Transaction Failed

Notification that a customer payment has failed.

Overview

This webhook will be sent when a failed customer payment has been attempted to one of your wallets. The reason the payment failed is indicated by the ‘ResponseEventId’ code.

Webhook notifications will not be triggered for cancelled transactions, or for payments that failed 3DS user authentication (see our Event ID codes).

Additionally, no notification will be triggered upon expiration of a payment order, but any subsequent successful payments will still trigger a webhook notification.

If you wish to test a Transaction Failed webhook, please use our Trigger a decline simulating functionality.

A customer may retry a payment (e.g. by retrying to pay using a different payment method), so a Transaction Failed webhook may be then followed by a Transaction Payment Created webhook, indicating that the customer has actually managed to pay, despite the original failure.

Consequently, please do not treat a Transaction Failed webhook as ‘final’, as a Transaction Payment Created webhook may follow, indicating a successful payment.

You should confirm the payment result with the combination of OrderCode, TransactionId and the StatusId parameters. As an extra layer of confirmation, you have the option to use Retrieve Transaction Details API.

Webhook configuration

If you are setting up an ISV integration, please see our ISV Create webhook API call

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. Choose Transaction Failed from the Event Type dropdown:

    Transaction Failed webhook

  7. Select the Active checkbox to activate notifications.

  8. Click on the Save button.

Response example

You may find below the sample response with EventTypeId 1798.

{
  "Url": "Your webhook url",
  "EventData": {
    "Moto": false,
    "BinId":41,
    "IsDcc": false,
    "Ucaf":"AJkBBCERkAAAACayl4FSdQcEZSM=",
    "Email": "jdoe@vivawallet.com",
    "Phone": "799999999999",
    "BankId": "NET_BNCT",
    "Systemic": false,
    "Switching": false,
    "ParentId": null,
    "Amount": 1000,
    "ChannelId": "245a790d-c98d-4d80-ad97-a9b1efb5771e",
    "TerminalId": 50000000,
    "MerchantId": "11ac9cd4-c9ea-48d3-b414-1f10ce664aad",
    "OrderCode": 3464811134270497,
    "ProductId": null,
    "StatusId": "E",
    "FullName": "John Doe",
    "ResellerId": null,
    "DualMessage": false,
    "InsDate": "2022-05-26T02:51:09.077",
    "TotalFee": 0,
    "CardToken": "2BFCB1FD4F000DB41CB5BA76CAFB68D76AB87752",    
    "CardNumber": "606005XXXXXX0148",
    "Descriptor": null,
    "TipAmount": 0,
    "SourceCode": "9999",
    "SourceName": "websource",
    "Latitude": null,
    "Longitude": null,
    "CompanyName": "Luxembourg Services",
    "TransactionId": "8d31eed6-bd43-4d93-b146-6e857d09c88d",
    "CompanyTitle": "Luxembourg Services",
    "PanEntryMode": "81",
    "ReferenceNumber": 66720,
    "ResponseCode": null,
    "CurrencyCode": "978",
    "OrderCulture": "en-GB",
    "MerchantTrns": null,
    "CustomerTrns": "Short description for customer",
    "IsManualRefund": false,
    "TargetPersonId": null,
    "TargetWalletId": null,
    "AcquirerApproved":false,
    "LoyaltyTriggered": false,
    "TransactionTypeId": 5,
    "AuthorizationId":"446455",
    "TotalInstallments": 0,
    "CardCountryCode": null,
    "CardIssuingBank": null,
    "RedeemedAmount": 0,
    "ClearanceDate": null,
    "ConversionRate": 1,
    "CurrentInstallment": 0,
    "OriginalAmount": 99.06,
    "Tags": [
      "string 1",
      "string 2",
      "string 3"
    ],
    "BillId": null,
    "ConnectedAccountId":null,
    "ResellerSourceCode": null,
    "ResellerSourceName": null,
    "MerchantCategoryCode": 7995,
    "ResellerCompanyName": null,
    "CardUniqueReference": "347E552560C0FD1CB31D3123CB060BC763421803",
    "OriginalCurrencyCode": "978",
    "ExternalTransactionId":null,     
    "ResellerSourceAddress": null,
    "CardExpirationDate": "2022-11-30T00:00:00",
    "ServiceId":null,
    "RetrievalReferenceNumber": null,
    "AssignedMerchantUsers": [],
    "AssignedResellerUsers": [],
    "CardTypeId": 6,
    "ResponseEventId": 310,
    "ElectronicCommerceIndicator": 5,
    "OrderServiceId":0,
    "ApplicationIdentifierTerminal": null,
    "IntegrationId": null,
    "DigitalWalletId": null,
    "DccSessionId": null,
    "DccMarkup": null,
    "DccDifferenceOverEcb": null
  },
  "Created": "2022-05-25T23:51:09.1255633Z",
  "CorrelationId": "22-145-E823540F",
  "EventTypeId": 1798,
  "Delay": null,
  "MessageId": "b2b46d3c-5bdb-4622-b281-d105616033bb",
  "RecipientId": "11ac9cd4-c9ea-48d3-b414-1f10ce664aad",
  "MessageTypeId": 512

Webhook body

You can find below the body parameters of this webhook

Parameter Description Example
Moto True/False, Indicates if the card details were entered by a third person or by customers themselves false
BinId Internal information related to the card schemes, routing and payment flow used 43
IsDcc Specified if this transaction took place through Dynamic Currency Conversion (DCC) true
Ucaf Transports authentication data from party to party in online transactions - contains values when a transaction is passing from 3DS null
Email Customer email "customer email"
Phone Phone number of the customer null
BankId Schema NET_VISA
Systemic If true, this is a transaction which was not initiated by the merchant or by the customer. Instead, this was a system-initiated transaction (for edge cases, e.g. Bancontact) false
Switching If the transaction is a switching transaction false
ParentId The parent TransactionId (if any) of the current transaction null
Amount The signed amount of the transaction. Represents the total funds paid by the customer and includes TotalFee 99.05
ChannelId Woocommerce, shopify, smart checkout, api, pos etc. 245a790d-c98d-4d80-ad97-a9b1efb5771e
TerminalId Id of the POS if it is a physical payment 90000000
MerchantId The MerchantId of the Merchant bdf4c6b3-c26d-4046-b5df-5c443ec39d09
OrderCode The OrderCode of the transaction 5039420255772601
ProductId If not empty, wallet refill null
StatusId The status of the transaction E
FullName Customer Fullname George Smith
ResellerId The ResellerId of the Reseller (if any) that received the payment null
DualMessage Internal information related to the card schemes, routing and payment flow used false
InsDate The date and time the transaction took place 2021-11-04T17:06:02.153
TotalFee The signed fees that apply to the transaction (e.g. if paid through reseller network) 0
CardToken The Token of the card 2BFCB1FD4F000DB41CB5BA76CAFB68D76AB87752
CardNumber The card number used (applicable for card related transaction types) 414746XXXXXX0133
Descriptor The descriptor displayed on both the bank statement and the 3DS verification page. MerchantX Descriptor
TipAmount The amount for the tip which is linked with the payment order 0
SourceCode The SourceCode of the Merchant used for the transaction 8362
SourceName The Merchant's source name Test
Latitude If physical source, GPS coordinates null
Longitude If physical source, GPS coordinates null
CompanyName The company name of the Merchant Payment Services
TransactionId The TransactionId of the transaction 92e0debb-fdf4-4392-a940-290b0c62ea6b
CompanyTitle Business Title Payment Services
PanEntryMode Indicates the method used for PAN entry to initiate a transaction. You may find all the POS Entry Modes here. 01
ReferenceNumber Used by card schemes to identify a transaction (created by us) 981049
ResponseCode The response code of the transaction 05
CurrencyCode The currency of the transaction in ISO 4217 numeric format (e.g. “978” for Euro) 978
OrderCulture The language (culture) of the order el-GR
MerchantTrns The MerchantTrns property as set during the creation of the Order Short description of items/services purchased by customer with card installments
CustomerTrns The CustomerTrns property as set during the creation of the Order Carpet Cleaning Services
IsManualRefund Internal process false
TargetPersonId The target logged-in user of the transaction (e.g. for wallet payments, this is the wallet owner id) null
TargetWalletId The target wallet of the transaction null
AcquirerApproved Applies to offline POS using SAF (Store And Forward) and approved locally. When back online, POS sends list of transactions to Viva with this parameter being used to record approved status false
LoyaltyTriggered If the customer paid using loyalty points in addition to the charge false
TransactionTypeId The type of transaction 5
AuthorizationId Unique authorization number for the transaction provided by issuer 471543
TotalInstallments The total card installments of the transaction 0
CardCountryCode The country the card was issued from SG
CardIssuingBank The bank the card was issued from CITIBANK
RedeemedAmount This has to do with loyalty, it is the amount redeemed using points 0
ClearanceDate The day of the clearence null
ConversionRate The ratio between two currencies used in foreign exchange markets 1
CurrentInstallment The current card installment ordinal (use in relation with TotalInstallments parameter) 0
OriginalAmount The amount that paid in the difference currency 120
Tags Information that Merchant inputs "tag sample string 1"
"tag sample string 2"
"tag sample string 3"
BillId The id of the bill payment (if the transaction is a bill payment transaction) null
ConnectedAccountId The ConnectedAccountId (where applicable such as in ISV schema and marketplaces) to which the transaction is linked null
ResellerSourceCode The SourceCode of the source of the Reseller (if any) that received the payment null
ResellerSourceName The name of the Reseller (if any) that received the payment null
MerchantCategoryCode The MCC of the merchant, denoting their business type 8999
ResellerCompanyName The name of the Reseller (if any) that received the payment null
CardUniqueReference The Token of the card 2BFCB1FD4F000DB41CB5BA76CAFB68D76AB87752
OriginalCurrencyCode The currency to which the transaction finally paid 826
ExternalTransactionId Contains the unique identifier of the transaction for the payment method used (e.g. BlueCode, Blik, Click2Pay) null
ResellerSourceAddress The address of the source of the Reseller (if any) that received the payment null
CardExpirationDate The expiration date of the card used 2022-01-31T00:00:00
ServiceId (int) A way to differentiate services, used for certain types of transactions. Possible values are:

-1 = Invalid
0 = WebCheckOut
4 = EmailCheckOut
6 = SendMoneyGambling
7 = MobileTopUp
8 = Voucher
9 = Collection
10 = BillPayment
14 = PayOut
15 = ManualCashDisbursement
16 = Withdrawal
17 = GiftCard
18 = SendMoneyMerchantRebate
19 = SendMoneyFastRefund
RetrievalReferenceNumber Used to retrieve the trn from external systems "124507944981"
AssignedMerchantUsers Merchants assigned to the source of the transaction []
AssignedResellerUsers Resellers assigned to the source of the transaction []
CardTypeId You may find below the possible values:

  • 0 = Visa
  • 1 = Mastercard
  • 2 = Diners
  • 3 = Amex
  • 4 = Invalid
  • 5 = Unknown
  • 6 = Maestro
  • 7 = Discover
  • 8 = JCB
  • 0
    ResponseEventId The internal EventId of the transaction, used for INTERNAL OPERATIONS loyalty, ctap, bancontact advices. null
    ElectronicCommerceIndicator The value returned by the Directory Server indicating the outcome of authentication requested on transactions for EMV® 3-D Secure.

    You may find all the possible values here
    5
    OrderServiceId The ServiceId of the order 0
    ApplicationIdentifierTerminal The Application Identifier Terminal

    You may find the list of AIDs here
    A0000000031010
    IntegrationId Identification of the type of request that triggered from backend when Oracle OPI integration take place.
    You may find below the possible values:

  • 0 = Invalid
  • 1 = OpiFoodAndBeverage
  • 2 = OpiHospitality
  • null
  • null
    DigitalWalletId Identification id if an e-commerce transaction paid through any digital wallet Possible values are:

    2 = Apple Pay
    3 = Google Pay
    4 = Samsung Pay
    6 = MobilePay Online
    DccSessionId The session ID that remarked with the DCC transaction 030aafe3-9e73-4d22-998f-07b3056c28c4
    DccMarkup The markup fee that applied to the merchant and included in the exchange rate 9.87
    DccDifferenceOverEcb The difference of the rate that exists between Global Blue and European Central Bank 1.15

    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!