Order Updated

Notification that an order code has been cancelled.

Overview

This webhook will be sent when an order’s status has been cancelled - either via Smart Checkout’s cancel (back) button or via API

You should check IsCancelled parameter to verify whether the order code is cancelled or not. The relevant order code is mentioned with OrderCode parameter in the payload.

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

Order Updated webhook

7. Select the Active checkbox to activate notifications

8. Click on the Save button

In order to activate Cancel button on Smart Checkout, please follow this guide.

Response example

You may find below the sample response with EventTypeId 4865.

{
    "Url": "your-webhook-url",
    "EventData":
    {
        "Email": "johndoe@vivawallet.com",
        "Amount": 10.00,
        "OrderCode": 6727479629472606,
        "MerchantId": "512344-d8f2-4024-6343-8de7396a9f5e",
        "FullName": "John Doe",
        "SourceCode": "Default",
        "IsCancelled": true,
        "Tags":
        [
            "Sample tag 1",
            "Sample tag 2",
            "Sample tag 3"
        ],
        "Redeemed": null,
        "CurrencyCode": "978",
        "MerchantTrns": "Short description of items/services purchased by customer",
        "CustomerTrns": "Short description of purchased items/services to display to your customer",
        "MaxInstallments": 0,
        "TargetPersonId": null,
        "TargetWalletId": null,
        "DisablePaidState": false,
        "TargetWalletName": null,
        "ExpirationDate": "2023-10-11T19:05:27.48",
        "ServiceId": 0
    },
    "Created": "2023-10-11T15:15:56.2625208Z",
    "CorrelationId": "23-284-4A24B692",
    "EventTypeId": 4865,
    "Delay": null,
    "MessageId": "bf5972bc-4809-4dcb-a999-24ba91d55b56",
    "RecipientId": "d66d9aae-d8f2-4024-9131-8de7396a9f5e",
    "MessageTypeId": 512
}

Webhook body

You can find below the body parameters of this webhook

Parameter Description Example
Url (string) Your webhook URL "Your webhook URL"
Email (string) Customer email "customer@example.com"
Amount (decimal) The signed amount of the transaction. Represents the total funds paid by the customer and includes TotalFee 10
OrderCode (long) The OrderCode of the transaction 6727479629472606
FullName (string) Customer Fullname "Customer name"
MerchantId (uuid) The MerchantId of the Merchant "512344-d8f2-4024-6343-8de7396a9f5e"
FullName (string) Customer Fullname "Customer name"
SourceCode (string) The SourceCode of the Merchant used for the transaction "8362"
IsCancelled (boolean) The cancellation status of the order true
Tags (arrayOfStrings) Information that Merchant inputs "tag sample string 1"
"tag sample string 2"
"tag sample string 3"
Redeemed Deprecated parameter null
CurrencyCode (string) The currency of the transaction in ISO 4217 numeric format (e.g. “978” for Euro) "978"
MerchantTrns (string) The MerchantTrns property as set during the creation of the Order "Short description of items/services purchased by customer"
CustomerTrns (string) The CustomerTrns property as set during the creation of the Order "Short description of items/services purchased to display to your customer"
MaxInstallments (integer) Number of installments of the order 0
TargetPersonId (uuid) The target logged-in user of the order (e.g. for wallet payments, this is the wallet owner id) null
TargetWalletId (int64) The target wallet of the order null
DisablePaidState (boolean) States the order's ability to accept multiple payments (`true`) or not (`false`) false
TargetWalletName(string) The target wallet name of the order null
ExpirationDate (string) The expiration date of the order "2023-10-11T19:05:27.48"
ServiceId (integer) The service id defined on an order 0
Created (datetime) Order update event's timestamp "2023-10-11T15:15:56.2625208Z"
CorrelationId (uuid) Internal Id to track the request flow for debug reasons "23-284-4A24B692"
Delay (string) Delay timespan for messages that are sent at a future date and not instantly null
MessageId (uuid) Unique identifier of the message "bf5972bc-4809-4dcb-a999-24ba91d55b56"
RecipientId (uuid) The recipient of the webhook (in this case the merchant) "d66d9aae-d8f2-4024-9131-8de7396a9f5e"
MessageTypeId (int) The type of the message, this will always be webhook for the merchants 0x200 or 0x201 in hex. 512

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!